/* =========================
   BASE
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
  -webkit-touch-callout: none;
  -webkit-overflow-scrolling: touch;
}

.bim-workspace__diagnostics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  flex: 0 1 600px;
  flex-wrap: wrap;
  text-align: right;
}

.bim-workspace__diagnostics[hidden],
.bim-workspace__diagnostic-warning[hidden],
.bim-workspace__normalize[hidden],
.bim-workspace__normalized-badge[hidden] {
  display: none !important;
}

.bim-workspace__diagnostic-warning {
  max-width: clamp(320px, 32vw, 500px);
  color: #fbbf24;
  font-size: 11px;
  line-height: 1.3;
}

.bim-workspace__normalize,
.bim-workspace__normalize.lg-btn,
.bim-workspace__normalize.lg-btn--pill {
  width: auto;
  min-width: 0 !important;
  min-height: 26px !important;
  padding: 0 9px !important;
  border-radius: 999px;
}

.bim-workspace__normalize .lg-btn__label {
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.bim-workspace__normalize .lg-btn__glow {
  display: none;
}

.bim-workspace__normalized-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 700;
}

:root {
  --site-frame-width: 1250px;
  --site-header-height: 86.49px;
  --site-footer-height: 132.5px;
  --mobile-bottom-nav-height: 88px;
  --mobile-content-bottom-space: calc(var(--mobile-bottom-nav-height) + max(22px, env(safe-area-inset-bottom, 0px)));
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  background-attachment: fixed;
  color: #f1f5f9;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

body.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

html.scope-scroll-locked,
body.scope-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none;
}

body.scope-scroll-locked {
  position: fixed !important;
  left: 0;
  right: 0;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: #0f172a;
  }

  body {
    background-attachment: scroll;
  }
}

.lg-filter-defs {
  width: 0;
  height: 0;
  overflow: hidden;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   LAYOUT
   ========================= */

main {
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

body.home-page > main {
  flex: 1 0 auto;
  width: 100%;
}

/* =========================
   HEADER - iOS Liquid Glass Style
   ========================= */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: var(--site-header-height);
  padding: 20px max(20px, calc((100vw - var(--site-frame-width)) / 2)) 18px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: none;
  box-shadow: none;
  position: static;
  top: auto;
  z-index: 100;
  gap: 16px;
  overflow: hidden;
  max-width: 100vw;
  /* SF Pro шрифт */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  transition: transform 200ms ease, opacity 200ms ease;
  pointer-events: none;
  box-sizing: border-box;
}

header.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  pointer-events: auto;
}

.brand:hover {
  transform: none;
  text-decoration: none;
}

.brand-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(96, 165, 250, 0.3));
  transition: all 0.3s ease;
}

.brand:hover .brand-icon {
  filter: drop-shadow(0 4px 8px rgba(96, 165, 250, 0.5));
  transform: none;
}

.brand-brick {
  fill: #60a5fa;
  stroke: #3b82f6;
  stroke-width: 0.5;
  transition: all 0.3s ease;
}

.brand:hover .brand-brick {
  fill: #3b82f6;
  stroke: #2563eb;
}

/* Анимация кирпичей при наведении - волна */
.brand:hover .brand-brick-1 {
  animation: brickWave 0.6s ease 0s;
}

.brand:hover .brand-brick-2 {
  animation: brickWave 0.6s ease 0.05s;
}

.brand:hover .brand-brick-3 {
  animation: brickWave 0.6s ease 0.1s;
}

.brand:hover .brand-brick-4 {
  animation: brickWave 0.6s ease 0.15s;
}

.brand:hover .brand-brick-5 {
  animation: brickWave 0.6s ease 0.2s;
}

.brand:hover .brand-brick-6 {
  animation: brickWave 0.6s ease 0.25s;
}

.brand:hover .brand-brick-7 {
  animation: brickWave 0.6s ease 0.3s;
}

.brand:hover .brand-brick-8 {
  animation: brickWave 0.6s ease 0.35s;
}

.brand:hover .brand-brick-9 {
  animation: brickWave 0.6s ease 0.4s;
}

.brand:hover .brand-brick-10 {
  animation: brickWave 0.6s ease 0.45s;
}

@keyframes brickWave {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  max-width: 100%;
  pointer-events: auto;
  margin-left: auto;
  margin-right: 8px;
}

.header-date-input {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  width: 140px;
}

.header-date-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.header-date-input:focus {
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Универсальные кнопки-иконки для header - iOS Liquid Glass */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  box-sizing: border-box;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
  /* Liquid Glass background */
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: none;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
  animation: none;
}

.header-icon-btn:hover {
  transform: none;
}

.header-icon-btn:active {
  transform: none;
  transition: none;
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.8;
  display: block;
}

.header-profile-icon {
  width: 22px;
  height: 22px;
}

.header-profile-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.header-profile-avatar[hidden] {
  display: none;
}

.header-icon-btn.has-avatar {
  overflow: hidden;
}

.header-icon-btn.has-avatar .header-profile-icon {
  display: none;
}

/* Кнопка переключения темы */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  transform: none;
}

.theme-toggle-btn:active {
  transform: none;
  transition: none;
}

/* Иконка */
.theme-toggle-icon {
  display: block;
  transition: none;
  font-style: normal;
  line-height: 1;
  font-size: 18px;
}

/* Анимация при смене */
.theme-toggle-btn.animating .theme-toggle-icon {
  animation: none;
}

@keyframes theme-spin {
  0%   { transform: rotate(0deg) scale(1);   opacity: 1; }
  40%  { transform: rotate(180deg) scale(0); opacity: 0; }
  60%  { transform: rotate(180deg) scale(0); opacity: 0; }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

/* Светлая тема */
body.theme-light .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #1e293b;
}

body.theme-light .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Активная кнопка (текущая страница) - iOS systemBlue */
.header-icon-btn--active {
  background: linear-gradient(
    135deg,
    rgba(10, 132, 255, 0.25) 0%,
    rgba(10, 132, 255, 0.1) 100%
  );
  border-color: rgba(10, 132, 255, 0.4);
  color: #0A84FF;
  cursor: default;
  box-shadow: 
    0 2px 8px rgba(10, 132, 255, 0.2),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

.header-icon-btn--active:hover {
  transform: none;
  background: linear-gradient(
    135deg,
    rgba(10, 132, 255, 0.25) 0%,
    rgba(10, 132, 255, 0.1) 100%
  );
  border-color: rgba(10, 132, 255, 0.4);
  color: #0A84FF;
}

/* Кнопка выхода - iOS systemRed */
.header-icon-btn--danger {
  border-color: rgba(255, 69, 58, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 69, 58, 0.2) 0%,
    rgba(255, 69, 58, 0.08) 100%
  );
  color: #FF453A;
}

.header-icon-btn--danger:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 69, 58, 0.2) 0%,
    rgba(255, 69, 58, 0.08) 100%
  );
  border-color: rgba(255, 69, 58, 0.3);
  color: #FF453A;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}

/* Светлая тема - Header кнопки */
body.theme-light .header-icon-btn {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.6);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .header-icon-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.04) 100%
  );
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.8);
}

body.theme-light .header-icon-btn--active {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.15) 0%,
    rgba(0, 122, 255, 0.05) 100%
  );
  border-color: rgba(0, 122, 255, 0.3);
  color: #007AFF;
}

body.theme-light .header-icon-btn--danger {
  background: linear-gradient(
    135deg,
    rgba(255, 59, 48, 0.12) 0%,
    rgba(255, 59, 48, 0.04) 100%
  );
  border-color: rgba(255, 59, 48, 0.2);
  color: #FF3B30;
}

/* =========================
   TOP CONTROLS
   ========================= */


.controls > div::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #60a5fa;
  transition: width 0.3s ease;
}

.controls > div:focus-within::after {
  width: 100%;
}

.meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================
   INPUTS / SELECTS
   ========================= */

input,
select,
button {
  font-family: inherit;
}

input {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 10px 14px;
  padding-right: 14px;
  font-size: 14px;
  min-width: 190px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  min-height: 44px; /* Touch-friendly размер */
  touch-action: manipulation; /* Убирает задержку двойного тапа */
}

/* Улучшенная поддержка автозаполнения на мобильных */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-text-fill-color: #f1f5f9 !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.08) inset !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
  transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
}

/* Дополнительная защита от белого фона при autofill */
input:-webkit-autofill::first-line,
textarea:-webkit-autofill::first-line,
select:-webkit-autofill::first-line {
  color: #f1f5f9 !important;
}

body:not(.theme-light) #geomPlateOpeningSizes,
body:not(.theme-light) #geomPlateFactOpeningSizes,
body:not(.theme-light) .geom-wall-projOpeningSizes,
body:not(.theme-light) .geom-wall-factOpeningSizes {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
}

body:not(.theme-light) #geomPlateOpeningSizes::placeholder,
body:not(.theme-light) #geomPlateFactOpeningSizes::placeholder,
body:not(.theme-light) .geom-wall-projOpeningSizes::placeholder,
body:not(.theme-light) .geom-wall-factOpeningSizes::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

body:not(.theme-light) #geomPlateOpeningSizes::-webkit-input-placeholder,
body:not(.theme-light) #geomPlateFactOpeningSizes::-webkit-input-placeholder,
body:not(.theme-light) .geom-wall-projOpeningSizes::-webkit-input-placeholder,
body:not(.theme-light) .geom-wall-factOpeningSizes::-webkit-input-placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

body:not(.theme-light) #geomPlateOpeningSizes:-webkit-autofill,
body:not(.theme-light) #geomPlateOpeningSizes:-webkit-autofill:hover,
body:not(.theme-light) #geomPlateOpeningSizes:-webkit-autofill:focus,
body:not(.theme-light) #geomPlateFactOpeningSizes:-webkit-autofill,
body:not(.theme-light) #geomPlateFactOpeningSizes:-webkit-autofill:hover,
body:not(.theme-light) #geomPlateFactOpeningSizes:-webkit-autofill:focus,
body:not(.theme-light) .geom-wall-projOpeningSizes:-webkit-autofill,
body:not(.theme-light) .geom-wall-projOpeningSizes:-webkit-autofill:hover,
body:not(.theme-light) .geom-wall-projOpeningSizes:-webkit-autofill:focus,
body:not(.theme-light) .geom-wall-factOpeningSizes:-webkit-autofill,
body:not(.theme-light) .geom-wall-factOpeningSizes:-webkit-autofill:hover,
body:not(.theme-light) .geom-wall-factOpeningSizes:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1f5f9 !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.08) inset !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  caret-color: #f1f5f9 !important;
}

/* =========================
   UI SELECT (единый стиль для всех select)
   ========================= */

.ui-select,
select {
  background: #2f3747 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f1f5f9 !important;
  padding: 12px 16px;
  padding-right: 40px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-sizing: border-box;
  appearance: menulist;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  /* Светлая стрелка (caret) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
}

.ui-select:hover,
select:hover {
  background: #2f3747 !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ui-select:focus,
select:focus {
  outline: none !important;
  background: #3d4757 !important;
  border-color: #60a5fa;
  box-shadow: 
    0 2px 8px rgba(96, 165, 250, 0.15),
    0 0 0 2px rgba(96, 165, 250, 0.08);
  /* Акцентная стрелка при фокусе */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2360a5fa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  /* При открытии dropdown должен быть поверх всего */
  z-index: 1000;
}

.ui-select:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #1e293b !important;
}

input::placeholder,
select::placeholder {
  color: #64748b;
}

input:focus {
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 16px rgba(96, 165, 250, 0.2),
    0 0 0 3px rgba(96, 165, 250, 0.1);
  transform: translateY(-1px);
}

/* Убираем стандартный браузерный focus для select - делаем его как продолжение input */
select:focus {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2360a5fa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  /* Мягкая акцентная рамка, как у input, без яркого синего фона */
  box-shadow: 
    0 2px 8px rgba(96, 165, 250, 0.15),
    0 0 0 2px rgba(96, 165, 250, 0.08);
  /* Убираем transform, чтобы dropdown визуально продолжал input */
  transform: none;
}

input:hover:not(:focus):not(:disabled) {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

select:hover:not(:focus):not(:disabled) {
  border-color: rgba(255, 255, 255, 0.1);
  background-color: #2f3747;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: none;
  transition: none;
  /* Стрелка остается без изменений при hover */
}

input:invalid:not(:placeholder-shown) {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

input:valid:not(:placeholder-shown):not([type="text"]):not(#projX):not(#projY):not(#projH) {
  border-color: #34d399;
}

input:disabled,
select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

input[readonly],
input[readonly]:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  opacity: 1;
  cursor: default;
}

input[type="number"] {
  min-width: 130px;
  padding-right: 14px;
}

input[type="date"] {
  padding-right: 14px;
}

/* =========================
   DATEPICKER STYLING
   ========================= */

/* Стилизация иконки календаря */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.7) brightness(0.9);
  opacity: 0.55;
  transition: opacity 0.2s ease;
  width: 18px;
  height: 18px;
  padding: 2px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.55;
  filter: invert(0.7) brightness(0.9);
}

/* Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.7) brightness(0.9);
  opacity: 0.55;
}

/* Стилизация полей даты в инпуте (Chrome/Edge) */
input[type="date"]::-webkit-datetime-edit {
  color: #f1f5f9;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  color: #f1f5f9;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: #94a3b8;
  padding: 0 4px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: #f1f5f9;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  border-radius: 4px;
}

/* Попытка стилизации попапа календаря через CSS переменные и глобальные стили */
/* Примечание: нативный datepicker рендерится в shadow DOM и имеет очень ограниченные возможности стилизации */
/* Для полной кастомизации (фон попапа, кнопки навигации, выбранный день) потребуется JavaScript библиотека */

/* Глобальные стили для элементов календаря (работают только если браузер позволяет) */
* {
  /* Переменные для календаря */
  --datepicker-bg: #020b1b;
  --datepicker-border: #111827;
  --datepicker-text: #f1f5f9;
  --datepicker-accent: #60a5fa;
  --datepicker-hover: rgba(96, 165, 250, 0.2);
  --datepicker-selected: rgba(96, 165, 250, 0.3);
}

/* Попытка стилизации через user agent stylesheet injection */
/* Это работает только если браузер поддерживает и позволяет доступ к shadow DOM */

/* Стилизация option для select */
select option {
  background: #2f3747;
  color: #f1f5f9;
  padding: 12px 16px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 400;
  border: none;
  line-height: 1.5;
}

/* Выбранный пункт - мягкий акцент */
select option:checked {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  font-weight: 500;
}

/* =========================
   CUSTOM DROPDOWN COMPONENT
   ========================= */

body.theme-light .bim-import-meta {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 14px 28px rgba(15, 23, 42, 0.08);
}

body.theme-light .bim-import-file-state {
  color: #0f172a;
}

body.theme-light .bim-import-status {
  color: #64748b;
}

/* =========================
   SUMMARY (ИТОГ)
   ========================= */

/* =========================
   CONTROL PLAN / ITP
   ========================= */

.control-plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.control-plan-metric {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.control-plan-metric span {
  color: #9fb0c6;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.control-plan-metric strong {
  color: #f8fafc;
  font-size: 22px;
  line-height: 1;
}

.control-plan-panel {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.032) 100%),
    rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 32px rgba(2, 6, 23, 0.18);
}

.control-plan-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.control-plan-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#btnControlPlanRefresh.btn-small,
#btnControlPlanExportCsv.btn-small,
#btnControlPlanExportPdf.btn-small {
  width: auto;
  min-width: 74px;
  max-width: 168px;
  min-height: 36px;
  padding: 8px 14px;
  align-self: flex-start;
}

#btnControlPlanRefresh.btn-small {
  min-width: 112px;
}

.control-plan-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.control-plan-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.control-plan-filter-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.28);
  color: #cbd5e1;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  transform: none !important;
}

.control-plan-filter-btn.is-active {
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
}

.control-plan-search {
  width: min(320px, 100%);
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.32);
  color: #f8fafc;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.control-plan-search::placeholder {
  color: #94a3b8;
}

.control-plan-title {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.25;
}

.control-plan-description {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.35;
}

.control-plan-empty {
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.24);
  border: 1px dashed rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
}

.control-plan-table-wrap {
  max-height: 420px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.control-plan-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.control-plan-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  background: #111827;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.control-plan-table td {
  padding: 9px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #dbe5f2;
  font-size: 12px;
  vertical-align: top;
}

.control-plan-construction details {
  min-width: 260px;
}

.control-plan-construction summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  list-style: none;
}

.control-plan-construction summary::-webkit-details-marker {
  display: none;
}

.control-plan-construction strong {
  color: #f8fafc;
  font-size: 13px;
}

.control-plan-construction span {
  color: #9fb0c6;
  font-size: 11px;
}

.control-plan-status,
.control-plan-task,
.control-plan-progress,
.control-plan-next-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(148, 163, 184, 0.12);
  color: #dbe5f2;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  transform: none !important;
}

.control-plan-task,
.control-plan-next-action {
  cursor: pointer;
}

.control-plan-task:hover,
.control-plan-next-action:hover {
  border-color: rgba(147, 197, 253, 0.62);
  filter: brightness(1.08);
}

.control-plan-status--ready,
.control-plan-task--done,
.control-plan-task--resolved {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(22, 163, 74, 0.14);
  color: #bbf7d0;
}

.control-plan-status--blocked,
.control-plan-task--deviation,
.control-plan-task--issue_open {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.control-plan-status--missing_required,
.control-plan-task--required {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
}

.control-plan-task--factory_control {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe;
}

.control-plan-row-details {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.control-plan-task-detail {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.control-plan-task-detail__head,
.control-plan-task-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.control-plan-task-detail__head strong {
  color: #f8fafc;
}

.control-plan-task-detail__head span,
.control-plan-task-detail__meta,
.control-plan-task-detail__basis,
.control-plan-task-detail__details {
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.35;
}

/* Мини-карточки статуса модулей */
.summary-overview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.28fr);
  align-items: stretch;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-modules-grid {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 8px 6px 0;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.38) rgba(15, 23, 42, 0.22);
  mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
}

.summary-modules-grid::-webkit-scrollbar {
  height: 8px;
}

.summary-modules-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
}

.summary-modules-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
}

.summary-module-card {
  flex: 0 0 314px;
  width: 314px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.035) 100%),
    rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: none;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(2, 6, 23, 0.18);
  scroll-snap-align: start;
}

.summary-module-card:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.035) 100%),
    rgba(15, 23, 42, 0.24);
  border-color: rgba(255, 255, 255, 0.1);
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(2, 6, 23, 0.18);
}

.summary-module-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.summary-module-icon {
  font-size: 16px;
  line-height: 1;
  filter: saturate(0.9);
}

.summary-module-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.summary-module-status {
  display: inline-flex;
  align-items: center;
}

.summary-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-status-badge.ok {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.summary-status-badge.exceeded {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.summary-status-badge.resolved {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.32);
}

.summary-status-badge.empty {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.summary-module-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.summary-module-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-module-stat--wide {
  grid-column: 1 / -1;
}

.summary-module-stat-label {
  font-size: 11px;
  color: #8ea1b7;
  line-height: 1.2;
}

.summary-module-stat-value {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-issues-panel {
  min-width: 0;
  margin-bottom: 0;
  padding: 11px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.032) 100%),
    rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 32px rgba(2, 6, 23, 0.18);
}

.summary-issues-head {
  display: grid;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 9px;
}

.summary-issues-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  color: #f8fafc;
}

.summary-issues-description {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #cbd5e1;
}

.summary-issues-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
  color: #cbd5e1;
  font-size: 11px;
}

.summary-issues-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.summary-issues-stats strong {
  margin-left: 4px;
  color: #f8fafc;
}

.summary-issues-empty {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.24);
  border: 1px dashed rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
}

.summary-issues-list {
  display: grid;
  gap: 5px;
  max-height: 118px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.summary-issue-registry__header,
.summary-issue-registry__row {
  display: grid;
  grid-template-columns: minmax(58px, 0.7fr) minmax(0, 1.25fr) minmax(70px, 0.75fr);
  align-items: center;
  gap: 7px;
}

.summary-issue-registry__header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 8px 4px;
  background: #202b3b;
  color: #8ea1b7;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-issue-registry__item {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.38);
  overflow: hidden;
}

.summary-issue-registry__item--overdue {
  border-color: rgba(248, 113, 113, 0.42);
}

.summary-issue-registry__item--closed {
  border-color: rgba(34, 197, 94, 0.34);
}

.summary-issue-registry__item--ready {
  border-color: rgba(96, 165, 250, 0.34);
}

.summary-issue-registry__row {
  min-height: 34px;
  padding: 7px 8px;
  color: #dbe5f2;
  font-size: 11px;
  line-height: 1.3;
}

.summary-issue-registry__row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-issue-registry__construction small {
  display: block;
  margin-top: 2px;
  color: #97a9bd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-issue-registry__status,
.summary-issue-registry__control {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(148, 163, 184, 0.12);
  color: #dbe5f2;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.summary-issue-registry__status--overdue {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.summary-issue-registry__status--closed,
.summary-issue-registry__control--linked {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(22, 163, 74, 0.14);
  color: #bbf7d0;
}

.summary-issue-registry__status--ready {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

.summary-issue-registry__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.35;
}

.summary-issue-registry__details strong {
  color: #f8fafc;
}

/* Контент итога */
.summary-content-row {
  display: block;
}

.summary-workspace-card {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.09), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px rgba(2, 6, 23, 0.2);
  transition: none !important;
}

#summary .summary-workspace-card.card:hover,
#summary .summary-workspace-card.card:focus-within,
#summary .summary-workspace-card:hover {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.09), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px rgba(2, 6, 23, 0.2) !important;
  filter: none !important;
  opacity: 1 !important;
  transition: none !important;
}

.summary-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.summary-workspace-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.summary-workspace-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.summary-workspace-title {
  margin: 0 0 6px;
  font-size: clamp(21px, 1.85vw, 27px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.summary-workspace-help-toggle {
  flex: 0 0 auto;
  margin-top: 3px;
}

.summary-workspace-help-content {
  margin-top: 6px;
  max-width: 720px;
}

.summary-workspace-description--fallback[hidden] {
  display: none !important;
}

.summary-meta-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 8px;
  flex: 0 1 390px;
  min-width: min(100%, 330px);
}

.summary-meta-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-meta-item--engineer {
  min-width: 0;
}

.summary-meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8ea1b7;
}

.summary-meta-value {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-text-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.summary-text-controls::-webkit-scrollbar {
  height: 0;
}

.summary-text-controls .lg-btn {
  min-width: auto;
  min-height: 38px;
  padding: 4px 12px;
  border-radius: 30px;
}

.summary-text-controls .lg-btn__label {
  font-size: 13px;
}

button.is-busy,
.menu-item.is-busy {
  cursor: wait;
}

button.is-busy .lg-btn__glow {
  opacity: 0.65;
}

.summary-text-controls .summary-workspace-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.summary-workspace-nav-btn.analytics-nav-btn {
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.summary-workspace-nav-btn.analytics-nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.48);
}

.summary-workspace-nav-btn.analytics-nav-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.summary-workspace-indicator.analytics-page-indicator {
  flex: 0 0 auto;
  min-width: 48px;
  color: #8ea1b7;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

#btnSummaryGenerate {
  box-shadow: inherit;
}

#btnSummaryGenerate .lg-btn__label {
  font-weight: inherit;
}

/* Бейдж статуса сервера ИИ */
.server-status-badge {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  margin-right: auto;
}

.server-status-checking {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}

.server-status-connected {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.server-status-disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.server-status-development {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}

.server-status-remote {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.3);
}

/* Светлая тема для бейджа */
body.theme-light .server-status-checking {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

body.theme-light .server-status-connected {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}

body.theme-light .server-status-disconnected {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

body.theme-light .server-status-development {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

body.theme-light .server-status-remote {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

body.theme-light .summary-text-controls button:not(.lg-btn) {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .summary-text-controls button.btn-primary:not(.lg-btn) {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.theme-light .summary-text-controls button.btn-primary:hover:not(.lg-btn),
body.theme-light .summary-text-controls button.btn-secondary:hover:not(.lg-btn) {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-text-controls button:not(.lg-btn) {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.summary-text-controls button.btn-primary:not(.lg-btn) {
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.summary-text-controls button.btn-primary:hover:not(.lg-btn) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  transform: none;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.summary-text-controls button.btn-secondary:hover:not(.lg-btn) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

button.btn-danger {
  background: #7f1d1d;
  color: #f8fafc;
  border: 1px solid #7f1d1d;
}

button.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(185, 28, 28, 0.25);
}

.summary-text-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 250px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.34) 0%, rgba(2, 6, 23, 0.22) 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-left: 12px;
  overflow: visible;
}

.summary-stage-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  color: #f8fafc;
}

.summary-stage-description {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #b8c6d8;
}

.summary-workspace-carousel {
  display: flex;
  overflow: hidden;
  border-radius: 18px;
  transition: height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.summary-workspace-track {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.summary-workspace-page {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.summary-workspace-page--analytics {
  padding-top: 2px;
}

.summary-workspace-page::-webkit-scrollbar {
  width: 6px;
}

.summary-workspace-page::-webkit-scrollbar-track {
  background: transparent;
}

.summary-workspace-page::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.summary-workspace-page::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.44);
}

.summary-analytics-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  align-content: start;
}

.summary-text-placeholder {
  color: #8ea1b7;
  font-style: normal;
  text-align: center;
  padding: 32px 18px;
  line-height: 1.55;
}

/* Лоадер для генерации отчёта */
.summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.summary-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(96, 165, 250, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.summary-loading-text {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
}

/* Текст отчёта от сервера */
.summary-report-text {
  padding: 0;
}

.summary-report-text pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0;
  padding: 0;
}

.summary-text-content h4 {
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 600;
  margin: 16px 0 8px 0;
}

.summary-text-content h4:first-child {
  margin-top: 0;
}

.summary-text-content ul {
  margin: 8px 0;
  padding-left: 24px;
}

.summary-text-content li {
  margin: 6px 0;
  color: #cbd5e1;
}

.summary-text-content .summary-overall {
  font-size: 15px;
  font-weight: 500;
  color: #f1f5f9;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Скроллбар для текста заключения */
.summary-text-content::-webkit-scrollbar {
  width: 6px;
}

.summary-text-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.summary-text-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.summary-text-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.summary-analytics-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.summary-analytics-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}

.summary-analytics-description {
  margin: 4px 0 0;
  max-width: 760px;
  font-size: 12px;
  line-height: 1.4;
  color: #b8c6d8;
}

#analyticsBlockContainer {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: visible;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .control-plan-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-overview-row {
    grid-template-columns: 1fr;
  }

  .summary-issues-head {
    display: grid;
  }

  .summary-issues-stats {
    justify-content: flex-start;
  }

  .summary-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  .control-plan-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .control-plan-panel {
    padding: 12px;
  }

  .control-plan-toolbar {
    display: grid;
  }

  .control-plan-toolbar-actions {
    justify-content: flex-start;
  }

  .control-plan-filters {
    display: grid;
  }

  .control-plan-search {
    width: 100%;
  }

  .control-plan-table-wrap {
    max-height: 460px;
  }

  .summary-modules-grid {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 18px 8px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
  }

  .summary-modules-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .summary-modules-grid > .summary-module-card {
    flex: 0 0 min(314px, calc(100% - 42px));
    width: min(314px, calc(100% - 42px));
    max-width: min(314px, calc(100% - 42px));
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .summary-workspace-card {
    padding: 18px;
    border-radius: 18px;
  }

  .summary-issues-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .summary-issue-registry__header {
    display: none;
  }

  .summary-issue-registry__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 9px 10px;
  }

  .summary-issue-registry__row::after {
    position: absolute;
    right: 10px;
    top: 10px;
  }

  .summary-issue-registry__row > span {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    white-space: normal;
  }

  .summary-issue-registry__row > span::before {
    content: attr(data-label);
    color: #8ea1b7;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .summary-issue-registry__details {
    grid-template-columns: 1fr;
  }

  .summary-workspace-title {
    font-size: 19px;
  }

  .summary-workspace-title-row {
    align-items: center;
    gap: 6px;
  }

  .summary-workspace-help-toggle {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-top: 0;
  }

  .summary-meta-strip {
    grid-template-columns: 1fr;
  }

  .summary-text-content {
    min-height: 220px;
    padding: 14px;
  }

  .summary-text-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    overflow: visible;
  }

  .summary-text-controls .summary-workspace-nav {
    margin-left: 0;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .summary-text-controls .lg-btn {
    min-height: 42px;
    width: 100%;
    padding: 8px 10px;
  }

  .summary-text-controls .lg-btn__label {
    font-size: 12px;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
  }

  #summary .summary-text-controls .analytics-nav-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  #summary .summary-text-controls .analytics-page-indicator {
    min-width: 52px;
    padding: 0 6px;
    font-size: 12px;
  }
}

/* Светлая тема */
body.theme-light .control-plan-metric,
body.theme-light .control-plan-panel,
body.theme-light .control-plan-empty,
body.theme-light .control-plan-row-details,
body.theme-light .control-plan-task-detail {
  background: #ffffff;
  border-color: #e5e7eb;
}

body.theme-light .control-plan-panel {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

body.theme-light .control-plan-title,
body.theme-light .control-plan-metric strong,
body.theme-light .control-plan-construction strong,
body.theme-light .control-plan-task-detail__head strong {
  color: #0f172a;
}

body.theme-light .control-plan-description,
body.theme-light .control-plan-empty,
body.theme-light .control-plan-metric span,
body.theme-light .control-plan-construction span,
body.theme-light .control-plan-task-detail__head span,
body.theme-light .control-plan-task-detail__meta,
body.theme-light .control-plan-task-detail__basis,
body.theme-light .control-plan-task-detail__details {
  color: #475569;
}

body.theme-light .control-plan-table-wrap {
  border-color: #e5e7eb;
}

body.theme-light .control-plan-table th {
  background: #f8fafc;
  color: #64748b;
}

body.theme-light .control-plan-table td {
  border-color: #e5e7eb;
  color: #1f2937;
}

body.theme-light .control-plan-status,
body.theme-light .control-plan-task,
body.theme-light .control-plan-progress,
body.theme-light .control-plan-next-action {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-light .control-plan-filter-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #334155;
}

body.theme-light .control-plan-filter-btn.is-active {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.34);
  color: #1e3a8a;
}

body.theme-light .control-plan-search {
  background: #ffffff;
  border-color: #d1d5db;
  color: #0f172a;
}

body.theme-light .control-plan-status--ready,
body.theme-light .control-plan-task--done,
body.theme-light .control-plan-task--resolved {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, 0.34);
  color: #166534;
}

body.theme-light .control-plan-status--blocked,
body.theme-light .control-plan-task--deviation,
body.theme-light .control-plan-task--issue_open {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.34);
  color: #991b1b;
}

body.theme-light .control-plan-status--missing_required,
body.theme-light .control-plan-task--required {
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.3);
  color: #92400e;
}

body.theme-light .control-plan-task--factory_control {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.34);
  color: #1e3a8a;
}

body.theme-light .summary-module-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  border-color: #d1d5db;
}

body.theme-light .summary-module-card:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  border-color: #d1d5db;
}

body.theme-light .summary-status-badge.resolved {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

body.theme-light .summary-workspace-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  border-color: #d1d5db;
}

body.theme-light #summary .summary-workspace-card.card:hover,
body.theme-light #summary .summary-workspace-card.card:focus-within,
body.theme-light #summary .summary-workspace-card:hover {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%) !important;
  border-color: #d1d5db !important;
  transform: none !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
  filter: none !important;
  opacity: 1 !important;
  transition: none !important;
}

body.theme-light .summary-module-name,
body.theme-light .summary-module-stat-value,
body.theme-light .summary-workspace-title,
body.theme-light .summary-meta-value,
body.theme-light .summary-analytics-title {
  color: #0f172a;
}

body.theme-light .summary-module-stat,
body.theme-light .summary-meta-item {
  background: #f8fafc;
  border-color: #e5e7eb;
}

body.theme-light .summary-issues-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  border-color: #d1d5db;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

body.theme-light .summary-issues-title,
body.theme-light .summary-issue-registry__details strong,
body.theme-light .summary-issues-stats strong {
  color: #0f172a;
}

body.theme-light .summary-issues-description,
body.theme-light .summary-issues-stats,
body.theme-light .summary-issues-empty,
body.theme-light .summary-issue-registry__construction small,
body.theme-light .summary-issue-registry__details {
  color: #475569;
}

body.theme-light .summary-issues-stats span,
body.theme-light .summary-issues-empty,
body.theme-light .summary-issue-registry__item {
  background: #f8fafc;
  border-color: #e5e7eb;
}

body.theme-light .summary-issue-registry__header {
  background: #f8fafc;
  color: #64748b;
}

body.theme-light .summary-issue-registry__row,
body.theme-light .summary-issue-registry__details {
  color: #1f2937;
}

body.theme-light .summary-issue-registry__status,
body.theme-light .summary-issue-registry__control {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-light .summary-issue-registry__status--overdue {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.34);
  color: #991b1b;
}

body.theme-light .summary-issue-registry__status--closed,
body.theme-light .summary-issue-registry__control--linked {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, 0.34);
  color: #166534;
}

body.theme-light .summary-issue-registry__status--ready {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.34);
  color: #1e3a8a;
}

body.theme-light .summary-module-stat-label,
body.theme-light .summary-workspace-description,
body.theme-light .summary-meta-label,
body.theme-light .summary-analytics-description,
body.theme-light .summary-stage-description {
  color: #6b7280;
}

body.theme-light .summary-stage-title {
  color: #0f172a;
}

body.theme-light .summary-text-content {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #374151;
}

body.theme-light .summary-text-placeholder {
  color: #9ca3af;
}

body.theme-light .summary-text-content h4 {
  color: #111827;
}

body.theme-light .summary-text-content li {
  color: #4b5563;
}

/* Альтернативный вариант: галочка (если браузер поддерживает) */
@supports (content: "✔") {
  select option:checked::after {
    content: "✔";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
  }
}

/* Стили для выбранного значения в самом select (более плотная типографика) */
.construction-bar select {
  font-weight: 500;
}

/* =========================
   BUTTONS
   ========================= */

button {
  border-radius: 8px;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* Touch-friendly размер */
  touch-action: manipulation; /* Убирает задержку двойного тапа */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
  position: relative;
  overflow: hidden;
}

button::before {
  display: none;
}

button:hover::before {
  display: none;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(96, 165, 250, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn-small:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}

.btn-small.lg-btn--micro {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
}

.btn-small.lg-btn--micro .lg-btn__label {
  font-size: 13px;
}

.add-btn-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.add-btn-row--between {
  justify-content: space-between;
  margin-bottom: 12px;
}

#geomColumnFields .add-btn-row + .scroll-list,
#geomWallFields .add-btn-row + .scroll-list,
#geomBeamFields .add-btn-row + .scroll-list {
  margin-top: 12px;
}

.logout-btn,
.profile-btn,
.theme-btn,
.settings-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* secondary / ghost */

button.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

button.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}

/* =========================
   HEADER BUTTON TYPES
   ========================= */

.logout-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-btn::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.profile-btn {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #bae6fd;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.profile-btn::before {
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.3), transparent);
}

.profile-btn:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
  border-color: rgba(96, 165, 250, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.settings-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: #cbd5e1;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.settings-btn::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 12px;
}

.settings-btn:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-color: rgba(96, 165, 250, 0.5);
  color: #60a5fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.settings-btn:active {
  transform: translateY(0);
}

.theme-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020819;
  color: #FFFFFF;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   CREATE PROJECT BAR
   ========================= */

.create-project-bar {
  display: none;
}

/* =========================
   CONSTRUCTION BAR
   ========================= */

.construction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, var(--tabs-glass-opacity));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(2px) saturate(120%);
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: visible;
  z-index: 30;
  isolation: isolate;
}

.construction-select-wrapper,
.project-select-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  flex: 0 1 220px;
  min-width: 190px;
  position: relative;
  /* Убираем overflow, чтобы dropdown не обрезался */
  overflow: visible;
  z-index: 10;
}

.project-select-wrapper {
  order: 1;
}

.construction-select-wrapper {
  order: 2;
}

.construction-select-wrapper[hidden],
.geo-manual-note[hidden],
.geo-bim-status-field[hidden],
.geo-bim-status[hidden],
.geo-bim-status[data-empty="1"] {
  display: none !important;
}

.geo-bim-status-field[hidden],
.geo-bim-status[hidden],
.geo-bim-status[data-empty="1"] {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.bim-import-wrapper {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: nowrap;
  align-items: center;
  align-self: center;
  gap: 6px 8px;
  min-width: 320px;
  order: 3;
  position: relative;
  overflow: visible;
  z-index: 40;
}

.bim-import-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  flex: 0 0 auto;
  align-self: center;
}

.bim-import-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.bim-import-controls .lg-btn,
.bim-import-controls .lg-btn--pill,
.bim-import-controls button,
.bim-import-controls label {
  width: auto;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
}

.bim-import-controls .btn-small,
#btnClearGeoBimSelection.btn-small,
#btnClearReinfBimSelection.btn-small,
#btnClearStrengthBimSelection.btn-small {
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--tabs-glass-radius);
}

#btnClearGeoBimSelection.btn-small,
#btnClearGeomBimSelection.btn-small,
#btnClearReinfBimSelection.btn-small,
#btnClearStrengthBimSelection.btn-small {
  min-height: 36px;
  padding: 9px 14px;
  border-radius: 999px;
  min-width: 110px;
}

#btnImportIfc,
#btnClearGeoBimSelection,
#btnClearGeomBimSelection,
#btnClearReinfBimSelection,
#btnClearStrengthBimSelection {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  font: inherit;
}

#btnImportIfc,
.bim-import-menu-trigger {
  height: 44px;
  margin: 0;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  align-self: center;
  flex-shrink: 0;
}

#btnImportIfc {
  min-width: 148px;
  justify-self: center;
}

.bim-import-primary .lg-btn__label {
  white-space: nowrap;
}

#btnImportIfc .lg-btn__label,
#btnClearGeoBimSelection .lg-btn__label,
#btnClearGeomBimSelection .lg-btn__label,
#btnClearReinfBimSelection .lg-btn__label,
#btnClearStrengthBimSelection .lg-btn__label,
.bim-import-menu-trigger .lg-btn__label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  line-height: 1.1;
}

#btnClearGeoBimSelection .lg-btn__label,
#btnClearGeomBimSelection .lg-btn__label,
#btnClearReinfBimSelection .lg-btn__label,
#btnClearStrengthBimSelection .lg-btn__label {
  font-size: 12px;
}

#btnImportIfc:disabled,
.bim-import-menu-trigger:disabled,
#btnClearGeoBimSelection:disabled,
#btnClearGeomBimSelection:disabled,
#btnClearReinfBimSelection:disabled,
#btnClearStrengthBimSelection:disabled,
.bim-viewer-launcher__button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.bim-import-meta {
  min-width: 0;
  flex: 1 1 220px;
  padding: 8px 12px;
  align-self: center;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(2, 8, 23, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bim-import-file-state {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bim-import-status {
  margin: 3px 0 0;
  min-width: 0;
  max-width: none;
  font-size: 11px;
  line-height: 1.2;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bim-import-status:empty {
  display: none;
}

.bim-import-menu {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  overflow: visible;
  z-index: 80;
}

.bim-import-menu-trigger {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  min-height: 34px;
  border-radius: 17px;
  align-self: center;
}

.bim-import-menu-trigger .lg-btn__label {
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1px);
}

.bim-import-menu-panel {
  min-width: 240px;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
}

.bim-import-menu-panel.menu-panel--up {
  top: auto;
  bottom: calc(100% + 8px);
}

.bim-import-menu-panel.menu-panel--left {
  right: auto;
  left: 0;
}

.bim-import-menu-panel .menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bim-import-menu-panel .menu-item:disabled:hover,
.bim-import-menu-panel .menu-danger:disabled:hover {
  background: transparent;
}

.bim-import-help-toggle {
  margin-top: 1px;
}

/* Keep upper controls from painting over the module tabs.
   Only explicit popups (like the IFC menu) should float above them. */
.construction-bar {
  z-index: auto;
  isolation: auto;
}

.construction-bar.ifc-menu-open {
  z-index: 1200;
  isolation: isolate;
}

.project-select-wrapper,
.construction-select-wrapper,
.bim-import-wrapper,
.bim-import-controls {
  z-index: auto;
}

.bim-import-wrapper.ifc-menu-open {
  z-index: 1201;
}

.bim-import-menu {
  z-index: 60;
}

.construction-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 500;
}

/* Стили для select в construction-bar наследуются от .ui-select */
.construction-bar select {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc;
  padding: 8px 12px;
  min-height: 40px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -6px 12px rgba(2, 8, 23, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.construction-bar .project-select {
  min-width: 200px;
  max-width: 400px;
}

.construction-bar select:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

@media (max-width: 1120px) {
  .construction-bar {
    gap: 10px;
    padding: 12px 14px;
  }

  .project-select-wrapper,
  .construction-select-wrapper {
    flex-basis: 200px;
    min-width: 170px;
  }

  .bim-import-wrapper {
    flex-wrap: wrap;
    min-width: 280px;
  }
}

@media (max-width: 820px) {
  .construction-bar {
    align-items: stretch;
  }

  .project-select-wrapper,
  .construction-select-wrapper,
  .bim-import-wrapper {
    flex: 1 1 100%;
    min-width: 0;
  }

  .bim-import-wrapper {
    align-items: stretch;
  }

  .bim-import-controls {
    flex-wrap: wrap;
    align-items: stretch;
  }

  #btnImportIfc,
  .bim-import-meta {
    flex: 1 1 160px;
  }

  .bim-import-menu {
    margin-left: auto;
  }

  .bim-import-menu-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

.construction-bar select:focus {
  border-color: rgba(96, 165, 250, 0.45) !important;
  box-shadow:
    0 0 0 2px rgba(96, 165, 250, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* =========================
   TABS (LIQUID GLASS)
   ========================= */

:root {
  --tabs-glass-blur: 45px;
  --tabs-glass-radius: 42px;
  --tabs-glass-opacity: 0.01;
  --tabs-border-opacity: 0.2;
  --tabs-glass-blur-hover: 45px;
  --tabs-glass-opacity-hover: 0.02;
  --tabs-glass-blur-active: 45px;
  --tabs-glass-opacity-active: 0.03;
  --tabs-border-opacity-active: 0.22;
  --tabs-layer-outer: rgba(148, 163, 184, 0.35);
  --tabs-layer-inner: rgba(15, 23, 42, 0.45);
  --tabs-layer-overlay: rgba(255, 255, 255, 0.01);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: none;
  border-radius: var(--tabs-glass-radius);
  background: rgba(30, 41, 59, 0.28);
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  margin: 12px 0 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-track {
  background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.tab {
  padding: 12px 20px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: var(--tabs-glass-radius);
  background: linear-gradient(180deg, rgba(240, 248, 255, 0.08), rgba(240, 248, 255, 0.02));
  color: #f8fafc;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.22s ease;
  position: relative;
  font-weight: 500;
  min-height: 44px; /* Touch-friendly размер */
  touch-action: manipulation;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  backdrop-filter: blur(var(--tabs-glass-blur));
  -webkit-backdrop-filter: blur(var(--tabs-glass-blur));
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  isolation: isolate;
  z-index: 1;
}

.tab.lg-btn {
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--tabs-glass-radius);
}

.tab.lg-btn .lg-btn__label {
  font-size: 13px;
  color: #f8fafc;
}

.tab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--tabs-glass-radius);
  background: rgba(255, 255, 255, 0.01);
  opacity: 1;
  filter: blur(1.5px);
  z-index: -2;
  pointer-events: none;
}

.tab::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: calc(var(--tabs-glass-radius) - 4px);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -6px 12px rgba(2, 8, 23, 0.22);
  opacity: 0.16;
  filter: blur(3px);
  z-index: -1;
  pointer-events: none;
}

.tab:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(240, 248, 255, 0.04));
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(var(--tabs-glass-blur-hover));
  -webkit-backdrop-filter: blur(var(--tabs-glass-blur-hover));
  box-shadow:
    0 8px 20px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.tab:hover::before {
  opacity: 0.2;
}


.tab.active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(240, 248, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(var(--tabs-glass-blur-active));
  -webkit-backdrop-filter: blur(var(--tabs-glass-blur-active));
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.tab.active::before {
  opacity: 0.18;
  background: rgba(255, 255, 255, 0.35);
}

.tab.active::after {
  background: rgba(255, 255, 255, 0.01);
  opacity: 1;
}

/* =========================
   SECTIONS
   ========================= */

.section {
  display: none;
  padding-top: 14px;
  animation: fadeIn 0.3s ease;
  /* Убираем overflow: hidden, чтобы dropdown не обрезался */
  overflow: visible;
  position: relative;
  z-index: 1;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInOnly {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin: 4px 0 10px 0;
  color: #f9fafb;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 18px 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
}

/* статус модуля */

.mod-status {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mod-status.saved {
  background: rgba(34, 197, 94, 0.2);
  border-color: #34d399;
  color: #34d399;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.mod-status.changed {
  background: rgba(248, 113, 113, 0.2);
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

/* Статусные бейджи */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.status-badge.ok {
  background: rgba(34, 197, 94, 0.2);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* =========================
   HELPERS
   ========================= */

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.split {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.split .col {
  flex: 1;
}

.flex1 {
  flex: 1;
}

.flex2 {
  flex: 2;
}

.mt8 {
  margin-top: 8px;
}

.mt10 {
  margin-top: 10px;
}

.mt12 {
  margin-top: 12px;
}

.ml-auto {
  margin-left: auto;
}

.invisible {
  visibility: hidden;
}

/* =========================
   CARDS
   ========================= */

.card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  /* Убираем overflow: hidden, чтобы dropdown не обрезался */
  overflow: visible;
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.card-title {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.caption {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 2px solid rgba(96, 165, 250, 0.3);
}

.scroll-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.scroll-list::-webkit-scrollbar {
  width: 6px;
}

.scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

#columnsBlock,
#wallsBlock,
#beamsBlock {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 12px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#columnsBlock::-webkit-scrollbar,
#wallsBlock::-webkit-scrollbar,
#beamsBlock::-webkit-scrollbar {
  width: 6px;
}

#columnsBlock::-webkit-scrollbar-track,
#wallsBlock::-webkit-scrollbar-track,
#beamsBlock::-webkit-scrollbar-track {
  background: transparent;
}

#columnsBlock::-webkit-scrollbar-thumb,
#wallsBlock::-webkit-scrollbar-thumb,
#beamsBlock::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

#columnsBlock::-webkit-scrollbar-thumb:hover,
#wallsBlock::-webkit-scrollbar-thumb:hover,
#beamsBlock::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
.strength-group-title {
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* =========================
   FORM GRID
   ========================= */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  /* Убираем overflow, чтобы dropdown не обрезался */
  overflow: visible;
  position: relative;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  /* Убираем overflow, чтобы dropdown не обрезался */
  overflow: visible;
  position: relative;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px 16px;
  /* Убираем overflow, чтобы dropdown не обрезался */
  overflow: visible;
  position: relative;
}

.grid-2 > div,
.grid-3 > div,
.grid-4 > div {
  display: flex;
  flex-direction: column;
}

.coordinate-grid-spacer {
  min-height: 1px;
  pointer-events: none;
}

.grid-full-span {
  grid-column: 1 / -1;
}

.geo-bim-card {
  margin-top: 16px;
}

.bim-panel-redundant {
  display: none !important;
}

.geo-bim-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(184px, 208px) minmax(184px, 208px) minmax(220px, 280px) auto;
  gap: 10px 12px;
  align-items: start;
}

.geo-bim-header .card-title {
  margin: 0;
  align-self: start;
  margin-top: -2px;
  white-space: nowrap;
}

.geo-bim-header .geo-bim-filter {
  align-self: start;
  margin-top: -2px;
}

.geo-bim-header #btnClearGeoBimSelection,
.geo-bim-header #btnClearGeomBimSelection,
.geo-bim-header #btnClearReinfBimSelection,
.geo-bim-header #btnClearStrengthBimSelection {
  align-self: start;
  margin-top: -2px;
}

.geo-bim-header #btnClearGeoBimSelection,
.geo-bim-header #btnClearGeoBimSelection.lg-btn,
.geo-bim-header #btnClearGeoBimSelection.lg-btn--pill,
.geo-bim-header #btnClearGeomBimSelection,
.geo-bim-header #btnClearGeomBimSelection.lg-btn,
.geo-bim-header #btnClearGeomBimSelection.lg-btn--pill,
.geo-bim-header #btnClearReinfBimSelection,
.geo-bim-header #btnClearReinfBimSelection.lg-btn,
.geo-bim-header #btnClearReinfBimSelection.lg-btn--pill,
.geo-bim-header #btnClearStrengthBimSelection,
.geo-bim-header #btnClearStrengthBimSelection.lg-btn,
.geo-bim-header #btnClearStrengthBimSelection.lg-btn--pill,
.geo-bim-header .bim-viewer-launcher__button,
.geo-bim-header .bim-viewer-launcher__button.lg-btn,
.geo-bim-header .bim-viewer-launcher__button.lg-btn--pill {
  min-width: 0 !important;
  max-width: 100%;
  min-height: 40px !important;
  padding: 0 12px !important;
}

.geo-bim-header #btnClearGeoBimSelection .lg-btn__label,
.geo-bim-header #btnClearGeomBimSelection .lg-btn__label,
.geo-bim-header #btnClearReinfBimSelection .lg-btn__label,
.geo-bim-header #btnClearStrengthBimSelection .lg-btn__label,
.geo-bim-header .bim-viewer-launcher__button .lg-btn__label {
  font-size: 12px;
}

.geo-bim-actions {
  display: none;
}

.geo-bim-mainrow {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(360px, 1fr);
  gap: 8px 12px;
  align-items: end;
}

.geo-bim-mainrow.mt8 {
  margin-top: 2px !important;
}

.geo-bim-filter {
  min-width: 0;
}

.geo-bim-meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 220px));
  gap: 6px 16px;
  align-items: end;
}

.geo-bim-meta-row.mt8 {
  margin-top: 4px !important;
}

#geoBimTypeFilter,
#geoBimAxesFilter,
#geomBimTypeFilter,
#geomBimAxesFilter,
#reinfBimTypeFilter,
#reinfBimAxesFilter,
#strengthBimTypeFilter,
#strengthBimAxesFilter {
  max-width: 208px;
  width: 100%;
}

.geo-bim-filter--search input[type="search"] {
  width: 100%;
}

.geo-bim-status {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  line-height: 1.2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E6B450;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.geo-bim-source {
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.geo-bim-source.is-stale {
  border-color: rgba(248, 113, 113, 0.24);
}

.geo-bim-source__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.geo-bim-source__heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-bim-source__eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.geo-bim-source__title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.geo-bim-source__state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.12);
  color: #E6B450;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.geo-bim-source.is-stale .geo-bim-source__state {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

.geo-bim-source__meta {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.geo-bim-source__meta:empty {
  display: none;
}

#geoBimMark,
#geoBimAxes,
#reinfBimMark,
#reinfBimAxes,
#strengthBimMark,
#strengthBimAxes {
  max-width: 236px;
}

.geo-bim-source__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px 12px;
}

.geo-bim-source__chip {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-bim-source__chip span {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.geo-bim-source__chip strong {
  min-width: 0;
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-bim-source__hint,
.geo-manual-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: #E6B450;
  font-size: 12px;
  line-height: 1.5;
}

.geo-manual-note {
  margin-bottom: 12px;
}

.geo-manual-note.is-linked {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(30, 64, 175, 0.1);
  color: #dbeafe;
}

.geo-manual-note.is-stale {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(127, 29, 29, 0.12);
  color: #fee2e2;
}

.geo-bim-field--autofilled > label,
.geo-bim-field--autofilled > .construction-label {
  color: #bfdbfe;
}

.geo-bim-field--autofilled > label::after,
.geo-bim-field--autofilled > .construction-label::after {
  content: "из BIM";
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #bfdbfe;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}

.geo-flatness-toggle {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.22);
  color: #dbeafe;
  cursor: pointer;
}

.geo-flatness-panel {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.18);
}

.geo-flatness-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.geo-flatness-panel__title {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.geo-flatness-panel__meta {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.3;
}

.geo-flatness-toggle--secondary {
  width: auto;
  min-width: 190px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.28);
}

.geo-flatness-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  appearance: none;
}

.geo-flatness-toggle__control {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.geo-flatness-toggle__control::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

.geo-flatness-toggle__text {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: inherit;
}

.geo-flatness-toggle__input:checked + .geo-flatness-toggle__control {
  background: rgba(37, 99, 235, 0.88);
  border-color: rgba(96, 165, 250, 0.82);
}

.geo-flatness-toggle__input:checked + .geo-flatness-toggle__control::after {
  transform: translateX(20px);
  background: #ffffff;
}

.geo-flatness-toggle:has(.geo-flatness-toggle__input:focus-visible) {
  outline: 2px solid rgba(96, 165, 250, 0.7);
  outline-offset: 2px;
}

.geo-flatness-result-field input.is-ok {
  border-color: rgba(52, 211, 153, 0.7) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #bbf7d0 !important;
}

.geo-flatness-result-field input.is-not-ok {
  border-color: rgba(248, 113, 113, 0.75) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fecaca !important;
}

.formwork-result.is-ok {
  border-color: rgba(52, 211, 153, 0.7) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #bbf7d0 !important;
}

.formwork-result.is-not-ok {
  border-color: rgba(248, 113, 113, 0.75) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fecaca !important;
}

#geomFormworkNote {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  min-height: 96px;
  padding: 10px 14px;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

#geomFormworkNote::placeholder,
#geomFormworkNote::-webkit-input-placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

#geomFormworkNote:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

#geomFormworkNote:focus {
  border-color: #60a5fa !important;
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    0 4px 16px rgba(96, 165, 250, 0.2),
    0 0 0 3px rgba(96, 165, 250, 0.1);
}

.formwork-result[readonly] {
  cursor: default;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  user-select: none;
  caret-color: transparent;
  border-style: solid;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.formwork-result[readonly]:focus {
  transform: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 2px rgba(148, 163, 184, 0.14);
}

.geo-flatness-tolerance--auto {
  cursor: default;
}

.geo-bim-field--autofilled > input,
.geo-bim-field--autofilled > select,
.geo-bim-field--autofilled > .ui-select {
  border-color: rgba(96, 165, 250, 0.36) !important;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.16)) !important;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.12),
    0 8px 18px rgba(2, 6, 23, 0.12);
}

.geo-bim-input--autofilled::placeholder {
  color: #bfdbfe;
}

.bim-visual-panel {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(2, 6, 23, 0.18);
}

.bim-visual-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bim-visual-panel__eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
}

.bim-visual-panel__title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.bim-visual-panel__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bim-visual-panel__count {
  font-size: 13px;
  color: #cbd5e1;
}

.bim-visual-panel__fit {
  flex-shrink: 0;
}

.bim-visual-stage {
  position: relative;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.9));
  overflow: hidden;
  min-height: 280px;
  aspect-ratio: 16 / 10;
}

.bim-visual-stage__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.bim-visual-stage__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: #cbd5e1;
}

.bim-visual-shape {
  cursor: pointer;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
  vector-effect: non-scaling-stroke;
}

.bim-visual-shape:hover,
.bim-visual-shape.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.42));
}

.bim-visual-shape--line {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0.8;
}

.bim-visual-shape--line.is-active {
  stroke-width: 18;
}

.bim-visual-shape--rect,
.bim-visual-shape--point {
  opacity: 0.84;
  stroke: rgba(241, 245, 249, 0.46);
  stroke-width: 4;
}

.bim-visual-shape--rect {
  fill-opacity: 0.24;
}

.bim-visual-shape--point {
  fill-opacity: 0.88;
}

.bim-visual-shape--rect.is-active,
.bim-visual-shape--point.is-active {
  stroke-width: 8;
}

@media (max-width: 1120px) {
  .geo-bim-header {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(180px, 1fr)) minmax(220px, 1fr) auto;
  }

  .geo-bim-actions {
    display: none;
  }

  .geo-bim-mainrow {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .geo-bim-meta-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .geo-bim-source__grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .bim-visual-stage {
    min-height: 240px;
  }
}

@media (max-width: 760px) {
  .geo-bim-header {
    grid-template-columns: 1fr;
  }

  .geo-bim-actions {
    display: none;
  }

  .geo-bim-mainrow {
    grid-template-columns: 1fr;
  }

  .geo-bim-meta-row {
    grid-template-columns: 1fr;
  }

  .geo-bim-source__grid {
    grid-template-columns: 1fr;
  }

  .bim-visual-panel__header,
  .bim-visual-panel__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .bim-visual-stage {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }
}

body.theme-light .geo-bim-source {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #dbe5f1;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.theme-light .geo-bim-source__eyebrow {
  color: #2563eb;
}

body.theme-light .geo-bim-source__title {
  color: #0f172a;
}

body.theme-light .geo-bim-source__state {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
  color: #E6B450;
}

body.theme-light .geo-bim-status {
  color: #E6B450;
}

body.theme-light .geo-bim-source.is-stale .geo-bim-source__state {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

body.theme-light .geo-bim-source__meta,
body.theme-light .geo-bim-source__chip span {
  color: #64748b;
}

body.theme-light .geo-bim-source__chip {
  background: #f8fafc;
  border-color: #dbe5f1;
}

body.theme-light .geo-bim-source__chip strong {
  color: #0f172a;
}

body.theme-light .geo-bim-source__hint,
body.theme-light .geo-manual-note {
  background: #f8fafc;
  border-color: #dbe5f1;
  color: #E6B450;
}

body.theme-light .geo-manual-note.is-linked {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.theme-light .geo-manual-note.is-stale {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

body.theme-light .geo-flatness-toggle {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.theme-light .geo-flatness-panel {
  background: #ffffff;
  border-color: #dbe5f1;
}

body.theme-light .geo-flatness-panel__title {
  color: #0f172a;
}

body.theme-light .geo-flatness-panel__meta {
  color: #64748b;
}

body.theme-light .geo-flatness-toggle__control {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

body.theme-light .geo-flatness-toggle__control::after {
  background: #ffffff;
}

body.theme-light .geo-flatness-toggle__input:checked + .geo-flatness-toggle__control {
  background: #2563eb;
  border-color: #2563eb;
}

body.theme-light .geo-bim-field--autofilled > label,
body.theme-light .geo-bim-field--autofilled > .construction-label {
  color: #1d4ed8;
}

body.theme-light .geo-bim-field--autofilled > label::after,
body.theme-light .geo-bim-field--autofilled > .construction-label::after {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.theme-light .geo-bim-field--autofilled > input,
body.theme-light .geo-bim-field--autofilled > select,
body.theme-light .geo-bim-field--autofilled > .ui-select {
  background: linear-gradient(180deg, #ffffff, #eff6ff) !important;
  border-color: #93c5fd !important;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.08),
    0 8px 18px rgba(59, 130, 246, 0.08);
}

body.theme-light .bim-visual-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #dbe5f1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 28px rgba(15, 23, 42, 0.08);
}

body.theme-light .bim-visual-panel__eyebrow {
  color: #2563eb;
}

body.theme-light .bim-visual-panel__title {
  color: #0f172a;
}

body.theme-light .bim-visual-panel__count,
body.theme-light .bim-visual-stage__empty {
  color: #64748b;
}

body.theme-light .bim-visual-stage {
  border-color: #dbe5f1;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 42%),
    linear-gradient(180deg, #f8fbff, #eef4fb);
}

body.theme-light .bim-visual-shape--rect,
body.theme-light .bim-visual-shape--point {
  stroke: rgba(15, 23, 42, 0.18);
}

.bim-visual-panel {
  --bim-drawer-width: min(356px, calc(100vw - 24px));
  position: fixed;
  top: 104px;
  right: 0;
  bottom: 16px;
  width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  z-index: 240;
  pointer-events: none;
}

button.bim-visual-panel__toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%) !important;
  width: 32px;
  min-height: 120px;
  padding: 10px 7px;
  border-radius: 16px 0 0 16px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9));
  color: #e2e8f0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 14px 24px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  transition:
    right 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

button.bim-visual-panel__toggle:hover,
button.bim-visual-panel__toggle:active,
button.bim-visual-panel__toggle:focus-visible {
  transform: translateY(-50%) !important;
}

button.bim-visual-panel__toggle:hover,
button.bim-visual-panel__toggle:active {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9)) !important;
  box-shadow:
    0 14px 24px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.bim-visual-panel[data-open="true"] .bim-visual-panel__toggle {
  right: var(--bim-drawer-width);
}

.bim-visual-panel__toggle-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform 180ms ease;
}

.bim-visual-panel[data-open="true"] .bim-visual-panel__toggle-icon {
  transform: rotate(180deg);
}

.bim-visual-panel__toggle-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bim-visual-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--bim-drawer-width);
  height: 100%;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 20px 0 0 20px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.76));
  box-shadow:
    -16px 16px 36px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.bim-visual-panel[data-open="true"] .bim-visual-panel__drawer {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.bim-visual-panel__selection {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  background: rgba(15, 23, 42, 0.42);
}

.bim-visual-panel__selection-eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.bim-visual-panel__selection-title {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bim-visual-panel__selection-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #a8b6ca;
  line-height: 1.45;
}

.bim-visual-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.bim-visual-panel__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.bim-visual-panel__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.bim-visual-panel__eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #8fb9ff;
  white-space: nowrap;
  transform: translateY(-1px);
}

.bim-visual-panel__title {
  margin-top: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.15;
  color: #dbe6f4;
}

.bim-visual-panel__count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.42);
  color: #dbe6f4;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.bim-visual-panel__fit,
.bim-visual-panel__fit.lg-btn,
.bim-visual-panel__fit.lg-btn--pill {
  width: auto;
  min-width: 0 !important;
  max-width: none;
  min-height: 22px;
  padding: 3px 7px !important;
  border-radius: 999px;
  font-size: 10px;
  box-shadow: none;
  flex-shrink: 0;
}

.bim-visual-panel__fit .lg-btn__label {
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.bim-visual-panel__fit .lg-btn__glow {
  display: none;
}

.bim-visual-stage {
  margin-top: 0;
  flex: 1;
  min-height: 228px;
  padding: 10px;
  border-radius: 18px;
  border-color: rgba(96, 165, 250, 0.12);
  background:
    linear-gradient(rgba(96, 165, 250, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.032) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 54%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.52));
  background-size: 28px 28px, 28px 28px, auto, auto;
  overflow: hidden;
}

.bim-visual-stage__canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: transparent;
}

.bim-visual-stage__hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.bim-visual-stage__hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bim-visual-stage__level,
.bim-visual-stage__hint {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.bim-visual-stage__level {
  color: #f8fafc;
}

.bim-visual-stage__hint {
  color: #9fb2c9;
}

.bim-visual-stage__floors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.bim-visual-stage__floor-chip {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.48);
  color: #9fb2c9;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.bim-visual-stage__floor-chip:hover,
.bim-visual-stage__floor-chip:focus-visible {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(30, 41, 59, 0.82);
  color: #f8fafc;
  outline: none;
}

.bim-visual-stage__floor-chip.is-active {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(37, 99, 235, 0.22);
  color: #ffffff;
}

.bim-visual-stage__empty {
  padding: 28px;
  font-size: 13px;
  line-height: 1.55;
  color: #a9b8cc;
  text-align: center;
  background: rgba(15, 23, 42, 0.18);
}

.bim-visual-stage__callout {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: min(196px, 74%);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.88);
  box-shadow:
    0 14px 28px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
}

.bim-visual-stage__callout[data-position="below"] {
  transform: translate(-50%, 12px);
}

.bim-visual-stage__callout-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.bim-visual-stage__callout-title {
  font-size: 12px;
  line-height: 1.35;
  color: #f8fafc;
}

.bim-visual-item {
  cursor: pointer;
}

.bim-visual-shell__backdrop {
  fill: rgba(125, 211, 252, 0.045);
}

.bim-visual-shell__outline {
  fill: none;
  stroke: rgba(125, 211, 252, 0.22);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.bim-visual-context-wall {
  fill: none;
  stroke: rgba(226, 232, 240, 0.15);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.bim-visual-hit {
  fill: transparent;
  stroke: transparent;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.bim-visual-focus {
  fill: none;
  stroke: rgba(248, 250, 252, 0.96);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.bim-visual-focus--line {
  opacity: 0.44;
}

.bim-visual-focus--rect,
.bim-visual-focus--point {
  stroke-width: 4;
  opacity: 0.64;
}

.bim-visual-shape {
  vector-effect: non-scaling-stroke;
  transition:
    opacity 160ms ease,
    stroke-width 160ms ease,
    filter 160ms ease,
    fill-opacity 160ms ease,
    stroke-opacity 160ms ease;
}

.bim-visual-item .bim-visual-shape {
  opacity: 0.82;
}

.bim-visual-item:hover .bim-visual-shape {
  opacity: 0.96;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.18));
}

.bim-visual-stage.has-active-selection .bim-visual-item:not(.is-active) .bim-visual-shape {
  opacity: 0.28;
  filter: none;
}

.bim-visual-item.is-active .bim-visual-shape {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(96, 165, 250, 0.3));
}

.bim-visual-shape--slab {
  fill-opacity: 0.08;
  stroke: rgba(125, 211, 252, 0.44);
  stroke-width: 1.8;
}

.bim-visual-shape--slab.is-schematic-shell {
  fill-opacity: 0.05;
  stroke-opacity: 0.42;
}

.bim-visual-item:hover .bim-visual-shape--slab {
  fill-opacity: 0.1;
}

.bim-visual-shape--stair {
  fill-opacity: 0.12;
  stroke: rgba(251, 113, 133, 0.78);
  stroke-width: 2.2;
}

.bim-visual-shape--stair-tread {
  stroke: rgba(251, 113, 133, 0.56);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.bim-visual-shape--column {
  fill-opacity: 0.9;
  stroke: rgba(15, 23, 42, 0.82);
  stroke-width: 2.5;
}

.bim-visual-shape--column-core {
  fill: rgba(15, 23, 42, 0.68);
  stroke: none;
}

.bim-visual-shape--wall {
  fill: none;
  stroke-opacity: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bim-visual-shape--beam {
  fill: none;
  stroke-opacity: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 8;
}

.bim-visual-shape--point-marker {
  fill-opacity: 0.92;
  stroke: rgba(248, 250, 252, 0.8);
  stroke-width: 3;
}

@media (max-width: 1120px) {
  .bim-visual-panel {
    --bim-drawer-width: min(332px, calc(100vw - 20px));
    top: 96px;
  }
}

@media (max-width: 760px) {
  .bim-visual-panel {
    --bim-drawer-width: min(318px, calc(100vw - 16px));
    top: 88px;
    bottom: 12px;
  }

  .bim-visual-panel__toggle {
    min-height: 108px;
  }

  .bim-visual-panel__drawer {
    padding: 12px;
    border-radius: 18px 0 0 18px;
  }

  .bim-visual-panel__header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .bim-visual-stage__hud-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .bim-visual-stage__callout {
    max-width: calc(100% - 28px);
  }
}

body.theme-light button.bim-visual-panel__toggle {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
  color: #0f172a;
}

body.theme-light button.bim-visual-panel__toggle:hover,
body.theme-light button.bim-visual-panel__toggle:active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96)) !important;
  box-shadow:
    0 16px 28px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

body.theme-light .bim-visual-panel__drawer {
  border-color: #dbe5f1;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow:
    -16px 16px 34px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.theme-light .bim-visual-panel__selection {
  border-color: #dbeafe;
  background: #eff6ff;
}

body.theme-light .bim-visual-panel__header {
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

body.theme-light .bim-visual-panel__selection-eyebrow {
  color: #2563eb;
}

body.theme-light .bim-visual-panel__selection-title {
  color: #0f172a;
}

body.theme-light .bim-visual-panel__selection-meta {
  color: #64748b;
}

body.theme-light .bim-visual-panel__count {
  border-color: #dbe5f1;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
}

body.theme-light .bim-visual-stage {
  border-color: #dbe5f1;
  background:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(37, 99, 235, 0.1), transparent 56%),
    linear-gradient(180deg, #f8fbff, #eef4fb);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

body.theme-light .bim-visual-stage__empty {
  background: rgba(255, 255, 255, 0.5);
  color: #64748b;
}

body.theme-light .bim-visual-stage__callout {
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body.theme-light .bim-visual-stage__callout-title {
  color: #0f172a;
}

body.theme-light .bim-visual-shell__backdrop {
  fill: rgba(125, 211, 252, 0.08);
}

body.theme-light .bim-visual-shell__outline {
  stroke: rgba(59, 130, 246, 0.2);
}

body.theme-light .bim-visual-context-wall {
  stroke: rgba(71, 85, 105, 0.14);
}

body.theme-light .bim-visual-stage__level,
body.theme-light .bim-visual-stage__hint,
body.theme-light .bim-visual-stage__floor-chip {
  border-color: #dbe5f1;
  background: rgba(255, 255, 255, 0.88);
}

body.theme-light .bim-visual-stage__level {
  color: #0f172a;
}

body.theme-light .bim-visual-stage__hint,
body.theme-light .bim-visual-stage__floor-chip {
  color: #64748b;
}

body.theme-light .bim-visual-stage__floor-chip:hover,
body.theme-light .bim-visual-stage__floor-chip:focus-visible {
  border-color: #93c5fd;
  background: #f8fbff;
  color: #0f172a;
}

body.theme-light .bim-visual-stage__floor-chip.is-active {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1d4ed8;
}

body.theme-light .bim-visual-focus {
  stroke: rgba(15, 23, 42, 0.72);
}

.bim-visual-panel__summary {
  display: grid;
  gap: 6px;
  padding: 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background: rgba(15, 23, 42, 0.34);
}

.bim-visual-panel__summary-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #f8fafc;
}

.bim-visual-panel__summary-text {
  font-size: 12px;
  line-height: 1.55;
  color: #9fb2c9;
}

.bim-visual-panel__open-viewer,
.bim-visual-panel__open-viewer.lg-btn,
.bim-visual-panel__open-viewer.lg-btn--pill {
  min-width: 0 !important;
  width: auto;
  min-height: 30px !important;
  padding: 0 12px !important;
  box-shadow: none;
}

.bim-visual-panel__open-viewer .lg-btn__label {
  font-size: 11px;
  white-space: nowrap;
}

.bim-visual-panel__open-viewer .lg-btn__glow {
  display: none;
}

.bim-viewer-action-stack {
  --bim-action-width: 220px;
  display: grid;
  gap: 8px;
  justify-self: end;
  align-self: start;
  width: min(var(--bim-action-width), 220px);
  position: relative;
  z-index: 6;
  isolation: isolate;
  overflow: visible;
}

.bim-viewer-launcher {
  width: 100%;
  position: relative;
  z-index: 6;
  overflow: visible;
}

.bim-viewer-launcher__button,
.bim-viewer-launcher__button.lg-btn,
.bim-viewer-launcher__button.lg-btn--pill {
  width: 100%;
  min-width: 220px;
  position: relative;
  z-index: 6;
  pointer-events: auto;
  overflow: hidden;
}

body.bim-workspace-open {
  overflow: hidden;
}

.bim-workspace {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: block;
  pointer-events: none;
}

.bim-workspace[hidden],
.bim-workspace:not([data-open="true"]) {
  display: none !important;
  pointer-events: none !important;
}

.bim-workspace:not([data-open="true"]) * {
  pointer-events: none !important;
}

.bim-workspace[data-open="true"] {
  display: block;
  pointer-events: auto;
}

.bim-workspace__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.bim-workspace[data-open="true"] .bim-workspace__backdrop {
  opacity: 1;
}

.bim-workspace__surface {
  position: absolute;
  inset: 56px 24px 24px 24px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  box-shadow:
    0 32px 80px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(16px) scale(0.985);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  overflow: hidden;
  isolation: isolate;
}

.bim-workspace[data-open="true"] .bim-workspace__surface {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.bim-workspace__header {
  position: relative;
  z-index: 4;
  min-height: 176px;
}

.bim-workspace__titlebar {
  display: grid;
  grid-template-columns: minmax(0, calc(100% - 378px)) minmax(300px, 1fr) auto;
  align-items: start;
  gap: 18px;
  min-height: 176px;
}

.bim-workspace__header-main {
  grid-column: 1;
  justify-self: start;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 12px;
  min-width: 0;
}

.bim-workspace__intro {
  min-width: 0;
  flex: 0 0 100%;
}

.bim-workspace__title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bim-workspace__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb9ff;
}

.bim-workspace__title {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
  color: #f8fafc;
}

.bim-workspace__help-toggle {
  margin-top: 8px;
  flex: 0 0 auto;
}

.bim-workspace__help-content {
  display: none;
}

.bim-workspace__subtitle {
  margin-top: 8px;
  max-width: 780px;
  font-size: 13px;
  line-height: 1.55;
  color: #9fb2c9;
}

.bim-workspace__mode-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.48);
}

.bim-workspace__mode {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9fb2c9;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bim-workspace__mode:hover,
.bim-workspace__mode:focus-visible {
  background: rgba(30, 41, 59, 0.72);
  color: #f8fafc;
  outline: none;
}

.bim-workspace__mode.is-active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.26), rgba(30, 64, 175, 0.18));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bim-workspace__actions {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.bim-workspace__action,
.bim-workspace__action.lg-btn,
.bim-workspace__action.lg-btn--pill {
  position: relative;
  z-index: 6;
  pointer-events: auto;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  box-shadow: none;
}

.bim-workspace__action .lg-btn__label {
  font-size: 11px;
  white-space: nowrap;
}

.bim-workspace__action .lg-btn__glow {
  display: none;
}

.bim-workspace__close {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  position: relative;
  z-index: 6;
  pointer-events: auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.54);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.bim-workspace__toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background: rgba(15, 23, 42, 0.36);
}

.bim-workspace__level-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bim-workspace__level {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.58);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.bim-workspace__floors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bim-workspace__mode,
.bim-visual-stage__floor-chip {
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.bim-workspace__hint {
  flex: 1 1 180px;
  min-width: 120px;
  font-size: 12px;
  line-height: 1.5;
  color: #9fb2c9;
  text-align: right;
}

.bim-workspace__body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 360px);
  gap: 18px;
}

.bim-workspace__stage-area,
.bim-workspace__inspector {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bim-workspace__stage-area {
  gap: 14px;
}

.bim-workspace__stage {
  position: relative;
  min-height: 0;
  flex: 1;
  z-index: 1;
}

.bim-workspace__stage .bim-visual-stage,
.bim-workspace__stage--3d {
  min-height: 100%;
  height: 100%;
}

.bim-workspace__stage .bim-visual-stage {
  min-height: 560px;
}

.bim-workspace__stage--3d {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.bim-workspace__stage--3d[data-bim-bg-theme="dark"] {
  border-color: rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(circle at top, rgba(30, 41, 59, 0.44), rgba(10, 17, 32, 0.96) 54%, rgba(3, 7, 18, 1)),
    linear-gradient(180deg, #0a1221, #040914);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.06);
}

.bim-workspace__stage--3d[data-bim-bg-theme="light"] {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.97) 54%, rgba(226, 232, 240, 0.99)),
    linear-gradient(180deg, #f8fafc, #e5ebf2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.bim-workspace__canvas3d,
.bim-workspace__canvas3d canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.bim-workspace__canvas3d {
  position: relative;
  z-index: 1;
}

.bim-workspace__canvas3d canvas {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.bim-workspace__canvas3d canvas:active {
  cursor: grabbing;
}

.bim-workspace__empty3d {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: #a9b8cc;
  background: rgba(15, 23, 42, 0.3);
}

.bim-workspace__inspector {
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background: rgba(15, 23, 42, 0.38);
}

.bim-workspace__inspector-head {
  display: grid;
  gap: 6px;
}

.bim-workspace__inspector-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb9ff;
}

.bim-workspace__inspector-title {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #f8fafc;
}

.bim-workspace__inspector-meta {
  font-size: 12px;
  line-height: 1.55;
  color: #9fb2c9;
}

.bim-workspace__properties {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.bim-workspace__property,
.bim-workspace__properties-empty {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.34);
}

.bim-workspace__property {
  display: grid;
  gap: 4px;
}

.bim-workspace__property-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fb9ff;
}

.bim-workspace__property-value,
.bim-workspace__properties-empty {
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}

body.theme-light .bim-visual-panel__summary {
  border-color: #dbeafe;
  background: #eff6ff;
}

body.theme-light .bim-visual-panel__summary-title {
  color: #0f172a;
}

body.theme-light .bim-visual-panel__summary-text {
  color: #475569;
}

body.theme-light .bim-workspace__backdrop {
  background: rgba(15, 23, 42, 0.22);
}

body.theme-light .bim-workspace__surface {
  border-color: #dbe5f1;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow:
    0 32px 80px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.theme-light .bim-workspace__eyebrow,
body.theme-light .bim-workspace__inspector-eyebrow,
body.theme-light .bim-workspace__property-label {
  color: #2563eb;
}

body.theme-light .bim-workspace__title,
body.theme-light .bim-workspace__inspector-title {
  color: #0f172a;
}

body.theme-light .bim-workspace__subtitle,
body.theme-light .bim-workspace__hint,
body.theme-light .bim-workspace__inspector-meta {
  color: #64748b;
}

body.theme-light .bim-workspace__mode-switch,
body.theme-light .bim-workspace__toolbar,
body.theme-light .bim-workspace__inspector,
body.theme-light .bim-workspace__property,
body.theme-light .bim-workspace__properties-empty,
body.theme-light .bim-workspace__level {
  border-color: #dbe5f1;
  background: rgba(255, 255, 255, 0.88);
}

body.theme-light .bim-workspace__mode {
  color: #64748b;
}

body.theme-light .bim-workspace__mode:hover,
body.theme-light .bim-workspace__mode:focus-visible {
  background: #f8fbff;
  color: #0f172a;
}

body.theme-light .bim-workspace__mode.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

body.theme-light .bim-workspace__close {
  border-color: #dbe5f1;
  background: #ffffff;
  color: #0f172a;
}

body.theme-light .bim-workspace__property-value,
body.theme-light .bim-workspace__properties-empty {
  color: #334155;
}

body.theme-light .bim-workspace__stage--3d:not([data-bim-bg-theme]),
body.theme-light .bim-workspace__stage--3d[data-bim-bg-theme="light"] {
  border-color: #dbe5f1;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(244, 247, 250, 0.98) 54%, rgba(230, 236, 243, 1)),
    linear-gradient(180deg, #fbfdff, #eef3f8);
}

@media (max-width: 1280px) {
  .bim-workspace__surface {
    inset: 48px 20px 20px 20px;
    padding: 18px;
  }

  .bim-workspace__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .bim-workspace__titlebar {
    grid-template-columns: minmax(0, calc(100% - 338px)) minmax(260px, 1fr) auto;
    min-height: 176px;
  }

  .bim-workspace__actions {
    justify-content: flex-start;
  }

  .bim-workspace__body {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 980px) {
  .bim-viewer-action-stack {
    justify-self: stretch;
    width: 100%;
  }

  .bim-workspace__surface {
    inset: 42px 14px 14px 14px;
  }

  .bim-workspace__toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .bim-workspace__diagnostics {
    justify-content: flex-start;
    margin-left: 0;
    flex-basis: auto;
    text-align: left;
  }

  .bim-workspace__diagnostic-warning {
    max-width: 100%;
  }

  .bim-workspace__hint {
    text-align: left;
  }

  .bim-workspace__stage .bim-visual-stage {
    min-height: 420px;
  }

  .bim-workspace__stage--3d {
    min-height: 420px;
  }

  .bim-workspace__inspector {
    max-height: 320px;
  }
}

body.theme-light .bim-visual-shape--column,
body.theme-light .bim-visual-shape--point-marker {
  stroke: rgba(15, 23, 42, 0.48);
}

label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Группировка форм */
.form-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.form-group:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.form-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================
   RESULT BLOCKS
   ========================= */

.result {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
  white-space: normal;
  transition: all 0.3s ease;
  line-height: 1.6;
  height: auto;
  min-height: 0;
}

.result.ok {
  border-color: #34d399;
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.result.not-ok {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.result .reg-basis {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 11px;
  color: #cbd5e1;
}

.result .reg-basis-title {
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #e2e8f0;
}

.result .reg-basis-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result .reg-basis-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.result .reg-basis-item-field {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.result .reg-basis-item-label {
  color: #94a3b8;
}

.result .reg-basis-item-value {
  color: #e5e7eb;
}

.result .reg-basis-source {
  margin-left: auto;
}

.result .reg-basis-source-link {
  color: #60a5fa;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
}

.result .reg-basis-source-fallback {
  color: #94a3b8;
  font-style: italic;
}

/* Естественная высота блоков результатов проверки */
#reinforcementResult,
#geometryResult,
#strengthResult,
#geoResult {
  max-height: none;
  overflow: visible;
  margin-top: 8px;
}



#reinforcementResult::-webkit-scrollbar,
#geometryResult::-webkit-scrollbar,
#strengthResult::-webkit-scrollbar {
  width: 8px;
}

#reinforcementResult::-webkit-scrollbar-track,
#geometryResult::-webkit-scrollbar-track,
#strengthResult::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#reinforcementResult::-webkit-scrollbar-thumb,
#geometryResult::-webkit-scrollbar-thumb,
#strengthResult::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#reinforcementResult::-webkit-scrollbar-thumb:hover,
#geometryResult::-webkit-scrollbar-thumb:hover,
#strengthResult::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Светлая тема для скроллбаров результатов */
body.theme-light #reinforcementResult::-webkit-scrollbar-track,
body.theme-light #geometryResult::-webkit-scrollbar-track,
body.theme-light #strengthResult::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light #reinforcementResult::-webkit-scrollbar-thumb,
body.theme-light #geometryResult::-webkit-scrollbar-thumb,
body.theme-light #strengthResult::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light #reinforcementResult::-webkit-scrollbar-thumb:hover,
body.theme-light #geometryResult::-webkit-scrollbar-thumb:hover,
body.theme-light #strengthResult::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* =========================
   MODALS (CENTERED)
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  padding: 16px;
}

.modal-content {
  width: min(460px, 100%);
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #e5e7eb;
}

.modal-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-popover {
  position: fixed;
  z-index: 1400;
  width: min(228px, calc(100vw - 20px));
  padding: 12px 8px 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.98);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.confirm-popover__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

.confirm-popover__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.confirm-popover__button.lg-btn,
.confirm-popover__button.lg-btn--pill {
  min-width: 74px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  box-shadow: none;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

.confirm-popover__button .lg-btn__label {
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: #ffffff !important;
}

.confirm-popover__button:hover,
.confirm-popover__button:focus-visible,
.confirm-popover__button:active,
.confirm-popover__button.lg-btn:hover,
.confirm-popover__button.lg-btn:focus-visible,
.confirm-popover__button.lg-btn:active,
.confirm-popover__button.lg-btn--pill:hover,
.confirm-popover__button.lg-btn--pill:focus-visible,
.confirm-popover__button.lg-btn--pill:active {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  --lg-raise: 0px !important;
  --lg-scale: 1 !important;
  --lg-tilt-x: 0deg !important;
  --lg-tilt-y: 0deg !important;
}

.confirm-popover__button .lg-btn__glow {
  display: none;
}

.confirm-popover__button--primary.lg-btn,
.confirm-popover__button--primary.lg-btn--pill {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fee2e2;
}

body.theme-light .modal {
  background: rgba(15, 23, 42, 0.25);
}

body.theme-light .modal-content {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.theme-light .modal-body {
  color: #0f172a;
}

body.theme-light .confirm-popover {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

body.theme-light .confirm-popover__title {
  color: #0f172a;
}

body.theme-light .confirm-popover__button--primary.lg-btn,
body.theme-light .confirm-popover__button--primary.lg-btn--pill {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
  color: #b91c1c;
}

.sep {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
  transition: border-color 0.2s ease;
}

/* =========================
   NODES LIST
   ========================= */

.nodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nodes::-webkit-scrollbar {
  width: 6px;
}

.nodes::-webkit-scrollbar-track {
  background: transparent;
}

.nodes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.nodes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.node:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateX(4px);
}

.node:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.node-title {
  font-weight: 600;
  font-size: 14px;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

.node-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Улучшенные стили для узлов */
.node-enhanced {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 12px;
  cursor: default;
}

.node-enhanced:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.node-enhanced:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.node-content {
  flex: 1;
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.node-enhanced .node-title {
  font-size: 15px;
  gap: 8px;
}

.node-icon {
  font-size: 18px;
  opacity: 0.9;
}

.node-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid #60a5fa;
}

.node-data-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.node-label {
  color: #94a3b8;
  font-weight: 500;
  min-width: 100px;
  flex-shrink: 0;
}

.node-values {
  color: #cbd5e1;
  flex: 1;
}

.node-values strong {
  color: #f1f5f9;
  font-weight: 600;
}

.node-enhanced .node-actions {
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================
   Улучшения UI для блока "Узлы" в геодезии
   ========================= */

/* Увеличиваем ширину левой колонки в геодезии */
#sectionGeo .split {
  gap: 20px;
}

#sectionGeo .split .col:first-child {
  flex: 0 0 420px;
  min-width: 420px;
  max-width: 460px;
}

#sectionGeo .split .card:last-child {
  flex: 1;
  min-width: 0;
}

/* Улучшаем список узлов */
#sectionGeo .nodes {
  max-height: 500px;
  padding: 8px 4px 8px 0;
  gap: 12px;
}

#sectionGeo .nodes::-webkit-scrollbar {
  width: 8px;
}

#sectionGeo .nodes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#sectionGeo .nodes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#sectionGeo .nodes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Улучшаем карточки узлов */
#sectionGeo .node-enhanced {
  padding: 20px;
  gap: 16px;
  margin-bottom: 0;
}

#sectionGeo .node-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Улучшаем заголовок карточки */
#sectionGeo .node-header {
  margin-bottom: 16px;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

#sectionGeo .node-enhanced .node-title {
  font-size: 16px;
  line-height: 1.5;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#sectionGeo .node-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* Улучшаем данные узла */
#sectionGeo .node-data {
  padding: 16px;
  gap: 12px;
  border-radius: 10px;
}

#sectionGeo .node-data-row {
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  align-items: baseline;
}

#sectionGeo .node-label {
  min-width: 80px;
  font-weight: 600;
  font-size: 13px;
}

#sectionGeo .node-values {
  line-height: 1.6;
  word-break: break-word;
}

#sectionGeo .node-values strong {
  font-weight: 600;
}

/* Улучшаем кнопки действий */
#sectionGeo .node-enhanced .node-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#sectionGeo .node-enhanced .node-actions .btn-small {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  line-height: 1.4;
}

#sectionGeo .node-enhanced .node-actions .btn-small span {
  font-size: 16px;
  flex-shrink: 0;
}

/* Светлая тема для геодезии */
body.theme-light #sectionGeo .nodes::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light #sectionGeo .nodes::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light #sectionGeo .nodes::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

body.theme-light #sectionGeo .node-enhanced .node-actions {
  border-top-color: #e5e7eb;
}

/* =========================
   Улучшения UI для модулей Армирование, Геометрия, Прочность
   ========================= */

/* Увеличиваем ширину левой колонки */
#reinforcement .split,
#geometry .split,
#strength .split {
  gap: 20px;
}

#reinforcement .split .col:first-child,
#geometry .split .col:first-child,
#strength .split .col:first-child {
  flex: 0 0 420px;
  min-width: 420px;
  max-width: 460px;
}

#reinforcement .split .card:last-child,
#geometry .split .card:last-child,
#strength .split .card:last-child {
  flex: 1;
  min-width: 0;
  /* Фон наследуется от .card */
}

/* Скролл для правой панели геодезии */
#sectionGeo .split .card:last-child {
  flex: 1;
  min-width: 0;
  /* Фон наследуется от .card */
}

/* Блок действий в левой панели */
.actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Локально изолируем левую колонку геодезии, чтобы hover-glow кнопок
   и любые blur/shadow-эффекты не рисовались поверх правой части формы. */
#sectionGeo .wizard-step[data-step="1"] > .card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  contain: paint;
}

#sectionGeo .wizard-step[data-step="1"] > .card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#sectionGeo .actions {
  position: relative;
  isolation: isolate;
}

.actions button {
  width: 100%;
}

.actions .row {
  margin: 0;
  gap: 8px;
}

.actions .row button {
  flex: 1;
}

/* =========================
   ACTION MENUS (⋯)
   ========================= */

.action-menu {
  position: relative;
  display: inline-flex;
}

.action-menu-right {
  margin-left: auto;
}

.menu-trigger {
  flex: 0 0 auto;
  width: 40px;
  padding: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.actions .row .menu-trigger {
  flex: 0 0 auto;
}

.menu-trigger:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.12);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 2000;
}

.menu-panel.open {
  display: block;
}

.menu-panel.menu-panel--up {
  top: auto;
  bottom: calc(100% + 6px);
}

.menu-panel.menu-panel--left {
  right: auto;
  left: 0;
}

.menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  box-shadow: none;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: none;
  box-shadow: none;
}

.menu-danger {
  color: #f87171;
}

.menu-danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

/* Светлая тема для блока действий */
body.theme-light .actions {
  border-top-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .menu-panel {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

body.theme-light .menu-item {
  color: #0f172a;
}

body.theme-light .menu-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

body.theme-light .menu-danger {
  color: #dc2626;
}

/* Стилизация скроллбара для правой панели */
#reinforcement .split .card:last-child::-webkit-scrollbar,
#geometry .split .card:last-child::-webkit-scrollbar,
#strength .split .card:last-child::-webkit-scrollbar,
#sectionGeo .split .card:last-child::-webkit-scrollbar {
  width: 8px;
}

#reinforcement .split .card:last-child::-webkit-scrollbar-track,
#geometry .split .card:last-child::-webkit-scrollbar-track,
#strength .split .card:last-child::-webkit-scrollbar-track,
#sectionGeo .split .card:last-child::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#reinforcement .split .card:last-child::-webkit-scrollbar-thumb,
#geometry .split .card:last-child::-webkit-scrollbar-thumb,
#strength .split .card:last-child::-webkit-scrollbar-thumb,
#sectionGeo .split .card:last-child::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#reinforcement .split .card:last-child::-webkit-scrollbar-thumb:hover,
#geometry .split .card:last-child::-webkit-scrollbar-thumb:hover,
#strength .split .card:last-child::-webkit-scrollbar-thumb:hover,
#sectionGeo .split .card:last-child::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Улучшаем список сохранённых проверок */
#reinforcement .nodes,
#geometry .nodes,
#strength .nodes {
  max-height: 500px;
  padding: 8px 4px 8px 0;
  gap: 12px;
}

#reinforcement .nodes::-webkit-scrollbar,
#geometry .nodes::-webkit-scrollbar,
#strength .nodes::-webkit-scrollbar {
  width: 8px;
}

#reinforcement .nodes::-webkit-scrollbar-track,
#geometry .nodes::-webkit-scrollbar-track,
#strength .nodes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#reinforcement .nodes::-webkit-scrollbar-thumb,
#geometry .nodes::-webkit-scrollbar-thumb,
#strength .nodes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#reinforcement .nodes::-webkit-scrollbar-thumb:hover,
#geometry .nodes::-webkit-scrollbar-thumb:hover,
#strength .nodes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Улучшаем карточки сохранённых проверок */
#reinforcement .node-enhanced,
#geometry .node-enhanced,
#strength .node-enhanced {
  padding: 20px;
  gap: 16px;
  margin-bottom: 0;
}

#reinforcement .node-enhanced:hover,
#geometry .node-enhanced:hover,
#strength .node-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Улучшаем заголовок карточки */
#reinforcement .node-header,
#geometry .node-header,
#strength .node-header {
  margin-bottom: 16px;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

#reinforcement .node-enhanced .node-title,
#geometry .node-enhanced .node-title,
#strength .node-enhanced .node-title {
  font-size: 16px;
  line-height: 1.5;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#reinforcement .node-icon,
#geometry .node-icon,
#strength .node-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* Улучшаем данные проверки */
#reinforcement .node-data,
#geometry .node-data,
#strength .node-data {
  padding: 16px;
  gap: 12px;
  border-radius: 10px;
}

#reinforcement .node-data-row,
#geometry .node-data-row,
#strength .node-data-row {
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  align-items: baseline;
}

#reinforcement .node-label,
#geometry .node-label,
#strength .node-label {
  min-width: 80px;
  font-weight: 600;
  font-size: 13px;
}

#reinforcement .node-values,
#geometry .node-values,
#strength .node-values {
  line-height: 1.6;
  word-break: break-word;
}

#reinforcement .node-values strong,
#geometry .node-values strong,
#strength .node-values strong {
  font-weight: 600;
}

/* Улучшаем кнопки действий */
#reinforcement .node-enhanced .node-actions,
#geometry .node-enhanced .node-actions,
#strength .node-enhanced .node-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#reinforcement .node-enhanced .node-actions .btn-small,
#geometry .node-enhanced .node-actions .btn-small,
#strength .node-enhanced .node-actions .btn-small {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  line-height: 1.4;
}

#reinforcement .node-enhanced .node-actions .btn-small span,
#geometry .node-enhanced .node-actions .btn-small span,
#strength .node-enhanced .node-actions .btn-small span {
  font-size: 16px;
  flex-shrink: 0;
}

/* Светлая тема */
body.theme-light #reinforcement .nodes::-webkit-scrollbar-track,
body.theme-light #geometry .nodes::-webkit-scrollbar-track,
body.theme-light #strength .nodes::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light #reinforcement .nodes::-webkit-scrollbar-thumb,
body.theme-light #geometry .nodes::-webkit-scrollbar-thumb,
body.theme-light #strength .nodes::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light #reinforcement .nodes::-webkit-scrollbar-thumb:hover,
body.theme-light #geometry .nodes::-webkit-scrollbar-thumb:hover,
body.theme-light #strength .nodes::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

body.theme-light #reinforcement .node-enhanced .node-actions,
body.theme-light #geometry .node-enhanced .node-actions,
body.theme-light #strength .node-enhanced .node-actions {
  border-top-color: #e5e7eb;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  #reinforcement .split,
  #geometry .split,
  #strength .split {
    flex-direction: column;
    gap: 16px;
  }

  #reinforcement .split .col:first-child,
  #geometry .split .col:first-child,
  #strength .split .col:first-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  #reinforcement .split .card:last-child,
  #geometry .split .card:last-child,
  #strength .split .card:last-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-height: none;
    overflow-y: visible;
  }
  
  #sectionGeo .split .card:last-child {
    max-height: none;
    overflow-y: visible;
  }

  #reinforcement .nodes,
  #geometry .nodes,
  #strength .nodes {
    max-height: 400px;
  }

  #reinforcementResult,
  #geometryResult,
  #strengthResult {
    max-height: 250px;
  }
}

.btn-open {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}

.btn-open:hover {
  background: rgba(96, 165, 250, 0.3);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
}

.tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag.ok {
  border-color: #34d399;
  color: #34d399;
  background: rgba(34, 197, 94, 0.2);
}

.tag.bad {
  border-color: #f87171;
  color: #f87171;
  background: rgba(248, 113, 113, 0.2);
}

.tag.warning {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
}

.tag.info {
  background: rgba(147, 197, 253, 0.2);
  border-color: #93c5fd;
  color: #93c5fd;
}

.tag.empty {
  background: rgba(156, 163, 175, 0.2);
  border-color: #9ca3af;
  color: #9ca3af;
}

/* =========================
   TABLE (ЖУРНАЛ)
   ========================= */

.journal-status-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.journal-toolbar .journal-status-filters {
  margin-top: 0;
}

.journal-mini-analytics {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.journal-mini-analytics-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.journal-mini-analytics-item strong {
  color: #e2e8f0;
  font-weight: 700;
}

.journal-filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: none;
}

.journal-filter-btn:hover {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(148, 163, 184, 0.5);
  transform: none !important;
}

.journal-filter-btn.is-active {
  background: rgba(37, 99, 235, 0.26);
  border-color: rgba(96, 165, 250, 0.75);
  color: #dbeafe;
}

.journal-table-wrap {
  max-height: 62vh;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

#journal .journal-table-wrap:hover {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
  background: rgba(255, 255, 255, 0.04) !important;
  scrollbar-color: rgba(148, 163, 184, 0.58) rgba(148, 163, 184, 0.14);
}

.journal-table-wrap:focus-within {
  scrollbar-color: rgba(148, 163, 184, 0.58) rgba(148, 163, 184, 0.14);
}

.journal-table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.journal-table-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.journal-table-wrap::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.journal-table-wrap:hover::-webkit-scrollbar-track,
.journal-table-wrap:focus-within::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.14);
}

.journal-table-wrap:hover::-webkit-scrollbar-thumb,
.journal-table-wrap:focus-within::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.58);
}

.journal-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(191, 219, 254, 0.78);
}

.journal-table-wrap::-webkit-scrollbar-thumb:active {
  background: rgba(191, 219, 254, 0.9);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#journalTable {
  font-size: 13px;
}

.table thead {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

#journalTable thead th {
  position: static;
  background: rgba(15, 23, 42, 0.92);
}

#journalTable .journal-actions-head,
#journalTable .journal-actions-cell {
  width: 82px;
  min-width: 82px;
  text-align: center;
  white-space: nowrap;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  transition: background 0.15s ease;
}

/* Убираем разделительные линии в журнале */
#journalTable th,
#journalTable td {
  border-bottom: none;
  padding: 12px 14px;
}

.table th {
  font-weight: 600;
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Кликабельные строки журнала */
.journal-row-clickable {
  transition: background-color 0.18s ease;
}

.journal-row-clickable:hover {
  background-color: transparent !important;
}

/* Убрана стрелка при наведении */

.journal-row-clickable:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background-color: rgba(59, 130, 246, 0.2);
}

.journal-row-clickable:active {
  background-color: transparent;
}

.journal-row-clickable.is-navigating {
  background-color: transparent !important;
}

.journal-row-clickable td {
  position: relative;
  transition: background-color 0.18s ease;
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.journal-row-clickable:hover td {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

.journal-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  text-transform: uppercase;
  white-space: nowrap;
}

.journal-status-badge.ok {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
}

.journal-status-badge.exceeded {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
}

.journal-status-badge.unknown {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.3);
}

.journal-row-clickable.journal-row-exceeded td {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.journal-row-clickable.journal-row-exceeded td:first-child {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.72);
}

.journal-row-clickable.journal-row-exceeded:hover td {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

.journal-row-clickable.is-navigating td {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

.journal-delete-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
  transform: none !important;
}

.journal-delete-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-delete-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(252, 165, 165, 0.58);
  color: #fecaca;
  transform: none !important;
}

.journal-issue-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin-right: 6px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.46);
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transform: none !important;
}

.journal-issue-btn:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(147, 197, 253, 0.7);
  color: #eff6ff;
  transform: none !important;
}

.journal-issue-btn:disabled {
  cursor: default;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
  opacity: 1;
}

.journal-issues-panel {
  padding: 12px;
}

.journal-issues-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.journal-issues-head .subtitle {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.35;
}

.journal-issues-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.35);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.journal-issues-stats strong {
  color: #f8fafc;
  font-weight: 800;
}

.journal-issue-empty {
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.22);
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.journal-issue-list {
  display: grid;
  gap: 7px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.journal-issue-card {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.28);
}

#journal .journal-issues-panel.card:hover,
#journal .journal-issue-card:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#journal .journal-issues-panel.card:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.journal-issue-card--overdue {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(127, 29, 29, 0.18);
}

.journal-issue-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.journal-issue-card__title {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.journal-issue-card__status {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex-shrink: 0;
}

.journal-issue-card__status-label {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.journal-issue-card__meta,
.journal-issue-card__description {
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.3;
}

.journal-issue-card__description {
  color: #e2e8f0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.journal-issue-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.journal-issue-status--issued,
.journal-issue-status--in_progress,
.journal-issue-status--ready_for_review {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
}

.journal-issue-status--overdue {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.journal-issue-status--closed {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

.journal-issue-card__action {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.32);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
  transform: none !important;
}

.journal-issue-card__action:hover {
  border-color: rgba(147, 197, 253, 0.62);
  background: rgba(30, 41, 59, 0.52);
  color: #ffffff;
  transform: none !important;
}

.journal-issue-card__action-note {
  color: #aab9cf;
  font-size: 10px;
  line-height: 1.3;
}

.journal-issue-card__repeat {
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.22);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.3;
}

.journal-issue-card__repeat--linked {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
}

.journal-issue-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.journal-issue-card__repeat-action {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
  transform: none !important;
}

.journal-issue-card__repeat-action:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, 0.62);
  background: rgba(37, 99, 235, 0.24);
  color: #eff6ff;
  transform: none !important;
}

.journal-issue-card__repeat-action:disabled {
  cursor: default;
  opacity: 0.78;
}

.journal-issue-card__delete {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
  transform: none !important;
}

.journal-issue-card__delete:hover {
  border-color: rgba(252, 165, 165, 0.58);
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  transform: none !important;
}

.journal-empty-cell {
  text-align: center !important;
  color: #94a3b8;
  padding: 14px 10px !important;
}

/* Плавное увеличение строки (без разбиения на ячейки) */
#journalTable tbody tr.journal-row-clickable {
  transform-origin: initial;
  transition: none;
  will-change: auto;
}

#journalTable tbody tr.journal-row-clickable:hover {
  transform: none;
  z-index: auto;
}

/* Подсветка элементов при навигации */
.highlight {
  animation: highlightPulse 2s ease-in-out;
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.table tr {
  transition: background 0.15s ease;
}

.table tr:not(.journal-row-clickable):hover td {
  background: rgba(255, 255, 255, 0.05);
}

.table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* =========================
   SUMMARY
   ========================= */

.strong {
  font-weight: 600;
  font-size: 14px;
}

/* =========================
   CHART
   ========================= */

#strengthChart {
  display: none;
  margin-top: 14px;
  max-height: 260px;
}

#strengthResult:empty {
  display: none;
  margin-top: 0;
  padding: 0;
  border: 0;
}


/* =========================
   SETTINGS MODAL
   ========================= */

.hidden {
  display: none !important;
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1200;
  pointer-events: auto;
}

.settings-overlay.active {
  pointer-events: auto; /* Блокирует клики только когда активен */
}

.settings-panel {
  position: fixed;
  right: 20px;
  top: 70px;
  width: 220px;
  background: #020b1b;
  border-radius: 12px;
  border: 1px solid #111827;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  padding: 10px 10px 12px;
  z-index: 1201;
}

.article-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #020b1b;
  border-radius: 12px;
  border: 1px solid #111827;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.article-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #1e293b;
}

.article-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #f1f5f9;
}

.article-modal-content {
  padding: 24px;
  overflow-y: auto;
  color: #cbd5e1;
  line-height: 1.6;
}

.article-modal-content h3 {
  color: #f1f5f9;
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-modal-content h4 {
  color: #e2e8f0;
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.article-modal-content p {
  margin-bottom: 16px;
}

.article-modal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-modal-content li {
  margin-bottom: 8px;
}

.article-modal-content a {
  color: #3b82f6;
  text-decoration: underline;
}

.article-modal-content a:hover {
  color: #60a5fa;
}

.hidden {
  display: none !important;
}
  font-size: 13px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.settings-title-main {
  font-weight: 600;
  font-size: 14px;
}

.btn-icon {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 14px;
}

.settings-section {
  margin-top: 4px;
}

.settings-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-option input {
  min-width: auto;
  width: 14px;
  height: 14px;
  margin: 0;
}

.settings-option span {
  font-size: 12px;
  line-height: 1.2;
}

.settings-option:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* Сегментированный переключатель темы */
.theme-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  position: relative;
}

.theme-switcher-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  user-select: none;
}

.theme-switcher-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.theme-switcher-option span {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* Выбранная опция */
.theme-switcher-option input:checked + span {
  color: #f1f5f9;
  font-weight: 600;
}

/* Современные браузеры с поддержкой :has() */
.theme-switcher-option:has(input:checked) {
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  box-shadow: 
    0 2px 8px rgba(96, 165, 250, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
}

.theme-switcher-option:has(input:checked) span {
  color: #f1f5f9;
  font-weight: 600;
}

/* Hover для невыбранных опций */
.theme-switcher-option:not(:has(input:checked)):hover {
  background: rgba(255, 255, 255, 0.04);
}

.theme-switcher-option:not(:has(input:checked)):hover span {
  color: #cbd5e1;
}

/* Светлая тема для сегментированного переключателя */
body.theme-light .theme-switcher {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .theme-switcher-option span {
  color: #6b7280;
}

body.theme-light .theme-switcher-option:has(input:checked) {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 2px 8px rgba(59, 130, 246, 0.1),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .theme-switcher-option:has(input:checked) span {
  color: #1e40af;
  font-weight: 600;
}

body.theme-light .theme-switcher-option:not(:has(input:checked)):hover {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-light .theme-switcher-option:not(:has(input:checked)):hover span {
  color: #374151;
}

/* Fallback для браузеров без поддержки :has() - используем соседний селектор */
@supports not selector(:has(*)) {
  .theme-switcher-option input:checked ~ span {
    color: #f1f5f9;
    font-weight: 600;
  }
  
  body.theme-light .theme-switcher-option input:checked ~ span {
    color: #1e40af;
    font-weight: 600;
  }
  
  /* Для фона выбранной опции без :has() используем класс через JS */
  .theme-switcher-option.selected {
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.4);
    box-shadow: 
      0 2px 8px rgba(96, 165, 250, 0.15),
      inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
  }
  
  body.theme-light .theme-switcher-option.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
      0 2px 8px rgba(59, 130, 246, 0.1),
      inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
  }
}

/* =========================
   LIGHT THEME (обновлённая)
   ========================= */

body.theme-light {
  background: #f3f4f6; /* мягкий серый, чтобы карточки и блоки читались */
  color: #111827;
}

/* header + main */

body.theme-light header {
  background: #000000;
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  border-bottom: none;
  box-shadow: none;
}

body.theme-light .brand h1 {
  color: #f8fafc;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  background-clip: initial;
}

body.theme-light .brand-brick {
  fill: #3b82f6;
  stroke: #2563eb;
}

body.theme-light .brand:hover .brand-brick {
  fill: #2563eb;
  stroke: #1d4ed8;
}

body.theme-light .brand-icon {
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

body.theme-light .brand:hover .brand-icon {
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.4));
}

body.theme-light .header-icon-btn,
body.theme-light .theme-toggle-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}

body.theme-light .header-icon-btn:hover,
body.theme-light .theme-toggle-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  color: rgba(255, 255, 255, 0.8);
}

body.theme-light main {
  background: #f8fafc;           /* немного светлее фона страницы */
  border-left: 0;
  border-right: 0;
}

body.theme-light .sep {
  border-top-color: #e5e7eb;
}

/* базовый текст */

body.theme-light .meta,
body.theme-light label,
body.theme-light .subtitle,
body.theme-light .caption,
body.theme-light .node-meta {
  color: #374151;
}

/* заголовки секций (Геодезическая привязка, Контроль армирования и т.д.) */

body.theme-light .section h2 {
  color: #111827;
}

/* статус модуля */

body.theme-light .mod-status {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #4b5563;
}

/* Inputs / selects */

body.theme-light input,
body.theme-light select {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364758b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

body.theme-light select {
  background-color: #ffffff;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364758b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
}

body.theme-light input:focus,
body.theme-light select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.15),
    0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.theme-light select:focus {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

/* Светлая тема для select */
body.theme-light .ui-select,
body.theme-light select {
  background: #ffffff !important;
  border-color: #d1d5db;
  color: #111827 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364758b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body.theme-light .ui-select:hover,
body.theme-light select:hover {
  background: #ffffff !important;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .ui-select:focus,
body.theme-light select:focus {
  background: #ffffff !important;
  border-color: #3b82f6;
  box-shadow: 
    0 2px 8px rgba(59, 130, 246, 0.12),
    0 0 0 2px rgba(59, 130, 246, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body.theme-light select option {
  background: #ffffff;
  color: #111827;
  padding: 12px 16px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 400;
}

body.theme-light select option:checked {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  font-weight: 500;
}

body.theme-light input::placeholder,
body.theme-light select::placeholder {
  color: #9ca3af;
}

body.theme-light input:disabled,
body.theme-light select:disabled {
  background: #f3f4f6;
  color: #1f2937;
  opacity: 0.8;
}

body.theme-light input[readonly],
body.theme-light input[readonly]:disabled {
  background: #f3f4f6;
  color: #1f2937;
  opacity: 1;
}

/* панель объекта */

body.theme-light .create-project-bar {
  background: #ffffff;
  border-color: #e5e7eb;
}

body.theme-light .header-date-input {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

body.theme-light .header-date-input:hover {
  border-color: #d1d5db;
  background: #ffffff;
}

body.theme-light .header-date-input:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Светлая тема для datepicker */
body.theme-light input[type="date"] {
  color-scheme: light;
}

body.theme-light input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.2) brightness(0.8);
}

body.theme-light input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(0.3) brightness(0.9);
}

body.theme-light .construction-bar .project-select {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .construction-bar .project-select:hover {
  border-color: #d1d5db;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: none;
}

body.theme-light .construction-bar .project-select:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.15),
    0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

body.theme-light .construction-bar {
  background: #f9fafb;
  border-color: #e5e7eb;
}

body.theme-light .construction-bar select {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .construction-bar select:hover {
  border-color: #d1d5db;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: none;
}

body.theme-light .construction-bar select:focus {
  outline: none !important;
  border-color: #3b82f6;
  background: #ffffff;
  /* Мягкая акцентная рамка, без яркого синего фона */
  box-shadow: 
    0 2px 8px rgba(59, 130, 246, 0.12),
    0 0 0 2px rgba(59, 130, 246, 0.08);
  /* Убираем transform, чтобы dropdown визуально продолжал input */
  transform: none;
}

body.theme-light .construction-label {
  color: #6b7280;
}

/* вкладки */

body.theme-light .tabs {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(var(--tabs-glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--tabs-glass-blur)) saturate(160%);
}

body.theme-light .tab {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.theme-light .tab:hover {
  background: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
  box-shadow:
    0 10px 22px rgba(59, 130, 246, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.theme-light .tab.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow:
    0 12px 24px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.theme-light .tab .lg-btn__label {
  color: #475569;
}

body.theme-light .tab.active .lg-btn__label {
  color: #ffffff;
}

body.theme-light .tab::before {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.65) 55%, rgba(255, 255, 255, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 16px rgba(15, 23, 42, 0.08);
}

body.theme-light .tab::after {
  background:
    radial-gradient(140px 90px at 20% 20%, rgba(148, 197, 255, 0.4), rgba(148, 197, 255, 0)),
    radial-gradient(200px 120px at 85% -10%, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0));
}

/* карточки */

body.theme-light .card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

/* РЕЗУЛЬТАТЫ ПРОВЕРОК – как в тёмной теме */

body.theme-light .result {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
}

body.theme-light .result.ok {
  background: rgba(34, 197, 94, 0.16);  /* зелёный */
  border-color: #22c55e;
}

body.theme-light .result.not-ok {
  background: rgba(248, 113, 113, 0.16); /* красный */
  border-color: #f97373;
}

body.theme-light .result .reg-basis {
  border-top-color: rgba(15, 23, 42, 0.15);
  color: #475569;
}

body.theme-light .result .reg-basis-title {
  color: #0f172a;
}

body.theme-light .result .reg-basis-item-label {
  color: #64748b;
}

body.theme-light .result .reg-basis-item-value {
  color: #0f172a;
}

body.theme-light .result .reg-basis-source-link {
  color: #2563eb;
}

body.theme-light .result .reg-basis-source-fallback {
  color: #64748b;
}

/* узлы */

body.theme-light .node {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #1f2937;
}

body.theme-light .node:hover {
  background: #f9fafb;
  border-color: #3b82f6;
}

body.theme-light .node-title {
  color: #1f2937;
}

body.theme-light .node-meta {
  color: #6b7280;
}

body.theme-light .tag {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

/* таблица журнала */

body.theme-light .table thead {
  background: #f3f4f6;
}

body.theme-light #journalTable thead th {
  background: rgba(243, 244, 246, 0.96);
}

body.theme-light .table th {
  color: #6b7280;
}

body.theme-light .table td {
  border-bottom-color: #e5e7eb;
}

body.theme-light .table tr:nth-child(even) td {
  background: #f9fafb;
}

/* Убираем линии журнала в обеих темах */
#journalTable th,
#journalTable td {
  border-bottom: none !important;
}

body.theme-light .journal-filter-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #334155;
}

body.theme-light .journal-mini-analytics {
  background: #ffffff;
  border-color: #d1d5db;
  color: #334155;
}

body.theme-light .journal-mini-analytics-item strong {
  color: #0f172a;
}

body.theme-light .journal-filter-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.theme-light .journal-filter-btn.is-active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1e3a8a;
}

body.theme-light #journal .journal-table-wrap:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
  scrollbar-color: rgba(100, 116, 139, 0.48) rgba(15, 23, 42, 0.1);
}

body.theme-light .journal-table-wrap {
  scrollbar-color: transparent transparent;
}

body.theme-light .journal-table-wrap:focus-within {
  scrollbar-color: rgba(100, 116, 139, 0.48) rgba(15, 23, 42, 0.1);
}

body.theme-light .journal-table-wrap:hover::-webkit-scrollbar-track,
body.theme-light .journal-table-wrap:focus-within::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.1);
}

body.theme-light .journal-table-wrap:hover::-webkit-scrollbar-thumb,
body.theme-light .journal-table-wrap:focus-within::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.48);
}

body.theme-light .journal-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.58);
}

body.theme-light .journal-table-wrap::-webkit-scrollbar-thumb:active {
  background: rgba(37, 99, 235, 0.68);
}

body.theme-light .journal-status-badge.ok {
  color: #15803d;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.34);
}

body.theme-light .journal-status-badge.exceeded {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.34);
}

body.theme-light .journal-status-badge.unknown {
  color: #64748b;
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.32);
}

body.theme-light .journal-row-clickable td,
body.theme-light .journal-row-clickable.is-navigating td {
  background-color: #ffffff !important;
}

body.theme-light .journal-row-clickable:hover td {
  background-color: #f8fafc !important;
}

body.theme-light .journal-row-clickable.journal-row-exceeded td {
  background-color: #ffffff !important;
}

body.theme-light .journal-row-clickable.journal-row-exceeded td:first-child {
  box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.62);
}

body.theme-light .journal-row-clickable.journal-row-exceeded:hover td {
  background-color: #f8fafc !important;
}

body.theme-light .journal-delete-btn {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.09);
  color: #dc2626;
}

body.theme-light .journal-delete-btn:hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.16);
  color: #b91c1c;
}

body.theme-light .journal-issue-btn {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

body.theme-light .journal-issue-btn:hover {
  border-color: rgba(37, 99, 235, 0.52);
  background: rgba(37, 99, 235, 0.16);
  color: #1e40af;
}

body.theme-light .journal-issue-btn:disabled {
  border-color: rgba(22, 163, 74, 0.34);
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

body.theme-light .journal-issues-stats {
  background: #ffffff;
  border-color: #d1d5db;
  color: #334155;
}

body.theme-light .journal-issues-stats strong {
  color: #0f172a;
}

body.theme-light .journal-issue-empty {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

body.theme-light .journal-issue-card {
  border-color: #e2e8f0;
  background: #ffffff;
}

body.theme-light #journal .journal-issues-panel.card:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

body.theme-light .journal-issue-card--overdue {
  border-color: rgba(220, 38, 38, 0.34);
  background: #fff7f7;
}

body.theme-light .journal-issue-card__title {
  color: #0f172a;
}

body.theme-light .journal-issue-card__status-label {
  color: #64748b;
}

body.theme-light .journal-issue-card__meta {
  color: #475569;
}

body.theme-light .journal-issue-card__description {
  color: #1f2937;
}

body.theme-light .journal-issue-status {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #334155;
}

body.theme-light .journal-issue-status--issued,
body.theme-light .journal-issue-status--in_progress,
body.theme-light .journal-issue-status--ready_for_review {
  border-color: rgba(37, 99, 235, 0.34);
  background: #dbeafe;
  color: #1e3a8a;
}

body.theme-light .journal-issue-status--overdue {
  border-color: rgba(220, 38, 38, 0.34);
  background: #fee2e2;
  color: #991b1b;
}

body.theme-light .journal-issue-status--closed {
  border-color: rgba(22, 163, 74, 0.34);
  background: #dcfce7;
  color: #166534;
}

body.theme-light .journal-issue-card__action {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #1f2937;
}

body.theme-light .journal-issue-card__action:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #0f172a;
}

body.theme-light .journal-issue-card__action-note {
  color: #64748b;
}

body.theme-light .journal-issue-card__repeat {
  border-color: #dbe3ef;
  background: #f8fafc;
  color: #475569;
}

body.theme-light .journal-issue-card__repeat--linked {
  border-color: rgba(22, 163, 74, 0.28);
  background: #ecfdf5;
  color: #166534;
}

body.theme-light .journal-issue-card__repeat-action {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
}

body.theme-light .journal-issue-card__repeat-action:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.48);
  background: rgba(37, 99, 235, 0.14);
  color: #1e40af;
}

body.theme-light .journal-issue-card__delete {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

body.theme-light .journal-issue-card__delete:hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.15);
  color: #991b1b;
}

body.theme-light .journal-empty-cell {
  color: #64748b;
}

/* кнопки в шапке */

body.theme-light .logout-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

body.theme-light .logout-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

body.theme-light .profile-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

body.theme-light .profile-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.6);
  color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

body.theme-light .settings-btn,
body.theme-light .theme-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-color: #d1d5db;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .settings-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Кнопки в светлой теме */
body.theme-light button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.theme-light button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body.theme-light .btn-primary,
body.theme-light button.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

body.theme-light .btn-primary .lg-btn__label {
  color: #ffffff;
}

body.theme-light .btn-primary:hover,
body.theme-light button.btn-primary:hover {
  background: #1d4ed8;
}

body.theme-light #btnGeo,
body.theme-light #btnReinf,
body.theme-light #btnGeom,
body.theme-light #btnStrength {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

body.theme-light #btnGeo .lg-btn__label,
body.theme-light #btnReinf .lg-btn__label,
body.theme-light #btnGeom .lg-btn__label,
body.theme-light #btnStrength .lg-btn__label {
  color: #ffffff;
}

body.theme-light #btnGeo:hover,
body.theme-light #btnReinf:hover,
body.theme-light #btnGeom:hover,
body.theme-light #btnStrength:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

body.theme-light .btn-small {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
}

body.theme-light .btn-small:hover {
  background: #f9fafb;
  border-color: #3b82f6;
  color: #1f2937;
}

body.theme-light .btn-open {
  background: rgba(59, 130, 246, 0.1);
  border-color: #cbd5e1;
  color: #2563eb;
}

body.theme-light .btn-open:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #cbd5e1;
}

body.theme-light .btn-delete {
  background: rgba(239, 68, 68, 0.1);
  border-color: #fca5a5;
  color: #dc2626;
}

body.theme-light .btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #fca5a5;
}

body.theme-light button.btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

body.theme-light button.btn-secondary:hover {
  background: #f9fafb;
  border-color: #3b82f6;
}

body.theme-light button.btn-danger {
  background: #fecaca;
  color: #7f1d1d;
  border-color: #fecaca;
}

body.theme-light button.btn-danger:hover {
  background: #fca5a5;
  border-color: #fca5a5;
}

/* Узлы в светлой теме */
body.theme-light .node-enhanced {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.theme-light .node-enhanced:hover {
  background: #f9fafb;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

body.theme-light .node-enhanced:nth-child(even) {
  background: #f9fafb;
}

body.theme-light .node-enhanced .node-title {
  color: #1f2937;
}

body.theme-light .node-data {
  background: #f3f4f6;
  border-left-color: #3b82f6;
}

body.theme-light .node-label {
  color: #1e293b;
}

body.theme-light .node-values {
  color: #1e293b;
}

body.theme-light .node-values strong {
  color: #1e293b;
}

body.theme-light .node-enhanced .node-actions {
  border-top-color: #e5e7eb;
}

/* модалка */

body.theme-light .settings-panel {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body.theme-light .settings-backdrop {
  background: rgba(15, 23, 42, 0.35);
}

body.theme-light .article-modal {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body.theme-light .article-modal-header {
  border-bottom-color: #e5e7eb;
}

body.theme-light .article-modal-header h2 {
  color: #1e293b;
}

body.theme-light .article-modal-content {
  color: #475569;
}

body.theme-light .article-modal-content h3 {
  color: #1e293b;
}

body.theme-light .article-modal-content h4 {
  color: #334155;
}

/* профиль / карточки объектов */

body.theme-light .project-card {
  background: #ffffff;
  border-color: #e5e7eb;
}

body.theme-light .project-meta {
  color: #6b7280;
}

body.theme-light .projects-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light .projects-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light .projects-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

body.theme-light.profile-page .profile-projects-card::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light.profile-page .profile-projects-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light.profile-page .profile-projects-card::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Светлая тема для улучшенного профиля */
body.theme-light .profile-card-enhanced {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

body.theme-light .profile-avatar-upload {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3) 0%, rgba(255, 255, 255, 0.85) 100%);
  color: #334155;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

body.theme-light .profile-user-email {
  color: #1f2937;
}

body.theme-light .profile-user-label {
  color: #6b7280;
}

body.theme-light .profile-user-email-icon {
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.3);
}

body.theme-light .profile-copy-uid-link {
  color: #2563eb;
  border-bottom: none;
}

body.theme-light .profile-section-title {
  color: #4b5563;
}

body.theme-light .profile-projects-card {
  background: #ffffff;
  border-color: #e5e7eb;
}

body.theme-light .profile-projects-icon {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3) 0%, rgba(255, 255, 255, 0.85) 100%);
  color: #334155;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

body.theme-light .profile-projects-title {
  color: #1f2937;
}

body.theme-light .profile-projects-subtitle {
  color: #6b7280;
}

body.theme-light .profile-create-input {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #1f2937;
}

body.theme-light .profile-create-input:focus {
  background: #ffffff;
  border-color: #3b82f6;
}

body.theme-light .project-card:hover {
  background: #f9fafb;
  border-color: #3b82f6;
}

body.theme-light .project-title {
  color: #1f2937;
}

body.theme-light .project-meta {
  color: #6b7280;
}


/* =========================
   ADAPTIVE
   ========================= */

@media (max-width: 1024px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .controls {
    margin: 10px 0 0 0;
  }

  main {
    border: none;
  }

  .create-project-bar {
    flex-wrap: wrap;
  }

  .split {
    flex-direction: column;
  }
}

/* Мобильные устройства (портретная ориентация) */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  main {
    padding: 12px 12px 24px;
  }

  header {
    padding: 6px 10px !important;
    position: static;
    top: auto;
    z-index: 1000;
    gap: 10px !important;
    overflow: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 48px !important;
  }

  .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .brand-icon {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  .brand h1 {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  /* Скрываем дату на мобильных - экономим место */
  .header-date-input {
    display: none !important;
  }

  /* Кнопки-иконки на мобильных */
  .header-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
  }

  .header-icon-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .construction-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    margin: 12px 0;
    gap: 10px;
  }

  .construction-select-wrapper,
  .project-select-wrapper {
    min-width: 100%;
  }

  .bim-import-wrapper {
    min-width: 100%;
  }

  .bim-import-controls .btn-small {
    width: 100%;
  }

  /* Явный порядок для мобильных: Объект первый, Конструкция второй */
  .project-select-wrapper {
    order: 1;
  }

  .construction-select-wrapper {
    order: 2;
  }

  .construction-label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  /* Все сетки в одну колонку на мобильных */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .coordinate-grid-spacer {
    display: none;
  }
  
  /* Адаптивность для grid-4 */
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  
  @media (max-width: 560px) {
    .grid-4 {
      grid-template-columns: 1fr;
      gap: 10px;
    }
  }
}

/* Планшеты и средние экраны */
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  
  .grid-4 > div {
    min-width: 0;
  }
  
  .grid-4 select {
    min-width: 0;
    width: 100%;
  }

  /* Адаптивность для геодезии на мобильных */
  #sectionGeo .split {
    flex-direction: column;
    gap: 16px;
  }

  #sectionGeo .split .col:first-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  #sectionGeo .split .card:last-child {
    flex: 1 1 100%;
    min-width: 100%;
  }

  #sectionGeo .nodes {
    max-height: 400px;
  }

  /* Карточки */
  .card {
    padding: 14px;
    border-radius: 10px;
  }

  .card-title {
    font-size: 14px;
    margin-bottom: 12px;
  }

  /* Формы */
  input,
  select,
  textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px; /* Предотвращает авто-зум на iOS */
    min-height: 44px;
    border-radius: 8px;
    min-width: 0;
  }

  label {
    font-size: 11px;
    margin-bottom: 5px;
  }

  /* Кнопки */
  button {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
    min-width: 44px;
    margin-bottom: 8px;
  }

  /* Touch-friendly элементы */
  button,
  .tab,
  a,
  input[type="button"],
  input[type="submit"],
  select {
    min-height: 44px;
    min-width: 44px;
  }

  .settings-btn,
  .profile-btn {
    padding: 10px;
  }

  /* База знаний - мобильная оптимизация */
  .knowledge-article-view {
    padding: 16px 12px;
  }

  .knowledge-article-view h1 {
    font-size: 24px;
    margin-bottom: 16px;
    line-height: 1.2;
  }

  .article-header-actions {
    margin-bottom: 16px;
  }

  .article-header-actions .btn-primary {
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
    min-height: 40px;
  }

  .article-content {
    padding: 20px 16px;
    font-size: 14px;
  }

  .knowledge-scroll-top-btn {
    right: 14px;
    bottom: 84px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .knowledge-breadcrumbs {
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 8px 0;
    margin-bottom: 12px;
  }

  .knowledge-breadcrumbs a {
    font-size: 11px;
    padding: 4px 6px;
  }

  .btn-small {
    padding: 10px 14px;
    font-size: 12px;
    min-height: 40px;
  }

  /* Вкладки */
  .tabs {
    margin: 10px 0;
    gap: 4px;
    padding-bottom: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }

  .tab {
    padding: 8px 10px;
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
  }

  /* Разделение на колонки */
  .split {
    flex-direction: column;
    gap: 12px;
  }

  .split .col {
    width: 100%;
  }

  /* Результаты */
  .result {
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
  }

  /* Таблицы */
  .table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table thead,
  .table tbody,
  .table tr {
    display: block;
  }

  .table th,
  .table td {
    display: block;
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .table th {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
  }

  /* Журнал: фильтры в одну строку на мобильных */
  #journal .journal-status-filters {
    width: 100%;
    margin-top: 0;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #journal .journal-status-filters::-webkit-scrollbar {
    height: 0;
  }

  #journal .journal-filter-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 30px;
    margin: 0;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  /* Журнал: мобильная компактная таблица с горизонтальным скроллом */
  #journal .journal-table-wrap {
    max-height: 58vh;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scrollbar-gutter: stable both-edges;
  }

  #journalTable.table {
    display: table;
    width: 100%;
    min-width: 860px;
    table-layout: auto;
    font-size: 12px;
  }

  #journalTable.table thead {
    display: table-header-group;
  }

  #journalTable.table tbody {
    display: table-row-group;
  }

  #journalTable.table tr {
    display: table-row;
  }

  #journalTable.table th,
  #journalTable.table td {
    display: table-cell;
    padding: 8px 9px;
    white-space: nowrap;
    vertical-align: top;
  }

  #journalTable .journal-actions-head,
  #journalTable .journal-actions-cell {
    width: 78px;
    min-width: 78px;
  }

  #journalTable .journal-status-badge {
    padding: 4px 9px;
    font-size: 11px;
  }

  #journalTable .journal-delete-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin-bottom: 0;
  }

  #journalTable .journal-issue-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin-right: 6px;
  }

  #journalTable .journal-delete-btn svg {
    width: 14px;
    height: 14px;
  }

  #journal .journal-issues-head {
    display: grid;
    gap: 10px;
  }

  #journal .journal-issues-stats {
    justify-self: start;
    white-space: normal;
    flex-wrap: wrap;
  }

  #journal .journal-issue-card__head {
    display: grid;
  }

  #journal .journal-issue-card__status {
    justify-items: start;
  }

  #journal .journal-issue-status {
    justify-self: start;
  }

  #journalTable .journal-empty-cell {
    display: table-cell;
    text-align: center !important;
    padding: 14px 10px !important;
    white-space: normal;
  }

  /* Списки узлов */
  .nodes {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Модальные окна */
  .settings-panel {
    width: calc(100% - 32px);
    max-width: 100%;
    margin: 20px 16px;
    padding: 20px;
  }

  .create-project-bar select {
    width: 100%;
    max-width: none;
  }
}

/* =============== PROFILE PAGE =============== */

body.profile-page {
  --profile-shell-width: min(1240px, calc(100vw - 48px));
  --profile-feed-width: 324px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

.profile-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

body.profile-page .profile-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  max-width: none;
  margin: 0;
  padding-top: 4px;
  padding-bottom: 56px;
}

body.profile-page .projects-list {
  min-height: 0;
}

body.profile-page .profile-main .section.active {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(740px, 880px);
  grid-template-rows: auto auto 1fr;
  gap: 6px 20px;
  align-items: start;
  justify-content: center;
  align-content: start;
}

body.profile-page .profile-main .section.active h2,
body.profile-page .profile-main .section.active .subtitle {
  grid-column: 1 / -1;
}

body.profile-page .profile-main .section.active h2 {
  grid-row: 1;
  margin: 0 0 2px 0;
}

body.profile-page .profile-main .section.active .subtitle {
  grid-row: 2;
  margin: 0 0 6px 0;
}

body.profile-page .profile-card-enhanced {
  grid-column: 1;
  grid-row: 3;
  margin-bottom: 0;
  margin-top: 0;
  justify-self: stretch;
  width: min(100%, 350px);
}

body.profile-page .profile-projects-card {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  width: min(100%, 860px);
  max-height: 72vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-right: 0;
  position: relative;
}

@media (min-width: 769px) {
  body.profile-page .profile-projects-card {
    overflow: hidden;
  }

  body.profile-page .projects-list {
    min-height: 0;
    max-height: max(220px, calc(72vh - 220px));
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    position: relative;
  }
}

body.profile-page .profile-name-grid input {
  min-width: 0;
}

@media (min-width: 769px) {
  body.profile-page .projects-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.profile-page .projects-list::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

body.profile-page .profile-scroll-indicator {
  position: absolute;
  top: 8px;
  right: 3px;
  width: 5px;
  height: calc(100% - 16px);
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transform: translateX(2px);
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
  z-index: 3;
}

body.profile-page .profile-scroll-indicator-thumb {
  width: 100%;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(0);
  transition: transform 0.08s linear, background-color 0.22s ease;
}

body.profile-page .projects-list.is-scrolling .profile-scroll-indicator {
  opacity: 1;
  transform: translateX(0);
  background: rgba(255, 255, 255, 0.08);
}

body.profile-page .projects-list.is-scroll-fading .profile-scroll-indicator {
  opacity: 0;
  transform: translateX(1px);
}

body.profile-page .projects-list.is-scrolling .profile-scroll-indicator-thumb {
  background: rgba(255, 255, 255, 0.38);
}

body.profile-page .projects-list.is-scrolling .profile-scroll-indicator-thumb:hover {
  background: rgba(255, 255, 255, 0.46);
}

body.profile-page .projects-list:not(.has-scroll) .profile-scroll-indicator {
  opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  body.profile-page .profile-scroll-indicator,
  body.profile-page .profile-scroll-indicator-thumb {
    transition: none;
  }
}

/* Visible IFC model count in the global project toolbar. */
.bim-import-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 22px;
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.bim-import-count.has-files {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
}

body.theme-light .bim-import-count {
  background: rgba(255, 255, 255, 0.76);
  color: #64748b;
}

body.theme-light .bim-import-count.has-files {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

/* Help opens on hover/focus and eases into place. */
.help-popover {
  transform: translateY(-5px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.help-popover.is-open {
  transform: translateY(0) scale(1);
}

.module-help-toggle {
  cursor: help;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

/* Shared page and section entrance motion. */
body:not(.profile-page) main {
  animation: app-page-reveal 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.home-page .section.active {
  animation: app-section-reveal 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.home-page .wizard-step.is-active,
body.home-page .wizard-sheet.is-open .wizard-sheet-panel {
  animation: app-block-reveal 240ms ease-out both;
}

@keyframes app-page-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-section-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-block-reveal {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.997);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Denser inspection forms without shrinking touch targets. */
body.home-page .wizard .card {
  padding: 14px !important;
  border-radius: 12px;
}

body.home-page .wizard .card-title {
  margin-bottom: 10px;
}

body.home-page .wizard .grid-2,
body.home-page .wizard .grid-3,
body.home-page .wizard .grid-4 {
  gap: 10px 12px;
}

body.home-page .wizard label {
  margin-bottom: 4px;
}

body.home-page .wizard input,
body.home-page .wizard select,
body.home-page .wizard textarea,
body.home-page .wizard .ui-select {
  min-height: 42px;
  padding-block: 9px;
}

body.home-page .wizard textarea {
  min-height: 82px;
}

body.home-page .wizard .wizard-header {
  gap: 6px;
  margin-bottom: 10px;
}

/* Minimal summary: four compact module cards and one clear issues registry. */
body.home-page #sectionSummary .summary-overview-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

body.home-page #sectionSummary .summary-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 0;
  mask-image: none;
  -webkit-mask-image: none;
}

body.home-page #sectionSummary .summary-module-card {
  width: auto;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.home-page #sectionSummary .summary-module-header {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 6px;
}

body.home-page #sectionSummary .summary-module-stats {
  gap: 5px 10px;
}

body.home-page #sectionSummary .summary-module-stat {
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.home-page #sectionSummary .summary-module-stat--wide {
  display: none;
}

body.home-page #sectionSummary .summary-issues-panel {
  padding: 12px;
  box-shadow: none;
}

body.home-page #sectionSummary .summary-issues-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.home-page #sectionSummary .summary-issues-stats {
  justify-content: flex-end;
}

body.home-page #sectionSummary .summary-issues-list {
  max-height: 180px;
}

@media (max-width: 900px) {
  body.home-page #sectionSummary .summary-modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.home-page #sectionSummary .summary-modules-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home-page #sectionSummary .summary-issues-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home-page #sectionSummary .summary-issues-stats {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.profile-page) main,
  body.home-page .section.active,
  body.home-page .wizard-step.is-active,
  body.home-page .wizard-sheet.is-open .wizard-sheet-panel {
    animation: none !important;
  }

  .help-popover {
    transition: none;
  }
}

body.theme-light.profile-page .profile-scroll-indicator-thumb {
  background: rgba(100, 116, 139, 0.62);
}

body.theme-light.profile-page .projects-list.is-scrolling .profile-scroll-indicator {
  background: rgba(203, 213, 225, 0.58);
}

body.theme-light.profile-page .projects-list.is-scrolling .profile-scroll-indicator-thumb {
  background: rgba(100, 116, 139, 0.72);
}

body.theme-light.profile-page .projects-list.is-scrolling .profile-scroll-indicator-thumb:hover {
  background: rgba(71, 85, 105, 0.82);
}

/* Улучшенные стили для карточки профиля */
.profile-card-enhanced {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid rgba(96, 165, 250, 0.2);
  padding: 24px;
}

.profile-header-enhanced {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-user-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-upload {
  width: 108px;
  height: 108px;
  min-width: 108px;
  padding: 0;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.18) 0%, rgba(15, 23, 42, 0.42) 100%);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  isolation: isolate;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-avatar-upload::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 30% 20%, rgba(148, 163, 184, 0.2), transparent 60%);
  z-index: 0;
}

.profile-avatar-upload:hover,
.profile-avatar-upload:focus-visible {
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.38);
  transform: translateY(-1px);
}

.profile-avatar-upload:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.4);
  outline-offset: 2px;
}

.profile-avatar-upload.is-loading {
  cursor: progress;
}

.profile-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.profile-avatar-upload:hover .profile-avatar-overlay,
.profile-avatar-upload:focus-visible .profile-avatar-overlay,
.profile-avatar-upload.is-loading .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-upload.preview-empty .profile-avatar-overlay {
  background: rgba(15, 23, 42, 0.62);
}

.profile-user-details {
  flex: 1;
  min-width: 0;
  align-self: center;
}

.profile-user-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  font-weight: 600;
}

.profile-copy-uid-link {
  color: #93c5fd;
  font-size: 12px;
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  text-align: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.profile-copy-uid-link:hover {
  color: #bfdbfe;
  border-bottom: none;
}

.profile-copy-uid-link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.copy-cursor-toast {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -120%);
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
  animation: copyCursorToastIn 1200ms ease forwards;
}

@keyframes copyCursorToastIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -108%);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -120%);
  }
  56% {
    opacity: 1;
    transform: translate(-50%, -120%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -172%);
  }
}

.profile-user-email {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.28;
}

.profile-user-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  min-width: 0;
  flex-wrap: nowrap;
}

.profile-user-email-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 165, 250, 0.16);
  color: #c7d2fe;
  font-size: 12px;
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.profile-fields-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.profile-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 0;
}

.profile-save-btn {
  margin-top: 10px;
}

/* блок "Мои объекты" */

.profile-projects-card {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid rgba(96, 165, 250, 0.2);
  padding: 24px;
}

.profile-projects-header-enhanced {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 16px;
}

.profile-projects-title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-projects-search {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.profile-projects-search--combined {
  width: 100%;
  margin-left: 0;
  padding-right: 8px;
  box-sizing: border-box;
}

.profile-projects-search-input {
  width: 220px;
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  font-size: 13px;
}

.profile-create-input-wrapper--combined {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  min-width: 0;
}

.profile-create-input-wrapper--combined .profile-projects-search-input {
  width: 100%;
  min-width: 0;
}

.profile-projects-search-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.profile-projects-search-input:focus {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.12);
}

.profile-projects-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25) 0%, rgba(15, 23, 42, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-projects-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #f1f5f9;
}

.profile-projects-title #projectsCountBadge {
  color: #93c5fd;
  font-weight: 600;
}

body.profile-page .profile-create-project-btn.lg-btn--pill {
  white-space: nowrap;
  justify-self: end;
  max-width: 100%;
  width: auto;
  flex: none;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 6px 14px !important;
  border-radius: 28px !important;
}

@media (min-width: 769px) and (max-width: 980px) {
  body.profile-page .profile-create-input-wrapper--combined {
    grid-template-columns: minmax(0, 1fr);
  }

  body.profile-page .profile-create-project-btn.lg-btn--pill {
    justify-self: start;
    width: min(100%, 240px);
  }
}

.profile-projects-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.profile-create-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-create-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  font-size: 14px;
}

.profile-create-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.profile-projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 8px;
}

body.profile-page .profile-filter-tab.lg-btn--pill {
  min-width: 88px !important;
  min-height: 40px !important;
  padding: 6px 12px !important;
  justify-content: center;
}

.profile-create-project-btn .lg-btn__label,
.profile-filter-tab .lg-btn__label {
  font-size: 13px;
}

.profile-projects-header {
  align-items: flex-start;
}

/* список объектов */

.projects-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px 4px 8px 0;
}

.projects-list::-webkit-scrollbar {
  width: 8px;
}

.projects-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.projects-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.projects-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.project-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  cursor: pointer;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover,
.project-card:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-card:hover::before,
.project-card:focus-visible::before {
  opacity: 1;
}

.project-card:focus-visible {
  outline: none;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(96, 165, 250, 0.22);
}

.project-card.is-renaming,
.project-card.is-renaming-pending {
  cursor: default;
}

.project-card-main {
  flex: 1;
  min-width: 0;
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #f1f5f9;
}

.project-title-name,
.project-title-input {
  font: inherit;
  line-height: 1.25;
}

.project-title-name {
  color: inherit;
  text-align: left;
  cursor: text;
  display: inline-flex;
  align-items: baseline;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.18s ease, text-decoration-color 0.18s ease;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(148, 163, 184, 0.32);
  text-underline-offset: 2px;
}

.project-title-name:hover,
.project-title-name:focus-visible {
  color: inherit;
  outline: none;
  text-decoration-color: rgba(96, 165, 250, 0.44);
}

.project-title-input {
  flex: 0 1 auto;
  width: auto;
  min-width: 110px;
  max-width: min(100%, 28ch);
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.22);
  color: inherit;
  box-shadow: none;
}

.project-title-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.project-card.is-renaming-pending .project-title-name,
.project-card.is-renaming-pending .project-title-input {
  opacity: 0.7;
}

.project-title::before {
  content: "📋";
  font-size: 18px;
  opacity: 0.8;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

.project-meta > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-meta > div::before {
  opacity: 0.6;
  font-size: 11px;
}

.project-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 230px;
}

.project-card-actions .btn-small,
.history-actions .btn-small {
  min-width: 120px;
  text-align: center;
  justify-content: center;
}

.project-actions-open-row,
.project-actions-secondary-row,
.project-actions-tertiary-row {
  display: flex;
  gap: 8px;
}

.project-actions-open-row .btn-small,
.project-actions-secondary-row .btn-small,
.project-actions-tertiary-row .btn-small {
  flex: 1;
}

body.profile-page .project-actions-secondary-row .btn-small.lg-btn--pill,
body.profile-page .project-actions-tertiary-row .btn-small.lg-btn--pill {
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 5px 12px !important;
  border-radius: 24px !important;
}

body.profile-page .project-actions-secondary-row .btn-small .lg-btn__label,
body.profile-page .project-actions-tertiary-row .btn-small .lg-btn__label {
  font-size: 12px;
}

/* Profile page: higher contrast controls + expressive form blocks */
body.profile-page .profile-card-enhanced,
body.profile-page .profile-projects-card {
  border-width: 1.5px;
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.profile-page .profile-fields-section {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.18));
  border: 1px solid rgba(148, 163, 184, 0.24);
}

body.profile-page .profile-field-wrapper label {
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #cbd5e1;
}

body.profile-page .profile-name-grid input,
body.profile-page .profile-projects-search-input {
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.profile-page .profile-name-grid input:focus,
body.profile-page .profile-projects-search-input:focus {
  border-color: rgba(96, 165, 250, 0.68);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.profile-page .profile-save-btn.lg-btn--pill,
body.profile-page .profile-create-project-btn.lg-btn--pill,
body.profile-page .profile-filter-tab.lg-btn--pill,
body.profile-page .project-card-actions .btn-small.lg-btn--pill {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.78));
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.profile-page .profile-save-btn .lg-btn__label,
body.profile-page .profile-create-project-btn .lg-btn__label,
body.profile-page .profile-filter-tab .lg-btn__label,
body.profile-page .project-card-actions .btn-small .lg-btn__label {
  color: inherit;
  font-weight: 600;
}

body.profile-page .profile-save-btn.lg-btn--pill:hover,
body.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.profile-page .profile-filter-tab.lg-btn--pill:hover,
body.profile-page .project-card-actions .btn-small.lg-btn--pill:hover {
  border-color: rgba(96, 165, 250, 0.56);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.88), rgba(30, 41, 59, 0.86));
}

body.profile-page .project-card-actions .btn-small[data-act="open"] {
  border-color: rgba(96, 165, 250, 0.48);
}

body.profile-page .project-card-actions .btn-small[data-act="delete"] {
  border-color: rgba(239, 68, 68, 0.44);
  color: #fecaca;
}

body.theme-light.profile-page .profile-card-enhanced,
body.theme-light.profile-page .profile-projects-card {
  border-color: #cbd5e1 !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.theme-light.profile-page .profile-fields-section {
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border-color: #d7e3f5;
}

body.theme-light.profile-page .profile-field-wrapper label {
  color: #334155 !important;
}

body.theme-light.profile-page .profile-name-grid input,
body.theme-light.profile-page .profile-projects-search-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light.profile-page .profile-save-btn.lg-btn--pill,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-save-btn.lg-btn--pill:hover,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:hover,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill:hover {
  border-color: #93c5fd !important;
  background: linear-gradient(180deg, #f8fbff, #eaf2ff) !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="open"] {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="delete"] {
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

/* Profile (light): no hover highlight on form containers */
body.theme-light.profile-page.profile-page .profile-card-enhanced:hover,
body.theme-light.profile-page.profile-page .profile-projects-card:hover {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  border-color: #c9d7ea !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transform: none !important;
}

body.theme-light.profile-page.profile-page .profile-fields-section:hover {
  background: linear-gradient(180deg, #f8fbff, #edf4ff) !important;
  border-color: #d6e2f3 !important;
  box-shadow: none !important;
}

/* Profile (dark): no hover highlight on form containers */
body.theme-dark.profile-page.profile-page .profile-card-enhanced:hover,
body.theme-dark.profile-page.profile-page .profile-projects-card:hover {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64)) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
}

body.theme-dark.profile-page.profile-page .profile-fields-section:hover {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.3)) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: none !important;
}

/* Profile: keep save button fully inside personal data block */
body.profile-page .profile-fields-section .profile-save-btn.lg-btn--pill {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-content: center !important;
  margin-top: 12px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* Knowledge: smaller action buttons + wider search input */
#sectionKnowledge .knowledge-search-bar {
  max-width: 620px !important;
  width: min(100%, 620px) !important;
}

#sectionKnowledge .knowledge-search-controls {
  max-width: 620px !important;
  width: min(100%, 620px) !important;
}

#sectionKnowledge .knowledge-search-bar input,
#sectionKnowledge .knowledge-search-controls input {
  max-width: none !important;
  min-width: 0;
}

#btnAllArticles.lg-btn,
#btnKnowledgeSearch.lg-btn,
#btnCategorySearch.lg-btn {
  width: auto !important;
  min-width: 120px !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 22px !important;
}

#btnAllArticles .lg-btn__label,
#btnKnowledgeSearch .lg-btn__label,
#btnCategorySearch .lg-btn__label {
  font-size: 12px !important;
}

/* =========================
   KNOWLEDGE BASE (light): cards readability
   ========================= */

body.theme-light .knowledge-subcategory-group {
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border: 1px solid #c9d7ea !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .knowledge-subcategory-group h3 {
  color: #1e293b !important;
}

body.theme-light .knowledge-subcategory-list li {
  color: #2563eb !important;
}

body.theme-light .knowledge-subcategory-list li:hover {
  color: #1d4ed8 !important;
}

body.theme-light .knowledge-construction-card {
  background: #ffffff !important;
  border-color: #d8e3f3 !important;
}

body.theme-light .knowledge-construction-card h4 {
  color: #0f172a !important;
}

body.theme-light .knowledge-construction-card__icon {
  background: #eff6ff !important;
  color: #2563eb !important;
}

body.theme-light .knowledge-construction-subtypes span {
  background: #f8fafc !important;
  border-color: #d8e3f3 !important;
  color: #475569 !important;
}

body.theme-light .knowledge-module-item__label {
  color: #2563eb !important;
}

body.theme-light .knowledge-module-item__label:hover,
body.theme-light .knowledge-module-item__label:focus-visible {
  color: #1d4ed8 !important;
}

body.theme-light .knowledge-module-item__note {
  color: #64748b !important;
}

body.theme-light .knowledge-module-item.is-disabled .knowledge-module-item__label,
body.theme-light .knowledge-module-item.is-disabled .knowledge-module-item__note {
  color: #94a3b8 !important;
}

body.theme-light .knowledge-category-card,
body.theme-light .knowledge-article-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border-color: #c9d7ea !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .knowledge-category-card:hover,
body.theme-light .knowledge-article-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.14) !important;
}

body.theme-light .category-title,
body.theme-light .knowledge-article-title {
  color: #1e293b !important;
}

body.theme-light .knowledge-tag,
body.theme-light .knowledge-article-meta {
  color: #64748b !important;
}

.status-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
}

.status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.status-active::before {
  content: "●";
  font-size: 8px;
}

.status-archived {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-archived::before {
  content: "●";
  font-size: 8px;
}

/* история проверок */

.project-history {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: block;
  flex-basis: 100%;
  width: 100%;
  transition: max-height 260ms ease, opacity 200ms ease;
  will-change: max-height, opacity;
}

.project-history.is-open {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #1f2937;
  opacity: 1;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}

.history-main {
  font-size: 13px;
}

.history-actions {
  display: flex;
  gap: 6px;
}

/* светлая тема для профиля */

body.theme-light .project-card {
  background: #ffffff;
  border-color: #e5e7eb;
}

body.theme-light .project-meta {
  color: #6b7280;
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    padding: 8px 12px;
  }

  .brand h1 {
    font-size: 14px;
  }

  .header-actions {
    gap: 4px;
    flex-wrap: nowrap;
  }

  /* Порядок кнопок в ландшафтной ориентации */
  .header-date-input {
    order: 1;
    width: 90px;
    padding: 6px 8px;
    font-size: 11px;
    min-height: 32px;
  }

  .settings-btn {
    order: 2;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .profile-btn {
    order: 3;
    padding: 6px 8px;
    font-size: 10px;
    min-height: 32px;
  }

  .logout-btn {
    order: 4;
    padding: 4px 6px;
    font-size: 9px;
    min-height: 28px;
  }

  .construction-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .construction-select-wrapper,
  .project-select-wrapper {
    flex: 1;
    min-width: 150px;
  }

  /* Порядок для ландшафтной ориентации: Объект первый, Конструкция второй */
  .project-select-wrapper {
    order: 1;
  }

  .construction-select-wrapper {
    order: 2;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Профиль и карточки проектов */
@media (max-width: 768px) {
  .profile-name-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-create-input-wrapper {
    flex-direction: column;
  }

  .profile-projects-header-enhanced {
    flex-direction: column;
  }

  .profile-projects-search--combined {
    width: 100%;
  }

  .profile-user-header {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-avatar-upload {
    width: 136px;
    height: 136px;
    min-width: 136px;
    border-radius: 26px;
    align-self: center;
  }

  .profile-user-details {
    width: 100%;
  }
  
  .project-card {
    flex-direction: column;
    align-items: stretch;
  }
  
  .project-card-actions {
    min-width: 0;
  }

  .project-actions-open-row,
  .project-actions-secondary-row,
  .project-actions-tertiary-row {
    flex-direction: column;
  }

  body.profile-page {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.profile-page .profile-main {
    overflow: visible;
    padding: 12px 16px 24px;
  }

  body.profile-page .profile-main .section.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
  }

  body.profile-page .profile-card-enhanced,
  body.profile-page .profile-projects-card {
    width: 100%;
  }

  body.profile-page .profile-projects-card {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    padding-right: 0;
    margin-top: 0;
  }

  body.profile-page .profile-projects-search--combined,
  body.profile-page .profile-create-input-wrapper--combined,
  body.profile-page .profile-projects-filters {
    width: 100%;
    max-width: 100%;
  }

  body.profile-page .profile-create-input-wrapper--combined {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  body.profile-page .profile-projects-card .profile-create-project-btn.lg-btn--pill,
  body.profile-page .profile-projects-card .profile-filter-tab.lg-btn--pill,
  body.profile-page .projects-list .project-card-actions .btn-small.lg-btn--pill {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  body.profile-page .profile-projects-card .profile-create-project-btn.lg-btn--pill,
  body.profile-page .profile-projects-card .profile-filter-tab.lg-btn--pill {
    width: min(100%, 330px) !important;
    max-width: calc(100% - 12px) !important;
    min-height: 38px !important;
    padding: 5px 10px !important;
    border-radius: 22px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center;
  }

  body.profile-page .profile-projects-filters {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  body.profile-page .profile-create-project-btn .lg-btn__label,
  body.profile-page .profile-filter-tab .lg-btn__label {
    font-size: 12px;
  }

  body.profile-page .projects-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding: 8px 18px;
    mask-image: linear-gradient(
      to right,
      transparent 0,
      black 18px,
      black calc(100% - 20px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      black 18px,
      black calc(100% - 20px),
      transparent 100%
    );
  }

  body.profile-page .projects-list .project-card,
  body.profile-page .projects-list > .caption {
    flex: 0 0 calc(100% - 16px);
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body.profile-page .projects-list > .caption {
    text-align: center;
    padding: 18px 10px;
  }

  body.profile-page .projects-list::-webkit-scrollbar {
    height: 6px;
    width: 0;
  }

  body.profile-page .projects-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
  }

  body.profile-page .projects-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
  }
}

/* =========================
   LOGIN PAGE
   ========================= */

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image: url("login-bg.jpg");
  background-image: image-set(
    url("login-bg.webp") type("image/webp"),
    url("login-bg.jpg") type("image/jpeg")
  );
  background-image: -webkit-image-set(
    url("login-bg.webp") type("image/webp"),
    url("login-bg.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.04), transparent 36%),
    linear-gradient(140deg, rgba(2, 6, 23, 0.76), rgba(15, 23, 42, 0.52));
  backdrop-filter: blur(1px) saturate(82%);
  -webkit-backdrop-filter: blur(1px) saturate(82%);
  z-index: 0;
}

body.login-page .auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 28px 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 8, 23, 0.94));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    0 28px 72px rgba(2, 6, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

body.login-page .auth-card--login {
  max-width: 468px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

body.login-page .auth-card--login .auth-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 24px 22px;
}

body.login-page .auth-card--login .auth-brand {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

body.login-page .auth-card--login .auth-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

body.login-page .auth-card--login .auth-brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(14, 165, 233, 0.14));
  border: 1px solid rgba(125, 211, 252, 0.24);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  color: #e0f2fe;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body.login-page .auth-card--login .auth-brand-copy {
  min-width: 0;
}

body.login-page .auth-card--login .auth-eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: rgba(125, 211, 252, 0.72);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.login-page .auth-card--login .auth-product {
  margin: 0;
  color: #f8fafc;
  font-size: 29px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

body.login-page .auth-card--login .auth-description {
  margin: 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 13px;
  line-height: 1.62;
  max-width: 40ch;
}

body.login-page .auth-card--login .auth-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

body.login-page .auth-card--login .auth-heading {
  display: grid;
  gap: 6px;
}

body.login-page .auth-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

body.login-page .auth-card--login .auth-title {
  margin: 0;
  text-align: left;
  font-size: 22px;
  font-weight: 650;
}

body.login-page .auth-card--login .auth-subtitle {
  margin: 0;
  color: rgba(148, 163, 184, 0.9);
  font-size: 13px;
  line-height: 1.45;
}

body.login-page .auth-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  background: rgba(127, 29, 29, 0.18);
  font-size: 13px;
  text-align: left;
  line-height: 1.45;
  color: #fecaca;
}

body.login-page .auth-message[data-type="warn"] {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.18);
  border-color: rgba(251, 191, 36, 0.24);
}

body.login-page .auth-message[data-type="success"] {
  color: #bbf7d0;
  background: rgba(21, 128, 61, 0.16);
  border-color: rgba(74, 222, 128, 0.22);
}

body.login-page .auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.login-page .auth-card--login .auth-label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

body.login-page .auth-card--login .auth-input {
  background: rgba(9, 16, 31, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  color: #f8fafc;
  min-height: 48px;
  padding: 12px 15px;
  font-size: 15px;
  cursor: text;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}

body.login-page .auth-card--login .auth-input::placeholder {
  color: #64748b;
}

body.login-page .auth-card--login .auth-input:hover:not(:focus):not(:disabled) {
  background: rgba(12, 20, 38, 0.94);
  border-color: rgba(148, 163, 184, 0.23);
}

body.login-page .auth-card--login .auth-input:focus {
  transform: none;
  background: rgba(13, 22, 41, 0.98);
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.1),
    0 10px 22px rgba(2, 6, 23, 0.24);
}

body.login-page .auth-card--login .auth-input:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  background: rgba(9, 16, 31, 0.72);
}

body.login-page .auth-card--login .auth-input:-webkit-autofill,
body.login-page .auth-card--login .auth-input:-webkit-autofill:hover,
body.login-page .auth-card--login .auth-input:-webkit-autofill:focus,
body.login-page .auth-card--login .auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #f8fafc !important;
  -webkit-box-shadow:
    0 0 0 1000px rgba(9, 16, 31, 0.96) inset !important,
    0 0 0 1px rgba(148, 163, 184, 0.18) !important;
  box-shadow:
    0 0 0 1000px rgba(9, 16, 31, 0.96) inset !important,
    0 0 0 1px rgba(148, 163, 184, 0.18) !important;
  caret-color: #f8fafc !important;
  border-radius: 14px !important;
  transition: background-color 9999s ease-in-out 0s;
}

body.login-page .auth-card--login .auth-password-wrap {
  position: relative;
}

body.login-page .auth-card--login .auth-password-wrap .auth-input {
  padding-right: 54px;
}

body.login-page .auth-card--login .auth-password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: none;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.login-page .auth-card--login .auth-password-toggle:hover:not(:disabled) {
  transform: none;
  background: rgba(51, 65, 85, 0.96);
  border-color: rgba(148, 163, 184, 0.3);
  color: #f8fafc;
  box-shadow: none;
}

body.login-page .auth-card--login .auth-password-toggle:focus-visible {
  outline: none;
  transform: none;
  border-color: rgba(96, 165, 250, 0.82);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

body.login-page .auth-card--login .auth-password-toggle:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

body.login-page .auth-card--login .auth-password-toggle .auth-password-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

body.login-page .auth-card--login .auth-password-toggle .auth-password-icon--hide {
  display: none;
}

body.login-page .auth-card--login .auth-password-toggle.is-visible .auth-password-icon--show {
  display: none;
}

body.login-page .auth-card--login .auth-password-toggle.is-visible .auth-password-icon--hide {
  display: block;
}

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

body.login-page .auth-card--login .auth-field.has-error .auth-label {
  color: #fca5a5;
}

body.login-page .auth-card--login .auth-field.has-error .auth-input {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(69, 10, 10, 0.16);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.08);
}

body.login-page .auth-card input {
  width: 100%;
  min-width: 0;
}

body.login-page #btnLogin,
body.login-page #btnRegister {
  width: 100%;
  margin-top: 4px;
  min-height: 48px;
  border-radius: 14px;
}

body.login-page #btnLogin {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

body.login-page #btnLogin:hover:not(:disabled),
body.login-page #btnRegister:hover:not(:disabled) {
  transform: none;
}

body.login-page #btnLogin:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee 0%, #1d4ed8 100%);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.34);
}

body.login-page #btnLogin:focus-visible,
body.login-page #btnRegister:focus-visible,
body.login-page .btn-google:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    0 16px 32px rgba(2, 6, 23, 0.26);
}

body.login-page #btnLogin:disabled,
body.login-page #btnRegister:disabled,
body.login-page .btn-google:disabled {
  opacity: 0.64;
  cursor: not-allowed;
  transform: none;
}

body.login-page .forgot-password {
  margin-top: -1px;
  text-align: right;
  font-size: 12px;
}

body.login-page .forgot-password a {
  color: rgba(191, 219, 254, 0.82);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.24);
  text-underline-offset: 3px;
  transition: color 0.16s ease, opacity 0.16s ease, text-decoration-color 0.16s ease;
}

body.login-page .forgot-password a:hover {
  color: #e0f2fe;
  text-decoration-color: rgba(125, 211, 252, 0.52);
}

body.login-page .forgot-password a.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  text-decoration: none;
}

body.login-page .auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.login-page .auth-divider::before,
body.login-page .auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

body.login-page .auth-divider span {
  padding: 0 12px;
}

body.login-page .btn-google {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
  margin-top: 0;
  box-shadow: none;
}

body.login-page .btn-google:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
  transform: none;
}

body.login-page .btn-google:active {
  transform: translateY(0);
}

body.login-page .btn-google svg {
  flex: 0 0 auto;
}

body.login-page button {
  transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

body.login-page button::before {
  display: none;
}

body.login-page button:hover {
  transform: none;
}

body.login-page .link {
  margin-top: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.82);
}

body.login-page .auth-card--login .auth-product,
body.login-page .auth-card--login .auth-description {
  position: relative;
}

body.login-page .auth-card--login .auth-product.is-typing::after,
body.login-page .auth-card--login .auth-description.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: auth-type-caret 1.15s steps(1, end) infinite;
}

@keyframes auth-type-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.login-page .auth-card--login .auth-product.is-typing::after,
  body.login-page .auth-card--login .auth-description.is-typing::after {
    animation: none;
    opacity: 0;
  }
}

body.login-page .link a {
  color: #f8fafc;
  font-weight: 650;
  text-decoration: none;
  display: inline-block;
}

body.login-page .link a:hover {
  text-decoration: none;
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  main {
    padding: 10px 10px 20px;
  }

  header {
    padding: 10px 10px !important;
    gap: 8px !important;
  }

  .brand h1 {
    font-size: 13px !important;
  }

  .header-actions {
    gap: 6px !important;
  }

  .header-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
  }

  .header-icon-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .construction-bar {
    padding: 10px;
    margin: 10px 0;
  }

  .card {
    padding: 12px;
  }

  button {
    padding: 10px 14px;
    font-size: 13px;
  }

  .tab {
    padding: 8px 8px;
    font-size: 10px;
    min-height: 36px;
  }

  body.login-page .auth-card {
      margin: 0 4px;
      max-width: min(560px, calc(100vw - 12px));
      gap: 12px;
    }

  body.login-page .auth-card:not(.auth-card--login) {
    padding: 32px 26px 28px;
  }

  body.login-page .auth-card--login .auth-shell {
      padding: 28px 24px 24px;
      gap: 22px;
    }

  body.login-page .auth-card--login .auth-brand {
      padding-bottom: 18px;
    }

  body.login-page .auth-title {
    font-size: 28px;
  }

  body.login-page .auth-card--login .auth-product {
      font-size: 28px;
    }

  body.login-page .auth-card--login .auth-title {
      font-size: 22px;
    }

  body.login-page .auth-card--login .auth-description,
  body.login-page .auth-card--login .auth-subtitle {
      font-size: 14px;
      line-height: 1.55;
    }

  body.login-page .auth-card input,
  body.login-page #btnLogin,
  body.login-page #btnRegister,
  body.login-page .btn-google {
      font-size: 16px;
      padding: 14px 16px;
      min-height: 52px;
    }

  body.login-page .auth-divider {
      font-size: 14px;
    }

  body.login-page .link,
  body.login-page .forgot-password,
  body.login-page .auth-message {
      font-size: 14px;
    }

  body.login-page .auth-card--login .auth-password-wrap .auth-input {
      padding-right: 56px;
    }

  body.login-page .auth-card--login .auth-password-toggle {
      width: 34px;
      min-width: 34px;
      height: 34px;
      min-height: 34px;
    }

  body.login-page {
      font-size: 16px;
    }
  }

  @media (max-width: 768px) {
    body.login-page {
      padding: 16px 12px max(16px, env(safe-area-inset-bottom, 0)) !important;
    }

    body.login-page::before {
        background:
          radial-gradient(circle at top, rgba(56, 189, 248, 0.04), transparent 36%),
          linear-gradient(140deg, rgba(2, 6, 23, 0.76), rgba(15, 23, 42, 0.52)) !important;
        backdrop-filter: blur(1px) saturate(82%) !important;
        -webkit-backdrop-filter: blur(1px) saturate(82%) !important;
      }

    body.login-page .auth-card--login {
      width: min(448px, calc(100vw - 44px)) !important;
      max-width: min(448px, calc(100vw - 44px)) !important;
      border-radius: 24px !important;
    }

    body.login-page .auth-card--login .auth-shell {
        padding: 18px 18px 2px !important;
        gap: 10px !important;
      }

    body.login-page .auth-card--login .auth-brand {
      gap: 6px !important;
      padding-bottom: 10px !important;
    }

    body.login-page .auth-card--login .auth-brand-row {
      gap: 12px !important;
    }

    body.login-page .auth-card--login .auth-brand-mark {
      width: 42px !important;
      height: 42px !important;
      flex-basis: 42px !important;
      font-size: 13px !important;
      border-radius: 14px !important;
    }

    body.login-page .auth-card--login .auth-product {
      font-size: 23px !important;
    }

    body.login-page .auth-card--login .auth-description {
      font-size: 11px !important;
      line-height: 1.35 !important;
      max-width: none !important;
    }

    body.login-page .auth-card--login .auth-panel {
        gap: 7px !important;
      }

    body.login-page .auth-card--login .auth-heading {
      gap: 0 !important;
    }

    body.login-page .auth-card--login .auth-title {
      font-size: 19px !important;
    }

    body.login-page .auth-card--login .auth-subtitle {
      display: none !important;
    }

    body.login-page .auth-card--login .auth-field {
      gap: 4px !important;
    }

    body.login-page .auth-card--login .auth-divider {
        margin: 4px 0 0 !important;
      }

    body.login-page .auth-card--login .link {
        margin: 0 !important;
      }

    body.login-page .auth-card--login .forgot-password {
        margin-top: 2px !important;
        margin-bottom: 2px !important;
      }

    body.login-page .auth-card--login .auth-label {
      font-size: 12px !important;
    }

    body.login-page .auth-card--login .auth-input,
      body.login-page #btnLogin,
      body.login-page #btnRegister,
      body.login-page .btn-google {
        min-height: 42px !important;
        padding: 9px 13px !important;
        font-size: 14px !important;
      }

    body.login-page .auth-card--login .auth-password-wrap .auth-input {
      padding-right: 48px !important;
    }

    body.login-page .auth-card--login .auth-password-toggle {
      top: 6px !important;
      right: 6px !important;
      width: 30px !important;
      min-width: 30px !important;
      height: 30px !important;
      min-height: 30px !important;
    }

    body.login-page .forgot-password,
    body.login-page .link,
    body.login-page .auth-message,
    body.login-page .auth-divider {
      font-size: 11px !important;
    }
  }

  @media (max-width: 768px) {
    body.login-page {
      padding: 22px 10px max(22px, env(safe-area-inset-bottom, 0));
      align-items: center;
      justify-content: center;
    }

    body.login-page::before {
      background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.06), transparent 34%),
        linear-gradient(140deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.64));
      backdrop-filter: blur(6px) saturate(90%);
      -webkit-backdrop-filter: blur(6px) saturate(90%);
    }

    body.login-page .auth-card--login {
      width: min(520px, calc(100vw - 28px));
      max-width: min(520px, calc(100vw - 28px));
      border-radius: 26px;
    }
  }

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
  /* Увеличиваем области нажатия */
  button,
  a,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
  }

  .header-icon-btn {
    min-width: 34px !important;
    min-height: 34px !important;
  }

  /* Убираем hover-эффекты на touch-устройствах */
  .card:hover {
    transform: none;
  }

  button:hover {
    transform: none;
  }

  /* Улучшаем видимость фокуса */
  input:focus,
  select:focus,
  textarea:focus,
  button:focus {
    outline: 3px solid rgba(96, 165, 250, 0.5);
    outline-offset: 2px;
  }
}

/* Планшеты в портретной ориентации */
@media (min-width: 481px) and (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    flex-direction: row;
    gap: 16px;
  }

  .split .col {
    flex: 1;
  }
}

/* =========================
   БАЗА ЗНАНИЙ
   ========================= */

.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.knowledge-stats {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.knowledge-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  max-width: 400px;
}

.knowledge-search-bar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
}

.knowledge-search-bar input:focus {
  outline: 2px solid #60a5fa;
  border-color: #60a5fa;
}

.knowledge-category-label {
  margin-bottom: 20px;
}

.category-label-text {
  font-size: 16px;
  font-weight: 500;
  color: #94a3b8;
}

.knowledge-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.knowledge-category-card {
  padding: 20px;
  border: 2px solid #475569;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #1e293b;
}

.knowledge-category-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.knowledge-category-card.active {
  border-color: #ef4444;
  background: #7f1d1d;
}

.category-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.category-title {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 14px;
}

.knowledge-subcategories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.knowledge-subcategory-group {
  background: #1e293b;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #475569;
}

.knowledge-subcategory-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 18px;
  color: #f1f5f9;
}

.knowledge-subcategory-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.knowledge-subcategory-list li {
  padding: 8px 0;
  cursor: pointer;
  color: #60a5fa;
  transition: color 0.2s;
}

.knowledge-subcategory-list li:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.knowledge-construction-cards {
  display: grid;
  gap: 12px;
}

.knowledge-construction-card {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
}

.knowledge-construction-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.25;
}

.knowledge-construction-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
}

.knowledge-construction-subtypes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.knowledge-construction-subtypes span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.7);
  font-size: 12px;
  line-height: 1.2;
}

.knowledge-module-list {
  display: grid;
  gap: 6px;
}

.knowledge-subcategory-list li.knowledge-module-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 7px 0;
  cursor: default;
  color: #cbd5e1;
}

.knowledge-module-item__label {
  width: fit-content;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #60a5fa;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.knowledge-module-item__label:hover,
.knowledge-module-item__label:focus-visible {
  color: #38bdf8;
  text-decoration: underline;
  outline: none;
}

.knowledge-module-item__note {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.knowledge-subcategory-list li.knowledge-module-item.is-disabled {
  color: #94a3b8;
}

.knowledge-module-item.is-disabled .knowledge-module-item__label {
  color: #94a3b8;
  cursor: default;
  font-weight: 500;
}

.knowledge-module-item.is-disabled .knowledge-module-item__note {
  color: #64748b;
}

/* Страница категории */
.knowledge-breadcrumbs {
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 14px;
}

.knowledge-breadcrumbs a {
  color: #60a5fa;
  text-decoration: none;
}

.knowledge-breadcrumbs a:hover {
  text-decoration: underline;
}

.knowledge-category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.knowledge-category-header h2 {
  margin: 0;
}

.badge {
  background: #475569;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: #f1f5f9;
}

.knowledge-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.knowledge-search-controls {
  display: flex;
  gap: 10px;
  max-width: 400px;
}

.knowledge-search-controls input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
}

.knowledge-search-controls input:focus {
  outline: 2px solid #60a5fa;
  border-color: #60a5fa;
}

.knowledge-sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knowledge-sort-controls label {
  color: #f1f5f9;
  font-size: 14px;
}

.knowledge-sort-controls select {
  padding: 8px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
  cursor: pointer;
}

.knowledge-sort-controls select:focus {
  outline: 2px solid #60a5fa;
  border-color: #60a5fa;
}

.knowledge-view-toggle {
  display: flex;
  gap: 5px;
}

.view-btn {
  padding: 8px 12px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #f1f5f9;
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.2s;
}

.view-btn:hover {
  background: #334155;
  border-color: #60a5fa;
}

.view-btn.active {
  background: #3b82f6;
}

/* Страница просмотра статьи */
.knowledge-article-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 26px;
}

.article-header-actions .btn-primary {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-header-actions {
  margin-bottom: 24px;
}

.knowledge-article-view h1 {
  font-size: 32px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 24px;
  line-height: 1.3;
}

.article-content {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 36px;
  margin-bottom: 24px;
  color: #cbd5e1;
  line-height: 1.75;
}

.article-content h3 {
  color: #f1f5f9;
  font-size: 24px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content h3:first-child {
  margin-top: 0;
}

.article-content h4 {
  color: #e2e8f0;
  font-size: 20px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.78;
}

.article-content ul {
  margin-bottom: 20px;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .knowledge-article-view {
    max-width: 940px;
    padding: 24px 20px;
  }

  .article-content {
    padding: 30px 26px;
  }
}

@media (max-width: 768px) {
  .knowledge-article-view {
    max-width: 100%;
    padding: 16px 12px;
  }

  .article-content {
    padding: 20px 16px;
    line-height: 1.7;
  }
}

.article-content a {
  color: #3b82f6;
  text-decoration: underline;
  transition: color 0.2s;
}

.article-content a:hover {
  color: #60a5fa;
}

.article-content h2 {
  color: #f1f5f9;
  font-size: 28px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 2px solid #334155;
}

.article-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article-content h3 {
  color: #e2e8f0;
  font-size: 22px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 14px;
}

.article-content ol {
  margin-bottom: 20px;
  padding-left: 28px;
}

.article-content ol li {
  margin-bottom: 10px;
  font-size: 16px;
}

.article-table-of-contents {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 32px;
}

.article-table-of-contents h3 {
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 16px;
}

.article-table-of-contents ol {
  margin: 0;
  padding-left: 24px;
}

.article-table-of-contents li {
  margin-bottom: 8px;
}

.article-table-of-contents a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.article-table-of-contents a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.article-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.knowledge-scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.knowledge-scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.knowledge-scroll-top-btn:hover {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(96, 165, 250, 0.6);
}

.knowledge-scroll-top-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.8);
  outline-offset: 2px;
}

body.theme-light .article-content h2 {
  color: #1e293b;
  border-top-color: #e2e8f0;
}

body.theme-light .article-content h3 {
  color: #334155;
}

body.theme-light .article-table-of-contents {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .article-table-of-contents h3 {
  color: #1e293b;
}

body.theme-light .knowledge-article-view h1 {
  color: #1e293b;
}

body.theme-light .article-content {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #475569;
}

body.theme-light .article-content h3 {
  color: #1e293b;
}

body.theme-light .article-content h4 {
  color: #334155;
}

body.theme-light .knowledge-scroll-top-btn {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1e293b;
}

body.theme-light .knowledge-scroll-top-btn:hover {
  background: #ffffff;
}
  color: white;
  border-color: #3b82f6;
}

.knowledge-articles-container {
  width: 100%;
}

.knowledge-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.knowledge-articles-grid.list-view {
  grid-template-columns: 1fr;
}

.knowledge-article-card {
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 20px;
  background: #1e293b;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}

.knowledge-article-card:hover {
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
  transform: translateY(-2px);
  border-color: #60a5fa;
}

.knowledge-article-card .favorite-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #94a3b8;
  padding: 5px;
  transition: transform 0.2s;
}

.knowledge-article-card .favorite-btn:hover {
  transform: scale(1.2);
}

.knowledge-article-card .favorite-btn.active {
  color: #ef4444;
}

.knowledge-article-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #f1f5f9;
  padding-right: 30px;
}

.knowledge-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}

.knowledge-tag {
  background: #334155;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.knowledge-article-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.knowledge-article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}


.btn-primary {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

#btnGeo,
#btnReinf,
#btnGeom,
#btnStrength,
#btnImportIfc,
#btnIfcMoreActions,
#btnClearGeoBimSelection,
#btnClearReinfBimSelection,
#btnClearStrengthBimSelection,
#btnClearForm,
#btnClearNodes,
#btnClearReinfForm,
#btnClearReinfChecks,
#btnClearGeomForm,
#btnClearGeomChecks,
#btnClearStrengthForm,
#btnClearStrengthChecks,
#btnAllArticles,
#btnKnowledgeSearch,
#btnCategorySearch {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

#btnGeo:hover,
#btnReinf:hover,
#btnGeom:hover,
#btnStrength:hover {
  background: #15803d;
  border-color: rgba(22, 163, 74, 0.6);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#btnAllArticles,
#btnKnowledgeSearch,
#btnCategorySearch {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(255, 255, 255, 0.34);
}

#btnAllArticles.lg-btn,
#btnKnowledgeSearch.lg-btn,
#btnCategorySearch.lg-btn {
  min-width: 160px;
  padding: 8px 12px;
}

#btnAllArticles:hover .lg-btn__glow,
#btnKnowledgeSearch:hover .lg-btn__glow,
#btnCategorySearch:hover .lg-btn__glow {
  opacity: 1;
}


#btnAllArticles:hover,
#btnKnowledgeSearch:hover,
#btnCategorySearch:hover {
  background: rgba(71, 85, 105, 0.7);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --lg-raise: -0.5px;
}

#btnAllArticles.lg-btn:hover::before,
#btnKnowledgeSearch.lg-btn:hover::before,
#btnCategorySearch.lg-btn:hover::before {
  opacity: 1;
}

#btnAllArticles .lg-btn__glow,
#btnKnowledgeSearch .lg-btn__glow,
#btnCategorySearch .lg-btn__glow {
  filter: blur(34px) url(#liquidGlass);
}

#btnAllArticles:hover .lg-btn__glow,
#btnKnowledgeSearch:hover .lg-btn__glow,
#btnCategorySearch:hover .lg-btn__glow {
  transform: translate3d(var(--lg-glow-x), var(--lg-glow-y), 0) scale(1.15);
}

.knowledge-search-bar input,
.knowledge-search-controls input {
  max-width: 360px;
}

body:not(.theme-light) #knowledgeSearchInput,
body:not(.theme-light) #knowledgeCategorySearch {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9;
  caret-color: #f1f5f9;
}

body:not(.theme-light) #knowledgeSearchInput:-webkit-autofill,
body:not(.theme-light) #knowledgeSearchInput:-webkit-autofill:hover,
body:not(.theme-light) #knowledgeSearchInput:-webkit-autofill:focus,
body:not(.theme-light) #knowledgeSearchInput:-webkit-autofill:active,
body:not(.theme-light) #knowledgeCategorySearch:-webkit-autofill,
body:not(.theme-light) #knowledgeCategorySearch:-webkit-autofill:hover,
body:not(.theme-light) #knowledgeCategorySearch:-webkit-autofill:focus,
body:not(.theme-light) #knowledgeCategorySearch:-webkit-autofill:active {
  -webkit-text-fill-color: #f1f5f9 !important;
  -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
  box-shadow: 0 0 0 1000px #1e293b inset !important;
  background-color: #1e293b !important;
}

/* Фикс белого фона у поля "Этаж" в армировании (особенно после autofill) */
body:not(.theme-light) #reinfFloor,
body:not(.theme-light) #reinfColumnFloor,
body:not(.theme-light) #reinfBeamFloor,
body:not(.theme-light) #reinfWallFloor {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}

body:not(.theme-light) #reinfFloor:focus,
body:not(.theme-light) #reinfColumnFloor:focus,
body:not(.theme-light) #reinfBeamFloor:focus,
body:not(.theme-light) #reinfWallFloor:focus {
  background: rgba(255, 255, 255, 0.12) !important;
}

body:not(.theme-light) #reinfFloor:-webkit-autofill,
body:not(.theme-light) #reinfFloor:-webkit-autofill:hover,
body:not(.theme-light) #reinfFloor:-webkit-autofill:focus,
body:not(.theme-light) #reinfFloor:-webkit-autofill:active,
body:not(.theme-light) #reinfColumnFloor:-webkit-autofill,
body:not(.theme-light) #reinfColumnFloor:-webkit-autofill:hover,
body:not(.theme-light) #reinfColumnFloor:-webkit-autofill:focus,
body:not(.theme-light) #reinfColumnFloor:-webkit-autofill:active,
body:not(.theme-light) #reinfBeamFloor:-webkit-autofill,
body:not(.theme-light) #reinfBeamFloor:-webkit-autofill:hover,
body:not(.theme-light) #reinfBeamFloor:-webkit-autofill:focus,
body:not(.theme-light) #reinfBeamFloor:-webkit-autofill:active,
body:not(.theme-light) #reinfWallFloor:-webkit-autofill,
body:not(.theme-light) #reinfWallFloor:-webkit-autofill:hover,
body:not(.theme-light) #reinfWallFloor:-webkit-autofill:focus,
body:not(.theme-light) #reinfWallFloor:-webkit-autofill:active,
body:not(.theme-light) #reinfFloor:autofill,
body:not(.theme-light) #reinfColumnFloor:autofill,
body:not(.theme-light) #reinfBeamFloor:autofill,
body:not(.theme-light) #reinfWallFloor:autofill {
  -webkit-text-fill-color: #f1f5f9 !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.08) inset !important;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.08) inset !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  caret-color: #f1f5f9;
}

.knowledge-search-bar,
.knowledge-search-controls {
  gap: 8px;
}

#btnClearForm:hover,
#btnClearNodes:hover,
#btnImportIfc:hover:not(:disabled),
#btnIfcMoreActions:hover:not(:disabled),
#btnClearGeoBimSelection:hover,
#btnClearReinfBimSelection:hover,
#btnClearStrengthBimSelection:hover,
#btnClearReinfForm:hover,
#btnClearReinfChecks:hover,
#btnClearGeomForm:hover,
#btnClearGeomChecks:hover,
#btnClearStrengthForm:hover,
#btnClearStrengthChecks:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Адаптивность для базы знаний */
@media (max-width: 1024px) {
  .knowledge-subcategories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #sectionJournal .module-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  #sectionJournal .journal-help-toggle {
    display: inline-flex;
  }

  #sectionJournal > .subtitle {
    display: none;
  }

  .knowledge-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .knowledge-subcategories {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 18px 8px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 22px), transparent 100%);
  }

  .knowledge-subcategories::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .knowledge-subcategories > .knowledge-subcategory-group {
    flex: 0 0 calc(100% - 42px);
    width: calc(100% - 42px);
    max-width: calc(100% - 42px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .knowledge-articles-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .knowledge-search-controls {
    min-width: auto;
  }

  #sectionKnowledge #knowledgeMainPage .knowledge-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  #sectionKnowledge #knowledgeMainPage .knowledge-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    flex: 1 1 auto;
    min-width: 0;
  }

  #sectionKnowledge #knowledgeMainPage .knowledge-stats {
    margin-left: auto;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
  }

  #sectionKnowledge #knowledgeMainPage #knowledgeArticlesCount {
    font-size: 12px;
    white-space: nowrap;
  }

  #sectionKnowledge #knowledgeMainPage .subtitle {
    margin-top: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.35;
    max-width: 100%;
  }
}

/* =========================
   ПРИВЕТСТВЕННАЯ АНИМАЦИЯ
   ========================= */

.welcome-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 8, 23, 0.98) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeInWelcome 0.3s ease-out;
  opacity: 1;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.welcome-animation.fade-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.welcome-animation.hidden {
  display: none;
}

.welcome-content {
  text-align: center;
  animation: slideUpWelcome 0.95s cubic-bezier(0.2, 0.9, 0.2, 1);
  transform-origin: center;
  transition: opacity 0.55s ease-out, transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.welcome-animation.fade-out .welcome-content {
  opacity: 0;
  transform: translateY(-12px) scale(0.985);
}

.welcome-icon {
  width: 200px;
  height: 140px;
  margin: 0 auto 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.welcome-animation.fade-out .welcome-icon {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
}

.welcome-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(96, 165, 250, 0.3));
}

.brick {
  fill: #60a5fa;
  stroke: #3b82f6;
  stroke-width: 1.5;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.welcome-animation.fade-out .brick {
  opacity: 0;
  transform: translateY(8px);
}

/* Появление кирпичей построчно */
.brick-row {
  opacity: 0;
  transform: translateY(-6px);
  animation: brickRow 0.35s ease-out forwards;
}

.row-1 { animation-delay: 0s; }
.row-2 { animation-delay: 0.12s; }
.row-3 { animation-delay: 0.24s; }
.row-4 { animation-delay: 0.36s; }


.welcome-title {
  font-size: 36px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 12px 0;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  filter: blur(10px);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: welcomeTitleReveal 0.95s cubic-bezier(0.2, 0.9, 0.2, 1) 0.15s forwards,
             gradientShift 3s ease-in-out 0.8s infinite;
  transition: opacity 0.55s ease-out, transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1), filter 0.7s ease-out;
  will-change: opacity, transform, filter;
}

.welcome-animation.fade-out .welcome-title {
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  filter: blur(8px);
}

.welcome-subtitle {
  font-size: 20px;
  color: #94a3b8;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  animation: welcomeSubtitleReveal 0.75s cubic-bezier(0.2, 0.9, 0.2, 1) 0.32s forwards;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), filter 0.6s ease-out;
}

.welcome-animation.fade-out .welcome-subtitle {
  opacity: 0;
  transform: translateY(-6px);
  filter: blur(6px);
}

@keyframes fadeInWelcome {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
  header {
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .brand h1 {
    font-size: 12px !important;
  }

  .header-actions {
    gap: 4px !important;
  }

  .header-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  .header-icon-btn svg {
    width: 17px !important;
    height: 17px !important;
  }

  main {
    padding: 8px 8px 16px;
  }

  .construction-bar {
    padding: 8px;
    margin: 8px 0;
  }

  .knowledge-article-view {
    padding: 10px 6px;
  }

  .knowledge-article-view h1 {
    font-size: 18px;
  }
}

@keyframes fadeOutWelcome {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes slideUpWelcome {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes brickPlace {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.5) rotate(-5deg);
  }
  60% {
    transform: translateY(5px) scale(1.1) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes brickRow {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInTextBounce {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcomeTitleReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes welcomeSubtitleReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Светлая тема для приветственной анимации */
body.theme-light .welcome-animation {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
}

body.theme-light .brick {
  fill: #3b82f6;
  stroke: #2563eb;
}

body.theme-light .welcome-svg {
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
}

body.theme-light .welcome-title {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
}

body.theme-light .welcome-subtitle {
  color: #6b7280;
}

/* =========================
   НИЖНЯЯ НАВИГАЦИЯ (МОБИЛЬНЫЕ)
   ========================= */

/* iOS 26 Liquid Glass Tab Bar - Apple UIKit Style */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 83px;
  /* iOS Tab Bar background */
  background: rgba(29, 29, 31, 0.94);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  /* iOS border */
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  z-index: 1000;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* iOS shadow */
  box-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .section {
    animation: fadeInOnly 0.2s ease;
  }

  .bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    height: auto;
    padding: 0;
    animation: none;
  }

  main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0)) !important;
  }

  .tabs {
    display: none !important;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 4px 0;
  background: transparent;
  border: none;
  /* iOS inactive color */
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  /* iOS spring animation */
  transition: transform 0.1s ease-out, color 0.2s ease;
  min-width: 50px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  /* SF Pro Text style */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.bottom-nav-item svg {
  width: 25px;
  height: 25px;
  /* iOS icon transition */
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-width: 1.5;
}

.bottom-nav-item span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  /* iOS tab bar label */
  margin-top: 2px;
}

/* iOS touch feedback */
.bottom-nav-item:active {
  transform: scale(0.85);
  transition: transform 0.05s ease-out;
}

/* Активный элемент - iOS tintColor: .systemBlue */
.bottom-nav-item.active {
  /* iOS systemBlue */
  color: #0A84FF;
}

.bottom-nav-item.active svg {
  /* Filled icon effect */
  stroke-width: 2;
  filter: drop-shadow(0 0 1px rgba(10, 132, 255, 0.5));
}

/* iOS prominent style indicator */
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #0A84FF;
  border-radius: 50%;
  opacity: 0;
}

/* Убираем старые эффекты */
.bottom-nav-item::before {
  display: none;
}

/* Светлая тема - iOS Light Mode */
body.theme-light .bottom-nav {
  background: rgba(249, 249, 249, 0.94);
  border-top-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.1);
}

body.theme-light .bottom-nav-item {
  /* iOS light inactive */
  color: rgba(60, 60, 67, 0.6);
}

body.theme-light .bottom-nav-item.active {
  /* iOS systemBlue light mode */
  color: #007AFF;
}

body.theme-light .bottom-nav-item.active svg {
  filter: drop-shadow(0 0 1px rgba(0, 122, 255, 0.5));
}

/* === iOS Floating Liquid Glass Tab Bar (iOS 26 style) === */
@media (max-width: 768px) {
  .bottom-nav {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-bottom: 0;
  }

  body.theme-light .bottom-nav {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .bottom-nav.floating {
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: auto;
    min-height: 64px;
    border-radius: 22px;
    border: none;
    background: linear-gradient(
      180deg,
      rgba(26, 27, 31, 0.6) 0%,
      rgba(18, 19, 23, 0.72) 100%
    );
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: 
      0 12px 30px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0));
    animation: floatingAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .bottom-nav-item {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 52px;
    min-height: 44px;
    padding: 6px 6px;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 0.2s ease;
  }

  .bottom-nav-item::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 10px;
    right: 10px;
    display: none;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .bottom-nav-item.active::before {
    display: none;
    opacity: 0;
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav-item.active::after {
    display: none;
  }

  .bottom-nav-item svg,
  .bottom-nav-item span {
    position: relative;
    z-index: 1;
  }

  .bottom-nav-item span {
    font-size: 11px;
    line-height: 1.1;
    opacity: 0.7;
  }

  .bottom-nav-item.active span {
    opacity: 1;
  }

  .bottom-nav-item.active svg {
    filter: none;
  }

  .bottom-nav-item.active {
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav-item:active {
    transform: none;
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav-item:focus,
  .bottom-nav-item:focus-visible {
    outline: none;
    box-shadow: none;
  }

  .bottom-nav-item {
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item span {
    display: none !important;
  }

  .bottom-nav-item svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.8;
  }

  @keyframes floatingAppear {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  body.theme-light .bottom-nav.floating {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(245, 245, 247, 0.86) 100%
    );
    box-shadow: 
      0 10px 26px rgba(15, 23, 42, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  body.theme-light .bottom-nav-item.active::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0.35) 100%
    );
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .bottom-nav {
    animation: slideUpNav 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
}

/* =========================
   SKELETON LOADING
   ========================= */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 12px;
}

.skeleton-text:last-child {
  width: 80%;
  margin-bottom: 0;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: 8px;
}

.skeleton-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.skeleton-row .skeleton {
  flex: 1;
  height: 40px;
}

/* Skeleton для списка данных */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skeleton-list-item .skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton-list-item .skeleton-content {
  flex: 1;
}

.skeleton-list-item .skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-list-item .skeleton-line:first-child {
  width: 70%;
}

.skeleton-list-item .skeleton-line:last-child {
  width: 40%;
  margin-bottom: 0;
}

/* Светлая тема */
body.theme-light .skeleton {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  background-size: 200% 100%;
}

body.theme-light .skeleton-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .skeleton-list-item {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
}

/* =========================
   УЛУЧШЕННЫЕ АНИМАЦИИ
   ========================= */

/* Плавное появление элементов */
.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Анимация для карточек при наведении */
.card {
  transition: none !important;
}

.card:hover {
  transform: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Отключаем hover-анимацию для шагов мастера */
.card.wizard-step,
.wizard-step.card {
  transition: none !important;
}

.card.wizard-step:hover,
.wizard-step.card:hover {
  transform: none !important;
}

/* Пульсация для важных кнопок */
.btn-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(96, 165, 250, 0);
  }
}

/* Улучшенные переходы для кнопок */
button, .btn, .btn-primary, .btn-secondary {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active, .btn:active {
  transform: scale(0.97);
}

/* Анимация загрузки (спиннер) */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* Контейнер для центрирования спиннера */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: #94a3b8;
  font-size: 14px;
}

/* Успешное сохранение - зелёная галочка */
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #22c55e;
  border-radius: 50%;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-check::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Индикатор офлайн режима */
.offline-indicator {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1001;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.offline-indicator::before {
  content: '📡';
}

.offline-indicator.show {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 768px) {
  .offline-indicator {
    bottom: 90px;
  }
}

/* =========================
   WIZARD + BOTTOM SHEETS
   ========================= */

.wizard {
  position: relative;
}

.wizard-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.wizard-progress {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
}

.wizard-steps-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.wizard-steps-nav::-webkit-scrollbar {
  height: 4px;
}

.wizard-steps-nav::-webkit-scrollbar-track {
  background: transparent;
}

.wizard-steps-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.wizard-step-btn:not(.lg-btn) {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wizard-step-btn:not(.lg-btn):hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.wizard-step-btn:not(.lg-btn).is-active {
  background: rgba(10, 132, 255, 0.2);
  border-color: rgba(10, 132, 255, 0.6);
  color: #0a84ff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.12);
}

.wizard-step-btn.lg-btn {
  min-height: 40px;
  padding: 8px 10px;
}

.wizard-step-btn.lg-btn--pill {
  min-width: 0;
  border-radius: 999px;
  width: auto;
  max-width: 100%;
  flex: 1 1 0;
}

.wizard-step {
  display: block;
}

.wizard-sheet-trigger-row {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
}

.wizard-footer {
  display: none;
}

.wizard-footer .wizard-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wizard-sheet {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1600;
}

.wizard-sheet.is-open {
  display: flex;
}

.wizard-sheet-overlay {
  position: absolute;
  inset: 0;
}

.wizard-sheet-panel {
  position: relative;
  width: min(640px, 100%);
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px 18px 0 0;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.35);
  max-height: 84vh;
}

.wizard-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wizard-sheet-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}

.wizard-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 10px;
  line-height: 1;
  box-shadow: none;
  width: auto !important;
  margin-bottom: 0 !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wizard-sheet-close::before {
  display: none;
}

.wizard-sheet-close:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.wizard-sheet-body {
  margin-top: 10px;
  overflow-y: auto;
  max-height: calc(84vh - 120px);
  padding-right: 4px;
}

.wizard-sheet-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}


body.sheet-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .wizard-sheet {
    position: static;
    inset: auto;
    height: auto;
    display: none;
    align-items: initial;
    justify-content: initial;
    background: transparent;
    z-index: auto;
    margin-top: 8px;
  }

  .wizard-sheet.is-open {
    display: block;
  }

  .wizard-sheet-overlay {
    display: none;
  }

  .wizard-sheet-panel {
    width: 100%;
    max-width: 100%;
    max-height: min(70vh, 70dvh);
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(2, 6, 23, 0.92);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  }

  .wizard-sheet-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(min(70vh, 70dvh) - 110px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .wizard-sheet-footer {
    position: static;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    background: rgba(2, 6, 23, 0.92);
  }

  .wizard-step {
    display: none;
  }

  .wizard-step.is-active {
    display: block;
  }

  .wizard-steps.split {
    flex-direction: column;
  }

  .wizard-steps.split > .wizard-step {
    width: 100%;
  }

  .wizard input,
  .wizard select,
  .wizard textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .wizard-sheet-trigger-row {
    display: flex;
  }

  .wizard-footer {
    display: flex;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0));
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1500;
    box-shadow: none;
  }

  .wizard-progress {
    display: none !important;
  }

  .wizard-footer .wizard-nav-btn {
    display: none !important;
  }

  .wizard-footer .wizard-primary-btn {
    flex: 1;
    min-width: 0;
    background: rgba(15, 23, 42, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  }

  .wizard-footer .wizard-primary-btn:active {
    background: #15803d !important;
    border-color: rgba(22, 163, 74, 0.6) !important;
    box-shadow: none !important;
  }

  .wizard-footer .wizard-primary-btn:focus-visible {
    outline: 2px solid rgba(34, 197, 94, 0.7) !important;
    outline-offset: 2px;
  }

  .wizard-footer .wizard-nav-btn {
    min-width: 78px;
  }

  .wizard-footer .wizard-primary-btn::before {
    opacity: 0 !important;
  }

  .wizard-footer .wizard-primary-btn .lg-btn__label {
    color: #ffffff !important;
  }

  .wizard-hide-mobile {
    display: none !important;
  }

  main {
    padding-bottom: 190px !important;
  }
}

@media (max-width: 768px) {
  body.sheet-open .bottom-nav {
    display: none !important;
  }

  body.sheet-open main {
    padding-bottom: 20px !important;
  }
}

@media (min-width: 769px) {
  .wizard-progress,
  .wizard-steps-nav,
  .wizard-footer {
    display: none;
  }

  .wizard-sheet {
    position: static;
    display: block;
    background: none;
    z-index: auto;
  }

  .wizard-sheet-overlay {
    display: none;
  }

  .wizard-sheet-panel {
    position: static;
    width: auto;
    max-height: none;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .wizard-sheet-header,
  .wizard-sheet-footer {
    display: none;
  }

  .wizard-sheet-body {
    margin-top: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

body.theme-light .wizard-step-btn:not(.lg-btn) {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #1f2937;
}

body.theme-light .wizard-step-btn:not(.lg-btn).is-active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

body.theme-light .wizard-footer {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  body.theme-light .wizard-footer .wizard-primary-btn,
  body.theme-light .wizard-footer .wizard-primary-btn.lg-btn,
  body.theme-light .wizard-footer .wizard-primary-btn.lg-btn--pill {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.03)),
      rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow:
      0 10px 18px rgba(148, 163, 184, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.58),
      inset 0 -1px 0 rgba(148, 163, 184, 0.05) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
  }
}

body.theme-light .wizard-sheet {
  background: rgba(15, 23, 42, 0.25);
}

body.theme-light .wizard-sheet-panel {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .wizard-sheet-header h3 {
  color: #0f172a;
}

body.theme-light .wizard-sheet-close {
  color: #475569;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .wizard-sheet-close:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.18);
}

/* =========================
   MODULE HELP TOGGLES
   ========================= */

.module-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.field-label-row label {
  margin: 0;
}

.module-help-toggle {
  width: 16px;
  height: 16px;
  min-width: 0;
  min-height: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #cbd5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-shadow: none;
  overflow: visible;
  transition: none;
}

.module-help-toggle::before {
  content: "?";
  display: inline-block;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  background: none;
  transition: none;
}

.module-help-toggle:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #f1f5f9;
  transform: none;
  background: transparent;
  box-shadow: none;
}

.module-help-toggle:hover::before {
  display: inline-block;
}

.module-help-toggle:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 2px;
}

.journal-help-toggle {
  display: none;
}

.module-help-content {
  display: none;
}

.help-popover {
  position: absolute;
  max-width: min(320px, calc(100vw - 32px));
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  z-index: 1700;
}

.help-popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.theme-light .module-help-toggle {
  border-color: rgba(15, 23, 42, 0.25);
  background: transparent;
  color: #1f2937;
}

body.theme-light .help-popover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

/* =========================
   FORM HOVER OFF (MODULES)
   ========================= */

#sectionGeo .card:hover,
#reinforcement .card:hover,
#geometry .card:hover,
#strength .card:hover {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

#sectionGeo .node:hover,
#reinforcement .node:hover,
#geometry .node:hover,
#strength .node:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
}

#sectionGeo .node-enhanced:hover,
#reinforcement .node-enhanced:hover,
#geometry .node-enhanced:hover,
#strength .node-enhanced:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.theme-light #sectionGeo .card:hover,
body.theme-light #reinforcement .card:hover,
body.theme-light #geometry .card:hover,
body.theme-light #strength .card:hover {
  border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
  background: #ffffff !important;
}

body.theme-light #sectionGeo .node:hover,
body.theme-light #reinforcement .node:hover,
body.theme-light #geometry .node:hover,
body.theme-light #strength .node:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  transform: none !important;
}

body.theme-light #sectionGeo .node-enhanced:hover,
body.theme-light #reinforcement .node-enhanced:hover,
body.theme-light #geometry .node-enhanced:hover,
body.theme-light #strength .node-enhanced:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
}

/* =========================
   PROFILE CARD HOVER OFF
   ========================= */

body.profile-page .card:hover {
  transform: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

body.profile-page .profile-card-enhanced:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
  border-color: rgba(96, 165, 250, 0.2) !important;
}

body.profile-page .profile-projects-card:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
  border-color: rgba(96, 165, 250, 0.2) !important;
}

body.profile-page .project-card:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.profile-page .project-card:hover::before {
  opacity: 0 !important;
}

body.theme-light.profile-page .card:hover {
  transform: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light.profile-page .profile-card-enhanced:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

body.theme-light.profile-page .profile-projects-card:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

body.theme-light.profile-page .project-card:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  transform: none !important;
  box-shadow: none !important;
}

body.theme-light.profile-page .project-card:hover::before {
  opacity: 0 !important;
}

/* =========================
   LIGHT THEME READABILITY PATCH
   ========================= */

body.theme-light {
  background: #eef2f7;
  color: #0f172a;
}

body.theme-light main {
  background: #f8fafc;
  border-left: 0;
  border-right: 0;
}

body.theme-light .section h2,
body.theme-light .card-title,
body.theme-light .project-title,
body.theme-light .profile-projects-title,
body.theme-light .profile-user-email {
  color: #0f172a;
}

body.theme-light label,
body.theme-light .meta,
body.theme-light .subtitle,
body.theme-light .caption,
body.theme-light .node-meta,
body.theme-light .profile-user-label,
body.theme-light .profile-section-title,
body.theme-light .profile-projects-subtitle,
body.theme-light .project-meta {
  color: #475569;
}

body.theme-light .card,
body.theme-light .result,
body.theme-light .node,
body.theme-light .node-enhanced,
body.theme-light .settings-panel,
body.theme-light .article-modal,
body.theme-light .project-card,
body.theme-light .profile-card-enhanced,
body.theme-light .profile-projects-card {
  background: #ffffff;
  border-color: #d5dde8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

body.theme-light input,
body.theme-light select,
body.theme-light .ui-select,
body.theme-light .profile-create-input,
body.theme-light .profile-projects-search-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.theme-light input::placeholder,
body.theme-light select::placeholder,
body.theme-light .profile-create-input::placeholder,
body.theme-light .profile-projects-search-input::placeholder {
  color: #64748b;
}

body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light .ui-select:focus,
body.theme-light .profile-create-input:focus,
body.theme-light .profile-projects-search-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
}

body.theme-light .tabs {
  background: #f1f5f9;
  border-color: #d5dde8;
}

body.theme-light .tab {
  background: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
}

body.theme-light .tab .lg-btn__label {
  color: #475569;
}

body.theme-light .tab:hover {
  background: #dbe5f1;
  color: #334155;
  border-color: #cbd5e1;
}

body.theme-light .tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

body.theme-light .tab.active .lg-btn__label {
  color: #ffffff;
}

body.theme-light .btn-primary,
body.theme-light button.btn-primary,
body.theme-light #btnGeo,
body.theme-light #btnReinf,
body.theme-light #btnGeom,
body.theme-light #btnStrength {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

body.theme-light .btn-primary:hover,
body.theme-light button.btn-primary:hover,
body.theme-light #btnGeo:hover,
body.theme-light #btnReinf:hover,
body.theme-light #btnGeom:hover,
body.theme-light #btnStrength:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

body.theme-light .btn-primary .lg-btn__label,
body.theme-light #btnGeo .lg-btn__label,
body.theme-light #btnReinf .lg-btn__label,
body.theme-light #btnGeom .lg-btn__label,
body.theme-light #btnStrength .lg-btn__label {
  color: #ffffff;
}

body.theme-light .btn-small,
body.theme-light button.btn-secondary {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

body.theme-light .btn-open {
  border-color: #cbd5e1;
}

body.theme-light .btn-delete {
  border-color: #fca5a5;
}

body.theme-light button:disabled,
body.theme-light .btn-small:disabled {
  background: #e5e7eb !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

body.theme-light .node-label,
body.theme-light .node-values,
body.theme-light .node-values strong,
body.theme-light .node-data {
  color: #1e293b;
}

body.theme-light.profile-page .profile-main {
  background: #f8fafc;
}

body.theme-light.profile-page .profile-user-info,
body.theme-light.profile-page .profile-projects-header-enhanced {
  border-bottom-color: #e2e8f0;
}

body.theme-light.profile-page .profile-avatar-upload,
body.theme-light.profile-page .profile-projects-icon {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e293b;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

body.theme-light .profile-avatar-overlay {
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
}

body.theme-light.profile-page .profile-copy-uid-link,
body.theme-light.profile-page .profile-user-email-icon {
  color: #2563eb;
}

body.theme-light.profile-page .profile-copy-uid-link:hover {
  color: #1d4ed8;
}

body.theme-light.profile-page .profile-filter-tab {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-light.profile-page .profile-filter-tab .lg-btn__label {
  color: #334155;
}

body.theme-light.profile-page .profile-filter-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

body.theme-light.profile-page .profile-filter-tab.is-active .lg-btn__label {
  color: #ffffff;
}

body.theme-light.profile-page .projects-list::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.18);
}

body.theme-light.profile-page .projects-list::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
}

body.theme-light.profile-page .projects-list::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.7);
}

body.theme-light.profile-page .project-card {
  background: #ffffff !important;
  border-color: #d5dde8 !important;
}

body.theme-light.profile-page .project-card:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1) !important;
}

/* =========================
   LIGHT THEME: DARK CARD/BUTTON PARITY
   ========================= */

/* Карточки как в dark */
body.theme-light .card,
body.theme-light .node,
body.theme-light .node-enhanced,
body.theme-light .project-card,
body.theme-light .profile-card-enhanced,
body.theme-light .profile-projects-card,
body.theme-light .result {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .card:hover,
body.theme-light .node:hover,
body.theme-light .node-enhanced:hover,
body.theme-light .project-card:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Текст в карточках как в dark */
body.theme-light .card-title,
body.theme-light .node-title,
body.theme-light .project-title,
body.theme-light .profile-projects-title,
body.theme-light .profile-user-email,
body.theme-light .node-values strong,
body.theme-light .node-label,
body.theme-light .node-values {
  color: #f1f5f9 !important;
}

body.theme-light .meta,
body.theme-light label,
body.theme-light .subtitle,
body.theme-light .caption,
body.theme-light .node-meta,
body.theme-light .profile-user-label,
body.theme-light .profile-projects-subtitle,
body.theme-light .project-meta {
  color: #94a3b8 !important;
}

/* Навигационные табы как в dark */
body.theme-light .tabs {
  background: rgba(30, 41, 59, 0.28) !important;
  border: none !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.theme-light .tab {
  background: linear-gradient(180deg, rgba(240, 248, 255, 0.08), rgba(240, 248, 255, 0.02)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.theme-light .tab .lg-btn__label {
  color: #f8fafc !important;
}

body.theme-light .tab:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(240, 248, 255, 0.04)) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

body.theme-light .tab.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(240, 248, 255, 0.06)) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
}

body.theme-light .tab.active .lg-btn__label {
  color: #ffffff !important;
}

/* Кнопки как в dark */
body.theme-light button {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3) !important;
}

body.theme-light button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4) !important;
}

body.theme-light .btn-small {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
}

body.theme-light .btn-small:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}

body.theme-light button.btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.theme-light button.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}

body.theme-light .btn-open {
  background: rgba(96, 165, 250, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
  color: #60a5fa !important;
}

body.theme-light .btn-open:hover {
  background: rgba(96, 165, 250, 0.3) !important;
}

body.theme-light .btn-delete {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
}

body.theme-light .btn-delete:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

body.theme-light #btnGeo,
body.theme-light #btnReinf,
body.theme-light #btnGeom,
body.theme-light #btnStrength,
body.theme-light #btnImportIfc,
body.theme-light #btnIfcMoreActions,
body.theme-light #btnClearGeoBimSelection,
body.theme-light #btnClearReinfBimSelection,
body.theme-light #btnClearStrengthBimSelection,
body.theme-light #btnClearForm,
body.theme-light #btnClearNodes,
body.theme-light #btnClearReinfForm,
body.theme-light #btnClearReinfChecks,
body.theme-light #btnClearGeomForm,
body.theme-light #btnClearGeomChecks,
body.theme-light #btnClearStrengthForm,
body.theme-light #btnClearStrengthChecks,
body.theme-light #btnAllArticles,
body.theme-light #btnKnowledgeSearch,
body.theme-light #btnCategorySearch {
  background: rgba(15, 23, 42, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body.theme-light #btnGeo:hover,
body.theme-light #btnReinf:hover,
body.theme-light #btnGeom:hover,
body.theme-light #btnStrength:hover {
  background: #15803d !important;
  border-color: rgba(22, 163, 74, 0.6) !important;
}

/* =========================
   LIGHT THEME LEGIBILITY FIX (PRIORITY)
   ========================= */

/* 1) Карточки узлов: заголовки и строки Проект/Факт */
body.theme-light .node-enhanced .node-title,
body.theme-light #sectionGeo .node-enhanced .node-title,
body.theme-light #reinforcement .node-enhanced .node-title,
body.theme-light #geometry .node-enhanced .node-title,
body.theme-light #strength .node-enhanced .node-title,
body.theme-light .node-data,
body.theme-light .node-data-row,
body.theme-light .node-label,
body.theme-light .node-values,
body.theme-light .node-values strong {
  color: #1e293b !important;
}

/* 2) Кнопки Проверить/Очистить: контрастный фон */
body.theme-light #btnGeo,
body.theme-light #btnReinf,
body.theme-light #btnGeom,
body.theme-light #btnStrength,
body.theme-light #btnImportIfc,
body.theme-light #btnIfcMoreActions,
body.theme-light #btnClearGeoBimSelection,
body.theme-light #btnClearReinfBimSelection,
body.theme-light #btnClearStrengthBimSelection,
body.theme-light #btnClearForm,
body.theme-light #btnClearNodes,
body.theme-light #btnClearReinfForm,
body.theme-light #btnClearReinfChecks,
body.theme-light #btnClearGeomForm,
body.theme-light #btnClearGeomChecks,
body.theme-light #btnClearStrengthForm,
body.theme-light #btnClearStrengthChecks {
  background: #334155 !important;
  border-color: #334155 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2) !important;
}

body.theme-light #btnGeo .lg-btn__label,
body.theme-light #btnReinf .lg-btn__label,
body.theme-light #btnGeom .lg-btn__label,
body.theme-light #btnStrength .lg-btn__label,
body.theme-light #btnImportIfc .lg-btn__label,
body.theme-light #btnIfcMoreActions .lg-btn__label,
body.theme-light #btnClearGeoBimSelection .lg-btn__label,
body.theme-light #btnClearReinfBimSelection .lg-btn__label,
body.theme-light #btnClearStrengthBimSelection .lg-btn__label,
body.theme-light #btnClearForm .lg-btn__label,
body.theme-light #btnClearNodes .lg-btn__label,
body.theme-light #btnClearReinfForm .lg-btn__label,
body.theme-light #btnClearReinfChecks .lg-btn__label,
body.theme-light #btnClearGeomForm .lg-btn__label,
body.theme-light #btnClearGeomChecks .lg-btn__label,
body.theme-light #btnClearStrengthForm .lg-btn__label,
body.theme-light #btnClearStrengthChecks .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light #btnGeo:hover,
body.theme-light #btnReinf:hover,
body.theme-light #btnGeom:hover,
body.theme-light #btnStrength:hover,
body.theme-light #btnImportIfc:hover:not(:disabled),
body.theme-light #btnIfcMoreActions:hover:not(:disabled),
body.theme-light #btnClearGeoBimSelection:hover,
body.theme-light #btnClearReinfBimSelection:hover,
body.theme-light #btnClearStrengthBimSelection:hover,
body.theme-light #btnClearForm:hover,
body.theme-light #btnClearNodes:hover,
body.theme-light #btnClearReinfForm:hover,
body.theme-light #btnClearReinfChecks:hover,
body.theme-light #btnClearGeomForm:hover,
body.theme-light #btnClearGeomChecks:hover,
body.theme-light #btnClearStrengthForm:hover,
body.theme-light #btnClearStrengthChecks:hover {
  background: #1e293b !important;
  border-color: #1e293b !important;
}

/* 3) Таб-бар: читаемый текст */
body.theme-light .tab {
  color: #1e293b !important;
}

body.theme-light .tab .lg-btn__label {
  color: #1e293b !important;
}

body.theme-light .tab.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

body.theme-light .tab.active .lg-btn__label {
  color: #ffffff !important;
}

/* 4) Лейблы полей */
body.theme-light label,
body.theme-light .construction-label,
body.theme-light .meta {
  color: #374151 !important;
}

/* 5) Текст внутри инпутов/дропдаунов */
body.theme-light input,
body.theme-light select,
body.theme-light .ui-select,
body.theme-light .profile-create-input,
body.theme-light .profile-projects-search-input {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.theme-light input::placeholder,
body.theme-light select::placeholder,
body.theme-light .profile-create-input::placeholder,
body.theme-light .profile-projects-search-input::placeholder {
  color: #64748b !important;
}

/* 6) Бейдж "в норме" */
body.theme-light .tag.ok {
  color: #166534 !important;
  background: #dcfce7 !important;
  border-color: #86efac !important;
}

/* Общий приоритет: светлый текст -> тёмный в light-теме */
body.theme-light .card-title,
body.theme-light .section h2,
body.theme-light .subtitle,
body.theme-light .caption,
body.theme-light .project-title,
body.theme-light .project-meta,
body.theme-light .profile-user-email,
body.theme-light .profile-user-label,
body.theme-light .profile-projects-title,
body.theme-light .profile-projects-subtitle {
  color: #1e293b !important;
}

/* =========================
   LIGHT THEME CARD CONTRAST (FORMS + NODES)
   ========================= */

/* Фон страницы и контейнера вокруг карточек */
body.theme-light,
body.theme-light main,
body.theme-light .section,
body.theme-light .section.active,
body.theme-light .split,
body.theme-light .wizard-steps {
  background: #f1f5f9 !important;
}

/* Карточки форм ввода (правые/основные карточки модулей) */
body.theme-light #sectionGeo .split .card:last-child,
body.theme-light #reinforcement .split .card:last-child,
body.theme-light #geometry .split .card:last-child,
body.theme-light #strength .split .card:last-child {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}

body.theme-light #sectionGeo .split .card:last-child:hover,
body.theme-light #reinforcement .split .card:last-child:hover,
body.theme-light #geometry .split .card:last-child:hover,
body.theme-light #strength .split .card:last-child:hover {
  border-color: #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  transform: none !important;
}

/* Левые карточки списка узлов */
body.theme-light #sectionGeo .node-enhanced,
body.theme-light #reinforcement .node-enhanced,
body.theme-light #geometry .node-enhanced,
body.theme-light #strength .node-enhanced {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1) !important;
}

body.theme-light #sectionGeo .node-enhanced:hover,
body.theme-light #reinforcement .node-enhanced:hover,
body.theme-light #geometry .node-enhanced:hover,
body.theme-light #strength .node-enhanced:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1) !important;
  transform: none !important;
}

/* Активная/выбранная карточка узла */
body.theme-light #sectionGeo .node-enhanced.active,
body.theme-light #sectionGeo .node-enhanced.is-active,
body.theme-light #sectionGeo .node-enhanced.selected,
body.theme-light #sectionGeo .node-enhanced[aria-selected="true"],
body.theme-light #reinforcement .node-enhanced.active,
body.theme-light #reinforcement .node-enhanced.is-active,
body.theme-light #reinforcement .node-enhanced.selected,
body.theme-light #reinforcement .node-enhanced[aria-selected="true"],
body.theme-light #geometry .node-enhanced.active,
body.theme-light #geometry .node-enhanced.is-active,
body.theme-light #geometry .node-enhanced.selected,
body.theme-light #geometry .node-enhanced[aria-selected="true"],
body.theme-light #strength .node-enhanced.active,
body.theme-light #strength .node-enhanced.is-active,
body.theme-light #strength .node-enhanced.selected,
body.theme-light #strength .node-enhanced[aria-selected="true"] {
  border-left: 3px solid #2563eb !important;
}

/* =========================
   LIGHT THEME: ACTION BUTTONS LIKE MODULE TABS
   ========================= */
body.theme-light #btnGeo,
body.theme-light #btnReinf,
body.theme-light #btnGeom,
body.theme-light #btnStrength,
body.theme-light #btnClearForm,
body.theme-light #btnClearNodes,
body.theme-light #btnImportIfc,
body.theme-light #btnIfcMoreActions,
body.theme-light #btnClearGeoBimSelection,
body.theme-light #btnClearReinfBimSelection,
body.theme-light #btnClearStrengthBimSelection,
body.theme-light #btnClearReinfForm,
body.theme-light #btnClearReinfChecks,
body.theme-light #btnClearGeomForm,
body.theme-light #btnClearGeomChecks,
body.theme-light #btnClearStrengthForm,
body.theme-light #btnClearStrengthChecks {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%) !important;
  border: 1px solid #94a3b8 !important;
  color: #1e293b !important;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.85) inset !important;
  transform: none !important;
}

body.theme-light #btnGeo .lg-btn__label,
body.theme-light #btnReinf .lg-btn__label,
body.theme-light #btnGeom .lg-btn__label,
body.theme-light #btnStrength .lg-btn__label,
body.theme-light #btnClearForm .lg-btn__label,
body.theme-light #btnClearNodes .lg-btn__label,
body.theme-light #btnImportIfc .lg-btn__label,
body.theme-light #btnIfcMoreActions .lg-btn__label,
body.theme-light #btnClearGeoBimSelection .lg-btn__label,
body.theme-light #btnClearReinfBimSelection .lg-btn__label,
body.theme-light #btnClearStrengthBimSelection .lg-btn__label,
body.theme-light #btnClearReinfForm .lg-btn__label,
body.theme-light #btnClearReinfChecks .lg-btn__label,
body.theme-light #btnClearGeomForm .lg-btn__label,
body.theme-light #btnClearGeomChecks .lg-btn__label,
body.theme-light #btnClearStrengthForm .lg-btn__label,
body.theme-light #btnClearStrengthChecks .lg-btn__label {
  color: #1e293b !important;
}

body.theme-light #btnClearForm:hover,
body.theme-light #btnClearNodes:hover,
body.theme-light #btnImportIfc:hover:not(:disabled),
body.theme-light #btnIfcMoreActions:hover:not(:disabled),
body.theme-light #btnClearGeoBimSelection:hover,
body.theme-light #btnClearReinfBimSelection:hover,
body.theme-light #btnClearStrengthBimSelection:hover,
body.theme-light #btnClearReinfForm:hover,
body.theme-light #btnClearReinfChecks:hover,
body.theme-light #btnClearGeomForm:hover,
body.theme-light #btnClearGeomChecks:hover,
body.theme-light #btnClearStrengthForm:hover,
body.theme-light #btnClearStrengthChecks:hover {
  background: linear-gradient(180deg, #eef3f9 0%, #dbe5f1 100%) !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  transform: none !important;
}

/* Проверить и сохранить: зелёный hover как в dark теме */
body.theme-light #btnGeo:hover,
body.theme-light #btnReinf:hover,
body.theme-light #btnGeom:hover,
body.theme-light #btnStrength:hover {
  background: #15803d !important;
  border-color: rgba(22, 163, 74, 0.6) !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 20px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

body.theme-light #btnGeo:hover .lg-btn__label,
body.theme-light #btnReinf:hover .lg-btn__label,
body.theme-light #btnGeom:hover .lg-btn__label,
body.theme-light #btnStrength:hover .lg-btn__label {
  color: #ffffff !important;
}

/* =========================
   LIGHT THEME: CONSTRUCTION + MODULES EMPHASIS
   ========================= */

/* Блок выбора объекта/конструкции */
body.theme-light .construction-bar {
  background: linear-gradient(180deg, #e9eef5 0%, #dde5ef 100%) !important;
  border: 1px solid #b8c5d6 !important;
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light .construction-label {
  color: #334155 !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
}

body.theme-light .construction-bar .project-select,
body.theme-light .construction-bar select,
body.theme-light #projectSelector,
body.theme-light #construction {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
  color: #0f172a !important;
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.theme-light .construction-bar .project-select:hover,
body.theme-light .construction-bar select:hover {
  border-color: #64748b !important;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light .construction-bar .project-select:focus,
body.theme-light .construction-bar select:focus {
  border-color: #2563eb !important;
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, 0.16),
    0 6px 16px rgba(37, 99, 235, 0.2) !important;
}

/* Панель модулей */
body.theme-light .tabs {
  background: linear-gradient(180deg, #b8c1cd 0%, #a6afbc 100%) !important;
  border: 1px solid #94a3b8 !important;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

body.theme-light .tab {
  background: linear-gradient(180deg, #dbe7f3 0%, #bfd0e4 100%) !important;
  border: 1px solid #9fb6cf !important;
  color: #1e293b !important;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

body.theme-light .tab .lg-btn__label {
  color: #1e293b !important;
  font-weight: 700 !important;
}

body.theme-light .tab:hover {
  background: linear-gradient(180deg, #e6eff8 0%, #ccdaea 100%) !important;
  border-color: #8ea8c6 !important;
  color: #0f172a !important;
}

body.theme-light .tab.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 18px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

body.theme-light .tab.active .lg-btn__label {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* =========================
   LIGHT THEME: NODE CARDS EMPHASIS
   ========================= */
body.theme-light #sectionGeo .node-enhanced,
body.theme-light #reinforcement .node-enhanced,
body.theme-light #geometry .node-enhanced,
body.theme-light #strength .node-enhanced {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid #b8c7d8 !important;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.95) inset !important;
}

body.theme-light #sectionGeo .node-enhanced:hover,
body.theme-light #reinforcement .node-enhanced:hover,
body.theme-light #geometry .node-enhanced:hover,
body.theme-light #strength .node-enhanced:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: #b8c7d8 !important;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.95) inset !important;
  transform: none !important;
}

body.theme-light #sectionGeo .node-enhanced .node-header,
body.theme-light #reinforcement .node-enhanced .node-header,
body.theme-light #geometry .node-enhanced .node-header,
body.theme-light #strength .node-enhanced .node-header {
  border-bottom: 1px solid #dbe4ef !important;
  padding-bottom: 10px !important;
  margin-bottom: 2px !important;
}

body.theme-light #sectionGeo .node-enhanced .node-title,
body.theme-light #reinforcement .node-enhanced .node-title,
body.theme-light #geometry .node-enhanced .node-title,
body.theme-light #strength .node-enhanced .node-title {
  color: #1e293b !important;
  font-weight: 700 !important;
}

body.theme-light #sectionGeo .node-enhanced .node-data,
body.theme-light #reinforcement .node-enhanced .node-data,
body.theme-light #geometry .node-enhanced .node-data,
body.theme-light #strength .node-enhanced .node-data {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
  border: 1px solid #d7e0eb !important;
  border-left: 4px solid #2563eb !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.theme-light #sectionGeo .node-enhanced .node-label,
body.theme-light #reinforcement .node-enhanced .node-label,
body.theme-light #geometry .node-enhanced .node-label,
body.theme-light #strength .node-enhanced .node-label {
  color: #334155 !important;
  font-weight: 700 !important;
}

body.theme-light #sectionGeo .node-enhanced .node-values,
body.theme-light #reinforcement .node-enhanced .node-values,
body.theme-light #geometry .node-enhanced .node-values,
body.theme-light #strength .node-enhanced .node-values,
body.theme-light #sectionGeo .node-enhanced .node-values strong,
body.theme-light #reinforcement .node-enhanced .node-values strong,
body.theme-light #geometry .node-enhanced .node-values strong,
body.theme-light #strength .node-enhanced .node-values strong {
  color: #1e293b !important;
}

body.theme-light #sectionGeo .node-enhanced .node-actions,
body.theme-light #reinforcement .node-enhanced .node-actions,
body.theme-light #geometry .node-enhanced .node-actions,
body.theme-light #strength .node-enhanced .node-actions {
  border-top: 1px solid #dbe4ef !important;
}

/* =========================
   COMPACT NODE CARDS (ALL MODULES)
   ========================= */

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact {
  position: relative;
  cursor: pointer !important;
  padding: 14px 16px !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  transition: none !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-header {
  margin-bottom: 12px !important;
  gap: 10px !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-title {
  font-size: 15px !important;
  line-height: 1.3 !important;
  gap: 8px !important;
  flex: 1;
  min-width: 0;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-icon {
  font-size: 18px !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-data {
  padding: 12px 14px !important;
  gap: 8px !important;
  border-left-width: 2px !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-data-row {
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-label {
  min-width: 80px !important;
  font-size: 14px !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-values {
  font-size: 14px !important;
  line-height: 1.35 !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact:hover {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(96, 165, 250, 0.6) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26) !important;
  transform: none !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.7);
  outline-offset: 2px;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-delete-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transform: none !important;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-delete-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-delete-icon:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fecaca;
  box-shadow: none;
  transform: none !important;
}

body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%) !important;
  border-color: #7aa8dd !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18) !important;
  transform: none !important;
}

body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-delete-icon {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .node-card-compact .node-delete-icon:hover {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

/* =========================
   PROFILE PAGE VISUAL BOOST
   ========================= */
body.profile-page .profile-card-enhanced,
body.profile-page .profile-projects-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64)) !important;
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.profile-page .profile-fields-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.3)) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  border-radius: 14px !important;
  padding: 14px !important;
}

body.profile-page .profile-field-wrapper label {
  color: #dbeafe !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

body.profile-page .profile-name-grid input,
body.profile-page .profile-projects-search-input {
  background: rgba(15, 23, 42, 0.58) !important;
  border: 1px solid rgba(148, 163, 184, 0.42) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.profile-page .profile-name-grid input:focus,
body.profile-page .profile-projects-search-input:focus {
  border-color: rgba(96, 165, 250, 0.72) !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.profile-page .project-card-actions {
  gap: 10px !important;
  min-width: 248px !important;
}

body.profile-page .profile-save-btn.lg-btn--pill,
body.profile-page .profile-create-project-btn.lg-btn--pill,
body.profile-page .profile-filter-tab.lg-btn--pill,
body.profile-page .profile-feed-tab.lg-btn--pill,
body.profile-page .project-card-actions .btn-small.lg-btn--pill {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.92), rgba(30, 41, 59, 0.9)) !important;
  border: 1px solid rgba(148, 163, 184, 0.42) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.profile-page .profile-save-btn .lg-btn__label,
body.profile-page .profile-create-project-btn .lg-btn__label,
body.profile-page .profile-filter-tab .lg-btn__label,
body.profile-page .profile-feed-tab .lg-btn__label,
body.profile-page .project-card-actions .btn-small .lg-btn__label {
  color: inherit !important;
  font-weight: 700 !important;
}

body.profile-page .profile-save-btn.lg-btn--pill:hover,
body.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.profile-page .profile-filter-tab.lg-btn--pill:hover,
body.profile-page .profile-feed-tab.lg-btn--pill:hover,
body.profile-page .project-card-actions .btn-small.lg-btn--pill:hover {
  border-color: rgba(96, 165, 250, 0.66) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.34), rgba(30, 64, 175, 0.3)) !important;
}

body.profile-page .profile-filter-tab.is-active,
body.profile-page .profile-feed-tab.is-active {
  border-color: rgba(59, 130, 246, 0.78) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
}

body.profile-page .profile-filter-tab.is-active .lg-btn__label,
body.profile-page .profile-feed-tab.is-active .lg-btn__label {
  color: #ffffff !important;
}

body.profile-page .project-card-actions .btn-small[data-act="open"] {
  border-color: rgba(96, 165, 250, 0.62) !important;
}

body.profile-page .project-card-actions .btn-small[data-act="delete"] {
  border-color: rgba(239, 68, 68, 0.56) !important;
  color: #fecaca !important;
}

body.theme-light.profile-page .profile-card-enhanced,
body.theme-light.profile-page .profile-projects-card {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  border: 1px solid #c9d7ea !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-fields-section {
  background: linear-gradient(180deg, #f8fbff, #edf4ff) !important;
  border-color: #d6e2f3 !important;
}

body.theme-light.profile-page .profile-field-wrapper label {
  color: #334155 !important;
}

body.theme-light.profile-page .profile-name-grid input,
body.theme-light.profile-page .profile-projects-search-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light.profile-page .profile-save-btn.lg-btn--pill,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-save-btn.lg-btn--pill:hover,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:hover,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:hover,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill:hover {
  border-color: #93c5fd !important;
  background: linear-gradient(180deg, #f8fbff, #eaf2ff) !important;
}

body.theme-light.profile-page .profile-filter-tab.is-active,
body.theme-light.profile-page .profile-feed-tab.is-active {
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
}

body.theme-light.profile-page .profile-filter-tab.is-active .lg-btn__label,
body.theme-light.profile-page .profile-feed-tab.is-active .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="open"] {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="delete"] {
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

body.theme-light .project-title-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .project-title-name {
  text-decoration-color: rgba(100, 116, 139, 0.32);
}

body.theme-light .project-title-name:hover,
body.theme-light .project-title-name:focus-visible {
  text-decoration-color: rgba(37, 99, 235, 0.4);
}

/* =========================
   PROFILE FINAL FIX (dark hover + save button fit)
   ========================= */

body.theme-dark.profile-page .profile-card-enhanced:hover,
body.theme-dark.profile-page .profile-projects-card:hover {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64)) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
}

body.theme-dark.profile-page .profile-fields-section:hover {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.3)) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: none !important;
  transform: none !important;
}

body.profile-page .profile-fields-section .profile-save-btn.lg-btn--pill {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-content: center !important;
  margin-top: 12px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* Summary: restore visible action buttons in light theme */
body.theme-light #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border: 1px solid #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill .lg-btn__label {
  color: #0f172a !important;
}

body.theme-light #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill:hover {
  background: linear-gradient(180deg, #f8fbff, #eaf2ff) !important;
  border-color: #93c5fd !important;
}

/* =========================
   PROFILE HEADER REFINEMENT
   ========================= */

body.profile-page .profile-user-info {
  gap: 0 !important;
  padding-bottom: 18px !important;
}

body.profile-page .profile-user-header {
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

body.profile-page .profile-avatar-upload {
  width: 112px !important;
  height: 112px !important;
  min-width: 112px !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.profile-page .profile-user-details {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

body.profile-page .profile-user-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.profile-page .profile-user-label {
  color: #94a3b8 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  font-weight: 600 !important;
}

body.profile-page .profile-user-email-row {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

body.profile-page .profile-user-email-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  color: #bfdbfe !important;
  background: rgba(96, 165, 250, 0.12) !important;
  border-color: rgba(96, 165, 250, 0.22) !important;
  flex: 0 0 auto !important;
}

body.profile-page .profile-user-email {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  cursor: help !important;
}

body.profile-page .profile-copy-uid-link {
  color: #93c5fd !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-align: left !important;
  opacity: 0.88;
}

body.profile-page .profile-copy-uid-link:hover {
  color: #dbeafe !important;
  opacity: 1;
}

body.profile-page .profile-fields-section {
  gap: 10px !important;
  padding: 12px !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.24)) !important;
}

body.profile-page .profile-section-title {
  font-size: 12px !important;
  letter-spacing: 0.08em !important;
  color: #cbd5e1 !important;
  margin-bottom: 2px !important;
}

body.profile-page .profile-name-grid {
  gap: 10px 12px !important;
}

body.profile-page .profile-field-wrapper {
  gap: 5px !important;
}

body.profile-page .profile-field-wrapper label {
  color: rgba(219, 234, 254, 0.88) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.profile-page .profile-name-grid input {
  min-height: 50px !important;
}

body.profile-page .profile-fields-section .profile-save-btn.lg-btn--pill {
  margin-top: 6px !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.82), rgba(30, 41, 59, 0.78)) !important;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.profile-page .profile-save-btn .lg-btn__label {
  font-weight: 600 !important;
}

body.profile-page .profile-fields-section .profile-save-btn.lg-btn--pill:hover {
  border-color: rgba(96, 165, 250, 0.52) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.24), rgba(30, 64, 175, 0.22)) !important;
}

@media (max-width: 768px) {
  body.profile-page .profile-user-header {
    align-items: stretch !important;
  }

  body.profile-page .profile-avatar-upload {
    width: 136px !important;
    height: 136px !important;
    min-width: 136px !important;
    border-radius: 26px !important;
    align-self: center !important;
  }

  body.profile-page .profile-user-details {
    width: 100% !important;
  }

  body.profile-page .profile-user-meta-row {
    justify-content: center;
    text-align: center;
  }

  body.profile-page .profile-user-email-row {
    justify-content: center;
    width: 100% !important;
  }

  body.profile-page .profile-user-email {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: clip !important;
    text-align: center !important;
  }

  body.profile-page .profile-copy-uid-link {
    text-align: center !important;
  }
}

/* =========================
   MINIMAL SITE FOOTER
   ========================= */

.site-footer {
  width: 100%;
  max-width: none;
  min-height: var(--site-footer-height);
  margin: 10px 0 0;
  padding: 30px max(20px, calc((100vw - var(--site-frame-width)) / 2)) 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  box-sizing: border-box;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
  box-shadow: 0 -14px 36px rgba(2, 6, 23, 0.18);
}

body.home-page .site-footer {
  margin-top: auto;
  border-top: none;
  box-shadow: none;
}

body.home-page .site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

body.home-page .site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

body.home-page .site-footer__link > span {
  display: inline-block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

body.home-page .site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 2px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

body.home-page .site-footer__link:hover {
  color: #f6f6f6;
}

body.home-page .site-footer__link:hover > span::after,
body.home-page .site-footer__link:focus-visible > span::after {
  opacity: 1;
}

body.home-page .site-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  color: #f6f6f6;
  text-decoration: none;
}

body.home-page .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.home-page .site-footer__copy {
  color: #959599;
  margin-left: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

.site-footer__link:link,
.site-footer__link:visited,
.site-footer__link:focus,
.site-footer__link:active,
.site-footer__link > span {
  color: inherit;
  text-decoration: none;
}

.site-footer__link > span {
  display: inline-block;
  position: relative;
}

.site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

.site-footer__link:hover {
  color: #f6f6f6;
}

.site-footer__link:hover > span::after,
.site-footer__link:focus-visible > span::after {
  opacity: 1;
}

.site-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  color: #f6f6f6;
  text-decoration: none;
}

.site-footer__icon-link:hover {
  color: #f6f6f6;
}

.site-footer__icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer__copy {
  color: #959599;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
}

body.theme-light .site-footer,
body.theme-light .site-footer__copy {
  color: #959599;
}

body.theme-light .site-footer {
  background: #000000;
  box-shadow: none;
}

body.theme-light .site-footer__link,
body.theme-light .site-footer__icon-link {
  color: #f6f6f6;
}

body.theme-light .site-footer__link:hover,
body.theme-light .site-footer__icon-link:hover {
  color: #f6f6f6;
}

@media (max-width: 900px) {
  .site-footer {
    width: min(100%, calc(100% - 24px));
    margin: 12px auto 18px;
    padding: 0 0 4px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .site-footer__nav {
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .site-footer__copy {
    white-space: normal;
    width: 100%;
    text-align: center;
  }
}

/* =========================
   ABOUT / PRIVACY PAGES
   ========================= */

body.about-page,
body.privacy-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

body.about-page header,
body.privacy-page header {
  padding: 14px 24px;
  min-height: 72px;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

body.about-page .brand,
body.privacy-page .brand {
  min-height: 44px;
  margin: 0 auto;
}

body.about-page .brand h1,
body.privacy-page .brand h1 {
  font-size: 18px;
  line-height: 1.1;
}

.legal-main,
.about-main {
  flex: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 40px;
}

.about-hero {
  min-height: clamp(480px, 74vh, 760px);
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: center;
  perspective: 1200px;
}

.about-scroll-story {
  width: 100%;
  max-width: none;
  padding-top: 0;
  overflow: clip;
}

.about-immersive {
  width: min(1280px, calc(100% - 40px));
  min-height: clamp(620px, calc(100vh - 72px), 820px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(360px, 0.78fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
  position: relative;
}

.about-immersive::before {
  content: "";
  position: absolute;
  inset: 8% 6% auto auto;
  width: min(52vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(96, 165, 250, 0.2), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}

.about-copy {
  position: relative;
  z-index: 2;
}

.about-copy h2 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: #f8fafc;
}

.about-copy p {
  margin: 28px 0 0;
  max-width: 620px;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.55;
  color: #cbd5e1;
}

.about-hero-signal {
  position: relative;
  z-index: 1;
  min-height: min(58vh, 520px);
  border-radius: 38px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 50% 52%, rgba(96, 165, 250, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(15, 23, 42, 0.28);
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(2, 6, 23, 0.24);
}

.about-hero-signal__ring {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.about-hero-signal__ring::before,
.about-hero-signal__ring::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  border: 1px solid rgba(34, 197, 94, 0.16);
}

.about-hero-signal__ring::after {
  inset: 36%;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.24);
}

.about-hero-signal__item {
  position: absolute;
  min-width: 150px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.032)),
    rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.22);
}

.about-hero-signal__item--one {
  left: 10%;
  top: 16%;
}

.about-hero-signal__item--two {
  right: 9%;
  top: 24%;
}

.about-hero-signal__item--three {
  left: 14%;
  bottom: 18%;
  border-color: rgba(248, 113, 113, 0.26);
}

.about-hero-signal__item--four {
  right: 12%;
  bottom: 12%;
  border-color: rgba(96, 165, 250, 0.26);
}

.about-device {
  position: relative;
  z-index: 1;
  min-height: min(70vh, 620px);
  border-radius: 36px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 42, 0.58);
  box-shadow:
    0 34px 80px rgba(2, 6, 23, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: perspective(1200px) rotateX(6deg) rotateY(-10deg);
  transform-origin: center;
}

.about-device__topbar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
}

.about-device__topbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.5);
}

.about-device__screen {
  height: calc(100% - 34px);
  min-height: 520px;
  border-radius: 26px;
  padding: 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(180deg, #111827, #0f172a);
  overflow: hidden;
}

.about-device__nav {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.about-device__nav span {
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.about-device__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-device__panel {
  min-height: 148px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.62);
}

.about-device__panel--wide {
  grid-column: 1 / -1;
}

.about-device__panel--accent {
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(20, 83, 45, 0.28);
}

.about-device__panel small {
  display: block;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.about-device__panel strong {
  display: block;
  margin-top: 10px;
  color: #f8fafc;
  font-size: clamp(20px, 2.8vw, 34px);
  line-height: 1.05;
}

.about-device__panel p,
.about-device__panel span {
  display: block;
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.about-cinematic {
  height: 250vh;
  position: relative;
}

.about-cinematic__sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.84fr) minmax(420px, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.about-cinematic__copy span {
  display: block;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about-cinematic__copy h3 {
  margin: 12px 0 0;
  max-width: 12ch;
  color: #f8fafc;
  font-size: clamp(42px, 5.8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.about-cinematic__copy p {
  margin: 22px 0 0;
  max-width: 520px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.62;
}

.about-product-stage {
  --story-progress: 0;
  position: relative;
  min-height: min(62vh, 560px);
  border-radius: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 50% 45%, rgba(96, 165, 250, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.08));
  overflow: hidden;
}

.about-product-orbit {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, 0.18);
  transform: rotate(calc(var(--story-progress) * 80deg)) scale(calc(0.92 + var(--story-progress) * 0.12));
}

.about-product-card {
  position: absolute;
  width: min(30vw, 280px);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 42, 0.76);
  box-shadow:
    0 24px 54px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 340ms ease, opacity 340ms ease, border-color 340ms ease;
}

.about-product-card small {
  display: block;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.about-product-card strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  font-size: 21px;
  line-height: 1.1;
}

.about-product-card span {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.about-product-card--project {
  left: 10%;
  top: 12%;
  transform: translate3d(calc(var(--story-progress) * 34px), calc(var(--story-progress) * -8px), 0);
}

.about-product-card--bim {
  right: 8%;
  top: 18%;
  transform: translate3d(calc(var(--story-progress) * -26px), calc(var(--story-progress) * 36px), 0);
}

.about-product-card--check {
  left: 28%;
  top: 42%;
  border-color: rgba(34, 197, 94, 0.26);
  transform: translate3d(0, calc(var(--story-progress) * -28px), 0) scale(calc(1 + var(--story-progress) * 0.06));
}

.about-product-card--issue {
  left: 8%;
  bottom: 12%;
  border-color: rgba(248, 113, 113, 0.26);
  transform: translate3d(calc(var(--story-progress) * 18px), calc(var(--story-progress) * -28px), 0);
}

.about-product-card--report {
  right: 10%;
  bottom: 10%;
  border-color: rgba(96, 165, 250, 0.28);
  transform: translate3d(calc(var(--story-progress) * -32px), calc(var(--story-progress) * -34px), 0);
}

.about-product-stage[data-scene="0"] .about-product-card:not(.about-product-card--project),
.about-product-stage[data-scene="1"] .about-product-card:not(.about-product-card--project):not(.about-product-card--bim),
.about-product-stage[data-scene="2"] .about-product-card--issue,
.about-product-stage[data-scene="2"] .about-product-card--report,
.about-product-stage[data-scene="3"] .about-product-card--report {
  opacity: 0.38;
}

.about-feature-film {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) 0 22px;
}

.about-feature-film__intro {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 0.82fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.about-feature-film__intro h3,
.about-flow__copy h3,
.about-system__headline h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.about-feature-film__intro p,
.about-flow__copy p,
.about-system__headline p {
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.65;
}

.about-feature-film__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-feature-tile {
  min-height: 230px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028)),
    rgba(15, 23, 42, 0.38);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.2);
  position: relative;
  overflow: hidden;
}

.about-feature-tile::before {
  content: "";
  position: absolute;
  inset: auto -16% -28% 18%;
  height: 58%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2), transparent 66%);
  pointer-events: none;
}

.about-feature-tile--large {
  grid-column: span 2;
  min-height: 280px;
}

.about-feature-tile--accent {
  grid-column: span 2;
  border-color: rgba(34, 197, 94, 0.26);
  background:
    radial-gradient(circle at 78% 20%, rgba(34, 197, 94, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028)),
    rgba(15, 23, 42, 0.42);
}

.about-feature-tile span,
.about-flow-step span,
.about-system-node span {
  display: block;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-feature-tile h4 {
  position: relative;
  margin: 42px 0 0;
  color: #f8fafc;
  font-size: clamp(22px, 2vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.about-feature-tile--large h4,
.about-feature-tile--accent h4 {
  max-width: 18ch;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.02;
}

.about-feature-tile p {
  position: relative;
  max-width: 560px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.65;
}

.about-flow {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 104px) 0;
}

.about-flow__sticky {
  display: grid;
  grid-template-columns: minmax(340px, 0.74fr) minmax(460px, 1.08fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: start;
}

.about-flow__copy {
  position: sticky;
  top: 104px;
}

.about-flow__timeline {
  display: grid;
  gap: 14px;
}

.about-flow-step {
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.026)),
    rgba(15, 23, 42, 0.34);
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.18);
}

.about-flow-step h4 {
  margin: 32px 0 0;
  color: #f8fafc;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.about-flow-step p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.65;
}

.about-system {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 88px) 0;
}

.about-system__headline {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: end;
  margin-bottom: 24px;
}

.about-system__board {
  min-height: 470px;
  position: relative;
  border-radius: 42px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.02)),
    rgba(15, 23, 42, 0.3);
  overflow: hidden;
}

.about-system__board::before,
.about-system__board::after {
  content: "";
  position: absolute;
  inset: 19% 12%;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 999px;
  pointer-events: none;
}

.about-system__board::after {
  inset: 32% 23%;
  border-color: rgba(34, 197, 94, 0.14);
}

.about-system-node {
  position: absolute;
  width: min(28vw, 290px);
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.082), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.26);
}

.about-system-node strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.about-system-node--primary {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(34, 197, 94, 0.34);
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(15, 23, 42, 0.82);
}

.about-system-node:nth-child(2) {
  left: 8%;
  top: 12%;
}

.about-system-node:nth-child(3) {
  right: 8%;
  top: 12%;
}

.about-system-node:nth-child(4) {
  left: 10%;
  bottom: 14%;
  border-color: rgba(248, 113, 113, 0.24);
}

.about-system-node:nth-child(5) {
  right: 10%;
  bottom: 14%;
  border-color: rgba(34, 197, 94, 0.24);
}

.about-system-node:nth-child(6) {
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  border-color: rgba(96, 165, 250, 0.28);
}

.about-split {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 56vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.about-split__copy h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.about-split__text {
  display: grid;
  gap: 18px;
}

.about-split__text p {
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.7;
}

.about-principles {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 40px;
}

.about-principle {
  min-height: 260px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026)),
    rgba(15, 23, 42, 0.34);
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.18);
}

.about-principle span {
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.about-principle h3 {
  margin: 58px 0 0;
  color: #f8fafc;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.about-principle p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.62;
}

.about-hero__eyebrow,
.legal-page__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #60a5fa;
}

.about-hero__title {
  margin: 12px 0 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.about-hero__lead {
  margin: 18px 0 0;
  max-width: 34rem;
  font-size: 17px;
  line-height: 1.65;
  color: #94a3b8;
}

.about-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.about-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.36);
  color: #cbd5e1;
  font-size: 12px;
}

.about-hero__visual {
  min-height: 420px;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.18), transparent 52%),
    linear-gradient(160deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.6));
  box-shadow:
    0 22px 44px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  align-content: end;
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.about-hero__visual-grid {
  display: grid;
  gap: 14px;
}

.about-panel {
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.about-panel__kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
}

.about-panel__title {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
}

.about-panel__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #94a3b8;
}

.about-story,
.about-feature-band,
.about-showcase,
.about-closing {
  padding-top: 72px;
  position: relative;
}

.about-section-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  align-items: start;
}

.about-section__title {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.about-section__body {
  display: grid;
  gap: 16px;
}

.about-section-pin {
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  will-change: transform;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-feature-card {
  min-height: 220px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.3));
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.2);
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.about-feature-card__index {
  font-size: 12px;
  color: #60a5fa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-feature-card__title {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 700;
}

.about-feature-card__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
}

.about-showcase__stack {
  display: grid;
  gap: 16px;
}

.about-showcase__card {
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.56), rgba(30, 41, 59, 0.44)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.1), transparent 46%);
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.about-showcase__metric {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 10px 0 0;
}

.about-showcase__caption {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 14px;
}

.about-closing__card {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.36));
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.24);
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.about-closing__card p,
.about-section__body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #94a3b8;
}

.about-closing__summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.about-closing__summary span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: rgba(37, 99, 235, 0.12);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.scroll-reveal {
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, var(--reveal-y, 42px), 0) scale(var(--reveal-scale, 0.985));
  transition:
    opacity 950ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.scroll-reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.about-hero .scroll-reveal:first-child {
  --reveal-y: 26px;
  --reveal-scale: 0.992;
}

.about-feature-card.scroll-reveal,
.about-showcase__card.scroll-reveal {
  --reveal-y: 32px;
  --reveal-scale: 0.972;
}

@media (min-width: 901px) {
  .about-story .about-section-pin,
  .about-showcase .about-section-pin {
    position: sticky;
    top: 116px;
  }
}

.legal-page__hero {
  max-width: 760px;
  padding: 24px 0 20px;
}

.legal-page__title {
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.legal-page__lead {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: #94a3b8;
}

.legal-card {
  max-width: 860px;
  padding: 26px 28px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.36));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.22);
}

.legal-card h2 {
  margin: 0;
  font-size: 22px;
}

.legal-card p,
.legal-card li {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.75;
}

.legal-card + .legal-card {
  margin-top: 18px;
}

body.theme-light .about-panel,
body.theme-light .about-feature-card,
body.theme-light .about-hero-signal,
body.theme-light .about-hero-signal__item,
body.theme-light .about-feature-tile,
body.theme-light .about-flow-step,
body.theme-light .about-system-node,
body.theme-light .about-showcase__card,
body.theme-light .about-closing__card,
body.theme-light .legal-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.88));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

body.theme-light .about-hero__lead,
body.theme-light .about-copy p,
body.theme-light .about-cinematic__copy p,
body.theme-light .about-feature-film__intro p,
body.theme-light .about-feature-tile p,
body.theme-light .about-flow__copy p,
body.theme-light .about-flow-step p,
body.theme-light .about-system__headline p,
body.theme-light .about-device__panel p,
body.theme-light .about-device__panel span,
body.theme-light .about-product-card span,
body.theme-light .about-split__text p,
body.theme-light .about-principle p,
body.theme-light .about-panel__text,
body.theme-light .about-feature-card__text,
body.theme-light .about-showcase__caption,
body.theme-light .about-closing__card p,
body.theme-light .about-section__body p,
body.theme-light .legal-page__lead,
body.theme-light .legal-card p,
body.theme-light .legal-card li {
  color: #64748b;
}

body.theme-light .about-hero__title,
body.theme-light .about-copy h2,
body.theme-light .about-cinematic__copy h3,
body.theme-light .about-feature-film__intro h3,
body.theme-light .about-feature-tile h4,
body.theme-light .about-flow__copy h3,
body.theme-light .about-flow-step h4,
body.theme-light .about-system__headline h3,
body.theme-light .about-system-node strong,
body.theme-light .about-device__panel strong,
body.theme-light .about-product-card strong,
body.theme-light .about-split__copy h3,
body.theme-light .about-principle h3,
body.theme-light .about-section__title,
body.theme-light .about-panel__title,
body.theme-light .about-feature-card__title,
body.theme-light .about-showcase__metric,
body.theme-light .legal-page__title,
body.theme-light .legal-card h2 {
  color: #0f172a;
}

body.theme-light .about-device,
body.theme-light .about-hero-signal,
body.theme-light .about-product-card,
body.theme-light .about-principle,
body.theme-light .about-system__board {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.9));
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.1);
}

body.theme-light .about-device__screen,
body.theme-light .about-device__panel {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-light .about-product-stage {
  background:
    radial-gradient(circle at 50% 45%, rgba(96, 165, 250, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(255, 255, 255, 0.5));
}

body.theme-light .about-closing__summary span {
  background: rgba(37, 99, 235, 0.1);
  color: #1e3a8a;
}

@media (max-width: 900px) {
  body.about-page header,
  body.privacy-page header {
    min-height: 56px;
  }

  .about-main,
  .legal-main {
    width: min(100%, calc(100% - 24px));
    padding-top: 10px;
  }

  .about-scroll-story {
    width: 100%;
    padding-top: 0;
  }

  .about-immersive,
  .about-cinematic__sticky,
  .about-feature-film__intro,
  .about-feature-film__grid,
  .about-flow__sticky,
  .about-system__headline,
  .about-split,
  .about-principles {
    width: min(100%, calc(100% - 24px));
    grid-template-columns: 1fr;
  }

  .about-feature-film__intro,
  .about-feature-film__grid,
  .about-flow__sticky,
  .about-system__headline {
    margin-left: auto;
    margin-right: auto;
  }

  .about-immersive {
    min-height: auto;
    padding: 42px 0 20px;
  }

  .about-copy h2,
  .about-cinematic__copy h3,
  .about-feature-film__intro h3,
  .about-flow__copy h3,
  .about-system__headline h3,
  .about-split__copy h3 {
    max-width: 11ch;
    font-size: clamp(44px, 15vw, 72px);
  }

  .about-device {
    min-height: 0;
    transform: none;
    border-radius: 24px;
  }

  .about-hero-signal {
    min-height: 360px;
    border-radius: 26px;
  }

  .about-hero-signal__item {
    min-width: 124px;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 15px;
  }

  .about-hero-signal__item--one {
    left: 8%;
    top: 14%;
  }

  .about-hero-signal__item--two {
    right: 6%;
    top: 24%;
  }

  .about-hero-signal__item--three {
    left: 8%;
    bottom: 22%;
  }

  .about-hero-signal__item--four {
    right: 8%;
    bottom: 10%;
  }

  .about-device__screen {
    min-height: 420px;
    border-radius: 18px;
  }

  .about-cinematic {
    height: auto;
    padding: 48px 0;
  }

  .about-cinematic__sticky {
    position: relative;
    min-height: auto;
  }

  .about-product-stage {
    min-height: 620px;
    border-radius: 26px;
  }

  .about-product-card {
    width: min(76vw, 320px);
  }

  .about-product-card--project {
    left: 5%;
    top: 6%;
  }

  .about-product-card--bim {
    right: 5%;
    top: 24%;
  }

  .about-product-card--check {
    left: 8%;
    top: 43%;
  }

  .about-product-card--issue {
    left: 5%;
    bottom: 17%;
  }

  .about-product-card--report {
    right: 5%;
    bottom: 4%;
  }

  .about-principles {
    padding-top: 34px;
  }

  .about-feature-film,
  .about-flow,
  .about-system {
    width: 100%;
    padding-top: 54px;
    padding-bottom: 22px;
  }

  .about-feature-film__grid {
    display: grid;
  }

  .about-feature-tile,
  .about-feature-tile--large,
  .about-feature-tile--accent {
    grid-column: auto;
    min-height: 210px;
    border-radius: 24px;
  }

  .about-feature-tile h4,
  .about-feature-tile--large h4,
  .about-feature-tile--accent h4 {
    margin-top: 48px;
    font-size: clamp(26px, 8vw, 40px);
  }

  .about-flow__copy {
    position: relative;
    top: auto;
  }

  .about-flow-step {
    min-height: 0;
    border-radius: 24px;
  }

  .about-flow-step h4 {
    margin-top: 32px;
  }

  .about-system__board {
    min-height: auto;
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 26px;
  }

  .about-system__board::before,
  .about-system__board::after {
    display: none;
  }

  .about-system-node,
  .about-system-node--primary,
  .about-system-node:nth-child(2),
  .about-system-node:nth-child(3),
  .about-system-node:nth-child(4),
  .about-system-node:nth-child(5),
  .about-system-node:nth-child(6) {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    transform: none;
  }

  .about-hero,
  .about-section-grid,
  .about-feature-grid {
    grid-template-columns: 1fr;
  }

  .about-hero {
    min-height: auto;
    gap: 18px;
  }

  .about-hero__visual {
    min-height: 320px;
  }

  .about-story,
  .about-feature-band,
  .about-showcase,
  .about-closing {
    padding-top: 48px;
  }

  .about-hero__visual,
  .about-panel,
  .about-feature-tile,
  .about-flow-step,
  .about-system__board,
  .about-feature-card,
  .about-showcase__card,
  .about-closing__card,
  .about-section-pin {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal.is-visible,
  .about-hero__visual,
  .about-panel,
  .about-feature-tile,
  .about-flow-step,
  .about-system__board,
  .about-feature-card,
  .about-showcase__card,
  .about-closing__card,
  .about-section-pin {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================
   PROFILE PROJECT CARDS: clickable emphasis
   ========================= */

body.profile-page .project-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04)) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow:
    0 12px 24px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.profile-page .project-card::before {
  display: none !important;
  opacity: 0 !important;
}

body.profile-page .project-card:hover,
body.profile-page .project-card:focus-visible {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), rgba(255, 255, 255, 0.07)) !important;
  border-color: rgba(96, 165, 250, 0.54) !important;
  box-shadow:
    0 18px 34px rgba(2, 6, 23, 0.3),
    0 0 0 1px rgba(96, 165, 250, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
  transform: translateY(-3px);
}

body.profile-page .project-card:hover::before,
body.profile-page .project-card:focus-visible::before {
  display: none !important;
  opacity: 0 !important;
  transform: none !important;
}

body.profile-page .project-card:focus-visible {
  box-shadow:
    0 18px 34px rgba(2, 6, 23, 0.3),
    0 0 0 2px rgba(96, 165, 250, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

body.profile-page .project-title {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
}

body.profile-page .project-title-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  text-decoration-color: rgba(148, 163, 184, 0.38);
  transition:
    color 0.2s ease,
    opacity 0.18s ease,
    text-decoration-color 0.18s ease,
    text-shadow 0.2s ease;
}

body.profile-page .project-card:hover .project-title-name,
body.profile-page .project-card:focus-visible .project-title-name {
  color: #ffffff;
  text-decoration-color: rgba(125, 211, 252, 0.62);
  text-shadow: 0 0 18px rgba(96, 165, 250, 0.18);
}

body.profile-page .project-card:hover .project-meta,
body.profile-page .project-card:focus-visible .project-meta {
  color: #cbd5e1;
}

body.theme-light.profile-page .project-card {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  border-color: #d5e0ee !important;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
}

body.theme-light.profile-page .project-card:hover,
body.theme-light.profile-page .project-card:focus-visible {
  background: linear-gradient(180deg, #ffffff, #eef5ff) !important;
  border-color: #93c5fd !important;
  box-shadow:
    0 18px 30px rgba(37, 99, 235, 0.12),
    0 0 0 1px rgba(147, 197, 253, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

body.theme-light.profile-page .project-card:focus-visible {
  box-shadow:
    0 18px 30px rgba(37, 99, 235, 0.12),
    0 0 0 2px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

body.theme-light.profile-page .project-title-name {
  color: #0f172a;
  text-decoration-color: rgba(100, 116, 139, 0.36);
}

body.theme-light.profile-page .project-card:hover .project-title-name,
body.theme-light.profile-page .project-card:focus-visible .project-title-name {
  color: #0b1220;
  text-decoration-color: rgba(37, 99, 235, 0.54);
  text-shadow: none;
}

body.theme-light.profile-page .project-card:hover .project-meta,
body.theme-light.profile-page .project-card:focus-visible .project-meta {
  color: #475569;
}

body.profile-page .project-card-actions .btn-small[data-act="toggle-archive"] {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.72), rgba(30, 41, 59, 0.66)) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:hover {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.78), rgba(51, 65, 85, 0.72)) !important;
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #e2e8f0 !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="toggle-archive"] {
  background: linear-gradient(180deg, #f8fafc, #eef2f7) !important;
  border-color: #cfd8e3 !important;
  color: #475569 !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:hover {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfd0e3 !important;
  color: #334155 !important;
}

/* =========================
   PROFILE PROJECTS TIGHTEN
   ========================= */
body.profile-page .profile-projects-card {
  padding-top: 18px !important;
  padding-bottom: 14px !important;
  max-height: 68vh;
  width: min(100%, 640px) !important;
}

body.profile-page .profile-projects-header-enhanced {
  margin-bottom: 8px;
}

body.profile-page .profile-projects-title {
  margin: 0;
  line-height: 1.15;
}

body.profile-page .profile-projects-subtitle {
  margin-top: 3px;
  font-size: 11px;
}

body.profile-page .profile-projects-search {
  margin-top: 0;
}

body.profile-page .profile-create-input-wrapper--combined {
  gap: 8px;
}

body.profile-page .profile-projects-search-input.profile-create-input {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}

body.profile-page .profile-create-project-btn.lg-btn--pill,
body.profile-page .profile-filter-tab.lg-btn--pill {
  min-height: 36px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

body.profile-page .profile-projects-filters {
  margin-top: 10px;
  margin-bottom: 4px;
}

body.profile-page .projects-list {
  margin-top: 10px;
  padding-top: 4px;
  align-items: center;
}

@media (min-width: 769px) {
  body.profile-page .projects-list {
    max-height: max(220px, calc(68vh - 198px));
  }
}

body.profile-page .profile-projects-card .project-card-actions {
  min-width: auto !important;
  gap: 0 !important;
  align-self: flex-start;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

body.profile-page .profile-projects-card .project-card {
  width: min(100%, 604px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 8px;
}

body.profile-page .profile-projects-card .project-actions-top-row,
body.profile-page .profile-projects-card .project-actions-secondary-row,
body.profile-page .profile-projects-card .project-actions-tertiary-row {
  justify-content: flex-end;
  gap: 6px;
}

body.profile-page .profile-projects-card .project-actions-top-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

body.profile-page .profile-projects-card .project-actions-top-row .btn-small,
body.profile-page .profile-projects-card .project-actions-open-row .btn-small,
body.profile-page .profile-projects-card .project-actions-secondary-row .btn-small,
body.profile-page .profile-projects-card .project-actions-tertiary-row .btn-small {
  flex: 0 0 auto;
}

body.profile-page .profile-projects-card .project-card-main {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

body.profile-page .profile-projects-card .project-card-actions {
  grid-column: 2;
  grid-row: 1;
}

body.profile-page .profile-projects-card .project-history {
  grid-column: 1 / -1;
}

body.profile-page .profile-projects-card .project-card-action-btn.lg-btn--pill {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 !important;
  border-radius: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.profile-page .profile-projects-card .project-card-action-btn.lg-btn--pill:hover,
body.profile-page .profile-projects-card .project-card-action-btn.lg-btn--pill:focus-visible {
  outline: none;
}

body.profile-page .profile-projects-card .project-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
}

body.profile-page .profile-projects-card .project-action-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

body.profile-page .profile-projects-card .project-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  body.profile-page .profile-projects-card {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
    max-height: none !important;
    width: 100% !important;
  }

  body.profile-page .profile-projects-card .project-card-actions {
    min-width: 0 !important;
    width: auto;
    margin-bottom: 0;
  }

  body.profile-page .profile-projects-card .project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 6px;
  }

  body.profile-page .profile-projects-card .project-card-main {
    grid-column: 1;
    grid-row: 1;
  }

  body.profile-page .profile-projects-card .project-card-actions {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
    margin-top: 2px;
  }

  body.profile-page .profile-projects-card .project-history {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  body.profile-page .profile-projects-card .project-title {
    margin-bottom: 6px;
    align-items: flex-start;
    gap: 6px;
  }

  body.profile-page .profile-projects-card .project-meta {
    gap: 8px;
    line-height: 1.45;
  }

  body.profile-page .project-actions-top-row,
  body.profile-page .project-actions-open-row,
  body.profile-page .project-actions-secondary-row,
  body.profile-page .project-actions-tertiary-row {
    flex-direction: row;
    gap: 0;
    justify-content: center;
  }

  body.profile-page .profile-projects-card .project-actions-top-row {
    justify-content: center;
  }

  body.profile-page .profile-projects-card .project-actions-top-row .project-card-action-btn + .project-card-action-btn {
    margin-left: 20px !important;
  }

  body.profile-page .projects-list .project-card-actions .project-card-action-btn.lg-btn--pill {
    width: 48px !important;
    max-width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body.profile-page .profile-projects-card .project-action-icon {
    width: 27px;
    height: 27px;
  }

  body.profile-page .profile-projects-card .project-action-icon svg {
    width: 27px;
    height: 27px;
  }
}

/* =========================
   PROFILE FEED
   ========================= */
body.profile-page .profile-feed-card {
  --profile-feed-space-1: 8px;
  --profile-feed-space-2: 12px;
  --profile-feed-space-3: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--profile-feed-space-3);
  min-height: 0;
  max-height: 68vh;
  width: min(100%, 408px);
  padding: 20px !important;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64)) !important;
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.profile-page .profile-feed-card:hover {
  transform: none !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64)) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.theme-light.profile-page .profile-feed-card {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  border: 1px solid #c9d7ea !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-feed-card:hover {
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  border-color: #c9d7ea !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.profile-page .profile-feed-header {
  margin-bottom: 0;
}

body.profile-page .profile-feed-title-section {
  display: flex;
  align-items: flex-start;
  gap: var(--profile-feed-space-2);
}

body.profile-page .profile-feed-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.26), rgba(59, 130, 246, 0.14));
  border: 1px solid rgba(96, 165, 250, 0.26);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.22);
}

body.profile-page .profile-feed-title {
  margin: 0;
  font-size: 1.03rem;
}

body.profile-page .profile-feed-subtitle {
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.86rem;
  line-height: 1.45;
}

body.theme-light.profile-page .profile-feed-subtitle {
  color: #475569;
}

body.profile-page .profile-feed-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--profile-feed-space-1);
  justify-content: flex-start;
  width: 100%;
}

body.profile-page .profile-feed-tab.lg-btn--pill {
  flex: 1 1 0;
  width: auto;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 6px 12px !important;
  justify-content: center;
}

body.profile-page .profile-feed-tab .lg-btn__label {
  font-size: 13px;
  line-height: 1.1;
  text-align: center;
}

body.profile-page .profile-feed-status {
  display: block;
  min-height: 18px;
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.82rem;
  line-height: 1.4;
}

body.profile-page .profile-feed-status[data-tone="warning"] {
  color: #fbbf24;
}

body.profile-page .profile-feed-status[data-tone="error"] {
  color: #fca5a5;
}

body.profile-page .profile-feed-list {
  flex: 1 1 auto;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: var(--profile-feed-space-2);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.34) transparent;
}

body.profile-page .profile-feed-list::-webkit-scrollbar {
  width: 8px;
}

body.profile-page .profile-feed-list::-webkit-scrollbar-track {
  background: transparent;
}

body.profile-page .profile-feed-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.34);
  border-radius: 999px;
}

body.profile-page .profile-feed-empty {
  padding: var(--profile-feed-space-3);
  border-radius: 16px;
  color: rgba(226, 232, 240, 0.82);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.24));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

body.theme-light.profile-page .profile-feed-empty {
  color: #475569;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border-color: #d6e2f3;
}

body.profile-page .profile-feed-item {
  display: grid;
  gap: var(--profile-feed-space-1);
  padding: var(--profile-feed-space-3);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.28));
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  color: inherit;
}

body.profile-page .profile-feed-item:hover,
body.profile-page .profile-feed-item:focus-visible {
  outline: none;
  border-color: rgba(96, 165, 250, 0.34);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.34));
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.2);
}

body.theme-light.profile-page .profile-feed-item {
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border-color: #d6e2f3;
}

body.theme-light.profile-page .profile-feed-item:hover,
body.theme-light.profile-page .profile-feed-item:focus-visible {
  border-color: #bfd2ee;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

body.profile-page .profile-feed-item-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.79rem;
  line-height: 1.35;
}

body.theme-light.profile-page .profile-feed-item-meta {
  color: #475569;
}

body.profile-page .profile-feed-item-source,
body.profile-page .profile-feed-item-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

body.profile-page .profile-feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #dbeafe;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.34), rgba(30, 64, 175, 0.24));
  border: 1px solid rgba(96, 165, 250, 0.28);
}

body.theme-light.profile-page .profile-feed-badge {
  color: #1d4ed8;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(191, 219, 254, 0.88));
  border-color: rgba(96, 165, 250, 0.24);
}

body.profile-page .profile-feed-item-title {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.4;
  color: #f8fafc;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}

body.theme-light.profile-page .profile-feed-item-title {
  color: #0f172a;
}

body.profile-page .profile-feed-item-summary {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: pretty;
}

body.theme-light.profile-page .profile-feed-item-summary {
  color: #334155;
}

@media (min-width: 1340px) {
  body.profile-page .profile-main .section.active {
    grid-template-columns: minmax(300px, 350px) minmax(552px, 632px) minmax(368px, 408px);
  }

  body.profile-page .profile-card-enhanced,
  body.profile-page .profile-projects-card,
  body.profile-page .profile-feed-card {
    justify-self: center;
  }

  body.profile-page .profile-feed-card {
    grid-column: 3;
    grid-row: 3;
  }
}

@media (min-width: 769px) and (max-width: 1339px) {
  body.profile-page .profile-card-enhanced,
  body.profile-page .profile-projects-card,
  body.profile-page .profile-feed-card {
    justify-self: center;
  }

  body.profile-page .profile-feed-card {
    grid-column: 2;
    grid-row: 4;
    width: min(100%, 680px);
  }
}

@media (max-width: 768px) {
  body.profile-page .profile-feed-card {
    width: 100%;
    max-height: none;
    padding: 14px !important;
    gap: 10px;
    border-radius: 20px;
  }

  body.profile-page .profile-feed-title-section {
    gap: 10px;
  }

  body.profile-page .profile-feed-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
    font-size: 17px;
  }

  body.profile-page .profile-feed-title {
    font-size: 1rem;
    line-height: 1.2;
  }

  body.profile-page .profile-feed-subtitle {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  body.profile-page .profile-feed-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.profile-page .profile-feed-tab.lg-btn--pill {
    width: 100%;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
  }

  body.profile-page .profile-feed-tab .lg-btn__label {
    font-size: 0.82rem;
  }

  body.profile-page .profile-feed-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: stretch;
    align-items: stretch;
    min-height: 188px;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 18px 6px 18px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    mask-image: linear-gradient(
      to right,
      transparent 0,
      black 18px,
      black calc(100% - 20px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      black 18px,
      black calc(100% - 20px),
      transparent 100%
    );
  }

  body.profile-page .profile-feed-list::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }

  body.profile-page .profile-feed-list > .profile-feed-item,
  body.profile-page .profile-feed-list > .profile-feed-empty {
    flex: 0 0 calc(100% - 16px);
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body.profile-page .profile-feed-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    min-height: 188px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.36));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  body.profile-page .profile-feed-item-meta {
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    margin-top: auto;
    font-size: 0.74rem;
    line-height: 1.25;
  }

  body.profile-page .profile-feed-badge {
    min-height: 22px;
    padding: 3px 10px;
    font-size: 0.68rem;
  }

  body.profile-page .profile-feed-item-title {
    font-size: 0.88rem;
    line-height: 1.34;
    -webkit-line-clamp: 2;
  }

  body.profile-page .profile-feed-item-summary {
    font-size: 0.78rem;
    line-height: 1.38;
    -webkit-line-clamp: 3;
  }

  body.profile-page .profile-feed-item-source,
  body.profile-page .profile-feed-item-date {
    max-width: 100%;
  }

  body.profile-page .profile-feed-item-source {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.profile-page .profile-feed-item-date {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.profile-page .profile-feed-item-separator {
    opacity: 0.5;
  }
}

@media (max-width: 420px) {
  body.profile-page .profile-feed-card {
    padding: 12px !important;
    gap: 9px;
  }

  body.profile-page .profile-feed-tabs {
    gap: 6px;
  }

  body.profile-page .profile-feed-tab.lg-btn--pill {
    min-height: 32px !important;
    padding: 4px 8px !important;
  }

  body.profile-page .profile-feed-tab .lg-btn__label {
    font-size: 0.78rem;
  }

  body.profile-page .profile-feed-item {
    min-height: 176px;
    padding: 12px;
    gap: 7px;
  }

  body.profile-page .profile-feed-item-meta {
    font-size: 0.7rem;
  }

  body.profile-page .profile-feed-item-title {
    font-size: 0.84rem;
  }

  body.profile-page .profile-feed-item-summary {
    font-size: 0.75rem;
  }
}

/* =========================
   MOBILE BOTTOM NAV FINAL
   ========================= */

@media (max-width: 768px) {
  #bottomNav.bottom-nav {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    padding: 16px 25px calc(25px + env(safe-area-inset-bottom, 0)) !important;
    position: fixed;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    width: min(402px, calc(100vw - 12px)) !important;
    min-height: calc(101px + env(safe-area-inset-bottom, 0));
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    z-index: 1100;
    overflow: visible !important;
  }

  #bottomNav.bottom-nav::before,
  #bottomNav.bottom-nav::after {
    content: none;
    display: none;
  }

  #bottomNav .bottom-nav__track {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 3px 6px;
    width: 100%;
    height: 60px;
    border-radius: 296px;
    background: transparent !important;
    border: none;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  #bottomNav .bottom-nav__track::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--bottom-nav-content-width, 100%);
    border-radius: 296px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    box-shadow:
      0 10px 22px rgba(15, 23, 42, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(255, 255, 255, 0.03);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.02)),
      rgba(255, 255, 255, 0.02);
    opacity: 0.98;
    pointer-events: none;
    z-index: 0;
  }

  #bottomNav .bottom-nav__track::after {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: calc(var(--bottom-nav-content-width, 100%) - 2px);
    height: 45%;
    border-radius: 296px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
  }

  #bottomNav .bottom-nav__track::-webkit-scrollbar {
    display: none;
  }

  #bottomNav .bottom-nav__active-capsule {
    position: absolute;
    left: 0;
    top: 4px;
    width: 102px;
    height: 52px;
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 100%),
      rgba(255, 255, 255, 0.08);
    mix-blend-mode: normal;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(255, 255, 255, 0.04),
      0 6px 14px rgba(0, 0, 0, 0.1);
    transition:
      transform 300ms ease-out,
      width 300ms ease-out,
      opacity 300ms ease-out;
    will-change: transform, width, opacity;
    backdrop-filter: blur(13px) saturate(135%);
    -webkit-backdrop-filter: blur(13px) saturate(135%);
  }

  #bottomNav.is-dragging .bottom-nav__active-capsule,
  #bottomNav.is-pressing .bottom-nav__active-capsule {
    transition-duration: 220ms !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.24),
      inset 0 -1px 0 rgba(255, 255, 255, 0.05),
      0 10px 24px rgba(0, 0, 0, 0.14);
  }

  #bottomNav .bottom-nav-item {
    flex: none !important;
    order: initial !important;
    flex-grow: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 6px 8px 7px !important;
    gap: 1px !important;
    isolation: isolate;
    width: 102px !important;
    min-width: 102px !important;
    max-width: 102px !important;
    height: 58px !important;
    min-height: 58px !important;
    margin: 0 -8px !important;
    border: none !important;
    border-radius: 100px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #1a1a1a !important;
    cursor: pointer;
    position: relative;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    transition:
      color 300ms ease-out,
      opacity 300ms ease-out,
      transform 300ms ease-out,
      filter 300ms ease-out;
  }

  #bottomNav .bottom-nav-item::before,
  #bottomNav .bottom-nav-item::after {
    display: none !important;
    content: none !important;
  }

  #bottomNav .bottom-nav-item__icon {
    display: inline-flex !important;
    width: 86px;
    height: 28px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-grow: 0;
    z-index: 1;
    mix-blend-mode: normal;
    color: inherit;
    pointer-events: none;
    transition: transform 220ms ease-out, color 220ms ease-out, opacity 220ms ease-out;
  }

  #bottomNav .bottom-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    display: block;
    stroke-width: 1.9;
    color: inherit;
    transition:
      color 300ms ease-out,
      opacity 300ms ease-out,
      transform 300ms ease-out;
  }

  #bottomNav .bottom-nav-item__label {
    display: block !important;
    width: 86px;
    height: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    font-style: normal;
    font-weight: 590;
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    mix-blend-mode: normal;
    align-self: stretch;
    flex-grow: 0;
    z-index: 2;
    pointer-events: none;
    transition: transform 220ms ease-out, color 220ms ease-out, opacity 220ms ease-out;
  }

  #bottomNav.is-pressing .bottom-nav-item.is-gesture-origin {
    transform: translateY(1px) scale(0.97);
  }

  #bottomNav.is-dragging .bottom-nav-item {
    opacity: 0.62;
    transform: scale(0.96);
    filter: saturate(0.86);
  }

  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target {
    opacity: 1;
    transform: translateY(-1px) scale(1);
    filter: saturate(1.08);
  }

  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__icon,
  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__label {
    transform: translateY(-1px);
  }

  #bottomNav .bottom-nav-item:not(.active) {
    opacity: 0.9;
  }

  #bottomNav .bottom-nav-item.active {
    color: #0088ff !important;
    opacity: 1;
  }

  #bottomNav .bottom-nav-item.active .bottom-nav-item__icon,
  #bottomNav .bottom-nav-item.active .bottom-nav-item__label {
    color: #0088ff !important;
  }

  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target,
  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__icon,
  #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__label {
    color: #0088ff !important;
  }

  body:not(.theme-light) #bottomNav.bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
  }

  body:not(.theme-light) #bottomNav .bottom-nav__track {
    background: transparent !important;
  }

  body:not(.theme-light) #bottomNav .bottom-nav__track::before {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(16, 18, 24, 0.5);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(255, 255, 255, 0.02);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.015);
  }

  body:not(.theme-light) #bottomNav .bottom-nav__track::after {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
      opacity: 0.42;
  }

  body:not(.theme-light) #bottomNav .bottom-nav__active-capsule {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%),
      rgba(133, 137, 146, 0.18);
    mix-blend-mode: normal;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(255, 255, 255, 0.03),
      0 5px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(13px) saturate(135%);
    -webkit-backdrop-filter: blur(13px) saturate(135%);
  }

  body:not(.theme-light) #bottomNav .bottom-nav-item {
    color: rgba(255, 255, 255, 0.88) !important;
  }

  body:not(.theme-light) #bottomNav .bottom-nav-item:not(.active) {
    opacity: 0.82;
  }

  body:not(.theme-light) #bottomNav .bottom-nav-item.active {
    color: #ffffff !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  }

  body:not(.theme-light) #bottomNav .bottom-nav-item.active .bottom-nav-item__icon,
  body:not(.theme-light) #bottomNav .bottom-nav-item.active .bottom-nav-item__label {
    color: #ffffff !important;
  }

  body:not(.theme-light) #bottomNav.is-dragging .bottom-nav-item {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  body:not(.theme-light) #bottomNav.is-dragging .bottom-nav-item.is-gesture-target,
  body:not(.theme-light) #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__icon,
  body:not(.theme-light) #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__label {
    color: #ffffff !important;
  }

  body.theme-light #bottomNav.bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
  }

  body.theme-light #bottomNav .bottom-nav__track {
    background: transparent !important;
  }

  body.theme-light #bottomNav .bottom-nav__track::before {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    box-shadow:
      0 10px 18px rgba(148, 163, 184, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.58),
      inset 0 -1px 0 rgba(148, 163, 184, 0.05);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.05);
  }

  body.theme-light #bottomNav .bottom-nav__track::after {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
      opacity: 0.52;
  }

  body.theme-light #bottomNav .bottom-nav__active-capsule {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.34) 100%),
      rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      inset 0 -1px 0 rgba(148, 163, 184, 0.05),
      0 5px 12px rgba(148, 163, 184, 0.08);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
  }

  body.theme-light #bottomNav.is-dragging .bottom-nav-item {
    color: rgba(71, 85, 105, 0.68) !important;
  }

  body.theme-light #bottomNav.is-dragging .bottom-nav-item.is-gesture-target,
  body.theme-light #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__icon,
  body.theme-light #bottomNav.is-dragging .bottom-nav-item.is-gesture-target .bottom-nav-item__label {
    color: #0088ff !important;
  }

  #bottomNav .bottom-nav-item:active {
    transform: scale(0.97);
  }

  #bottomNav .bottom-nav-item:focus,
  #bottomNav .bottom-nav-item:focus-visible {
    outline: none;
    box-shadow: none;
  }

  main {
    padding-bottom: calc(116px + env(safe-area-inset-bottom, 0)) !important;
  }
}

/* =========================
   PROFILE LAYOUT REBUILD
   ========================= */

body.profile-page > header {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 15px max(24px, calc((100vw - 1240px) / 2)) 13px;
  border-bottom: none !important;
  box-shadow: none !important;
}

body.profile-page > header .brand {
  min-width: 0;
  gap: 14px;
}

body.profile-page > header .brand-icon {
  width: 28px;
  height: 28px;
}

body.profile-page > header .brand h1 {
  font-size: 22px;
}

body.profile-page > header .header-actions {
  margin-left: auto;
  margin-right: 8px;
  gap: 8px;
}

body.profile-page > header .header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px !important;
  transition: none !important;
  animation: none !important;
}

body.profile-page > header .header-icon-btn svg,
body.profile-page > header .theme-toggle-icon {
  transition: none !important;
  animation: none !important;
}

body.profile-page > header .header-icon-btn:hover,
body.profile-page > header .header-icon-btn:focus-visible,
body.profile-page > header .header-icon-btn:active {
  transform: none !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15) !important;
}

body.profile-page > header .header-icon-btn--active:hover,
body.profile-page > header .header-icon-btn--active:focus-visible,
body.profile-page > header .header-icon-btn--active:active {
  transform: none !important;
  background: linear-gradient(
    135deg,
    rgba(10, 132, 255, 0.25) 0%,
    rgba(10, 132, 255, 0.1) 100%
  ) !important;
  border-color: rgba(10, 132, 255, 0.4) !important;
  color: #0A84FF !important;
  box-shadow:
    0 2px 8px rgba(10, 132, 255, 0.2),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.2) !important;
}

body.profile-page > header .header-icon-btn--danger:hover,
body.profile-page > header .header-icon-btn--danger:focus-visible,
body.profile-page > header .header-icon-btn--danger:active {
  transform: none !important;
  background: linear-gradient(
    135deg,
    rgba(255, 69, 58, 0.2) 0%,
    rgba(255, 69, 58, 0.08) 100%
  ) !important;
  border-color: rgba(255, 69, 58, 0.3) !important;
  color: #FF453A !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15) !important;
}

body.theme-light.profile-page > header .theme-toggle-btn:hover,
body.theme-light.profile-page > header .theme-toggle-btn:focus-visible,
body.theme-light.profile-page > header .theme-toggle-btn:active {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #1e293b !important;
}

body.profile-page > header .header-profile-avatar {
  border-radius: 999px !important;
}

body.profile-page .profile-main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

body.profile-page .profile-main .section.active.profile-section {
  display: block !important;
  min-height: auto;
}

body.profile-page .profile-shell {
  width: var(--profile-shell-width) !important;
  max-width: none !important;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.profile-page .profile-projects-card,
body.profile-page .profile-feed-card {
  border-width: 1.5px;
  border-color: rgba(96, 165, 250, 0.24);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.64));
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.profile-page .profile-projects-card,
body.profile-page .profile-feed-card {
  border-width: 1.5px;
}

body.profile-page .profile-projects-card:hover,
body.profile-page .profile-feed-card:hover {
  transform: none !important;
}

body.profile-page .profile-topbar {
  width: var(--profile-shell-width) !important;
  max-width: 100%;
  margin: 0 auto;
  padding: 2px 0 4px !important;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.profile-page .profile-topbar-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

body.profile-page .profile-topbar-primary {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

body.profile-page .profile-avatar-upload--header {
  width: 100px;
  height: 100px;
  min-width: 100px;
  aspect-ratio: 1 / 1;
  border-radius: 999px !important;
  border: none !important;
  box-shadow: none !important;
  clip-path: circle(50% at 50% 50%);
  overflow: hidden;
  cursor: default !important;
}

body.profile-page .profile-avatar-upload--header .profile-avatar-image,
body.profile-page .profile-avatar-upload--header .profile-avatar-overlay,
body.profile-page .profile-avatar-upload--header::before {
  border-radius: 999px !important;
}

body.profile-page .profile-avatar-upload--header::before,
body.profile-page .profile-avatar-upload--header .profile-avatar-overlay {
  display: none !important;
}

body.profile-page .profile-avatar-upload--header:hover,
body.profile-page .profile-avatar-upload--header:focus-visible,
body.profile-page .profile-avatar-upload--header:active {
  transform: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

body.profile-page .profile-topbar-copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

body.profile-page .profile-display-name {
  margin: 0;
  width: auto;
  min-height: 25.55px;
  font-size: 20px;
  line-height: 25.55px;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

body.profile-page .profile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 6px;
}

body.profile-page .profile-edit-toggle.lg-btn--pill {
  min-height: 27px !important;
  min-width: 104px !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.76), rgba(51, 65, 85, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-decoration: none;
  justify-content: center;
}

body.profile-page .profile-edit-toggle.lg-btn--pill:hover,
body.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible,
body.profile-page .profile-edit-toggle.lg-btn--pill:active {
  transform: none !important;
  text-decoration: none !important;
}

body.profile-page .profile-edit-toggle .lg-btn__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.profile-page .profile-edit-toggle.is-active {
  border-color: rgba(147, 197, 253, 0.36);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.3), rgba(30, 64, 175, 0.22));
}

body.profile-page .profile-edit-toggle.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

body.profile-page .profile-menu-wrap {
  position: relative;
}

body.profile-page .profile-menu-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  flex: 0 0 24px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px !important;
  color: #e2e8f0;
  padding: 0 !important;
  line-height: 0 !important;
}

body.profile-page .profile-menu-button svg {
  width: 10px;
  height: 10px;
}

body.profile-page .profile-menu-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.profile-page .profile-menu-button.is-active {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  ) !important;
  color: #e2e8f0 !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15) !important;
}

body.profile-page .profile-menu-panel {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  right: auto;
  transform: translateY(-50%);
  z-index: 12;
  min-width: 148px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(12px);
}

body.profile-page .profile-menu-button:not(.is-active):hover,
body.profile-page .profile-menu-button:not(.is-active):focus-visible,
body.profile-page .profile-menu-button:not(.is-active):active {
  transform: none !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15) !important;
}

body.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.profile-page .profile-create-project-btn.lg-btn--pill:focus-visible,
body.profile-page .profile-create-project-btn.lg-btn--pill:active,
body.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):hover,
body.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):focus-visible,
body.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):active,
body.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):hover,
body.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):focus-visible,
body.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):active,
body.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):hover,
body.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):focus-visible,
body.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):active {
  transform: none !important;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.92), rgba(30, 41, 59, 0.9)) !important;
  border-color: rgba(148, 163, 184, 0.42) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

body.profile-page .profile-filter-tab.is-active:hover,
body.profile-page .profile-filter-tab.is-active:focus-visible,
body.profile-page .profile-filter-tab.is-active:active,
body.profile-page .profile-feed-tab.is-active:hover,
body.profile-page .profile-feed-tab.is-active:focus-visible,
body.profile-page .profile-feed-tab.is-active:active {
  transform: none !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:hover,
body.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:focus-visible,
body.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:active {
  transform: none !important;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.72), rgba(30, 41, 59, 0.66)) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.profile-page .project-card-actions .btn-small[data-act="delete"]:hover,
body.profile-page .project-card-actions .btn-small[data-act="delete"]:focus-visible,
body.profile-page .project-card-actions .btn-small[data-act="delete"]:active {
  border-color: rgba(239, 68, 68, 0.56) !important;
  color: #fecaca !important;
}

body.profile-page .project-card-actions .btn-small[data-act="open"]:hover,
body.profile-page .project-card-actions .btn-small[data-act="open"]:focus-visible,
body.profile-page .project-card-actions .btn-small[data-act="open"]:active,
body.profile-page .project-card-actions .btn-small[data-act="history"]:hover,
body.profile-page .project-card-actions .btn-small[data-act="history"]:focus-visible,
body.profile-page .project-card-actions .btn-small[data-act="history"]:active {
  border-color: rgba(96, 165, 250, 0.62) !important;
}

body.theme-light.profile-page .profile-menu-button:not(.is-active):hover,
body.theme-light.profile-page .profile-menu-button:not(.is-active):focus-visible,
body.theme-light.profile-page .profile-menu-button:not(.is-active):active {
  transform: none !important;
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill:hover,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill:focus-visible,
body.theme-light.profile-page .profile-create-project-btn.lg-btn--pill:active,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):hover,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):focus-visible,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):active,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):hover,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):focus-visible,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):active,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):hover,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):focus-visible,
body.theme-light.profile-page .project-card-actions .btn-small.lg-btn--pill:not([data-act="toggle-archive"]):active {
  transform: none !important;
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  outline: none !important;
}

body.theme-light.profile-page .profile-filter-tab.is-active:hover,
body.theme-light.profile-page .profile-filter-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-filter-tab.is-active:active,
body.theme-light.profile-page .profile-feed-tab.is-active:hover,
body.theme-light.profile-page .profile-feed-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-feed-tab.is-active:active {
  transform: none !important;
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:hover,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:focus-visible,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="toggle-archive"]:active {
  transform: none !important;
  background: linear-gradient(180deg, #f8fafc, #eef2f7) !important;
  border-color: #cfd8e3 !important;
  color: #475569 !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="delete"]:hover,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="delete"]:focus-visible,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="delete"]:active {
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

body.theme-light.profile-page .project-card-actions .btn-small[data-act="open"]:hover,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="open"]:focus-visible,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="open"]:active,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="history"]:hover,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="history"]:focus-visible,
body.theme-light.profile-page .project-card-actions .btn-small[data-act="history"]:active {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

body.profile-page .profile-menu-item {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

body.profile-page .profile-menu-item:hover,
body.profile-page .profile-menu-item:focus-visible {
  outline: none;
  background: rgba(59, 130, 246, 0.16);
  color: #f8fafc;
}

body.profile-page .profile-content-grid {
  display: grid;
  width: var(--profile-shell-width) !important;
  max-width: 100%;
  margin: 0 auto;
  grid-template-columns: minmax(700px, 1fr) var(--profile-feed-width);
  align-items: flex-start;
  gap: 18px;
}

body.profile-page .profile-content-grid > * {
  min-width: 0;
}

body.profile-page .profile-projects-card,
body.profile-page .profile-feed-card {
  justify-self: stretch !important;
}

body.profile-page .profile-projects-card {
  flex: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-width: 700px;
  max-height: min(76vh, 940px);
  min-height: 620px;
  padding: 24px !important;
}

body.profile-page .profile-projects-header-enhanced,
body.profile-page .profile-feed-header {
  margin-bottom: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

body.profile-page .profile-projects-title-section,
body.profile-page .profile-feed-title-section {
  align-items: flex-start;
}

body.profile-page .profile-projects-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

body.profile-page .profile-projects-subtitle,
body.profile-page .profile-feed-subtitle {
  margin-top: 6px;
}

body.profile-page .profile-projects-search--combined {
  margin-top: 18px;
  padding-right: 0;
}

body.profile-page .profile-create-input-wrapper--combined {
  column-gap: 10px;
}

body.profile-page .profile-projects-filters {
  margin-top: 16px;
  margin-bottom: 14px;
}

body.profile-page .projects-list {
  margin-top: 0;
  max-height: calc(min(76vh, 940px) - 220px);
  min-width: 0;
  width: 100%;
  padding-right: 8px;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, 0.42) transparent !important;
}

body.profile-page .profile-scroll-indicator {
  display: none !important;
}

body.profile-page .profile-feed-card {
  flex: none;
  max-height: min(76vh, 940px);
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px !important;
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(145deg, rgba(25, 35, 54, 0.68), rgba(15, 23, 42, 0.58));
}

body.profile-page .profile-feed-title {
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

body.profile-page .profile-feed-tabs {
  margin-top: 14px;
}

body.profile-page .profile-feed-list {
  min-height: 0;
  padding-right: 4px;
}

body.profile-page .projects-list::-webkit-scrollbar {
  width: 8px !important;
}

body.profile-page .projects-list::-webkit-scrollbar-track {
  background: transparent !important;
}

body.profile-page .projects-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.42) !important;
  border-radius: 999px !important;
}

body.profile-page .projects-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.56) !important;
}

body.profile-page .site-footer {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: auto 0 0 !important;
  min-height: 74px;
  padding: 20px max(20px, calc((100vw - 1280px) / 2)) 22px;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 4;
  flex-shrink: 0;
  color: #cbd5e1;
  font-size: 13px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #0f172a;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.profile-page .site-footer__nav {
  gap: 12px 16px;
}

body.profile-page .site-footer__link,
body.profile-page .site-footer__icon-link,
body.profile-page .site-footer__copy {
  color: #cbd5e1;
  opacity: 1;
}

body.profile-page .site-footer__icon-link {
  width: 20px;
  height: 20px;
}

body.profile-page .site-footer__icon-link svg {
  width: 18px;
  height: 18px;
}

body.profile-page .site-footer__link:hover,
body.profile-page .site-footer__icon-link:hover {
  color: #f8fafc;
}

body.theme-light.profile-page .site-footer {
  color: #475569;
  border-top: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}

body.theme-light.profile-page .site-footer__link,
body.theme-light.profile-page .site-footer__icon-link,
body.theme-light.profile-page .site-footer__copy {
  color: #475569;
}

body.theme-light.profile-page .site-footer__link:hover,
body.theme-light.profile-page .site-footer__icon-link:hover {
  color: #0f172a;
}

body.profile-page .profile-feed-item {
  padding: 14px;
  border-radius: 16px;
}

body.profile-page .profile-feed-item-title {
  font-size: 0.9rem;
}

body.profile-page .profile-feed-item-summary {
  font-size: 0.81rem;
}

body.theme-light.profile-page .profile-projects-card,
body.theme-light.profile-page .profile-feed-card {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.theme-light.profile-page .profile-topbar {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body.theme-light.profile-page .profile-projects-card,
body.theme-light.profile-page .profile-feed-card {
  border-color: #cbd5e1;
}

body.theme-light.profile-page .profile-display-name {
  color: #0f172a;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill {
  border-color: #cbd5e1 !important;
  background: linear-gradient(180deg, #ffffff, #eef2f7) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill .lg-btn__label {
  color: #0f172a !important;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:hover,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:active {
  border-color: #93c5fd !important;
  background: linear-gradient(180deg, #f8fbff, #eaf2ff) !important;
  color: #0f172a !important;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:hover .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:active .lg-btn__label {
  color: #0f172a !important;
}

body.theme-light.profile-page .profile-edit-toggle.is-active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
}

body.theme-light.profile-page .profile-menu-button.is-active {
  border-color: #bfccde !important;
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

body.theme-light.profile-page .profile-menu-panel {
  border-color: #d7e3f4;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

body.theme-light.profile-page .profile-menu-item {
  color: #1e293b;
}

body.theme-light.profile-page .profile-menu-item:hover,
body.theme-light.profile-page .profile-menu-item:focus-visible {
  background: #eff6ff;
  color: #0f172a;
}

@media (max-width: 1180px) {
  body.profile-page {
    --profile-shell-width: calc(100vw - 40px);
    --profile-feed-width: 312px;
  }

  body.profile-page .profile-content-grid {
    grid-template-columns: minmax(620px, 1fr) var(--profile-feed-width);
    gap: 18px;
  }

  body.profile-page .profile-projects-card {
    min-width: 620px;
  }

  body.profile-page .profile-feed-card {
    width: var(--profile-feed-width) !important;
  }
}

@media (max-width: 960px) {
  body.profile-page > header {
    padding: 12px 16px 10px;
  }

  body.profile-page > header .header-actions {
    margin-right: 0;
  }

  body.profile-page .profile-main {
    padding: 18px 16px 30px;
  }

  body.profile-page .profile-topbar {
    padding: 2px 0 4px !important;
  }

  body.profile-page .profile-topbar-main {
    flex-wrap: wrap;
    gap: 16px;
  }

  body.profile-page .profile-topbar-actions {
    justify-content: flex-start;
  }

  body.profile-page .profile-content-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
  }

  body.profile-page .profile-projects-card,
  body.profile-page .profile-feed-card {
    min-height: 0;
    max-height: none;
  }

  body.profile-page .profile-projects-card {
    min-width: 0;
  }

  body.profile-page .profile-feed-card {
    width: 100% !important;
    max-width: none !important;
  }

  body.profile-page .projects-list {
    max-height: none;
  }

  body.profile-page .site-footer {
    min-height: 68px;
    padding: 18px 16px 20px;
  }
}

@media (max-width: 768px) {
  body.profile-page > header {
    padding: 12px 14px 10px;
  }

  body.profile-page > header .header-icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  body.profile-page .profile-main {
    padding: 14px 14px 28px;
  }

  body.profile-page .profile-shell {
    width: 100% !important;
    gap: 18px;
  }

  body.profile-page .profile-topbar {
    padding: 0 !important;
    gap: 0;
  }

  body.profile-page .profile-topbar-primary {
    align-items: flex-start;
    gap: 16px;
  }

  body.profile-page .profile-avatar-upload--header {
    width: 88px;
    height: 88px;
    min-width: 88px;
  }

  body.profile-page .profile-display-name {
    font-size: 21px;
    line-height: 25.55px;
  }

  body.profile-page .profile-topbar-actions {
    width: auto;
    justify-content: flex-start;
    margin-left: 0;
  }

  body.profile-page .profile-edit-toggle.lg-btn--pill {
    flex: 0 0 auto;
    justify-content: center;
  }

  body.profile-page .profile-menu-wrap {
    flex: 0 0 auto;
  }

  body.profile-page .profile-menu-panel {
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    transform: none;
  }

  body.profile-page .profile-projects-card,
  body.profile-page .profile-feed-card {
    padding: 18px !important;
    border-radius: 22px;
  }

  body.profile-page .profile-projects-title,
  body.profile-page .profile-feed-title {
    font-size: 1.16rem;
  }

  body.profile-page .profile-create-input-wrapper--combined {
    grid-template-columns: 1fr;
  }

  body.profile-page .profile-create-project-btn.lg-btn--pill {
    width: 100%;
    justify-self: stretch;
  }

  body.profile-page .profile-projects-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.profile-page .profile-filter-tab.lg-btn--pill {
    width: 100%;
    min-width: 0 !important;
  }

  body.profile-page .site-footer {
    min-height: 0;
    padding: 16px 14px 18px;
  }
}

@media (max-width: 480px) {
  body.profile-page .profile-topbar-primary {
    flex-direction: column;
    align-items: flex-start;
  }

  body.profile-page .profile-topbar-actions {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  body.profile-page .profile-edit-toggle.lg-btn--pill {
    width: 100%;
  }

  body.profile-page .profile-menu-wrap {
    width: auto;
  }

  body.profile-page .profile-menu-button {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    flex: 0 0 28px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 999px !important;
  }

  body.profile-page .profile-menu-panel {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    min-width: 0;
    transform: none;
  }

  body.profile-page .profile-projects-filters {
    grid-template-columns: 1fr;
  }
}

  @media (max-width: 420px) {
  #bottomNav.bottom-nav {
      width: calc(100vw - 8px) !important;
      padding-left: 12px !important;
      padding-right: 12px !important;
    }

  main {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0)) !important;
  }
}

@media (max-width: 768px) {
  .construction-bar {
    gap: 10px !important;
    overflow: visible;
  }

  .construction-bar [hidden],
  .geo-bim-card [hidden],
  .wizard [hidden] {
    display: none !important;
    pointer-events: none !important;
  }

  .bim-import-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .bim-import-head {
    min-height: 0;
    display: none;
  }

  .bim-import-controls {
    display: grid;
    grid-template-columns: minmax(114px, 128px) minmax(0, 1fr) 32px;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  #btnImportIfc,
  #btnImportIfc.lg-btn,
  #btnImportIfc.lg-btn--pill {
    width: 100%;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
  }

  #btnImportIfc .lg-btn__label {
    font-size: 11px;
    letter-spacing: -0.01em;
  }

  .bim-import-meta {
    width: 100%;
    max-width: 100%;
    flex: 0 1 auto;
    align-self: center;
    min-height: 36px;
    padding: 5px 10px;
    border-radius: 12px;
    text-align: center;
    display: grid;
    align-content: center;
  }

  .bim-import-file-state,
  .bim-import-status {
    text-align: center;
  }

  .bim-import-file-state {
    font-size: 11px;
    line-height: 1.2;
  }

  .bim-import-status {
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.25;
  }

  .bim-import-menu {
    margin-left: 0;
    align-self: center;
    justify-self: center;
  }

  .bim-import-menu-trigger {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    border-radius: 14px;
  }

  #btnIfcMoreActions,
  #btnIfcMoreActions.lg-btn,
  #btnIfcMoreActions.lg-btn--pill {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 14px !important;
  }

  .bim-import-menu-trigger .lg-btn__label {
    font-size: 13px;
    transform: translateY(-1px);
  }

  .geo-bim-card {
    margin-top: 14px;
  }

  .geo-bim-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    align-items: end;
  }

  .geo-bim-header .card-title,
  .geo-bim-header .geo-bim-filter--search {
    grid-column: 1 / -1;
  }

  .geo-bim-header .card-title {
    margin-top: 0;
    white-space: normal;
  }

  .geo-bim-header .geo-bim-filter {
    margin-top: 0;
  }

  .geo-bim-header .geo-bim-filter label {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.2;
  }

  #geoBimTypeFilter,
  #geoBimAxesFilter,
  #geomBimTypeFilter,
  #geomBimAxesFilter,
  #reinfBimTypeFilter,
  #reinfBimAxesFilter,
  #strengthBimTypeFilter,
  #strengthBimAxesFilter {
    max-width: none;
    min-height: 40px;
    padding: 10px 34px 10px 12px;
  }

  .geo-bim-filter--search input[type="search"] {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .geo-bim-header .bim-viewer-action-stack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: 2px;
  }

  .geo-bim-header .bim-viewer-action-stack > #btnClearGeoBimSelection,
  .geo-bim-header .bim-viewer-action-stack > #btnClearGeomBimSelection,
  .geo-bim-header .bim-viewer-action-stack > #btnClearReinfBimSelection,
  .geo-bim-header .bim-viewer-action-stack > #btnClearStrengthBimSelection,
  .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher,
  .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher > .bim-viewer-launcher__button,
  .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher > .bim-viewer-launcher__button.lg-btn,
  .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher > .bim-viewer-launcher__button.lg-btn--pill {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
  }

  .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher {
    width: 100%;
  }

  .geo-bim-header .bim-viewer-action-stack .lg-btn__label {
    font-size: 11px;
    white-space: nowrap;
  }

  .geo-bim-mainrow,
  .geo-bim-meta-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .geo-bim-status {
    min-height: 0;
    padding: 10px 12px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.35;
  }

  .card .ui-select,
  .card select,
  .card input,
  .card textarea {
    z-index: 1;
  }

  .card .row button,
  .geo-bim-header button,
  .wizard-step-btn {
    position: relative;
    z-index: 2;
  }

  .wizard-header {
    margin-top: 10px;
    gap: 10px;
  }

  .wizard-steps-nav {
    padding-top: 4px;
    padding-bottom: 2px;
  }

  .wizard-step-btn.lg-btn {
    min-height: 38px;
  }

  .wizard-footer {
    display: flex !important;
    position: fixed !important;
    left: 50%;
    right: auto;
    bottom: calc(94px + env(safe-area-inset-bottom, 0));
    width: min(402px, calc(100vw - 12px));
    padding: 0 14px;
    transform: translateX(-50%) !important;
    justify-content: center;
    z-index: 1490;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .wizard-footer .wizard-primary-btn,
  .wizard-footer .wizard-primary-btn.lg-btn,
  .wizard-footer .wizard-primary-btn.lg-btn--pill {
    width: 100%;
    min-height: 52px !important;
    border-radius: 296px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.02)),
      rgba(16, 18, 24, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(28px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(155%) !important;
  }

  .wizard-footer .wizard-primary-btn .lg-btn__label {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    font-size: 13px !important;
    font-weight: 590;
    letter-spacing: -0.1px;
  }

  .bim-workspace__surface {
    inset:
      calc(10px + env(safe-area-inset-top, 0))
      8px
      calc(8px + env(safe-area-inset-bottom, 0))
      8px;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 12px;
    gap: 12px;
    border-radius: 22px;
    max-height: calc(100dvh - 18px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .bim-workspace__header {
    gap: 10px;
  }

  .bim-workspace__titlebar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .bim-workspace__header-main {
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .bim-workspace__intro {
    flex-basis: 100%;
  }

  .bim-workspace__title-row {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .bim-workspace__eyebrow {
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: 0.1em;
  }

  .bim-workspace__title {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.05;
  }

  .bim-workspace__help-toggle {
    margin-top: 0;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }

  .bim-workspace__subtitle,
  .bim-workspace__hint {
    display: none;
  }

  .bim-workspace__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .bim-workspace__action,
  .bim-workspace__action.lg-btn,
  .bim-workspace__action.lg-btn--pill {
    width: 100%;
    min-height: 36px !important;
    padding: 0 8px !important;
    border-radius: 14px !important;
  }

  .bim-workspace__action .lg-btn__label {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .bim-workspace__mode-switch {
    width: 100%;
    justify-content: stretch;
    gap: 6px;
    padding: 4px;
  }

  .bim-workspace__mode {
    flex: 1 1 0;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .bim-workspace__close {
    width: 34px;
    height: 34px;
    justify-self: end;
    align-self: start;
    border-radius: 11px;
    font-size: 20px;
  }

  .bim-workspace__toolbar {
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
  }

  .bim-workspace__level-wrap {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .bim-workspace__floors,
  .bim-visual-stage__floors {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bim-workspace__floors::-webkit-scrollbar,
  .bim-visual-stage__floors::-webkit-scrollbar {
    display: none;
  }

  .bim-visual-stage__floor-chip {
    white-space: nowrap;
    min-width: max-content;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .bim-workspace__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
  }

  .bim-workspace__stage-area {
    gap: 12px;
  }

  .bim-workspace__stage .bim-visual-stage,
  .bim-workspace__stage--3d {
    min-height: clamp(220px, 32dvh, 300px);
  }

  .bim-workspace__stage .bim-visual-stage {
    min-height: clamp(220px, 32dvh, 300px);
    margin-top: 0;
  }

  .bim-workspace__stage--3d {
    border-radius: 18px;
  }

  .bim-workspace__inspector {
    max-height: none;
    padding: 12px;
    gap: 10px;
    border-radius: 18px;
  }

  .bim-workspace__inspector-head {
    gap: 4px;
  }

  .bim-workspace__inspector-title {
    font-size: 16px;
    line-height: 1.28;
  }

  .bim-workspace__inspector-meta {
    font-size: 11px;
    line-height: 1.45;
  }

  .bim-workspace__properties {
    max-height: min(34dvh, 280px);
    overflow-y: auto;
    padding-right: 0;
    padding-bottom: 4px;
  }

  .bim-workspace__property,
  .bim-workspace__properties-empty {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .bim-workspace__surface [hidden] {
    display: none !important;
    pointer-events: none !important;
  }
}

@media (max-width: 420px) {
  .bim-import-meta {
    padding: 7px 9px;
  }

  .bim-import-controls {
    grid-template-columns: minmax(104px, 118px) minmax(0, 1fr) 28px;
  }

  #btnImportIfc,
  #btnImportIfc.lg-btn,
  #btnImportIfc.lg-btn--pill {
    min-height: 34px !important;
    padding: 0 10px !important;
  }

  .bim-import-file-state {
    font-size: 10px;
  }

  .bim-import-status {
    font-size: 9px;
  }

  .geo-bim-header {
    gap: 7px 8px;
  }

  .wizard-footer {
    width: calc(100vw - 8px);
    padding-left: 12px;
    padding-right: 12px;
  }

  .bim-workspace__surface {
    padding: 10px;
    gap: 10px;
  }

  .bim-workspace__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bim-workspace__inspector-meta {
    font-size: 11px;
  }

  .bim-workspace__title {
    font-size: 17px;
  }

  .bim-workspace__action .lg-btn__label {
    font-size: 9px;
  }

  .bim-workspace__properties {
    max-height: min(36dvh, 260px);
  }
}

@media (max-width: 768px) {
  body.bim-workspace-open {
    overflow: hidden !important;
    max-width: 100vw !important;
  }

  .bim-workspace {
    overflow: hidden !important;
    max-width: 100vw !important;
  }

  .bim-workspace__surface {
    left: max(6px, env(safe-area-inset-left, 0px)) !important;
    right: max(6px, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-width: calc(100vw - max(12px, env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px))) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .bim-workspace__header,
  .bim-workspace__titlebar,
  .bim-workspace__header-main,
  .bim-workspace__toolbar,
  .bim-workspace__body,
  .bim-workspace__stage-area,
  .bim-workspace__inspector,
  .bim-workspace__stage,
  .bim-workspace__stage--3d,
  .bim-workspace__properties {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .bim-workspace__titlebar {
    position: relative !important;
    display: block !important;
    padding-right: 42px !important;
  }

  .bim-workspace__close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 12px !important;
  }

  .bim-workspace__header-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .bim-workspace__title {
    padding-right: 0 !important;
    overflow-wrap: anywhere !important;
  }

  .bim-workspace__actions {
    width: 100% !important;
    min-width: 0 !important;
    order: 3 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 6px !important;
    margin: 0 -2px !important;
    scroll-snap-type: x proximity !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .bim-workspace__actions::-webkit-scrollbar {
    display: none !important;
  }

  .bim-workspace__action,
  .bim-workspace__action.lg-btn,
  .bim-workspace__action.lg-btn--pill {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    scroll-snap-align: start !important;
  }

  .bim-workspace__action .lg-btn__label {
    max-width: 100% !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .bim-workspace__mode-switch {
    order: 2 !important;
    margin-top: 0 !important;
    width: 100% !important;
  }

  .bim-workspace__toolbar {
    overflow: hidden !important;
  }

  .bim-workspace__floors,
  .bim-visual-stage__floors {
    flex-wrap: wrap !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
    gap: 8px !important;
  }

  .bim-visual-stage__floor-chip {
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
    white-space: normal !important;
  }

  .bim-workspace__stage .bim-visual-stage,
  .bim-workspace__stage--3d {
    width: 100% !important;
    min-height: clamp(250px, 36dvh, 340px) !important;
  }

  .bim-workspace__canvas3d,
  .bim-workspace__canvas3d canvas,
  .bim-visual-stage,
  .bim-visual-stage__canvas {
    max-width: 100% !important;
  }

  .bim-workspace__inspector-meta,
  .bim-workspace__properties-empty {
    overflow-wrap: anywhere !important;
  }

  .bim-workspace__inspector {
    margin-top: 16px !important;
    padding: 14px !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
    max-height: none !important;
  }

  .bim-workspace__inspector-head {
    gap: 7px !important;
  }

  .bim-workspace__inspector-eyebrow {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .bim-workspace__inspector-title {
    font-size: 18px !important;
    line-height: 1.28 !important;
  }

  .bim-workspace__inspector-meta {
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .bim-workspace__properties {
    max-height: none !important;
    overflow: visible !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  .bim-workspace__property,
  .bim-workspace__properties-empty {
    padding: 13px 14px !important;
    line-height: 1.5 !important;
  }
}

@media (max-width: 560px) {
  .bim-workspace__surface {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    bottom: max(6px, env(safe-area-inset-bottom, 0px)) !important;
    padding: 12px !important;
    gap: 10px !important;
    border-radius: 20px !important;
  }

  .bim-workspace__actions {
    gap: 7px !important;
  }

  .bim-workspace__mode-switch {
    width: 100% !important;
  }

  .bim-workspace__toolbar {
    padding: 9px !important;
  }

  .bim-workspace__stage .bim-visual-stage,
  .bim-workspace__stage--3d {
    min-height: clamp(230px, 34dvh, 320px) !important;
    border-radius: 16px !important;
  }

  .bim-workspace__inspector {
    padding: 10px !important;
  }
}

/* =========================
   PROFILE PAGE LAYOUT RESTORE
   ========================= */

body.profile-page {
  --profile-shell-width: min(1250px, calc(100vw - 40px));
  --profile-header-height: 86.49px;
  --profile-footer-height: 132.5px;
}

body.profile-page > header {
  width: 100% !important;
  max-width: none !important;
  min-height: var(--profile-header-height);
  margin: 0 !important;
  padding: 20px max(20px, calc((100vw - var(--profile-shell-width)) / 2)) 18px !important;
  box-sizing: border-box;
}

body.profile-page .profile-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 20px 64px;
}

body.profile-page .profile-main .section.active.profile-section {
  display: block !important;
  min-height: 0;
}

body.profile-page .profile-shell {
  width: var(--profile-shell-width) !important;
  max-width: var(--profile-shell-width) !important;
  margin: 0 auto !important;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.profile-page .profile-topbar {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.profile-page .profile-content-grid {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  grid-template-columns: minmax(680px, 700px) minmax(0, 1fr) !important;
  align-items: start !important;
  justify-content: center !important;
  gap: 24px !important;
}

body.profile-page .profile-content-grid > * {
  min-width: 0 !important;
}

body.profile-page .profile-projects-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 620px;
  max-height: min(76vh, 940px);
  margin: 0 !important;
  justify-self: stretch !important;
}

body.profile-page .profile-feed-card {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: min(76vh, 940px);
  margin: 0 !important;
  justify-self: stretch !important;
}

body.profile-page .projects-list,
body.profile-page .profile-feed-list {
  min-width: 0;
}

body.profile-page .site-footer {
  width: 100%;
  max-width: none;
  min-height: var(--profile-footer-height);
  margin: auto 0 0 !important;
  padding: 30px max(20px, calc((100vw - var(--profile-shell-width)) / 2)) 26px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  box-sizing: border-box;
  border-top: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
  box-shadow: none;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

body.profile-page .site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

body.profile-page .site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

body.profile-page .site-footer__link > span {
  display: inline-block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

body.profile-page .site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

body.profile-page .site-footer__link:hover {
  color: #f6f6f6;
}

body.profile-page .site-footer__link:hover > span::after,
body.profile-page .site-footer__link:focus-visible > span::after {
  opacity: 1;
}

body.profile-page .site-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  color: #f6f6f6;
  text-decoration: none;
}

body.profile-page .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.profile-page .site-footer__icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body.profile-page .site-footer__copy {
  color: #959599;
  margin-left: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
}

body.theme-light.profile-page .site-footer {
  color: #959599;
  background: #000000;
  box-shadow: none;
}

body.theme-light.profile-page .site-footer__link,
body.theme-light.profile-page .site-footer__icon-link,
body.theme-light.profile-page .site-footer__copy {
  color: #f6f6f6;
}

body.theme-light.profile-page .site-footer__link:hover,
body.theme-light.profile-page .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.theme-light.profile-page .site-footer__copy {
  color: #959599;
}

body.theme-light #themeToggleBtn,
body.theme-light #btnLogout {
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

body.theme-light #themeToggleBtn:hover,
body.theme-light #themeToggleBtn:focus-visible,
body.theme-light #themeToggleBtn:active,
body.theme-light #btnLogout:hover,
body.theme-light #btnLogout:focus-visible,
body.theme-light #btnLogout:active {
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

body.theme-light.profile-page .profile-menu-button,
body.theme-light.profile-page .profile-menu-button.is-active,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light.profile-page .profile-menu-button:hover,
body.theme-light.profile-page .profile-menu-button:focus-visible,
body.theme-light.profile-page .profile-menu-button:active,
body.theme-light.profile-page .profile-menu-button.is-active:hover,
body.theme-light.profile-page .profile-menu-button.is-active:focus-visible,
body.theme-light.profile-page .profile-menu-button.is-active:active,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:hover,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:active {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light.profile-page .profile-edit-toggle .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:hover .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:focus-visible .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:active .lg-btn__label {
  color: #0f172a !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light.profile-page .profile-edit-toggle .lg-btn__glow {
  display: none !important;
}

body.theme-light.profile-page .profile-filter-tab.lg-btn--pill,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill,
body.theme-light.profile-page .profile-filter-tab .lg-btn__label,
body.theme-light.profile-page .profile-feed-tab .lg-btn__label {
  transition: none !important;
  animation: none !important;
}

body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):hover,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):focus-visible,
body.theme-light.profile-page .profile-filter-tab.lg-btn--pill:not(.is-active):active,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):hover,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):focus-visible,
body.theme-light.profile-page .profile-feed-tab.lg-btn--pill:not(.is-active):active {
  background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
  border-color: #bfccde !important;
  color: #0f172a !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transform: none !important;
}

body.theme-light.profile-page .profile-filter-tab.is-active:hover,
body.theme-light.profile-page .profile-filter-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-filter-tab.is-active:active,
body.theme-light.profile-page .profile-feed-tab.is-active:hover,
body.theme-light.profile-page .profile-feed-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-feed-tab.is-active:active {
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
}

body.theme-light.profile-page .profile-topbar-copy,
body.theme-light.profile-page .profile-projects-card,
body.theme-light.profile-page .profile-feed-card {
  color: #000000 !important;
}

body.theme-light.profile-page .profile-display-name,
body.theme-light.profile-page .profile-user-label,
body.theme-light.profile-page .profile-section-title,
body.theme-light.profile-page .profile-projects-title,
body.theme-light.profile-page .profile-projects-subtitle,
body.theme-light.profile-page .project-title-name,
body.theme-light.profile-page .project-meta,
body.theme-light.profile-page .project-meta > div,
body.theme-light.profile-page .profile-feed-title,
body.theme-light.profile-page .profile-feed-subtitle,
body.theme-light.profile-page .profile-feed-item-meta,
body.theme-light.profile-page .profile-feed-item-source,
body.theme-light.profile-page .profile-feed-item-date,
body.theme-light.profile-page .profile-feed-item-title,
body.theme-light.profile-page .profile-feed-item-summary,
body.theme-light.profile-page .profile-feed-empty {
  color: #000000 !important;
}

body.profile-page .profile-edit-toggle.lg-btn--pill,
body.profile-page .profile-menu-button,
body.profile-page .profile-menu-button.is-active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

body.profile-page .profile-edit-toggle.lg-btn--pill:hover,
body.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible,
body.profile-page .profile-edit-toggle.lg-btn--pill:active,
body.profile-page .profile-menu-button:hover,
body.profile-page .profile-menu-button:focus-visible,
body.profile-page .profile-menu-button:active,
body.profile-page .profile-menu-button.is-active:hover,
body.profile-page .profile-menu-button.is-active:focus-visible,
body.profile-page .profile-menu-button.is-active:active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

body.profile-page .profile-edit-toggle .lg-btn__label,
body.profile-page .profile-edit-toggle:hover .lg-btn__label,
body.profile-page .profile-edit-toggle:focus-visible .lg-btn__label,
body.profile-page .profile-edit-toggle:active .lg-btn__label {
  color: #ffffff !important;
  transition: none !important;
  animation: none !important;
}

body.profile-page .profile-filter-tab.lg-btn--pill,
body.profile-page .profile-feed-tab.lg-btn--pill,
body.profile-page .profile-filter-tab .lg-btn__label,
body.profile-page .profile-feed-tab .lg-btn__label {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

body.profile-page .profile-filter-tab.lg-btn--pill:hover,
body.profile-page .profile-filter-tab.lg-btn--pill:focus-visible,
body.profile-page .profile-filter-tab.lg-btn--pill:active,
body.profile-page .profile-feed-tab.lg-btn--pill:hover,
body.profile-page .profile-feed-tab.lg-btn--pill:focus-visible,
body.profile-page .profile-feed-tab.lg-btn--pill:active {
  transform: none !important;
}

body.profile-page .profile-filter-tab.is-active:hover,
body.profile-page .profile-filter-tab.is-active:focus-visible,
body.profile-page .profile-filter-tab.is-active:active,
body.profile-page .profile-feed-tab.is-active:hover,
body.profile-page .profile-feed-tab.is-active:focus-visible,
body.profile-page .profile-feed-tab.is-active:active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill,
body.theme-light.profile-page .profile-menu-button,
body.theme-light.profile-page .profile-menu-button.is-active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:hover,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:focus-visible,
body.theme-light.profile-page .profile-edit-toggle.lg-btn--pill:active,
body.theme-light.profile-page .profile-menu-button:hover,
body.theme-light.profile-page .profile-menu-button:focus-visible,
body.theme-light.profile-page .profile-menu-button:active,
body.theme-light.profile-page .profile-menu-button.is-active:hover,
body.theme-light.profile-page .profile-menu-button.is-active:focus-visible,
body.theme-light.profile-page .profile-menu-button.is-active:active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.theme-light.profile-page .profile-edit-toggle .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:hover .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:focus-visible .lg-btn__label,
body.theme-light.profile-page .profile-edit-toggle:active .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.profile-page .profile-filter-tab.is-active:hover,
body.theme-light.profile-page .profile-filter-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-filter-tab.is-active:active,
body.theme-light.profile-page .profile-feed-tab.is-active:hover,
body.theme-light.profile-page .profile-feed-tab.is-active:focus-visible,
body.theme-light.profile-page .profile-feed-tab.is-active:active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
}

body.profile-page #profileEditLink,
body.profile-page #profileMenuButton,
body.profile-page #btnCreateProjectProfile {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.profile-page #profileEditLink:hover,
body.profile-page #profileEditLink:focus-visible,
body.profile-page #profileEditLink:active,
body.profile-page #profileMenuButton:hover,
body.profile-page #profileMenuButton:focus-visible,
body.profile-page #profileMenuButton:active,
body.profile-page #btnCreateProjectProfile:hover,
body.profile-page #btnCreateProjectProfile:focus-visible,
body.profile-page #btnCreateProjectProfile:active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.84)) !important;
  border-color: rgba(59, 130, 246, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.profile-page #profileEditLink .lg-btn__label,
body.profile-page #profileEditLink:hover .lg-btn__label,
body.profile-page #profileEditLink:focus-visible .lg-btn__label,
body.profile-page #profileEditLink:active .lg-btn__label,
body.profile-page #btnCreateProjectProfile .lg-btn__label,
body.profile-page #btnCreateProjectProfile:hover .lg-btn__label,
body.profile-page #btnCreateProjectProfile:focus-visible .lg-btn__label,
body.profile-page #btnCreateProjectProfile:active .lg-btn__label {
  color: #ffffff !important;
  transition: none !important;
  animation: none !important;
}

body.profile-page #profileEditLink .lg-btn__glow,
body.profile-page #btnCreateProjectProfile .lg-btn__glow,
body.profile-page .profile-filter-tab .lg-btn__glow,
body.profile-page .profile-feed-tab .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

body.profile-page .profile-filter-tab,
body.profile-page .profile-feed-tab {
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.profile-page .profile-filter-tab:hover,
body.profile-page .profile-filter-tab:focus-visible,
body.profile-page .profile-filter-tab:active,
body.profile-page .profile-feed-tab:hover,
body.profile-page .profile-feed-tab:focus-visible,
body.profile-page .profile-feed-tab:active {
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light.profile-page #profileEditLink,
body.theme-light.profile-page #profileMenuButton,
body.theme-light.profile-page #btnCreateProjectProfile {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.theme-light.profile-page #profileEditLink:hover,
body.theme-light.profile-page #profileEditLink:focus-visible,
body.theme-light.profile-page #profileEditLink:active,
body.theme-light.profile-page #profileMenuButton:hover,
body.theme-light.profile-page #profileMenuButton:focus-visible,
body.theme-light.profile-page #profileMenuButton:active,
body.theme-light.profile-page #btnCreateProjectProfile:hover,
body.theme-light.profile-page #btnCreateProjectProfile:focus-visible,
body.theme-light.profile-page #btnCreateProjectProfile:active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
}

body.theme-light.home-page main .btn-small.btn-secondary.lg-btn.lg-btn--pill:not(.wizard-step-btn),
body.theme-light.home-page main .bim-viewer-launcher__button,
body.theme-light.home-page main .bim-viewer-launcher__button.lg-btn,
body.theme-light.home-page main .bim-viewer-launcher__button.lg-btn--pill {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light.home-page main .btn-small.btn-secondary.lg-btn.lg-btn--pill:not(.wizard-step-btn):hover,
body.theme-light.home-page main .btn-small.btn-secondary.lg-btn.lg-btn--pill:not(.wizard-step-btn):focus-visible,
body.theme-light.home-page main .btn-small.btn-secondary.lg-btn.lg-btn--pill:not(.wizard-step-btn):active,
body.theme-light.home-page main .bim-viewer-launcher__button:hover,
body.theme-light.home-page main .bim-viewer-launcher__button:focus-visible,
body.theme-light.home-page main .bim-viewer-launcher__button:active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light.home-page main .btn-small.btn-secondary.lg-btn.lg-btn--pill:not(.wizard-step-btn) .lg-btn__label,
body.theme-light.home-page main .bim-viewer-launcher__button .lg-btn__label {
  color: #ffffff !important;
}

body.home-page .geo-bim-card,
body.home-page .geo-bim-header,
body.home-page .geo-bim-mainrow,
body.home-page .geo-bim-meta-row {
  position: relative;
  overflow: visible;
}

body.home-page .geo-bim-header .card-title,
body.home-page .geo-bim-header .geo-bim-filter {
  position: relative;
  z-index: 1;
}

body.home-page .geo-bim-header .bim-viewer-action-stack,
body.home-page .geo-bim-header .bim-viewer-launcher,
body.home-page .geo-bim-header .bim-viewer-launcher__button,
body.home-page .geo-bim-header .bim-viewer-launcher__button.lg-btn,
body.home-page .geo-bim-header .bim-viewer-launcher__button.lg-btn--pill {
  position: relative;
  z-index: 8 !important;
  overflow: visible;
  pointer-events: auto;
}

body.home-page .geo-bim-header .bim-viewer-action-stack .lg-btn__label,
body.home-page .geo-bim-header .bim-viewer-launcher__button .lg-btn__label {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

body.home-page .construction-bar:not(.ifc-menu-open),
body.home-page .bim-import-wrapper:not(.ifc-menu-open),
body.home-page .bim-import-controls,
body.home-page .construction-select-wrapper,
body.home-page .project-select-wrapper {
  z-index: 1 !important;
}

body.home-page .tabs {
  position: relative;
  z-index: 20 !important;
  isolation: isolate;
  pointer-events: auto;
}

body.home-page .tab,
body.home-page .tab.lg-btn {
  position: relative;
  z-index: 21 !important;
  pointer-events: auto;
}

body.theme-light.home-page .tab,
body.theme-light.home-page .tab.lg-btn,
body.theme-light.home-page .wizard-step-btn.btn-small.btn-secondary.lg-btn.lg-btn--pill {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light.home-page .tab:hover,
body.theme-light.home-page .tab:focus-visible,
body.theme-light.home-page .tab:active,
body.theme-light.home-page .tab.lg-btn:hover,
body.theme-light.home-page .tab.lg-btn:focus-visible,
body.theme-light.home-page .tab.lg-btn:active,
body.theme-light.home-page .wizard-step-btn.btn-small.btn-secondary.lg-btn.lg-btn--pill:hover,
body.theme-light.home-page .wizard-step-btn.btn-small.btn-secondary.lg-btn.lg-btn--pill:focus-visible,
body.theme-light.home-page .wizard-step-btn.btn-small.btn-secondary.lg-btn.lg-btn--pill:active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light.home-page .tab .lg-btn__label,
body.theme-light.home-page .tab.lg-btn .lg-btn__label,
body.theme-light.home-page .wizard-step-btn.btn-small.btn-secondary.lg-btn.lg-btn--pill .lg-btn__label {
  color: #ffffff !important;
}

@media (max-width: 1180px) {
  body.profile-page {
    --profile-shell-width: min(100%, calc(100vw - 40px));
  }

  body.profile-page > header {
    width: 100% !important;
    min-height: auto;
    padding: 16px 20px 14px !important;
  }

  body.profile-page .profile-content-grid {
    grid-template-columns: minmax(620px, 660px) minmax(0, 1fr) !important;
    gap: 20px !important;
  }
}

@media (max-width: 960px) {
  body.profile-page .profile-main {
    padding: 20px 16px 40px;
  }

  body.profile-page .profile-shell {
    width: 100% !important;
    max-width: 100% !important;
    gap: 18px;
  }

  body.profile-page .profile-content-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.profile-page .profile-projects-card,
  body.profile-page .profile-feed-card {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 0;
    max-height: none;
  }

  body.profile-page .projects-list {
    max-height: none;
  }

  body.profile-page .site-footer {
    padding: 20px 16px 24px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  body.profile-page .site-footer__copy {
    margin-left: 0;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 768px) {
  body.profile-page {
    --profile-shell-width: calc(100vw - 28px);
  }

  body.profile-page .profile-main {
    padding: 16px 14px 32px;
  }

  body.profile-page .site-footer {
    padding: 18px 14px 22px;
  }
}

body.home-page .construction-bar,
body.home-page .construction-bar > * {
  pointer-events: none;
}

body.home-page .construction-bar :is(
  select,
  button,
  input,
  .ui-select,
  .menu-panel,
  .menu-item,
  .module-help-content:not([hidden]),
  a
) {
  pointer-events: auto;
}

body.home-page .tabs {
  position: relative;
  z-index: 1100 !important;
  margin-top: 18px !important;
  pointer-events: auto !important;
  isolation: isolate;
}

body.home-page .tab,
body.home-page .tab.lg-btn {
  position: relative;
  z-index: 1101 !important;
  pointer-events: auto !important;
}

body.home-page .tab *,
body.home-page .tab.lg-btn * {
  pointer-events: auto !important;
}

body.home-page .geo-bim-header .bim-viewer-action-stack {
  --bim-action-width: 196px;
  width: min(100%, 196px) !important;
}

body.home-page .geo-bim-header .bim-viewer-action-stack > :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection,
  .bim-viewer-launcher
),
body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher > :is(
  .bim-viewer-launcher__button,
  .bim-viewer-launcher__button.lg-btn,
  .bim-viewer-launcher__button.lg-btn--pill
) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.home-page .geo-bim-header :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection,
  .bim-viewer-launcher__button,
  .bim-viewer-launcher__button.lg-btn,
  .bim-viewer-launcher__button.lg-btn--pill
) {
  padding-inline: 10px !important;
}

body.home-page .geo-bim-header :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection
) .lg-btn__label,
body.home-page .geo-bim-header .bim-viewer-launcher__button .lg-btn__label {
  font-size: 11px !important;
}

body.theme-light.home-page {
  --home-action-blue-bg: linear-gradient(180deg, #3b82f6, #2563eb);
  --home-action-blue-border: #2563eb;
  --home-action-blue-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --home-action-blue-shadow-hover: 0 10px 22px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body.theme-light.home-page :is(
  #btnImportIfc,
  #btnImportIfc.lg-btn,
  #btnImportIfc.lg-btn--pill,
  #btnClearGeoBimSelection,
  #btnClearGeoBimSelection.lg-btn,
  #btnClearGeoBimSelection.lg-btn--pill,
  #btnClearGeomBimSelection,
  #btnClearGeomBimSelection.lg-btn,
  #btnClearGeomBimSelection.lg-btn--pill,
  #btnClearReinfBimSelection,
  #btnClearReinfBimSelection.lg-btn,
  #btnClearReinfBimSelection.lg-btn--pill,
  #btnClearStrengthBimSelection,
  #btnClearStrengthBimSelection.lg-btn,
  #btnClearStrengthBimSelection.lg-btn--pill,
  .bim-viewer-launcher__button,
  .bim-viewer-launcher__button.lg-btn,
  .bim-viewer-launcher__button.lg-btn--pill
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  #btnImportIfc,
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection,
  .bim-viewer-launcher__button
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnImportIfc:hover,
  #btnImportIfc:focus-visible,
  #btnImportIfc:active,
  #btnClearGeoBimSelection:hover,
  #btnClearGeoBimSelection:focus-visible,
  #btnClearGeoBimSelection:active,
  #btnClearGeomBimSelection:hover,
  #btnClearGeomBimSelection:focus-visible,
  #btnClearGeomBimSelection:active,
  #btnClearReinfBimSelection:hover,
  #btnClearReinfBimSelection:focus-visible,
  #btnClearReinfBimSelection:active,
  #btnClearStrengthBimSelection:hover,
  #btnClearStrengthBimSelection:focus-visible,
  #btnClearStrengthBimSelection:active,
  .bim-viewer-launcher__button:hover,
  .bim-viewer-launcher__button:focus-visible,
  .bim-viewer-launcher__button:active
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page .bim-viewer-launcher__button:disabled {
  opacity: 1 !important;
}

body.theme-light.home-page .tab,
body.theme-light.home-page .tab.lg-btn {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
  transform: translateY(0) !important;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease !important;
  animation: none !important;
}

body.theme-light.home-page .tab .lg-btn__label,
body.theme-light.home-page .tab.lg-btn .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page .tab:hover,
body.theme-light.home-page .tab:focus-visible,
body.theme-light.home-page .tab:active,
body.theme-light.home-page .tab.lg-btn:hover,
body.theme-light.home-page .tab.lg-btn:focus-visible,
body.theme-light.home-page .tab.lg-btn:active {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow-hover) !important;
  transform: translateY(-1px) !important;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease !important;
}

body.theme-light.home-page {
  --home-light-surface-bg: #ffffff;
  --home-light-surface-border: #94a3b8;
  --home-light-surface-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

body.theme-light.home-page .geo-bim-card,
body.theme-light.home-page .geo-bim-source,
body.theme-light.home-page .bim-visual-panel__selection,
body.theme-light.home-page .construction-bar,
body.theme-light.home-page .tabs {
  background: var(--home-light-surface-bg) !important;
  border: 1px solid var(--home-light-surface-border) !important;
  box-shadow: var(--home-light-surface-shadow) !important;
}

body.theme-light.home-page .geo-bim-card:hover,
body.theme-light.home-page .geo-bim-source:hover,
body.theme-light.home-page .bim-visual-panel__selection:hover,
body.theme-light.home-page .construction-bar:hover,
body.theme-light.home-page .tabs:hover {
  background: var(--home-light-surface-bg) !important;
  border-color: var(--home-light-surface-border) !important;
  box-shadow: var(--home-light-surface-shadow) !important;
  transform: none !important;
  filter: none !important;
}

body.theme-light.home-page .geo-bim-card,
body.theme-light.home-page .geo-bim-source,
body.theme-light.home-page .bim-visual-panel__selection {
  transition: none !important;
}

body.theme-light.home-page .geo-bim-source__chip,
body.theme-light.home-page .geo-bim-source__hint,
body.theme-light.home-page .geo-manual-note {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08) !important;
}

/* Stable two-row header: selectors first, BIM / IFC always second. */
body.home-page .construction-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 10px 12px !important;
}

body.home-page .project-select-wrapper,
body.home-page .construction-select-wrapper {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  order: 1 !important;
}

body.home-page .construction-select-wrapper[hidden],
body.home-page #constructionSubtypeShell[hidden] {
  display: none !important;
}

body.home-page .bim-import-wrapper {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  order: 2 !important;
  align-items: center !important;
  gap: 8px !important;
}

body.home-page .bim-import-head {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.home-page .bim-import-controls {
  display: grid !important;
  grid-template-columns: minmax(126px, max-content) minmax(160px, 1fr) auto !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 8px !important;
}

body.home-page .bim-import-meta {
  min-width: 0 !important;
}

@media (max-width: 900px) {
  body.home-page .project-select-wrapper,
  body.home-page .construction-select-wrapper {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: min(260px, 100%) !important;
  }

  body.home-page .bim-import-wrapper {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  body.home-page .project-select-wrapper,
  body.home-page .construction-select-wrapper {
    flex: 0 0 100% !important;
    min-width: 100% !important;
  }

  body.home-page .bim-import-controls {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  body.home-page .bim-import-primary,
  body.home-page .bim-import-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  body.home-page .bim-import-controls {
    grid-template-columns: 1fr !important;
  }

  body.home-page .bim-import-menu {
    justify-self: end;
  }
}

@media (max-width: 560px) {
  body.home-page .bim-import-controls {
    display: grid !important;
    grid-template-columns: minmax(96px, 118px) minmax(0, 1fr) 32px !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body.home-page .bim-import-primary,
  body.home-page .bim-import-meta,
  body.home-page .bim-import-menu {
    grid-column: auto !important;
  }

  body.home-page .bim-import-primary {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 10px !important;
  }

  body.home-page .bim-import-meta {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-inline: 8px !important;
    overflow: hidden !important;
  }

  body.home-page .bim-import-file-state,
  body.home-page .bim-import-status {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.home-page .bim-import-menu {
    justify-self: end !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 420px) {
  body.home-page .bim-import-controls {
    grid-template-columns: minmax(88px, 104px) minmax(0, 1fr) 28px !important;
  }

  body.home-page .bim-import-primary {
    padding-inline: 8px !important;
  }

  body.home-page .bim-import-primary .lg-btn__label {
    font-size: 10px !important;
  }
}

/* Compact knowledge base cards */
#sectionKnowledge .knowledge-subcategories {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  align-items: start !important;
  gap: 14px !important;
  margin-top: 18px !important;
}

#sectionKnowledge .knowledge-subcategory-group {
  min-width: 0;
  padding: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.58) !important;
  box-shadow: none !important;
}

#sectionKnowledge .knowledge-subcategory-group h3 {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
  color: #e5edf8 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

#sectionKnowledge .knowledge-subcategory-group h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 7px;
  background: rgba(96, 165, 250, 0.1);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 800;
}

#sectionKnowledge .knowledge-construction-cards {
  display: grid !important;
  gap: 8px !important;
}

#sectionKnowledge .knowledge-construction-card {
  min-width: 0;
  padding: 10px 11px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.36) !important;
  box-shadow: none !important;
}

#sectionKnowledge .knowledge-construction-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
}

#sectionKnowledge .knowledge-construction-card h4 {
  display: flex !important;
  align-items: center !important;
  min-width: 0;
  gap: 7px !important;
  margin: 0 !important;
  color: #f8fafc !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 720 !important;
}

#sectionKnowledge .knowledge-construction-card__icon {
  width: 24px !important;
  min-width: 24px !important;
  height: 22px !important;
  border: 1px solid rgba(96, 165, 250, 0.2) !important;
  border-radius: 7px !important;
  background: rgba(96, 165, 250, 0.1) !important;
  color: #93c5fd !important;
  font-size: 9px !important;
  font-weight: 800 !important;
}

#sectionKnowledge .knowledge-construction-card__chevron {
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

#sectionKnowledge .knowledge-construction-subtypes {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin: 0 0 7px !important;
}

#sectionKnowledge .knowledge-construction-subtypes span {
  min-height: 20px !important;
  padding: 2px 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(30, 41, 59, 0.45) !important;
  color: #aebdd0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}

#sectionKnowledge .knowledge-construction-card__note {
  margin: 0 0 7px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
}

#sectionKnowledge .knowledge-module-list {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#sectionKnowledge .knowledge-subcategory-list li.knowledge-module-item,
#sectionKnowledge .knowledge-module-item {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  gap: 4px !important;
  padding: 0 !important;
  color: inherit !important;
  cursor: default !important;
}

#sectionKnowledge .knowledge-subcategory-list li.knowledge-module-item:hover {
  color: inherit !important;
  text-decoration: none !important;
}

#sectionKnowledge .knowledge-module-item__label {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  width: auto !important;
  max-width: 100% !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(96, 165, 250, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(37, 99, 235, 0.16) !important;
  color: #bfdbfe !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 650 !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

#sectionKnowledge .knowledge-module-item__label:hover,
#sectionKnowledge .knowledge-module-item__label:focus-visible {
  border-color: rgba(96, 165, 250, 0.46) !important;
  background: rgba(37, 99, 235, 0.24) !important;
  color: #dbeafe !important;
  text-decoration: none !important;
  outline: none !important;
}

#sectionKnowledge .knowledge-module-item__note {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 2px 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.26) !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

#sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(100, 116, 139, 0.13) !important;
  color: #94a3b8 !important;
  cursor: default !important;
  font-weight: 560 !important;
}

#sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:hover,
#sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:focus-visible {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(100, 116, 139, 0.13) !important;
  color: #94a3b8 !important;
}

body.theme-light #sectionKnowledge .knowledge-subcategory-group {
  background: #ffffff !important;
  border-color: #d7e1ee !important;
  box-shadow: none !important;
}

body.theme-light #sectionKnowledge .knowledge-subcategory-group h3,
body.theme-light #sectionKnowledge .knowledge-construction-card h4 {
  color: #0f172a !important;
}

body.theme-light #sectionKnowledge .knowledge-subcategory-group h3 span,
body.theme-light #sectionKnowledge .knowledge-construction-card__icon {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #2563eb !important;
}

body.theme-light #sectionKnowledge .knowledge-construction-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-light #sectionKnowledge .knowledge-construction-subtypes span,
body.theme-light #sectionKnowledge .knowledge-module-item__note {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

body.theme-light #sectionKnowledge .knowledge-construction-card__note,
body.theme-light #sectionKnowledge .knowledge-construction-card__chevron {
  color: #64748b !important;
}

body.theme-light #sectionKnowledge .knowledge-module-item__label {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

body.theme-light #sectionKnowledge .knowledge-module-item__label:hover,
body.theme-light #sectionKnowledge .knowledge-module-item__label:focus-visible {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
}

body.theme-light #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

@media (max-width: 520px) {
  #sectionKnowledge .knowledge-subcategories {
    grid-template-columns: 1fr !important;
  }

  #sectionKnowledge .knowledge-subcategory-group,
  #sectionKnowledge .knowledge-construction-card {
    padding: 11px !important;
  }
}

body.theme-light.home-page :is(
  .card-title,
  .section h2,
  .construction-label,
  .meta,
  .subtitle,
  .caption,
  .node-meta,
  .project-meta,
  .geo-bim-source__title,
  .geo-bim-source__meta,
  .geo-bim-source__chip span,
  .geo-bim-source__chip strong,
  .geo-bim-status,
  .bim-visual-panel__title,
  .bim-visual-panel__count,
  .bim-visual-panel__selection-title,
  .bim-visual-panel__selection-meta,
  .bim-visual-stage__empty,
  .bim-workspace__subtitle,
  .bim-workspace__hint,
  .bim-workspace__inspector-meta
) {
  color: #000000 !important;
}

body.theme-light.home-page :is(
  #btnGeo,
  #btnReinf,
  #btnGeom,
  #btnStrength,
  #btnClearForm,
  #btnClearNodes,
  #btnClearReinfForm,
  #btnClearReinfChecks,
  #btnClearGeomForm,
  #btnClearGeomChecks,
  #btnClearStrengthForm,
  #btnClearStrengthChecks
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  #btnGeo,
  #btnReinf,
  #btnGeom,
  #btnStrength,
  #btnClearForm,
  #btnClearNodes,
  #btnClearReinfForm,
  #btnClearReinfChecks,
  #btnClearGeomForm,
  #btnClearGeomChecks,
  #btnClearStrengthForm,
  #btnClearStrengthChecks
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnGeo:hover,
  #btnGeo:focus-visible,
  #btnGeo:active,
  #btnReinf:hover,
  #btnReinf:focus-visible,
  #btnReinf:active,
  #btnGeom:hover,
  #btnGeom:focus-visible,
  #btnGeom:active,
  #btnStrength:hover,
  #btnStrength:focus-visible,
  #btnStrength:active,
  #btnClearForm:hover,
  #btnClearForm:focus-visible,
  #btnClearForm:active,
  #btnClearNodes:hover,
  #btnClearNodes:focus-visible,
  #btnClearNodes:active,
  #btnClearReinfForm:hover,
  #btnClearReinfForm:focus-visible,
  #btnClearReinfForm:active,
  #btnClearReinfChecks:hover,
  #btnClearReinfChecks:focus-visible,
  #btnClearReinfChecks:active,
  #btnClearGeomForm:hover,
  #btnClearGeomForm:focus-visible,
  #btnClearGeomForm:active,
  #btnClearGeomChecks:hover,
  #btnClearGeomChecks:focus-visible,
  #btnClearGeomChecks:active,
  #btnClearStrengthForm:hover,
  #btnClearStrengthForm:focus-visible,
  #btnClearStrengthForm:active,
  #btnClearStrengthChecks:hover,
  #btnClearStrengthChecks:focus-visible,
  #btnClearStrengthChecks:active
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow-hover) !important;
}

body.theme-light.home-page .tab,
body.theme-light.home-page .tab.lg-btn {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
}

body.theme-light.home-page .tab .lg-btn__label,
body.theme-light.home-page .tab.lg-btn .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnGeo,
  #btnReinf,
  #btnGeom,
  #btnStrength
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease !important;
}

body.theme-light.home-page :is(
  #btnGeo,
  #btnReinf,
  #btnGeom,
  #btnStrength
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnGeo,
  #btnReinf,
  #btnGeom,
  #btnStrength
) .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
  transform: none !important;
  filter: none !important;
}

body.theme-light.home-page :is(
  #btnGeo:hover,
  #btnGeo:focus-visible,
  #btnGeo:active,
  #btnReinf:hover,
  #btnReinf:focus-visible,
  #btnReinf:active,
  #btnGeom:hover,
  #btnGeom:focus-visible,
  #btnGeom:active,
  #btnStrength:hover,
  #btnStrength:focus-visible,
  #btnStrength:active
) {
  background: #15803d !important;
  border-color: rgba(22, 163, 74, 0.6) !important;
  color: #ffffff !important;
  box-shadow:
    0 10px 22px rgba(2, 6, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px) !important;
}

body.theme-light.home-page :is(
  .tab[data-target="geo"],
  .tab[data-target="reinforcement"],
  .tab[data-target="geometry"],
  .tab[data-target="strength"],
  .tab[data-target="summary"],
  .tab[data-target="journal"],
  .tab[data-target="knowledge"]
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  .tab[data-target="geo"],
  .tab[data-target="reinforcement"],
  .tab[data-target="geometry"],
  .tab[data-target="strength"],
  .tab[data-target="summary"],
  .tab[data-target="journal"],
  .tab[data-target="knowledge"]
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  .tab[data-target="geo"],
  .tab[data-target="reinforcement"],
  .tab[data-target="geometry"],
  .tab[data-target="strength"],
  .tab[data-target="summary"],
  .tab[data-target="journal"],
  .tab[data-target="knowledge"]
):is(.active, :hover, :focus-visible, :active) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  .tab[data-target="geo"],
  .tab[data-target="reinforcement"],
  .tab[data-target="geometry"],
  .tab[data-target="strength"],
  .tab[data-target="summary"],
  .tab[data-target="journal"],
  .tab[data-target="knowledge"]
)::before,
body.theme-light.home-page :is(
  .tab[data-target="geo"],
  .tab[data-target="reinforcement"],
  .tab[data-target="geometry"],
  .tab[data-target="strength"],
  .tab[data-target="summary"],
  .tab[data-target="journal"],
  .tab[data-target="knowledge"]
)::after {
  opacity: 0 !important;
  background: transparent !important;
}

body.theme-light.home-page :is(
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear,
  #btnSummaryDebug,
  #btnAllArticles,
  #btnKnowledgeSearch,
  #btnCategorySearch
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear,
  #btnSummaryDebug,
  #btnAllArticles,
  #btnKnowledgeSearch,
  #btnCategorySearch
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear,
  #btnSummaryDebug,
  #btnAllArticles,
  #btnKnowledgeSearch,
  #btnCategorySearch
):is(:hover, :focus-visible, :active) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow-hover) !important;
}

body.theme-light.home-page :is(
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear,
  #btnSummaryDebug,
  #btnAllArticles,
  #btnKnowledgeSearch,
  #btnCategorySearch
) .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
}

body.theme-light.home-page :is(
  #summaryWorkspacePrev,
  #summaryWorkspaceNext
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  #btnIfcMoreActions,
  .bim-import-menu-trigger,
  #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill,
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear
) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page :is(
  #btnIfcMoreActions,
  .bim-import-menu-trigger,
  #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill,
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear
) .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page :is(
  #btnIfcMoreActions,
  .bim-import-menu-trigger,
  #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill,
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear
):is(:hover, :focus-visible, :active) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow-hover) !important;
}

body.theme-light.home-page :is(
  #btnIfcMoreActions,
  .bim-import-menu-trigger,
  #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill,
  #btnSummaryGenerate,
  #btnSummaryCopy,
  #btnSummaryExportPdf,
  #btnSummaryClear
) .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
}

body:not(.theme-light) .theme-toggle-btn:is(:hover, :focus-visible, :active),
body:not(.theme-light).profile-page > header .theme-toggle-btn:is(:hover, :focus-visible, :active) {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.15) !important;
  filter: none !important;
  transform: none !important;
}

body.home-page .bim-viewer-launcher__button::before,
body.home-page .bim-viewer-launcher__button.lg-btn::before,
body.home-page .bim-viewer-launcher__button.lg-btn--pill::before,
body.home-page .bim-viewer-launcher__button .lg-btn__glow,
body.home-page .bim-viewer-launcher__button.lg-btn .lg-btn__glow,
body.home-page .bim-viewer-launcher__button.lg-btn--pill .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
}

body.home-page .bim-viewer-launcher__button:is(:hover, :focus-visible, :active),
body.home-page .bim-viewer-launcher__button.lg-btn:is(:hover, :focus-visible, :active),
body.home-page .bim-viewer-launcher__button.lg-btn--pill:is(:hover, :focus-visible, :active) {
  --lg-raise: 0px !important;
  --lg-scale: 1 !important;
  --lg-tilt-x: 0deg !important;
  --lg-tilt-y: 0deg !important;
  --lg-glow-x: 0px !important;
  --lg-glow-y: 0px !important;
  filter: none !important;
}

body.theme-light.home-page #btnClearGeomBimSelection,
body.theme-light.home-page #btnClearGeomBimSelection.lg-btn,
body.theme-light.home-page #btnClearGeomBimSelection.lg-btn--pill,
body.theme-light.home-page #geometry #btnClearGeomBimSelection,
body.theme-light.home-page #geometry #btnClearGeomBimSelection.lg-btn,
body.theme-light.home-page #geometry #btnClearGeomBimSelection.lg-btn--pill {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page #btnClearGeomBimSelection .lg-btn__label,
body.theme-light.home-page #geometry #btnClearGeomBimSelection .lg-btn__label {
  color: #ffffff !important;
}

body.theme-light.home-page #btnClearGeomBimSelection:is(:hover, :focus-visible, :active),
body.theme-light.home-page #geometry #btnClearGeomBimSelection:is(:hover, :focus-visible, :active) {
  background: var(--home-action-blue-bg) !important;
  border-color: var(--home-action-blue-border) !important;
  color: #ffffff !important;
  box-shadow: var(--home-action-blue-shadow) !important;
}

body.theme-light.home-page #btnClearGeomBimSelection .lg-btn__glow,
body.theme-light.home-page #geometry #btnClearGeomBimSelection .lg-btn__glow {
  display: none !important;
  opacity: 0 !important;
}

body:not(.theme-light).home-page :is(
  #btnClearGeoBimSelection,
  #btnClearGeoBimSelection.lg-btn,
  #btnClearGeoBimSelection.lg-btn--pill,
  #btnClearGeomBimSelection,
  #btnClearGeomBimSelection.lg-btn,
  #btnClearGeomBimSelection.lg-btn--pill,
  .bim-viewer-launcher__button,
  .bim-viewer-launcher__button.lg-btn,
  .bim-viewer-launcher__button.lg-btn--pill
) {
  background: rgba(15, 23, 42, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  color: #f8fafc !important;
}

body:not(.theme-light).home-page :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  .bim-viewer-launcher__button
) .lg-btn__label {
  color: #f8fafc !important;
}

body:not(.theme-light).home-page :is(
  #btnClearGeoBimSelection:hover,
  #btnClearGeoBimSelection:focus-visible,
  #btnClearGeoBimSelection:active,
  #btnClearGeomBimSelection:hover,
  #btnClearGeomBimSelection:focus-visible,
  #btnClearGeomBimSelection:active,
  .bim-viewer-launcher__button:hover,
  .bim-viewer-launcher__button:focus-visible,
  .bim-viewer-launcher__button:active
) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

body.home-page .bim-viewer-launcher--placeholder {
  visibility: visible !important;
  opacity: 1 !important;
}

body.home-page .bim-viewer-launcher-slot .bim-viewer-launcher__button {
  pointer-events: auto !important;
}

body.home-page .geo-bim-header .bim-viewer-action-stack {
  --bim-action-width: 168px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: min(100%, var(--bim-action-width)) !important;
  align-self: start;
}

body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot,
body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot > .bim-viewer-launcher,
body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot > .bim-viewer-launcher > .bim-viewer-launcher__button,
body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot > .bim-viewer-launcher > .bim-viewer-launcher__button.lg-btn,
body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot > .bim-viewer-launcher > .bim-viewer-launcher__button.lg-btn--pill {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.home-page .geo-bim-header .bim-viewer-action-stack > .bim-viewer-launcher-slot {
  display: block !important;
}

body.home-page .geo-bim-header :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection,
  .bim-viewer-launcher__button,
  .bim-viewer-launcher__button.lg-btn,
  .bim-viewer-launcher__button.lg-btn--pill
) {
  min-height: 38px !important;
  padding-inline: 9px !important;
}

body.home-page .geo-bim-header :is(
  #btnClearGeoBimSelection,
  #btnClearGeomBimSelection,
  #btnClearReinfBimSelection,
  #btnClearStrengthBimSelection
) .lg-btn__label,
body.home-page .geo-bim-header .bim-viewer-launcher__button .lg-btn__label {
  font-size: 10px !important;
}

body.home-page .bim-viewer-launcher--placeholder {
  display: block !important;
}

body.home-page .bim-viewer-launcher--placeholder .lg-btn__glow {
  display: none !important;
}

@media (max-width: 760px) {
  body.home-page .geo-bim-header .bim-viewer-action-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100% !important;
  }

  body.home-page :is(
    #geoBimElementSelect,
    #geomBimElementSelect,
    #reinfBimElementSelect,
    #strengthBimElementSelect
  ) {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
  }
}

body.theme-light.home-page :is(.geo-bim-card, .geo-bim-source, .bim-visual-panel__selection),
body.theme-light.home-page :is(.geo-bim-card, .geo-bim-source, .bim-visual-panel__selection):hover,
body.theme-light.home-page :is(.geo-bim-card, .geo-bim-source, .bim-visual-panel__selection):focus-within {
  background: #ffffff !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light.home-page :is(.geo-bim-card, .geo-bim-source, .bim-visual-panel__selection)::before,
body.theme-light.home-page :is(.geo-bim-card, .geo-bim-source, .bim-visual-panel__selection)::after {
  transition: none !important;
  animation: none !important;
}

body.theme-light.home-page .card.geo-bim-card,
body.theme-light.home-page .card.geo-bim-card:hover,
body.theme-light.home-page .card.geo-bim-card:focus-within {
  background: #ffffff !important;
  border-color: var(--home-light-surface-border) !important;
  box-shadow: var(--home-light-surface-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.theme-light.home-page .tabs,
body.theme-light.home-page .wizard-steps-nav {
  background: #ffffff !important;
  border: 1px solid var(--home-light-surface-border) !important;
  box-shadow: var(--home-light-surface-shadow) !important;
  border-radius: 16px !important;
}

body.theme-light.home-page .wizard-header {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
}

body.theme-light.home-page .wizard-steps-nav {
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.home-page .bim-import-menu-panel .menu-item,
body.home-page .bim-import-menu-panel .menu-item.menu-danger {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
  border: none !important;
  outline: none !important;
  border-radius: 12px !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}

body:not(.theme-light).home-page .bim-import-menu-panel .menu-item:is(:hover, :focus-visible, :active) {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

body:not(.theme-light).home-page .bim-import-menu-panel .menu-item.menu-danger:is(:hover, :focus-visible, :active) {
  background: rgba(248, 113, 113, 0.12) !important;
  box-shadow: none !important;
}

body.theme-light.home-page .bim-import-menu-panel .menu-item:is(:hover, :focus-visible, :active) {
  background: rgba(59, 130, 246, 0.16) !important;
  box-shadow: none !important;
}

body.theme-light.home-page .bim-import-menu-panel .menu-item.menu-danger:is(:hover, :focus-visible, :active) {
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: none !important;
}

body.theme-light .card.geo-bim-card,
body.theme-light .card.geo-bim-card:hover,
body.theme-light .card.geo-bim-card:focus-within {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light .card.geo-bim-card::before,
body.theme-light .card.geo-bim-card::after,
body.theme-light .card.geo-bim-card:hover::before,
body.theme-light .card.geo-bim-card:hover::after {
  transition: none !important;
  animation: none !important;
}

body.theme-light .tabs,
body.theme-light .tabs:hover,
body.theme-light .tabs:focus-within {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light .tab,
body.theme-light .tab:hover,
body.theme-light .tab:focus-visible,
body.theme-light .tab:active,
body.theme-light .tab.active,
body.theme-light .tab.lg-btn,
body.theme-light .tab.lg-btn:hover,
body.theme-light .tab.lg-btn:focus-visible,
body.theme-light .tab.lg-btn:active,
body.theme-light .tab.lg-btn.active {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
  --lg-raise: 0px !important;
}

body.theme-light .tab::before,
body.theme-light .tab::after,
body.theme-light .tab:hover::before,
body.theme-light .tab:hover::after,
body.theme-light .tab.lg-btn::before,
body.theme-light .tab.lg-btn::after,
body.theme-light .tab.lg-btn:hover::before,
body.theme-light .tab.lg-btn:hover::after {
  opacity: 0 !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light .tab .lg-btn__label,
body.theme-light .tab:hover .lg-btn__label,
body.theme-light .tab.lg-btn .lg-btn__label,
body.theme-light .tab.lg-btn:hover .lg-btn__label {
  color: #ffffff !important;
  transition: none !important;
}

body.theme-light .geo-bim-card,
body.theme-light .geo-bim-card:hover,
body.theme-light .geo-bim-card:focus-within {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light .geo-bim-card::before,
body.theme-light .geo-bim-card::after,
body.theme-light .geo-bim-card:hover::before,
body.theme-light .geo-bim-card:hover::after {
  opacity: 0 !important;
  transition: none !important;
  animation: none !important;
}

body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .card.geo-bim-card,
body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .card.geo-bim-card:hover,
body.theme-light :is(#sectionGeo, #reinforcement, #geometry, #strength) .card.geo-bim-card:focus-within {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

body.home-page .site-footer {
  width: 100%;
  max-width: none;
  min-height: var(--site-footer-height);
  margin: auto 0 0 !important;
  padding: 30px max(20px, calc((100vw - var(--site-frame-width)) / 2)) 26px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  box-sizing: border-box;
  border-top: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
  box-shadow: none;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

body.home-page .site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

body.home-page .site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

body.home-page .site-footer__link > span {
  display: inline-block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

body.home-page .site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

body.home-page .site-footer__link:hover,
body.home-page .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.home-page .site-footer__link:hover > span::after,
body.home-page .site-footer__link:focus-visible > span::after {
  opacity: 1;
}

body.home-page .site-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  color: #f6f6f6;
  text-decoration: none;
}

body.home-page .site-footer__copy {
  color: #959599;
  margin-left: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
}

body.theme-light.home-page .site-footer {
  color: #959599;
  background: #000000;
  box-shadow: none;
}

body.theme-light.home-page .site-footer__link,
body.theme-light.home-page .site-footer__icon-link,
body.theme-light.home-page .site-footer__copy {
  color: #f6f6f6;
}

body.theme-light.home-page .site-footer__link:hover,
body.theme-light.home-page .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.theme-light.home-page .site-footer__copy {
  color: #959599;
}

body:is(.home-page, .profile-page) .site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

body:is(.home-page, .profile-page) .site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

body:is(.home-page, .profile-page) .site-footer__link > span {
  display: inline-block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

body:is(.home-page, .profile-page) .site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

body:is(.home-page, .profile-page) .site-footer__link:hover,
body:is(.home-page, .profile-page) .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body:is(.home-page, .profile-page) .site-footer__link:hover > span::after,
body:is(.home-page, .profile-page) .site-footer__link:focus-visible > span::after {
  opacity: 1;
}

body.home-page .site-footer.site-footer--profile-like {
  width: 100%;
  max-width: none;
  min-height: var(--site-footer-height);
  margin: auto 0 0 !important;
  padding: 30px max(20px, calc((100vw - var(--site-frame-width)) / 2)) 26px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  box-sizing: border-box;
  border-top: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.82) 100%
  );
  box-shadow: none;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__link {
  display: block;
  padding: 0.5rem 0;
  color: #f6f6f6;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
  text-decoration: none;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__link > span {
  display: inline-block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__link > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0;
  pointer-events: none;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__link:hover,
body.home-page .site-footer.site-footer--profile-like .site-footer__icon-link:hover {
  color: #f6f6f6;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__link:hover > span::after,
body.home-page .site-footer.site-footer--profile-like .site-footer__link:focus-visible > span::after {
  opacity: 1;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  color: #f6f6f6;
  text-decoration: none;
}

body.home-page .site-footer.site-footer--profile-like .site-footer__copy {
  color: #959599;
  margin-left: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2em;
  font-weight: 400;
}

body.theme-light.home-page .site-footer.site-footer--profile-like {
  color: #959599;
  background: #000000;
  box-shadow: none;
}

body.theme-light.home-page .site-footer.site-footer--profile-like .site-footer__link,
body.theme-light.home-page .site-footer.site-footer--profile-like .site-footer__icon-link {
  color: #f6f6f6;
}

body.theme-light.home-page .site-footer.site-footer--profile-like .site-footer__copy {
  color: #959599;
}

.profile-mobile-header-title,
.profile-mobile-header-btn,
.profile-mobile-header-menu,
.profile-settings-trigger,
.profile-settings-backdrop,
.profile-settings-sheet,
.profile-share-sheet {
  display: none;
}

.profile-settings-backdrop[hidden],
.profile-settings-sheet[hidden],
.profile-share-sheet[hidden] {
  display: none !important;
}

.profile-settings-trigger {
  color: #f8fafc;
}

.profile-mobile-header-menu {
  position: relative;
  justify-self: end;
}

.profile-mobile-header-btn {
  color: inherit;
  position: relative;
  z-index: 2;
}

body.profile-page .profile-topbar-actions {
  display: flex;
}

body.profile-page #profileSettingsButton {
  display: none !important;
}

.profile-settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(1, 6, 15, 0.62);
  opacity: 0;
  transition: opacity 260ms ease;
}

.profile-settings-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 121;
  width: min(100%, 540px);
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 0 calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(56, 68, 86, 0.98), rgba(43, 53, 69, 0.995));
  box-shadow: 0 -18px 44px rgba(2, 6, 23, 0.46);
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
  will-change: transform, opacity;
}

.profile-share-sheet {
  --profile-share-sheet-drag-y: 0px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 121;
  width: min(100%, 540px);
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 0 calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(56, 68, 86, 0.98), rgba(43, 53, 69, 0.995));
  box-shadow: 0 -18px 44px rgba(2, 6, 23, 0.46);
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
  will-change: transform, opacity;
}

.profile-settings-backdrop.is-open {
  opacity: 1;
}

.profile-settings-sheet.is-open {
  opacity: 1;
  transform: translateY(0);
}

.profile-share-sheet.is-open {
  opacity: 1;
  transform: translate3d(0, var(--profile-share-sheet-drag-y), 0);
}

.profile-settings-sheet__handle {
  position: relative;
  width: 42px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: rgba(222, 230, 241, 0.38);
}

.profile-settings-sheet__handle-button {
  position: absolute;
  inset: -12px -18px;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
}

.profile-settings-sheet__handle-button:focus-visible {
  outline: 2px solid rgba(143, 186, 255, 0.9);
  outline-offset: 1px;
}

.profile-share-sheet.is-dragging {
  transition: none;
  user-select: none;
}

.profile-share-sheet.is-dragging .profile-settings-sheet__handle-button {
  cursor: grabbing;
}

.profile-settings-row--password {
  justify-content: center;
  color: #8fbaff;
  font-weight: 700;
}

.profile-settings-password-status {
  min-height: 0;
  padding-bottom: 8px;
}

.profile-settings-sheet__chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 18px 14px;
  border-bottom: 1px solid rgba(196, 208, 224, 0.12);
}

.profile-settings-sheet__nav {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.profile-settings-sheet__nav--cancel {
  justify-self: start;
  color: #aab7c9;
}

.profile-settings-sheet__nav--save {
  justify-self: end;
  color: #17d75a;
  font-weight: 700;
}

.profile-settings-sheet__title {
  margin: 0;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.profile-settings-sheet__body {
  max-height: min(76vh, 720px);
  overflow-y: auto;
  padding: 14px 0 0;
}

.profile-share-sheet__body {
  display: grid;
  gap: 14px;
  padding: 0 18px;
}

.profile-share-sheet__title {
  margin: 0;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.profile-share-sheet__action {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  background: rgba(56, 68, 86, 0.92);
  color: #dce6f5;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.profile-share-sheet__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile-settings-form {
  display: grid;
  gap: 16px;
}

.profile-settings-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-settings-sheet__group {
  margin: 0 0 14px;
}

.profile-settings-sheet__signed,
.profile-settings-sheet__section-title {
  padding: 0 18px;
}

.profile-settings-sheet__signed {
  min-height: 62px;
  display: flex;
  align-items: center;
  color: #b7c4d7;
  font-size: 17px;
  line-height: 1.3;
  background: rgba(28, 36, 47, 0.78);
  border-top: 1px solid rgba(196, 208, 224, 0.08);
  border-bottom: 1px solid rgba(196, 208, 224, 0.08);
}

.profile-settings-sheet__signed strong {
  color: #eef4ff;
  font-weight: 700;
  margin-left: 0.35ch;
}

.profile-settings-sheet__section-title {
  margin-bottom: 1px;
  color: rgba(186, 199, 216, 0.82);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-settings-row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  border-top: 1px solid rgba(196, 208, 224, 0.08);
  background: rgba(56, 68, 86, 0.92);
  color: #dce6f5;
  text-decoration: none;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  box-sizing: border-box;
}

.profile-settings-row:last-child {
  border-bottom: 1px solid rgba(196, 208, 224, 0.08);
}

.profile-settings-row__value,
.profile-settings-row__chevron {
  color: rgba(186, 199, 216, 0.88);
}

.profile-settings-row__chevron {
  font-size: 28px;
  line-height: 1;
}

.profile-settings-row--danger {
  justify-content: flex-start;
  color: #f2a43a;
}

.profile-settings-sheet__avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 14px;
  background: rgba(56, 68, 86, 0.92);
  border-top: 1px solid rgba(196, 208, 224, 0.08);
  border-bottom: 1px solid rgba(196, 208, 224, 0.08);
}

.profile-settings-sheet__avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border: 1px solid rgba(126, 154, 194, 0.28);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(82, 96, 118, 0.88), rgba(45, 56, 73, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 10px 22px rgba(2, 6, 23, 0.24);
  overflow: hidden;
  position: relative;
}

.profile-settings-sheet__avatar.is-empty::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(237, 245, 255, 0.9);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.profile-settings-sheet__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-settings-sheet__avatar-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profile-settings-sheet__avatar-title {
  color: #f8fafc;
  font-size: 17px;
  font-weight: 600;
}

.profile-settings-sheet__avatar-action {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #8dc0ff;
  font: inherit;
  font-size: 15px;
  padding: 0;
  cursor: pointer;
}

.profile-settings-field {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(56, 68, 86, 0.92);
  border-top: 1px solid rgba(196, 208, 224, 0.08);
}

.profile-settings-field:last-of-type {
  border-bottom: 1px solid rgba(196, 208, 224, 0.08);
}

.profile-settings-field__label {
  color: #dce6f5;
  font-size: 15px;
  line-height: 1.2;
}

.profile-settings-field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 148, 182, 0.24);
  border-radius: 14px;
  background: #2f3949;
  color: #f8fafc;
  font: inherit;
  font-size: 17px;
  box-sizing: border-box;
}

.profile-settings-field__input::placeholder {
  color: rgba(185, 198, 216, 0.5);
}

.profile-settings-sheet__status {
  min-height: 24px;
  padding: 0 18px;
  color: #b7c4d7;
  font-size: 14px;
  line-height: 1.45;
}

.profile-settings-sheet__status[data-tone="success"] {
  color: #62e07d;
}

.profile-settings-sheet__status[data-tone="warning"] {
  color: #fbbf24;
}

.profile-settings-sheet__status[data-tone="error"] {
  color: #f87171;
}

body.theme-light .profile-settings-trigger {
  color: #0f172a;
}

body.theme-light .profile-settings-backdrop {
  background: rgba(15, 23, 42, 0.36);
}

body.theme-light .profile-settings-sheet {
  background: linear-gradient(180deg, rgba(233, 239, 247, 0.99), rgba(219, 228, 240, 0.995));
}

body.theme-light .profile-share-sheet {
  background: linear-gradient(180deg, rgba(233, 239, 247, 0.99), rgba(219, 228, 240, 0.995));
}

body.theme-light .profile-settings-sheet__title,
body.theme-light .profile-share-sheet__title,
body.theme-light .profile-settings-sheet__avatar-title,
body.theme-light .profile-settings-field__label,
body.theme-light .profile-settings-row {
  color: #0f172a;
}

body.theme-light .profile-settings-sheet__signed,
body.theme-light .profile-settings-row,
body.theme-light .profile-settings-sheet__avatar-row,
body.theme-light .profile-settings-field {
  background: rgba(241, 245, 249, 0.98);
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-light .profile-settings-sheet__signed strong,
body.theme-light .profile-settings-row__value,
body.theme-light .profile-settings-row__chevron,
body.theme-light .profile-settings-sheet__signed,
body.theme-light .profile-settings-sheet__section-title,
body.theme-light .profile-settings-sheet__status {
  color: #475569;
}

body.theme-light .profile-settings-field__input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-light .profile-share-sheet__action {
  background: rgba(241, 245, 249, 0.98);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light .profile-settings-row--password {
  color: #2563eb;
}

@media (min-width: 769px) {
  body.profile-page #profileMobileSettingsButton {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  body.home-page {
    --site-header-height: 60px;
  }

  body.profile-page {
    --profile-header-height: 60px;
    --profile-settings-screen-top: rgba(52, 65, 82, 0.985);
    --profile-settings-screen-body: #202a36;
    --profile-settings-screen-row: #364557;
    --profile-settings-screen-row-strong: #1d2530;
    --profile-settings-screen-border: rgba(13, 20, 30, 0.58);
    --profile-settings-screen-hairline: rgba(255, 255, 255, 0.035);
    --profile-settings-screen-label: #dbe5f2;
    --profile-settings-screen-muted: #aab7c9;
    --profile-settings-screen-link: #8fbaff;
    --profile-settings-screen-save: #1ed760;
    --profile-settings-screen-danger: #ee9b32;
    --profile-settings-screen-backdrop: rgba(3, 8, 18, 0.46);
    --profile-settings-screen-top-gap: max(70px, calc(env(safe-area-inset-top) + 12px));
    overflow-y: visible !important;
    padding-top: 0;
  }

  body.theme-light.profile-page {
    --profile-settings-screen-top: rgba(231, 237, 244, 0.985);
    --profile-settings-screen-body: #dde5ef;
    --profile-settings-screen-row: #edf3fa;
    --profile-settings-screen-row-strong: #e7eef7;
    --profile-settings-screen-border: rgba(148, 163, 184, 0.3);
    --profile-settings-screen-hairline: rgba(148, 163, 184, 0.22);
    --profile-settings-screen-label: #0f172a;
    --profile-settings-screen-muted: #5f6e82;
    --profile-settings-screen-link: #2563eb;
    --profile-settings-screen-save: #0f9f42;
    --profile-settings-screen-danger: #d97706;
    --profile-settings-screen-backdrop: rgba(15, 23, 42, 0.24);
  }

  body.home-page > header,
  body.profile-page > header {
    padding-top: calc(env(safe-area-inset-top) + 8px) !important;
    padding-right: 14px !important;
    padding-bottom: 6px !important;
    padding-left: 14px !important;
  }

  body.home-page > header {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    justify-content: initial !important;
    gap: 8px !important;
  }

  body.home-page > header::before {
    content: "";
    grid-column: 1;
    width: 38px;
    height: 1px;
  }

  body.home-page > header .brand {
    grid-column: 2;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
    justify-self: center;
    overflow: visible !important;
    gap: 10px !important;
  }

  body.home-page > header .brand .brand-icon {
    width: 26px !important;
    height: 26px !important;
  }

  body.home-page > header .brand h1 {
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.home-page > header .header-actions {
    grid-column: 3;
    justify-self: end;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 0 !important;
  }

  body.home-page > header #themeToggleBtn,
  body.home-page > header #btnLogout {
    display: none !important;
  }

  body.home-page > header #headerProfileButton {
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    cursor: pointer;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  body.home-page > header #headerProfileButton .header-profile-icon {
    width: 24px !important;
    height: 24px !important;
  }

  body.profile-page.profile-overlay-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.profile-page > header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: calc(var(--profile-header-height) + env(safe-area-inset-top)) !important;
    z-index: 100;
    isolation: isolate;
    overflow: visible !important;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: none !important;
    backface-visibility: visible;
    will-change: auto;
    transition: none !important;
  }

  body.profile-page > header.header-hidden {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.profile-page > header > .brand,
  body.profile-page > header .header-actions,
  body.profile-page > header #themeToggleBtn,
  body.profile-page > header #headerProfileButton,
  body.profile-page > header #btnLogout,
  body.profile-page .profile-topbar-actions,
  body.profile-page .site-footer {
    display: none !important;
  }

  body.profile-page .profile-mobile-header-title,
  body.profile-page .profile-mobile-header-btn,
  body.profile-page .profile-mobile-header-menu,
  body.profile-page .profile-settings-trigger,
  body.profile-page .profile-settings-backdrop,
  body.profile-page .profile-settings-sheet,
  body.profile-page .profile-share-sheet {
    display: block;
  }

  body.profile-page .profile-settings-backdrop {
    z-index: 120;
    background: var(--profile-settings-screen-backdrop);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  body.profile-page .profile-settings-sheet {
    top: var(--profile-settings-screen-top-gap);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(
      180deg,
      var(--profile-settings-screen-top) 0,
      var(--profile-settings-screen-top) calc(env(safe-area-inset-top) + 56px),
      var(--profile-settings-screen-body) calc(env(safe-area-inset-top) + 56px),
      var(--profile-settings-screen-body) 100%
    );
    box-shadow: none;
    opacity: 0;
    transform: translate3d(0, 100%, 0);
    transition:
      transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 260ms ease;
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 121;
  }

  body.profile-page .profile-settings-sheet.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  body.profile-page .profile-settings-sheet__chrome {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--profile-settings-screen-top);
    border-bottom: 1px solid var(--profile-settings-screen-border);
    box-shadow: none;
  }

  body.profile-page .profile-settings-sheet__title {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 84px;
    color: var(--profile-settings-screen-label);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
  }

  body.profile-page .profile-settings-sheet__nav {
    display: inline-flex !important;
    width: fit-content !important;
    min-width: 0;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    color: var(--profile-settings-screen-muted);
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 1;
    justify-content: flex-start;
    position: absolute;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  body.profile-page .profile-settings-sheet__nav:disabled {
    opacity: 0.45;
  }

  body.profile-page .profile-settings-sheet__nav--save {
    left: auto;
    right: 16px;
    color: var(--profile-settings-screen-save);
    font-weight: 700;
  }

  body.profile-page .profile-settings-sheet__nav--cancel {
    left: 16px;
    right: auto;
  }

  body.profile-page .profile-settings-sheet__body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 calc(26px + env(safe-area-inset-bottom));
    background: transparent;
  }

  body.profile-page .profile-settings-form {
    gap: 0;
  }

  body.profile-page .profile-settings-sheet__group {
    margin: 0;
  }

  body.profile-page .profile-settings-sheet__signed {
    min-height: 50px;
    padding: 0 16px;
    background: var(--profile-settings-screen-row-strong);
    border-top: 0;
    border-bottom: 1px solid var(--profile-settings-screen-border);
    color: var(--profile-settings-screen-muted);
    font-size: 17px;
    line-height: 1.3;
  }

  body.profile-page .profile-settings-sheet__signed strong {
    color: var(--profile-settings-screen-label);
    font-weight: 600;
  }

  body.profile-page .profile-settings-sheet__section-title {
    margin: 0;
    padding: 12px 16px 8px;
    color: rgba(171, 184, 201, 0.78);
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.18em;
  }

  body.theme-light.profile-page .profile-settings-sheet__section-title {
    color: rgba(95, 110, 130, 0.82);
  }

  body.profile-page .profile-settings-row,
  body.profile-page .profile-settings-sheet__avatar-row,
  body.profile-page .profile-settings-field {
    background: var(--profile-settings-screen-row);
    border-top: 1px solid var(--profile-settings-screen-hairline);
    box-shadow: none;
  }

  body.profile-page .profile-settings-row,
  body.profile-page .profile-settings-field {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 0 !important;
    box-sizing: border-box;
  }

  body.profile-page .profile-settings-row:last-child,
  body.profile-page .profile-settings-field:last-of-type {
    border-bottom: 1px solid var(--profile-settings-screen-border);
  }

  body.profile-page .profile-settings-row {
    border-radius: 0 !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  body.profile-page .profile-settings-row__label,
  body.profile-page .profile-settings-field__label,
  body.profile-page .profile-settings-sheet__avatar-title {
    color: var(--profile-settings-screen-label);
    font-size: 17px;
    line-height: 1.28;
  }

  body.profile-page .profile-settings-row__value,
  body.profile-page .profile-settings-row__chevron {
    color: rgba(187, 198, 213, 0.84);
  }

  body.theme-light.profile-page .profile-settings-row__value,
  body.theme-light.profile-page .profile-settings-row__chevron {
    color: rgba(95, 110, 130, 0.84);
  }

  body.profile-page .profile-settings-row__chevron {
    font-size: 30px;
    line-height: 1;
  }

  body.profile-page .profile-settings-row--danger {
    color: var(--profile-settings-screen-danger);
  }

  body.profile-page .profile-settings-row--danger .profile-settings-row__label {
    color: var(--profile-settings-screen-danger);
  }

  body.profile-page .profile-settings-sheet__avatar-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--profile-settings-screen-border);
    border-radius: 0 !important;
  }

  body.profile-page .profile-settings-sheet__avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    padding: 0;
    flex: 0 0 64px;
    display: block;
    border: 1px solid rgba(126, 154, 194, 0.22);
    border-radius: 50% !important;
    background: linear-gradient(180deg, rgba(88, 103, 124, 0.82), rgba(58, 71, 89, 0.94));
    box-shadow: none;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
  }

  body.profile-page .profile-settings-sheet__avatar-copy {
    gap: 0;
    align-items: flex-start;
  }

  body.profile-page .profile-settings-sheet__avatar-action {
    color: var(--profile-settings-screen-link);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  body.profile-page .profile-settings-sheet__nav:is(:hover, :focus, :focus-visible, :active),
  body.profile-page .profile-settings-row:is(:hover, :focus, :focus-visible, :active),
  body.profile-page .profile-settings-sheet__avatar-action:is(:hover, :focus, :focus-visible, :active),
  body.profile-page .profile-settings-sheet__avatar:is(:hover, :focus, :focus-visible, :active) {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.profile-page #profileMobileSettingsButton,
  body.profile-page #profileMobileShareButton,
  body.profile-page #profileMenuButton {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  body.profile-page #profileMobileSettingsButton:is(:hover, :focus, :focus-visible, :active),
  body.profile-page #profileMobileShareButton:is(:hover, :focus, :focus-visible, :active),
  body.profile-page #profileMenuButton:is(:hover, :focus, :focus-visible, :active),
  body.profile-page #profileMenuButton.is-active {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
  }

  body.profile-page .profile-settings-field {
    grid-template-columns: minmax(104px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding-top: 0;
    padding-bottom: 0;
  }

  body.profile-page .profile-settings-sheet__rows--fields {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--profile-settings-screen-hairline);
    border-bottom: 1px solid var(--profile-settings-screen-border);
    background: var(--profile-settings-screen-row);
    overflow: hidden;
  }

  body.profile-page .profile-settings-sheet__group + .profile-settings-sheet__group {
    margin-top: 0;
  }

  body.profile-page .profile-settings-sheet__rows--fields .profile-settings-field {
    width: 100%;
    margin: 0;
    border-top: 1px solid var(--profile-settings-screen-border);
    border-bottom: 0;
  }

  body.profile-page .profile-settings-sheet__rows--fields .profile-settings-field:first-child {
    border-top: 0;
  }

  body.profile-page .profile-settings-field__label {
    font-size: 16px;
  }

  body.profile-page .profile-settings-field__input {
    min-height: 50px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(193, 205, 220, 0.9);
    font-size: 16px;
    text-align: right;
    box-shadow: none;
    caret-color: var(--profile-settings-screen-label);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.theme-light.profile-page .profile-settings-field__input {
    color: rgba(71, 85, 105, 0.95);
    background: transparent;
  }

  body.profile-page .profile-settings-field__input::placeholder {
    color: rgba(171, 184, 201, 0.52);
    text-align: right;
  }

  body.theme-light.profile-page .profile-settings-field__input::placeholder {
    color: rgba(95, 110, 130, 0.6);
  }

  body.profile-page .profile-settings-field:focus-within {
    background: rgba(67, 81, 99, 0.98);
  }

  body.theme-light.profile-page .profile-settings-field:focus-within {
    background: rgba(255, 255, 255, 0.96);
  }

  body.profile-page .profile-settings-field__input:focus {
    outline: none;
  }

  body.profile-page .profile-settings-sheet__avatar-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  body.profile-page .profile-settings-sheet__avatar-image[hidden] {
    display: none;
  }

  body.profile-page .profile-settings-sheet__avatar:disabled,
  body.profile-page .profile-settings-sheet__avatar-action:disabled,
  body.profile-page .profile-settings-row:disabled {
    opacity: 0.55;
  }

  body.profile-page .profile-settings-sheet__status {
    min-height: 20px;
    padding: 4px 16px 0;
    margin-bottom: env(safe-area-inset-bottom);
    color: var(--profile-settings-screen-muted);
    font-size: 13px;
    line-height: 1.45;
  }

  body.profile-page .profile-mobile-header-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: auto;
    touch-action: manipulation;
  }

  body.profile-page .profile-mobile-header-btn:hover,
  body.profile-page .profile-mobile-header-btn:focus-visible,
  body.profile-page .profile-mobile-header-btn:active {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
  }

  body.profile-page .profile-mobile-header-btn svg {
    width: 20px !important;
    height: 20px !important;
  }

  body.profile-page #profileMobileSettingsButton svg {
    width: 22px !important;
    height: 22px !important;
  }

  body.profile-page #profileMobileSettingsButton {
    grid-column: 1;
    justify-self: start;
  }

  body.profile-page .profile-mobile-header-menu {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-self: end;
    pointer-events: auto;
    z-index: 3;
  }

  body.profile-page .profile-mobile-header-title {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
  }

  body.profile-page .profile-mobile-header-brand {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto;
  }

  body.profile-page .profile-mobile-header-brand.brand .brand-icon {
    width: 26px !important;
    height: 26px !important;
  }

  body.profile-page .profile-mobile-header-title .profile-mobile-header-brand.brand h1 {
    font-size: 16px !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  body.theme-light.profile-page .profile-mobile-header-title {
    color: #0f172a;
  }

  body.profile-page .profile-topbar {
    padding-top: 0 !important;
    margin-top: -20px !important;
  }

  body.profile-page .profile-topbar-main,
  body.profile-page .profile-topbar-primary {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  body.profile-page .profile-avatar-upload--header {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 50%;
    margin-top: -16px;
  }

  body.profile-page .profile-topbar-copy {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
  }

  body.profile-page .profile-display-name {
    font-size: 20px;
    line-height: 1.18;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
  }

  body.profile-page .profile-main {
    padding-top: calc(var(--profile-header-height) + env(safe-area-inset-top) + 8px) !important;
    padding-bottom: 28px !important;
  }

  body.home-page > header {
    min-height: var(--site-header-height) !important;
    gap: 8px !important;
  }
}

@media (min-width: 769px) {
  body.home-page > header {
    min-height: 80px !important;
    padding-top: 16px !important;
    padding-bottom: 14px !important;
  }

  body.profile-page {
    --profile-header-height: 80px;
  }

  body.profile-page > header {
    min-height: var(--profile-header-height) !important;
    padding-top: 14px !important;
    padding-bottom: 12px !important;
  }
}

@media (max-width: 768px) {
  body.profile-page > header,
  body.profile-page > header.header-hidden {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
  }

  body.profile-page .profile-main {
    padding-top: calc(var(--profile-header-height) + env(safe-area-inset-top) + 16px) !important;
  }

  body.profile-page .profile-topbar {
    margin-top: -6px !important;
  }

  body.profile-page .profile-avatar-upload--header {
    margin-top: 4px !important;
  }

  body.profile-page .profile-projects-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
    padding-top: 6px !important;
    overflow: visible !important;
    scrollbar-width: none;
  }

  body.profile-page .profile-projects-filters::-webkit-scrollbar {
    display: none;
  }

  body.profile-page .profile-filter-tab.lg-btn--pill {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 0 !important;
    padding: 0 10px !important;
  }

  body.profile-page .profile-filter-tab .lg-btn__label {
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 480px) {
  body.profile-page .profile-projects-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.profile-page .profile-filter-tab.lg-btn--pill {
    padding: 0 8px !important;
  }
}

@media (max-width: 768px) {
  body.home-page .tabs,
  body.home-page .wizard-steps-nav,
  body.home-page .journal-status-filters,
  body.home-page .summary-text-controls,
  body.home-page #sectionKnowledge .knowledge-view-toggle,
  body.home-page #sectionKnowledge .knowledge-category-filter,
  body.profile-page .profile-feed-tabs {
    padding-top: max(6px, var(--mobile-button-bleed-space, 6px)) !important;
    margin-top: max(8px, var(--mobile-button-row-gap, 8px)) !important;
  }

  body.home-page .journal-status-filters,
  body.profile-page .profile-feed-tabs {
    overflow: visible !important;
  }

  body.home-page .tabs,
  body.home-page .wizard-steps-nav,
  body.home-page .summary-text-controls,
  body.home-page #sectionKnowledge .knowledge-view-toggle,
  body.home-page #sectionKnowledge .knowledge-category-filter {
    overflow-y: visible !important;
  }
}

.server-status-badge,
#serverStatusBadge {
  display: none !important;
}

@media (max-width: 768px) {
  body.home-page #summary .summary-text-controls {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: max(6px, var(--mobile-button-bleed-space, 6px)) 34px 8px 2px !important;
    margin: max(8px, var(--mobile-button-row-gap, 8px)) -2px 0 !important;
    scroll-snap-type: x proximity !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    mask-image: linear-gradient(to right, black 0, black calc(100% - 34px), transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 34px), transparent 100%) !important;
  }

  body.home-page #summary .summary-text-controls::-webkit-scrollbar {
    display: none !important;
  }

  body.home-page #summary .summary-text-controls .btn-small.lg-btn.lg-btn--pill {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 150px !important;
    min-height: 48px !important;
    padding: 0 18px !important;
    scroll-snap-align: start !important;
  }

  body.home-page #summary .summary-text-controls .lg-btn__label {
    white-space: nowrap !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  body.home-page #summary .summary-workspace-carousel {
    --summary-mobile-slide-width: 100%;
    height: clamp(420px, calc(100svh - 260px), 560px) !important;
    max-height: clamp(420px, calc(100svh - 260px), 560px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-radius: 18px !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  body.home-page #summary .summary-text-content {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.home-page #summary .summary-workspace-carousel::-webkit-scrollbar {
    display: none !important;
  }

  body.home-page #summary .summary-workspace-track {
    transform: none !important;
    transition: none !important;
    width: max-content !important;
    min-width: 100% !important;
    align-items: stretch !important;
    height: 100% !important;
  }

  body.home-page #summary .summary-workspace-page {
    flex: 0 0 var(--summary-mobile-slide-width, 100%) !important;
    width: var(--summary-mobile-slide-width, 100%) !important;
    max-width: var(--summary-mobile-slide-width, 100%) !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.home-page #summary .summary-workspace-page--analytics {
    display: contents !important;
    flex: initial !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
  }

  body.home-page #summary .summary-analytics-panel,
  body.home-page #summary #analyticsBlockContainer,
  body.home-page #summary #analyticsBlock,
  body.home-page #summary #analyticsContent,
  body.home-page #summary .analytics-carousel,
  body.home-page #summary .analytics-pages-track {
    display: contents !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
  }

  body.home-page #summary .summary-analytics-panel-header,
  body.home-page #summary .analytics-carousel-nav {
    display: none !important;
  }

  body.home-page #summary .analytics-page {
    flex: 0 0 var(--summary-mobile-slide-width, 100%) !important;
    width: var(--summary-mobile-slide-width, 100%) !important;
    max-width: var(--summary-mobile-slide-width, 100%) !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    box-sizing: border-box !important;
    padding-right: 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.home-page #summary .summary-workspace-nav,
  body.home-page #summary #summaryWorkspacePrev,
  body.home-page #summary #summaryWorkspaceNext,
  body.home-page #summary #summaryWorkspaceIndicator {
    display: none !important;
  }
}

/* Knowledge base: card layout matching the reference screen. */
body.home-page #sectionKnowledge {
  color: #e5edf8;
}

body.home-page #sectionKnowledge .knowledge-header {
  align-items: center;
  margin-bottom: 34px;
}

body.home-page #sectionKnowledge .knowledge-header h2 {
  color: #f8fafc;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 750;
}

body.home-page #sectionKnowledge .knowledge-stats {
  gap: 22px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 500;
}

body.home-page #sectionKnowledge .subtitle {
  margin: 0 0 24px;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1.45;
}

body.home-page #sectionKnowledge .knowledge-search-bar {
  display: grid;
  grid-template-columns: minmax(280px, 615px) 150px;
  align-items: center;
  gap: 10px;
  margin: 0 0 36px;
}

body.home-page #sectionKnowledge .knowledge-search-bar input {
  width: 100%;
  max-width: none;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #46556b;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.56);
  color: #e5edf8;
  font-size: 16px;
  box-shadow: none;
}

body.home-page #sectionKnowledge .knowledge-search-bar input::placeholder {
  color: #e2e8f0;
  opacity: 0.95;
}

body.home-page #sectionKnowledge #btnAllArticles.lg-btn,
body.home-page #sectionKnowledge #btnKnowledgeSearch.lg-btn,
body.home-page #sectionKnowledge #btnCategorySearch.lg-btn {
  height: 44px;
  min-width: 150px;
  padding: 0 22px;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.7);
  color: #e5edf8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  transform: none;
}

body.home-page #sectionKnowledge #btnKnowledgeSearch.lg-btn {
  height: 56px;
}

body.home-page #sectionKnowledge .normative-assistant {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)),
    rgba(15, 23, 42, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(2, 6, 23, 0.16);
}

body.home-page #sectionKnowledge .normative-assistant__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body.home-page #sectionKnowledge .normative-assistant__head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.25;
}

body.home-page #sectionKnowledge .normative-assistant__head p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

body.home-page #sectionKnowledge .normative-assistant__badge,
body.home-page #sectionKnowledge .normative-assistant__status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(2, 6, 23, 0.28);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

body.home-page #sectionKnowledge .normative-assistant__controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(160px, 0.7fr) minmax(240px, 1.45fr) auto;
  align-items: start;
  gap: 10px;
}

body.home-page #sectionKnowledge .normative-assistant__controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #aebdd1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

body.home-page #sectionKnowledge .normative-assistant__controls select,
body.home-page #sectionKnowledge .normative-assistant__controls input {
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid #46556b;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.58);
  color: #f8fafc;
  font-size: 14px;
}

body.home-page #sectionKnowledge .normative-assistant__action {
  display: grid;
  gap: 10px;
  align-content: start;
}

body.home-page #sectionKnowledge .normative-assistant__action::before {
  content: "";
  display: block;
  height: 13px;
}

body.home-page #sectionKnowledge #btnNormativeAssistantAsk.lg-btn {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  min-width: 86px !important;
  max-width: 96px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1;
  align-self: start;
}

body.home-page #sectionKnowledge .normative-assistant__result {
  min-height: 64px;
}

body.home-page #sectionKnowledge .normative-assistant__empty {
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.22);
  color: #cbd5e1;
  font-size: 13px;
}

body.home-page #sectionKnowledge .normative-assistant__answer {
  display: grid;
  gap: 12px;
}

body.home-page #sectionKnowledge .normative-assistant__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

body.home-page #sectionKnowledge .normative-assistant__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

body.home-page #sectionKnowledge .normative-assistant__summary h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.3;
}

body.home-page #sectionKnowledge .normative-assistant__summary p {
  margin: 5px 0 0;
  color: #dbe5f2;
  font-size: 13px;
  line-height: 1.45;
}

body.home-page #sectionKnowledge .normative-assistant__source {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

body.home-page #sectionKnowledge .normative-assistant__source:hover {
  border-color: rgba(147, 197, 253, 0.48);
  background: rgba(59, 130, 246, 0.18);
  color: #eff6ff;
}

body.home-page #sectionKnowledge .normative-assistant__status--object {
  align-self: flex-start;
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(22, 163, 74, 0.14);
  color: #bbf7d0;
}

body.home-page #sectionKnowledge .normative-assistant__status--factory {
  align-self: flex-start;
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
}

body.home-page #sectionKnowledge .normative-assistant__status--disabled {
  align-self: flex-start;
  color: #cbd5e1;
}

body.home-page #sectionKnowledge .normative-assistant__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

body.home-page #sectionKnowledge .normative-assistant__columns section,
body.home-page #sectionKnowledge .normative-assistant__articles {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body.home-page #sectionKnowledge .normative-assistant__columns h5,
body.home-page #sectionKnowledge .normative-assistant__articles h5 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.3;
}

body.home-page #sectionKnowledge .normative-assistant__columns ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}

body.home-page #sectionKnowledge .normative-assistant__columns li span {
  color: #97a9bd;
}

body.home-page #sectionKnowledge .normative-assistant__more {
  color: #93c5fd;
  list-style: none;
  margin-left: -18px;
  font-weight: 700;
}

body.home-page #sectionKnowledge .normative-assistant__columns a {
  color: #93c5fd;
}

body.home-page #sectionKnowledge .normative-assistant__articles div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.home-page #sectionKnowledge .normative-assistant__articles button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

body.home-page #sectionKnowledge .normative-assistant__articles button:hover {
  border-color: rgba(147, 197, 253, 0.5);
  background: rgba(59, 130, 246, 0.2);
  color: #eff6ff;
}

body.home-page #sectionKnowledge #btnAllArticles .lg-btn__glow,
body.home-page #sectionKnowledge #btnKnowledgeSearch .lg-btn__glow,
body.home-page #sectionKnowledge #btnCategorySearch .lg-btn__glow {
  display: none;
}

body.home-page #sectionKnowledge .knowledge-category-label {
  margin: 0 0 36px;
  color: #8fa0b7;
  font-size: 20px;
  font-weight: 700;
}

body.home-page #sectionKnowledge .knowledge-subcategories {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 38px !important;
  margin-top: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 24px !important;
  color: #8fa0b7 !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c4b5fd;
  font-size: 20px;
  font-weight: 800;
}

body.home-page #sectionKnowledge .knowledge-construction-cards {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  gap: 38px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card {
  min-height: 300px;
  padding: 50px 26px 28px !important;
  border: 1px solid #46556b !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.64) !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__header {
  display: block;
  margin: 0 0 28px;
}

body.home-page #sectionKnowledge .knowledge-construction-card h4 {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  color: #f8fafc !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 760 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__icon {
  display: inline-flex !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #c4b5fd !important;
  font-size: 19px !important;
  font-weight: 800 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__chevron,
body.home-page #sectionKnowledge .knowledge-construction-subtypes,
body.home-page #sectionKnowledge .knowledge-construction-card__note {
  display: none !important;
}

body.home-page #sectionKnowledge .knowledge-module-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-list li.knowledge-module-item,
body.home-page #sectionKnowledge .knowledge-module-item {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__label {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #60a5fa !important;
  box-shadow: none !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__label:hover,
body.home-page #sectionKnowledge .knowledge-module-item__label:focus-visible {
  color: #93c5fd !important;
  background: transparent !important;
  text-decoration: none !important;
  outline: none !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__note {
  display: inline !important;
  min-height: 0 !important;
  margin-left: 8px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #7f8fa6 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label {
  color: #7f8fa6 !important;
  cursor: default !important;
}

body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:hover,
body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:focus-visible {
  color: #7f8fa6 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-header h2,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card h4,
body.theme-light.home-page #sectionKnowledge .knowledge-stats {
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .subtitle,
body.theme-light.home-page #sectionKnowledge .knowledge-category-label,
body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
  color: #64748b !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-search-bar input,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-search-bar input {
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-search-bar input::placeholder {
  color: #334155 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-module-item__label {
  color: #2563eb !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label,
body.theme-light.home-page #sectionKnowledge .knowledge-module-item__note {
  color: #94a3b8 !important;
}

@media (max-width: 900px) {
  body.home-page #sectionKnowledge .knowledge-search-bar {
    grid-template-columns: 1fr;
  }

  body.home-page #sectionKnowledge .knowledge-construction-cards {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card {
    min-height: 0;
    padding-top: 34px !important;
  }
}

@media (max-width: 520px) {
  body.home-page #sectionKnowledge .knowledge-header {
    gap: 14px;
  }

  body.home-page #sectionKnowledge .knowledge-header h2 {
    font-size: 24px;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card h4 {
    font-size: 20px !important;
  }

  body.home-page #sectionKnowledge .knowledge-module-item__label {
    font-size: 18px !important;
  }
}

/* Knowledge base legacy visual style with the current construction matrix. */
body.home-page #sectionKnowledge .knowledge-header {
  margin-bottom: 18px !important;
}

body.home-page #sectionKnowledge .knowledge-header h2 {
  color: #f1f5f9 !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-stats {
  gap: 14px !important;
  color: #e2e8f0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.home-page #sectionKnowledge .subtitle {
  margin: 0 0 18px !important;
  color: #94a3b8 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

body.home-page #sectionKnowledge .knowledge-search-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 28px !important;
}

body.home-page #sectionKnowledge .knowledge-search-bar input {
  width: 100% !important;
  max-width: 360px !important;
  height: auto !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
  border: 1px solid #475569 !important;
  border-radius: 8px !important;
  background: #1e293b !important;
  color: #f1f5f9 !important;
  font-size: 15px !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-search-bar input::placeholder {
  color: #94a3b8 !important;
}

body.home-page #sectionKnowledge #btnAllArticles.lg-btn,
body.home-page #sectionKnowledge #btnKnowledgeSearch.lg-btn,
body.home-page #sectionKnowledge #btnCategorySearch.lg-btn {
  height: auto !important;
  min-height: 40px !important;
  min-width: 120px !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  border-radius: 999px !important;
  background: rgba(51, 65, 85, 0.6) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.home-page #sectionKnowledge .knowledge-category-label {
  margin: 0 0 18px !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategories {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 24px !important;
  margin-top: 24px !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group {
  padding: 20px !important;
  border: 1px solid #475569 !important;
  border-radius: 8px !important;
  background: #1e293b !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 16px !important;
  color: #f1f5f9 !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group h3 span {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #c4b5fd !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-cards {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card {
  min-height: 0 !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.32) !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__header {
  display: block !important;
  margin: 0 0 12px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card h4 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  color: #f1f5f9 !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #c4b5fd !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__chevron,
body.home-page #sectionKnowledge .knowledge-construction-subtypes,
body.home-page #sectionKnowledge .knowledge-construction-card__note {
  display: none !important;
}

body.home-page #sectionKnowledge .knowledge-module-list {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-list li.knowledge-module-item,
body.home-page #sectionKnowledge .knowledge-module-item {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__label {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #60a5fa !important;
  box-shadow: none !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__label:hover,
body.home-page #sectionKnowledge .knowledge-module-item__label:focus-visible {
  color: #93c5fd !important;
  background: transparent !important;
  text-decoration: underline !important;
  outline: none !important;
}

body.home-page #sectionKnowledge .knowledge-module-item__note {
  display: inline !important;
  margin-left: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label {
  color: #94a3b8 !important;
  cursor: default !important;
}

body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:hover,
body.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label:focus-visible {
  color: #94a3b8 !important;
  text-decoration: none !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group {
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border-color: #c9d7ea !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-construction-card,
body.theme-light.home-page #sectionKnowledge .knowledge-search-bar input {
  background: #ffffff !important;
  border-color: #d8e3f3 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-header h2,
body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group h3,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card h4,
body.theme-light.home-page #sectionKnowledge .knowledge-search-bar input {
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .subtitle,
body.theme-light.home-page #sectionKnowledge .knowledge-category-label,
body.theme-light.home-page #sectionKnowledge .knowledge-stats {
  color: #64748b !important;
}

@media (max-width: 700px) {
  body.home-page #sectionKnowledge .knowledge-search-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.home-page #sectionKnowledge .knowledge-search-bar input {
    max-width: none !important;
  }
}

/* Knowledge base clean article catalog style. */
body.home-page #sectionKnowledge .knowledge-subcategories {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  align-items: start !important;
  gap: 22px !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group {
  padding: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 10px !important;
  background: rgba(30, 41, 59, 0.72) !important;
  box-shadow: none !important;
}

body.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
  margin-bottom: 16px !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-cards {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 166px !important;
  padding: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.32) !important;
  cursor: pointer !important;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card:hover,
body.home-page #sectionKnowledge .knowledge-construction-card:focus-visible {
  border-color: rgba(96, 165, 250, 0.42) !important;
  background: rgba(30, 41, 59, 0.5) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 14px !important;
  margin: 0 0 12px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card h4 {
  margin: 0 !important;
  font-size: 19px !important;
  line-height: 1.32 !important;
  color: #f8fafc !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__icon {
  width: 32px !important;
  min-width: 32px !important;
  height: 30px !important;
  border: 1px solid rgba(96, 165, 250, 0.22) !important;
  border-radius: 7px !important;
  background: rgba(96, 165, 250, 0.1) !important;
  color: #93c5fd !important;
  font-size: 11px !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__chevron {
  display: inline-flex !important;
  color: #94a3b8 !important;
  font-size: 26px !important;
  line-height: 1 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__subtitle {
  margin: 0 0 18px !important;
  color: #aebdd0 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: auto !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__count {
  color: #94a3b8 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-card__action {
  color: #bfdbfe !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body.home-page #sectionKnowledge .knowledge-module-status {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 20px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  background: rgba(15, 23, 42, 0.28) !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

body.home-page #sectionKnowledge .knowledge-module-status--object_control {
  border-color: rgba(34, 197, 94, 0.2) !important;
  background: rgba(34, 197, 94, 0.1) !important;
  color: #86efac !important;
}

body.home-page #sectionKnowledge .knowledge-module-status--factory_control {
  border-color: rgba(245, 158, 11, 0.22) !important;
  background: rgba(245, 158, 11, 0.1) !important;
  color: #fbbf24 !important;
}

body.home-page #sectionKnowledge .knowledge-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}

body.home-page #sectionKnowledge .knowledge-article-meta span {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.52);
  font-size: 12px;
}

body.home-page #sectionKnowledge .knowledge-construction-overview {
  grid-column: 1 / -1 !important;
  padding: 22px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.34) !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview h3 {
  margin: 0 0 10px !important;
  color: #f8fafc !important;
  font-size: 26px !important;
  line-height: 1.25 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview h4 {
  margin: 18px 0 10px !important;
  color: #e2e8f0 !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview p,
body.home-page #sectionKnowledge .knowledge-construction-overview li,
body.home-page #sectionKnowledge .knowledge-article-card__meta {
  color: #aebdd0 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview__muted {
  color: #94a3b8 !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview__block ul {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview__block li {
  display: grid !important;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: baseline !important;
}

body.home-page #sectionKnowledge .knowledge-construction-overview__block button {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #60a5fa !important;
  font: inherit !important;
  font-weight: 700 !important;
  text-align: left !important;
  cursor: pointer !important;
}

body.home-page #sectionKnowledge .knowledge-article-card {
  padding: 14px 16px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.home-page #sectionKnowledge .knowledge-article-card__status {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 8px !important;
  padding: 3px 9px !important;
  border: 1px solid rgba(96, 165, 250, 0.26) !important;
  border-radius: 999px !important;
  background: rgba(37, 99, 235, 0.12) !important;
  color: #c7d2fe !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
}

body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 5px 14px !important;
  align-items: center !important;
  padding: 12px 14px !important;
}

body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-title {
  margin: 0 !important;
  padding-right: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-card__meta {
  margin: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-card__status {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  margin-top: 0 !important;
}

body.home-page #sectionKnowledge .knowledge-article-title {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

body.home-page #sectionKnowledge .knowledge-articles-grid {
  gap: 14px !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-overview {
  background: #ffffff !important;
  border-color: #d8e3f3 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-construction-card:hover,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card:focus-visible {
  background: #f8fbff !important;
  border-color: #93c5fd !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-construction-card h4,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-overview h3,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-overview h4 {
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant,
body.theme-light.home-page #sectionKnowledge .normative-assistant__summary,
body.theme-light.home-page #sectionKnowledge .normative-assistant__columns section,
body.theme-light.home-page #sectionKnowledge .normative-assistant__articles {
  background: #ffffff !important;
  border-color: #d8e3f3 !important;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__head h3,
body.theme-light.home-page #sectionKnowledge .normative-assistant__summary h4,
body.theme-light.home-page #sectionKnowledge .normative-assistant__columns h5,
body.theme-light.home-page #sectionKnowledge .normative-assistant__articles h5 {
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__head p,
body.theme-light.home-page #sectionKnowledge .normative-assistant__summary p,
body.theme-light.home-page #sectionKnowledge .normative-assistant__columns ul,
body.theme-light.home-page #sectionKnowledge .normative-assistant__empty {
  color: #334155 !important;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__badge,
body.theme-light.home-page #sectionKnowledge .normative-assistant__controls select,
body.theme-light.home-page #sectionKnowledge .normative-assistant__controls input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__source {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__source:hover {
  border-color: rgba(37, 99, 235, 0.44);
  background: rgba(37, 99, 235, 0.14);
  color: #1e40af;
}

body.theme-light.home-page #sectionKnowledge .normative-assistant__controls label,
body.theme-light.home-page #sectionKnowledge .normative-assistant__columns li span {
  color: #475569 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-article-card__status {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1e40af !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-construction-card__subtitle,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-card__count,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-overview p,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-overview li,
body.theme-light.home-page #sectionKnowledge .knowledge-article-card__meta {
  color: #64748b !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-module-item__label {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-module-item.is-disabled .knowledge-module-item__label,
body.theme-light.home-page #sectionKnowledge .knowledge-module-item--not_applicable .knowledge-module-item__label {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-module-status,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-subtypes span,
body.theme-light.home-page #sectionKnowledge .knowledge-control-legend__item,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-status,
body.theme-light.home-page #sectionKnowledge .knowledge-article-meta span {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-control-legend__item--article,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-status--working_geometry {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-control-legend__item--object_control,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-status--object_control {
  background: #ecfdf5 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}

body.theme-light.home-page #sectionKnowledge .knowledge-control-legend__item--factory_control,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-status--factory_control,
body.theme-light.home-page #sectionKnowledge .knowledge-construction-status--mixed_control {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}

@media (max-width: 760px) {
  body.home-page #sectionKnowledge .knowledge-subcategories {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 700px) {
  body.home-page #sectionKnowledge .knowledge-subcategory-group h3,
  body.home-page #sectionKnowledge .knowledge-construction-overview h3 {
    font-size: 23px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card h4,
  body.home-page #sectionKnowledge .knowledge-article-title {
    font-size: 18px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-overview__block li {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

@media (max-width: 760px) {
  body.home-page #knowledge,
  body.home-page #sectionKnowledge,
  body.home-page #knowledgeMainPage,
  body.home-page #knowledgeCategoryPage,
  body.home-page #knowledgeArticlePage {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.home-page #sectionKnowledge {
    padding-inline: 0 !important;
  }

  body.home-page #sectionKnowledge .knowledge-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  body.home-page #sectionKnowledge .knowledge-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
  }

  body.home-page #sectionKnowledge .knowledge-stats {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    font-size: 14px !important;
  }

  body.home-page #sectionKnowledge .subtitle {
    margin-bottom: 18px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  body.home-page #sectionKnowledge .knowledge-search-bar,
  body.home-page #sectionKnowledge .knowledge-search-controls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
  }

  body.home-page #sectionKnowledge .knowledge-search-bar input,
  body.home-page #sectionKnowledge .knowledge-search-controls input {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }

  body.home-page #sectionKnowledge #btnAllArticles,
  body.home-page #sectionKnowledge #btnKnowledgeSearch,
  body.home-page #sectionKnowledge #btnCategorySearch,
  body.home-page #sectionKnowledge #btnNormativeAssistantAsk,
  body.home-page #sectionKnowledge #btnBackToKnowledgeMain,
  body.home-page #sectionKnowledge #btnBackToArticles {
    min-height: 44px !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  body.home-page #sectionKnowledge .normative-assistant {
    padding: 12px !important;
    border-radius: 10px !important;
  }

  body.home-page #sectionKnowledge .normative-assistant__head,
  body.home-page #sectionKnowledge .normative-assistant__summary {
    display: grid !important;
  }

  body.home-page #sectionKnowledge .normative-assistant__controls,
  body.home-page #sectionKnowledge .normative-assistant__columns {
    grid-template-columns: 1fr !important;
  }

  body.home-page #sectionKnowledge .normative-assistant__status {
    justify-self: start !important;
  }

  body.home-page #sectionKnowledge .knowledge-category-label {
    margin: 22px 0 14px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategories,
  body.home-page #sectionKnowledge .knowledge-construction-cards,
  body.home-page #sectionKnowledge .knowledge-articles-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group,
  body.home-page #sectionKnowledge .knowledge-construction-card,
  body.home-page #sectionKnowledge .knowledge-article-card,
  body.home-page #sectionKnowledge .knowledge-construction-overview,
  body.home-page #sectionKnowledge .knowledge-article-view {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group {
    padding: 14px !important;
    border-radius: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
    margin-bottom: 12px !important;
    font-size: 19px !important;
    line-height: 1.3 !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card {
    min-height: 0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card h4 {
    min-width: 0 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__icon {
    margin-right: 8px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__chevron {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 auto !important;
    color: #93c5fd !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__subtitle {
    margin: 10px 0 14px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__footer {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__count,
  body.home-page #sectionKnowledge .knowledge-construction-card__action {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  body.home-page #sectionKnowledge .knowledge-category-header,
  body.home-page #sectionKnowledge .knowledge-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  body.home-page #sectionKnowledge .knowledge-category-header h2 {
    font-size: 24px !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }

  body.home-page #sectionKnowledge .knowledge-view-toggle {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.home-page #sectionKnowledge .knowledge-view-toggle button {
    min-height: 40px !important;
    flex: 1 0 auto !important;
  }

  body.home-page #sectionKnowledge .knowledge-breadcrumbs {
    display: flex !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-card {
    padding: 14px !important;
    border-radius: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-title {
    font-size: 16px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-view {
    padding: 16px 12px !important;
    border-radius: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-view h1 {
    font-size: 24px !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }

  body.home-page #sectionKnowledge .article-content,
  body.home-page #sectionKnowledge .knowledge-article-content {
    font-size: 15px !important;
    line-height: 1.6 !important;
    overflow-wrap: anywhere !important;
  }

  body.home-page #sectionKnowledge .article-content table,
  body.home-page #sectionKnowledge .article-content pre,
  body.home-page #sectionKnowledge .knowledge-article-content table,
  body.home-page #sectionKnowledge .knowledge-article-content pre {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  body.home-page #sectionKnowledge .knowledge-scroll-top-btn {
    right: 12px !important;
    bottom: 76px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 760px) {
  body.home-page #sectionKnowledge .knowledge-category-label {
    margin: 18px 0 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategories {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    margin-top: 12px !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
    margin: 0 0 10px !important;
    color: #cbd5e1 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group h3 span {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
    border-radius: 7px !important;
    background: rgba(96, 165, 250, 0.1) !important;
    color: #93c5fd !important;
    font-size: 11px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card {
    display: grid !important;
    min-height: 112px !important;
    padding: 12px !important;
    border-radius: 8px !important;
    align-content: space-between !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__header {
    gap: 8px !important;
    margin: 0 !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card h4 {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 7px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__icon {
    width: 26px !important;
    min-width: 26px !important;
    height: 24px !important;
    margin: 0 !important;
    font-size: 10px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__chevron {
    width: 22px !important;
    height: 22px !important;
    font-size: 22px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__subtitle {
    display: none !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__footer {
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top-color: rgba(148, 163, 184, 0.12) !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__count,
  body.home-page #sectionKnowledge .knowledge-construction-card__action {
    font-size: 11px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__action {
    display: none !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-overview {
    display: none !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-card {
    display: grid !important;
    gap: 6px !important;
    padding: 13px 14px !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-title {
    margin-bottom: 0 !important;
    padding-right: 0 !important;
    font-size: 16px !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-card__meta {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-card {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  body.home-page #sectionKnowledge .knowledge-article-card__status {
    margin-top: 6px !important;
    font-size: 11px !important;
  }

  body.home-page #sectionKnowledge .knowledge-articles-grid.list-view .knowledge-article-card__status {
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: start !important;
  }

  body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  body.theme-light.home-page #sectionKnowledge .knowledge-subcategory-group h3 {
    color: #334155 !important;
  }

}

@media (max-width: 420px) {
  body.home-page #sectionKnowledge .knowledge-stats {
    grid-template-columns: 1fr !important;
  }

  body.home-page #sectionKnowledge #btnAllArticles,
  body.home-page #sectionKnowledge #btnKnowledgeSearch,
  body.home-page #sectionKnowledge #btnCategorySearch,
  body.home-page #sectionKnowledge #btnBackToKnowledgeMain,
  body.home-page #sectionKnowledge #btnBackToArticles {
    width: 100% !important;
  }

  body.home-page #sectionKnowledge .knowledge-subcategory-group,
  body.home-page #sectionKnowledge .knowledge-construction-card,
  body.home-page #sectionKnowledge .knowledge-article-card {
    padding: 12px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-cards {
    grid-template-columns: 1fr !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card h4 {
    font-size: 15px !important;
  }

  body.home-page #sectionKnowledge .knowledge-construction-card__footer {
    align-items: center !important;
    flex-direction: row !important;
  }
}



/* =========================
   MOBILE VIEWPORT + SAFE AREA FIXES
   ========================= */

@media (max-width: 768px) {
  body.home-page {
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
  }

  body.profile-page > header,
  body.profile-page > header.header-hidden {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    max-height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    contain: layout paint;
  }

  body.home-page main {
    padding-bottom: var(--mobile-content-bottom-space) !important;
  }

  body.profile-page .profile-settings-sheet__body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .site-footer,
  body:is(.home-page, .profile-page) .site-footer {
    display: none !important;
  }

  #bottomNav.bottom-nav.floating,
  .bottom-nav.floating {
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    left: max(10px, env(safe-area-inset-left, 0px)) !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    transform: none !important;
    min-height: 64px !important;
    padding: 7px 8px !important;
  }


  .wizard-footer {
    bottom: calc(var(--mobile-content-bottom-space) + 10px) !important;
  }

  .offline-indicator {
    bottom: calc(var(--mobile-content-bottom-space) + 8px) !important;
  }

  body.sheet-open .bottom-nav,
  body.scope-scroll-locked .bottom-nav {
    pointer-events: none;
  }

  body.profile-page .profile-menu-item--mobile-link {
    display: flex;
  }
}

@media (min-width: 769px) {
  body.profile-page .profile-menu-item--mobile-link {
    display: none;
  }
}

@supports (height: 100svh) {
  @media (max-width: 768px) {
    body.login-page {
      min-height: 100svh;
      height: 100svh;
    }
  }
}

@supports (height: 100dvh) {
  @media (max-width: 768px) {
    body.login-page {
      min-height: 100dvh;
      height: 100dvh;
    }
  }
}

@media (max-width: 768px) {
  html:has(body.login-page) {
    width: 100%;
    min-height: 100%;
    overflow: hidden !important;
    background: #0f172a;
  }

  body.login-page {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    overscroll-behavior: none;
    align-items: center !important;
    justify-content: center !important;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px)) !important;
    background-color: #0f172a;
    background-attachment: scroll;
  }

  body.login-page::before {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    transform: translateZ(0);
  }

  body.login-page .auth-card--login {
    width: min(440px, calc(100vw - 24px)) !important;
    max-width: min(440px, calc(100vw - 24px)) !important;
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px)) - max(20px, env(safe-area-inset-bottom, 0px))) !important;
    overflow: hidden !important;
  }

  body.login-page .auth-card--login .auth-shell {
    max-height: inherit;
    overflow: hidden;
    padding: 14px 16px 12px !important;
    gap: 8px !important;
  }

  body.login-page .auth-card--login .auth-brand {
    gap: 5px !important;
    padding-bottom: 8px !important;
  }

  body.login-page .auth-card--login .auth-panel {
    gap: 6px !important;
  }

  body.login-page .auth-card--login .auth-description {
    display: none;
  }

  body.login-page .auth-card--login .auth-input,
  body.login-page #btnLogin,
  body.login-page #btnRegister,
  body.login-page .btn-google {
    min-height: 40px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  body.login-page .auth-card--login .auth-brand {
    display: none;
  }

  body.login-page .auth-card--login .auth-shell {
    padding-top: 12px !important;
    padding-bottom: 10px !important;
  }

  body.login-page .auth-card--login .auth-title {
    font-size: 18px !important;
  }

  body.login-page .auth-divider {
    display: none !important;
  }
}

html.scope-scroll-locked,
body.scope-scroll-locked,
body.profile-page.scope-scroll-locked,
body.home-page.scope-scroll-locked {
  overflow: hidden !important;
  overflow-y: hidden !important;
  overscroll-behavior: none !important;
}

@media (max-width: 768px) {
  .site-footer,
  body.home-page .site-footer.site-footer--profile-like,
  body.profile-page .site-footer,
  body:is(.home-page, .profile-page) footer.site-footer {
    display: none !important;
    visibility: hidden !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.home-page main {
    padding-bottom: calc(var(--mobile-content-bottom-space) + 46px) !important;
  }

  /* Keep fixed wizard actions relative to the viewport, not animated sections. */
  body.home-page main,
  body.home-page .section.active {
    animation-name: fadeInOnly !important;
  }

  .wizard-footer {
    display: flex !important;
    position: fixed !important;
    left: max(10px, env(safe-area-inset-left, 0px)) !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
    transform: none !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.theme-light .wizard-footer {
    background: transparent !important;
    box-shadow: none !important;
  }

  .wizard-footer .wizard-primary-btn,
  .wizard-footer .wizard-primary-btn.lg-btn,
  .wizard-footer .wizard-primary-btn.lg-btn--pill {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 50px !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f8fafc !important;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-tap-highlight-color: transparent;
  }

  .wizard-footer .wizard-primary-btn:is(:hover, :focus, :focus-visible, :active) {
    background: rgba(15, 23, 42, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f8fafc !important;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
    transform: none !important;
  }

  .wizard-footer .wizard-primary-btn .lg-btn__glow {
    display: none !important;
    opacity: 0 !important;
  }

  .wizard-footer .wizard-primary-btn .lg-btn__label {
    color: inherit !important;
  }

  body.theme-light .wizard-footer .wizard-primary-btn,
  body.theme-light .wizard-footer .wizard-primary-btn:is(:hover, :focus, :focus-visible, :active) {
    background: var(--home-action-blue-bg) !important;
    border-color: var(--home-action-blue-border) !important;
    color: #ffffff !important;
    box-shadow: var(--home-action-blue-shadow) !important;
  }

  body.home-page :is(
    #btnClearForm,
    #btnClearNodes,
    #btnClearReinfForm,
    #btnClearReinfChecks,
    #btnClearGeomForm,
    #btnClearGeomChecks,
    #btnClearStrengthForm,
    #btnClearStrengthChecks
  ),
  body.home-page :is(
    #btnClearForm,
    #btnClearNodes,
    #btnClearReinfForm,
    #btnClearReinfChecks,
    #btnClearGeomForm,
    #btnClearGeomChecks,
    #btnClearStrengthForm,
    #btnClearStrengthChecks
  ):is(:hover, :focus, :focus-visible, :active) {
    background: rgba(15, 23, 42, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f8fafc !important;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transform: none !important;
    outline: none !important;
  }

  body.home-page :is(
    #btnClearForm,
    #btnClearNodes,
    #btnClearReinfForm,
    #btnClearReinfChecks,
    #btnClearGeomForm,
    #btnClearGeomChecks,
    #btnClearStrengthForm,
    #btnClearStrengthChecks
  ) .lg-btn__glow {
    display: none !important;
    opacity: 0 !important;
  }

  body.home-page :is(
    #btnClearForm,
    #btnClearNodes,
    #btnClearReinfForm,
    #btnClearReinfChecks,
    #btnClearGeomForm,
    #btnClearGeomChecks,
    #btnClearStrengthForm,
    #btnClearStrengthChecks
  ) .lg-btn__label {
    color: #f8fafc !important;
  }
}

/* Mobile profile: fixed header, only the profile content below it scrolls. */
@media (max-width: 768px) {
  html.profile-page-root {
    width: 100% !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overscroll-behavior: none !important;
  }

  body.profile-page {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overscroll-behavior: none !important;
  }

  body.profile-page > header,
  body.profile-page > header.header-hidden {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    align-items: center !important;
    justify-content: initial !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    max-height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 6px !important;
    transform: translate3d(0, 0, 0) !important;
    translate: none !important;
    scale: none !important;
    opacity: 1 !important;
    transition: none !important;
    will-change: auto !important;
    contain: layout paint !important;
    overflow: visible !important;
    pointer-events: auto !important;
    z-index: 1200 !important;
    background: #111a2b !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.profile-page #profileMobileSettingsButton {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  body.profile-page .profile-mobile-header-title {
    grid-column: 2 !important;
    display: flex !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  body.profile-page .profile-mobile-header-menu {
    grid-column: 3 !important;
    display: flex !important;
    justify-self: end !important;
  }

  body.profile-page .profile-main {
    position: fixed !important;
    top: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 16px 14px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.profile-page .profile-topbar {
    margin-top: 0 !important;
  }

  body.profile-page.profile-overlay-open,
  body.profile-page.profile-menu-open,
  body.profile-page.scope-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body.profile-page.profile-overlay-open .profile-main,
  body.profile-page.profile-menu-open .profile-main,
  body.profile-page.scope-scroll-locked .profile-main {
    overflow: hidden !important;
    touch-action: none !important;
  }
}

/* Mobile profile header follows the same document flow as the home page. */
@media (max-width: 768px) {
  html.profile-page-root {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: auto !important;
  }

  body.profile-page {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
  }

  body.profile-page > header,
  body.profile-page > header.header-hidden {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(var(--profile-header-height) + env(safe-area-inset-top, 0px)) !important;
    max-height: none !important;
    transform: none !important;
    translate: none !important;
    opacity: 1 !important;
    z-index: 100 !important;
    contain: none !important;
  }

  body.profile-page .profile-main {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    padding: 16px 14px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* BIM viewer header alignment: controls live in the model column; close stays on the right. */
.bim-workspace__surface {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

.bim-workspace__surface > .bim-workspace__header,
.bim-workspace__surface > .bim-workspace__header .bim-workspace__titlebar {
  display: none !important;
}

.bim-workspace__surface > .bim-workspace__close {
  position: absolute !important;
  top: 22px !important;
  right: 22px !important;
  z-index: 20 !important;
  width: 38px !important;
  min-width: 0 !important;
  max-width: 38px !important;
  min-height: 0 !important;
  height: 38px !important;
  max-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
}

.bim-workspace__surface > .bim-workspace__toolbar {
  grid-row: 1 !important;
  padding-right: 70px !important;
}

.bim-workspace__surface > .bim-workspace__body {
  grid-row: 2 !important;
}

.bim-workspace__model-head {
  width: 100% !important;
  min-width: 0 !important;
}

.bim-workspace__model-head .bim-workspace__header-main {
  position: static !important;
  display: flex !important;
  flex-flow: row wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
}

.bim-workspace__model-head .bim-workspace__intro {
  flex: 0 0 100% !important;
  width: 100% !important;
}

.bim-workspace__model-head .bim-workspace__actions,
.bim-workspace__model-head .bim-workspace__mode-switch {
  justify-content: flex-start !important;
}

/* BIM viewer viewport: keep the complete workspace inside the visual viewport. */
.bim-workspace__surface {
  inset:
    calc(12px + env(safe-area-inset-top, 0px))
    16px
    calc(12px + env(safe-area-inset-bottom, 0px))
    16px !important;
  gap: 12px !important;
  padding: 16px !important;
}

.bim-workspace__surface > .bim-workspace__close {
  top: 16px !important;
  right: 16px !important;
}

.bim-workspace__surface > .bim-workspace__toolbar {
  padding-right: 58px !important;
}

.bim-workspace__body,
.bim-workspace__stage-area,
.bim-workspace__stage,
.bim-workspace__stage .bim-visual-stage,
.bim-workspace__stage--3d {
  min-height: 0 !important;
}

.bim-workspace__stage-area,
.bim-workspace__inspector {
  overflow: hidden;
}

.bim-workspace__stage--3d {
  height: 100% !important;
}

@media (max-width: 768px) {
  .bim-workspace__surface {
    inset:
      calc(6px + env(safe-area-inset-top, 0px))
      6px
      calc(6px + env(safe-area-inset-bottom, 0px))
      6px !important;
    max-height: none !important;
    padding: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .bim-workspace__surface > .bim-workspace__close {
    top: 10px !important;
    right: 10px !important;
  }

  .bim-workspace__stage-area,
  .bim-workspace__inspector {
    overflow: visible;
  }

  .bim-workspace__body {
    min-height: max-content !important;
    overflow: visible !important;
  }

  .bim-workspace__stage-area,
  .bim-workspace__inspector {
    flex: 0 0 auto !important;
  }

  .bim-workspace__stage .bim-visual-stage,
  .bim-workspace__stage--3d {
    min-height: clamp(240px, 38dvh, 340px) !important;
  }
}

/* IFC pre-import requirements report. */
.ifc-check-modal {
  padding:
    calc(14px + env(safe-area-inset-top, 0px))
    14px
    calc(14px + env(safe-area-inset-bottom, 0px));
}

.ifc-check-modal__content {
  width: min(760px, 100%);
  max-height: min(780px, calc(100dvh - 28px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
}

.ifc-check-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ifc-check-modal__header h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.ifc-check-modal__eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb9ff;
}

.ifc-check-modal__status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(134, 239, 172, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 700;
}

.ifc-check-modal__status[data-status="warning"] {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.ifc-check-modal__status[data-status="blocked"] {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.ifc-check-modal__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ifc-check-modal__metrics > div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.42);
}

.ifc-check-modal__metrics strong {
  font-size: 18px;
  color: #f8fafc;
}

.ifc-check-modal__metrics span {
  font-size: 10px;
  color: #9fb2c9;
}

.ifc-check-modal__notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(134, 239, 172, 0.22);
  background: rgba(34, 197, 94, 0.08);
  color: #d1fae5;
  font-size: 12px;
  line-height: 1.5;
}

.ifc-check-modal__notice[data-status="warning"] {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(245, 158, 11, 0.08);
  color: #fef3c7;
}

.ifc-check-modal__notice[data-status="blocked"] {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(239, 68, 68, 0.08);
  color: #fee2e2;
}

.ifc-check-modal__list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.ifc-check-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.3);
}

.ifc-check-row__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  font-weight: 800;
}

.ifc-check-row.is-warning .ifc-check-row__icon {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.ifc-check-row.is-error .ifc-check-row__icon {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.ifc-check-row__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ifc-check-row__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ifc-check-row__heading strong {
  font-size: 12px;
  color: #f8fafc;
}

.ifc-check-row__heading span,
.ifc-check-row__body small {
  font-size: 10px;
  color: #94a3b8;
}

.ifc-check-row__body p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #b8c7da;
}

.ifc-check-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ifc-check-modal__import {
  border-color: rgba(96, 165, 250, 0.34) !important;
  background: rgba(37, 99, 235, 0.3) !important;
}

body.theme-light .ifc-check-modal__eyebrow {
  color: #2563eb;
}

body.theme-light .ifc-check-modal__metrics > div,
body.theme-light .ifc-check-row {
  border-color: #dbe5f1;
  background: #f8fafc;
}

body.theme-light .ifc-check-modal__metrics strong,
body.theme-light .ifc-check-row__heading strong {
  color: #0f172a;
}

body.theme-light .ifc-check-modal__metrics span,
body.theme-light .ifc-check-row__heading span,
body.theme-light .ifc-check-row__body small,
body.theme-light .ifc-check-row__body p {
  color: #475569;
}

@media (max-width: 640px) {
  .ifc-check-modal__content {
    max-height: calc(100dvh - 12px);
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .ifc-check-modal__header {
    display: grid;
    gap: 8px;
  }

  .ifc-check-modal__header h3 {
    font-size: 18px;
  }

  .ifc-check-modal__status {
    justify-self: start;
  }

  .ifc-check-modal__metrics {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ifc-check-modal__metrics > div {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    padding: 8px 10px;
  }

  .ifc-check-modal__metrics strong {
    font-size: 15px;
  }

  .ifc-check-row__heading {
    display: grid;
    gap: 2px;
  }

  .ifc-check-modal__footer > button {
    flex: 1 1 0;
  }
}

/* =========================
   GLOBAL THEME TEXT CONTRAST
   ========================= */

body {
  --app-text-primary: #ffffff;
  --app-text-secondary: #edf4ff;
  --app-text-muted: #cbd8ea;
  --app-text-subtle: #aab9cf;
  --app-text-placeholder: #9fb0c8;
  --app-text-disabled: #91a0b6;
  color: var(--app-text-primary);
}

body.theme-light {
  --app-text-primary: #030712;
  --app-text-secondary: #111827;
  --app-text-muted: #334155;
  --app-text-subtle: #475569;
  --app-text-placeholder: #64748b;
  --app-text-disabled: #7c8798;
  color: var(--app-text-primary);
}

body:not(.theme-light) {
  color: var(--app-text-primary);
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .section h2,
body .card-title,
body .module-title,
body .summary-module-name,
body .summary-workspace-title,
body .summary-stage-title,
body .summary-analytics-title,
body .profile-projects-title,
body .profile-feed-title,
body .profile-user-email,
body .project-title,
body .auth-title,
body .geo-bim-source__title,
body .node-label,
body .result .reg-basis-title {
  color: var(--app-text-primary);
}

body p,
body li,
body .node-values,
body .node-values strong,
body .node-data,
body .summary-text-content,
body .summary-text-content h4,
body .summary-text-content li,
body .summary-module-stat-value,
body .summary-meta-value,
body .journal-table-wrap,
body .article-modal,
body .profile-settings-row__label,
body .profile-settings-field__label,
body .profile-settings-row__value,
body .auth-label {
  color: var(--app-text-secondary);
}

body label,
body .meta,
body .subtitle,
body .caption,
body .node-meta,
body .construction-label,
body .bim-import-meta,
body .bim-import-file-state,
body .geo-bim-source__meta,
body .geo-bim-source__hint,
body .geo-manual-note,
body .summary-module-stat-label,
body .summary-workspace-description,
body .summary-meta-label,
body .summary-analytics-description,
body .summary-stage-description,
body .summary-text-placeholder,
body .summary-loading-text,
body .profile-user-label,
body .profile-section-title,
body .profile-projects-subtitle,
body .profile-feed-subtitle,
body .project-meta,
body .auth-description,
body .result .reg-basis,
body .result .reg-basis-item-label {
  color: var(--app-text-muted);
}

body .text-muted,
body .muted,
body small,
body .empty-state,
body .empty-message,
body .hint,
body .helper-text,
body .profile-settings-sheet__section-title,
body .profile-settings-sheet__hint {
  color: var(--app-text-subtle);
}

body input,
body select,
body textarea,
body .ui-select {
  color: var(--app-text-primary);
}

body input::placeholder,
body select::placeholder,
body textarea::placeholder {
  color: var(--app-text-placeholder);
  opacity: 1;
}

body input:disabled,
body select:disabled,
body textarea:disabled,
body button:disabled,
body .btn-small:disabled {
  color: var(--app-text-disabled);
}

body {
  --profile-settings-screen-label: var(--app-text-primary);
  --profile-settings-screen-muted: var(--app-text-muted);
}

/* Stable spacing between dynamic form controls and add actions. */
.wizard-sheet-body .add-btn-row {
  position: relative;
  z-index: 2;
  gap: 10px;
  margin: 16px 0 12px;
  padding-top: 2px;
}

.wizard-sheet-body .add-btn-row + .scroll-list {
  margin-top: 12px !important;
}

@media (max-width: 560px) {
  .wizard-sheet-body .add-btn-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .wizard-sheet-body .add-btn-row .lg-btn {
    max-width: 100%;
  }
}

/* Calm, staged loading for profile data and cards. */
body.profile-page.is-profile-loading .profile-shell {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

body.profile-page.is-profile-ready .profile-shell {
  animation: profile-shell-reveal 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.profile-page.is-profile-ready .profile-topbar,
body.profile-page.is-profile-ready .profile-content-grid > .card {
  animation: profile-block-reveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.profile-page.is-profile-ready .profile-content-grid > .card:nth-child(2) {
  animation-delay: 70ms;
}

body.profile-page.is-profile-ready .profile-feed-item,
body.profile-page.is-profile-ready .project-card {
  animation: profile-item-reveal 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--profile-reveal-delay, 0ms);
}

@keyframes profile-shell-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes profile-block-reveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes profile-item-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.home-page #sectionKnowledge .normative-assistant__answer {
  animation: knowledge-answer-reveal 260ms ease-out both;
}

body.home-page #sectionKnowledge .normative-assistant__columns li span {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 750;
}

@keyframes knowledge-answer-reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.profile-page.is-profile-ready .profile-shell,
  body.profile-page.is-profile-ready .profile-topbar,
  body.profile-page.is-profile-ready .profile-content-grid > .card,
  body.profile-page.is-profile-ready .profile-feed-item,
  body.profile-page.is-profile-ready .project-card,
  body.home-page #sectionKnowledge .normative-assistant__answer {
    animation: none !important;
  }
}

/* =========================================
   Object overview + restrained UI system
   ========================================= */
body.home-page {
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 24px;
  --ui-radius-sm: 8px;
  --ui-radius-md: 12px;
  --ui-radius-lg: 16px;
  --ui-control-height: 42px;
  --ui-surface: #111a2d;
  --ui-surface-raised: #172136;
  --ui-surface-soft: rgba(148, 163, 184, 0.08);
  --ui-border: rgba(148, 163, 184, 0.18);
  --ui-text: #f1f5f9;
  --ui-muted: #94a3b8;
  --ui-success: #36b37e;
  --ui-success-soft: rgba(54, 179, 126, 0.14);
  --ui-danger: #e05263;
  --ui-danger-soft: rgba(224, 82, 99, 0.14);
  --ui-warning: #d6a33b;
  --ui-warning-soft: rgba(214, 163, 59, 0.15);
}

body.home-page.theme-light {
  --ui-surface: #ffffff;
  --ui-surface-raised: #f8fafc;
  --ui-surface-soft: #f1f5f9;
  --ui-border: rgba(71, 85, 105, 0.18);
  --ui-text: #172033;
  --ui-muted: #64748b;
}

body.home-page header,
body.home-page .construction-bar,
body.home-page .tabs,
body.home-page .card,
body.home-page .control-plan-panel,
body.home-page .summary-workspace-card,
body.home-page .summary-issues-panel,
body.home-page .summary-module-card,
body.home-page .knowledge-article-card,
body.home-page .knowledge-category-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

body.home-page .construction-bar,
body.home-page .tabs,
body.home-page .card,
body.home-page .control-plan-panel,
body.home-page .summary-workspace-card,
body.home-page .summary-issues-panel {
  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius-lg) !important;
}

body.home-page .lg-btn,
body.home-page button,
body.home-page input,
body.home-page select {
  border-radius: var(--ui-radius-md);
}

body.home-page .module-help-toggle {
  border-radius: 50%;
}

body.home-page .btn-primary,
body.home-page .btn-secondary,
body.home-page .btn-small,
body.home-page .lg-btn {
  min-height: var(--ui-control-height);
}

body.home-page .lg-btn__glow {
  display: none !important;
}

body.home-page .lg-btn,
body.home-page .btn-secondary {
  filter: none !important;
  box-shadow: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.home-page button:focus-visible,
body.home-page [role="button"]:focus-visible {
  outline: 2px solid #94a3b8 !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

body.home-page .btn-primary {
  background: #334155 !important;
  border-color: #475569 !important;
  box-shadow: none !important;
}

body.home-page .tabs {
  align-items: center;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2);
  overflow: visible;
}

body.home-page .tabs > .tab,
body.home-page .tabs-group-trigger {
  min-height: var(--ui-control-height);
  padding: 0 var(--ui-space-4);
  border: 1px solid transparent;
  border-radius: var(--ui-radius-md);
  background: transparent;
  color: var(--ui-muted);
  white-space: nowrap;
}

body.home-page .tabs > .tab:hover,
body.home-page .tabs-group-trigger:hover,
body.home-page .tabs-group.is-active .tabs-group-trigger,
body.home-page .tabs > .tab.active {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-border) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

.tabs-group {
  position: relative;
  flex: 0 0 auto;
}

.tabs-group-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  font: inherit;
  cursor: pointer;
}

.tabs-group-chevron {
  transition: transform 160ms ease;
}

.tabs-group.is-open .tabs-group-chevron {
  transform: rotate(180deg);
}

.tabs-group-menu {
  position: absolute;
  z-index: 1600;
  top: calc(100% + 8px);
  left: 0;
  width: min(340px, calc(100vw - 32px));
  display: grid;
  gap: var(--ui-space-1);
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.tabs-group.is-open .tabs-group-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.home-page .tabs-group-item {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: var(--ui-space-3);
  border: 0;
  border-radius: var(--ui-radius-md);
  background: transparent;
  color: var(--ui-text);
  text-align: left;
  cursor: pointer;
}

body.home-page .tabs-group-item:hover,
body.home-page .tabs-group-item.active {
  background: var(--ui-surface-soft) !important;
}

.tabs-group-item span {
  display: grid;
  gap: 2px;
}

.tabs-group-item strong {
  font-size: 14px;
  font-weight: 700;
}

.tabs-group-item small {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 500;
}

.object-overview {
  display: grid;
  gap: var(--ui-space-4);
  color: var(--ui-text);
  transition: opacity 160ms ease;
}

.object-overview.is-loading {
  opacity: 0.72;
}

.overview-heading,
.overview-panel-heading,
.overview-readiness-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ui-space-4);
}

.overview-heading h2 {
  margin: 2px 0 4px;
}

.overview-heading .subtitle {
  margin: 0;
}

.overview-eyebrow,
.overview-panel-kicker,
.overview-readiness-label,
.overview-metric-label {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-status-badge,
.overview-action-marker {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.overview-status-badge {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 750;
}

.overview-status-badge[data-tone="success"] {
  border-color: rgba(54, 179, 126, 0.35);
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

.overview-status-badge[data-tone="danger"] {
  border-color: rgba(224, 82, 99, 0.35);
  background: var(--ui-danger-soft);
  color: var(--ui-danger);
}

.overview-status-badge[data-tone="warning"] {
  border-color: rgba(214, 163, 59, 0.35);
  background: var(--ui-warning-soft);
  color: var(--ui-warning);
}

.overview-readiness,
.overview-panel,
.overview-metric {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
}

.overview-readiness {
  display: grid;
  gap: var(--ui-space-3);
  padding: var(--ui-space-5);
}

.overview-readiness-copy > div {
  display: grid;
  gap: var(--ui-space-1);
}

.overview-readiness-value {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.overview-readiness-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  text-align: right;
}

.overview-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ui-surface-soft);
}

.overview-progress span {
  display: block;
  width: var(--overview-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #64748b;
  transition: width 360ms ease;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ui-space-3);
}

.overview-metric {
  min-width: 0;
  display: grid;
  gap: var(--ui-space-1);
  padding: var(--ui-space-4);
}

.overview-metric strong {
  font-size: 26px;
  line-height: 1.15;
}

.overview-metric-note {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-content-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.4fr);
  gap: var(--ui-space-3);
}

.overview-panel {
  padding: var(--ui-space-5);
}

.overview-panel h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.overview-action-marker {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ui-muted);
}

.overview-action-marker[data-tone="success"] { background: var(--ui-success); }
.overview-action-marker[data-tone="danger"] { background: var(--ui-danger); }
.overview-action-marker[data-tone="warning"] { background: var(--ui-warning); }

.overview-next-title {
  margin: var(--ui-space-5) 0 var(--ui-space-2);
  font-size: 20px;
  font-weight: 750;
}

.overview-next-description {
  min-height: 44px;
  margin: 0 0 var(--ui-space-5);
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.55;
}

.overview-action-button,
.overview-text-action,
.overview-shortcuts button {
  min-height: var(--ui-control-height);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-soft);
  color: var(--ui-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

.overview-action-button {
  width: 100%;
  padding: 0 var(--ui-space-4);
}

.overview-action-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.overview-text-action {
  min-height: 32px;
  padding: 0 var(--ui-space-3);
}

.overview-module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-4);
}

.overview-module-row {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-raised);
  color: var(--ui-text);
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

.overview-module-row:hover,
.overview-action-button:not(:disabled):hover,
.overview-text-action:hover,
.overview-shortcuts button:hover {
  border-color: rgba(148, 163, 184, 0.38);
  background: var(--ui-surface-soft);
}

.overview-module-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.overview-module-row strong {
  font-size: 13px;
}

.overview-module-row small {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-module-row[data-tone="success"] { border-left: 3px solid var(--ui-success); }
.overview-module-row[data-tone="danger"] { border-left: 3px solid var(--ui-danger); }
.overview-module-row[data-tone="warning"] { border-left: 3px solid var(--ui-warning); }

.overview-module-count {
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface-soft);
  font-size: 13px;
  font-weight: 800;
}

.overview-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ui-space-2);
}

.overview-shortcuts button {
  padding: 0 var(--ui-space-3);
}

.bottom-nav-group-menu {
  display: none;
}

@media (max-width: 980px) {
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .overview-readiness-copy {
    display: grid;
  }

  .overview-readiness-copy p {
    text-align: left;
  }

  .overview-module-list {
    grid-template-columns: 1fr;
  }

  .overview-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #bottomNav {
    overflow: visible !important;
  }

  .bottom-nav-group-menu {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 10px);
    left: 12px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ui-space-2);
    padding: var(--ui-space-2);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .bottom-nav-group-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .bottom-nav-group-option {
    min-height: 54px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: var(--ui-space-2) var(--ui-space-3);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-raised);
    color: var(--ui-text);
    text-align: left;
  }

  .bottom-nav-group-option span {
    font-size: 12px;
    font-weight: 750;
  }

  .bottom-nav-group-option small {
    color: var(--ui-muted);
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  body.home-page .overview-heading {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .overview-status-badge {
    justify-self: start;
  }

  .overview-readiness,
  .overview-panel {
    padding: var(--ui-space-4);
  }

  .overview-metrics {
    gap: var(--ui-space-2);
  }

  .overview-metric {
    padding: var(--ui-space-3);
  }

  .overview-metric strong {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tabs-group-menu,
  .bottom-nav-group-menu,
  .overview-progress span,
  .object-overview {
    transition: none !important;
  }
}

/* Light theme corrections and compact object overview */
.object-overview {
  gap: var(--ui-space-3);
}

.overview-heading {
  min-height: 0;
  padding: 2px 4px 4px;
  background: transparent;
}

.overview-heading h2 {
  font-size: 26px;
  line-height: 1.1;
}

.overview-readiness {
  gap: 10px;
  padding: 14px 18px;
}

.overview-readiness-value {
  font-size: clamp(30px, 3vw, 36px);
}

.overview-metrics,
.overview-content-grid {
  gap: 10px;
}

.overview-metric {
  padding: 12px 14px;
}

.overview-metric strong {
  font-size: 24px;
}

.overview-panel {
  padding: 16px;
}

.overview-next-title {
  margin: 14px 0 6px;
  font-size: 18px;
}

.overview-next-description {
  min-height: 0;
  margin: 0 0 14px;
}

.overview-module-list {
  margin-top: 12px;
}

.overview-module-row {
  min-height: 58px;
  padding: 10px 12px;
}

.overview-shortcuts button {
  min-height: 40px;
}

body.home-page.theme-light .object-overview {
  color: #172033;
}

body.home-page.theme-light .overview-heading {
  background: transparent !important;
  color: #172033 !important;
}

body.home-page.theme-light .overview-heading h2,
body.home-page.theme-light .overview-panel h3,
body.home-page.theme-light .overview-next-title,
body.home-page.theme-light .overview-metric strong,
body.home-page.theme-light .overview-module-row strong,
body.home-page.theme-light .overview-module-count {
  color: #172033 !important;
}

body.home-page.theme-light .overview-heading .subtitle,
body.home-page.theme-light .overview-readiness-copy p,
body.home-page.theme-light .overview-metric-note,
body.home-page.theme-light .overview-next-description,
body.home-page.theme-light .overview-module-row small,
body.home-page.theme-light .overview-eyebrow,
body.home-page.theme-light .overview-panel-kicker,
body.home-page.theme-light .overview-readiness-label,
body.home-page.theme-light .overview-metric-label {
  color: #64748b !important;
}

body.home-page.theme-light .overview-readiness,
body.home-page.theme-light .overview-panel,
body.home-page.theme-light .overview-metric {
  background: #ffffff !important;
  border-color: #d5dde8 !important;
  color: #172033 !important;
  box-shadow: none !important;
}

body.home-page.theme-light .overview-progress {
  background: #e8edf4 !important;
}

body.home-page.theme-light .overview-progress span {
  background: #64748b !important;
}

body.home-page.theme-light .overview-module-row,
body.home-page.theme-light .overview-action-button,
body.home-page.theme-light .overview-text-action,
body.home-page.theme-light .overview-shortcuts button {
  background: #f8fafc !important;
  border-color: #d5dde8 !important;
  color: #172033 !important;
  box-shadow: none !important;
  filter: none !important;
}

body.home-page.theme-light .overview-module-row:hover,
body.home-page.theme-light .overview-module-row:focus-visible,
body.home-page.theme-light .overview-action-button:not(:disabled):hover,
body.home-page.theme-light .overview-action-button:not(:disabled):focus-visible,
body.home-page.theme-light .overview-text-action:hover,
body.home-page.theme-light .overview-text-action:focus-visible,
body.home-page.theme-light .overview-shortcuts button:hover,
body.home-page.theme-light .overview-shortcuts button:focus-visible {
  background: #eef2f7 !important;
  border-color: #aeb9c8 !important;
  color: #0f172a !important;
}

body.home-page.theme-light .overview-module-count {
  background: #e8edf4 !important;
}

body.home-page.theme-light .tabs-group-menu,
body.home-page.theme-light .bottom-nav-group-menu {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important;
}

body.home-page.theme-light .tabs > .tab,
body.home-page.theme-light .tabs > .tab.lg-btn,
body.home-page.theme-light .tabs-group-trigger,
body.home-page.theme-light .tabs-group-trigger.lg-btn {
  background: transparent !important;
  border-color: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  filter: none !important;
}

body.home-page.theme-light .tabs > .tab .lg-btn__label,
body.home-page.theme-light .tabs > .tab.lg-btn .lg-btn__label,
body.home-page.theme-light .tabs-group-trigger .lg-btn__label {
  color: #475569 !important;
}

body.home-page.theme-light .tabs > .tab:hover,
body.home-page.theme-light .tabs > .tab:focus-visible,
body.home-page.theme-light .tabs > .tab.active,
body.home-page.theme-light .tabs-group-trigger:hover,
body.home-page.theme-light .tabs-group-trigger:focus-visible,
body.home-page.theme-light .tabs-group.is-active .tabs-group-trigger,
body.home-page.theme-light .tabs-group.is-open .tabs-group-trigger {
  background: #e8edf4 !important;
  border-color: #cbd5e1 !important;
  color: #172033 !important;
  box-shadow: none !important;
}

body.home-page.theme-light .tabs > .tab:hover .lg-btn__label,
body.home-page.theme-light .tabs > .tab:focus-visible .lg-btn__label,
body.home-page.theme-light .tabs > .tab.active .lg-btn__label,
body.home-page.theme-light .tabs-group-trigger:hover .lg-btn__label,
body.home-page.theme-light .tabs-group-trigger:focus-visible .lg-btn__label,
body.home-page.theme-light .tabs-group.is-active .tabs-group-trigger .lg-btn__label,
body.home-page.theme-light .tabs-group.is-open .tabs-group-trigger .lg-btn__label {
  color: #172033 !important;
}

body.home-page.theme-light .tabs-group-menu .tabs-group-item,
body.home-page.theme-light .bottom-nav-group-option {
  background: transparent !important;
  border-color: transparent !important;
  color: #172033 !important;
  box-shadow: none !important;
}

body.home-page.theme-light .tabs-group-menu .tabs-group-item:hover,
body.home-page.theme-light .tabs-group-menu .tabs-group-item:focus-visible,
body.home-page.theme-light .tabs-group-menu .tabs-group-item.active,
body.home-page.theme-light .bottom-nav-group-option:hover,
body.home-page.theme-light .bottom-nav-group-option:focus-visible {
  background: #eef2f7 !important;
  border-color: #d5dde8 !important;
  color: #172033 !important;
}

body.home-page.theme-light .tabs-group-menu .tabs-group-item strong,
body.home-page.theme-light .bottom-nav-group-option span {
  color: #172033 !important;
}

body.home-page.theme-light .tabs-group-menu .tabs-group-item small,
body.home-page.theme-light .bottom-nav-group-option small {
  color: #64748b !important;
}

/* Stable navigation geometry: one clipped surface without legacy glass layers. */
body.home-page .tabs > .tab,
body.home-page .tabs-group-trigger,
body.home-page .tabs-group-item,
body.home-page .overview-module-row,
body.home-page .overview-action-button,
body.home-page .overview-text-action,
body.home-page .overview-shortcuts button {
  transform: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  overflow: hidden;
  background-clip: padding-box;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease !important;
}

body.home-page .tabs > .tab,
body.home-page .tabs-group-trigger,
body.home-page .tabs-group-item {
  border-radius: var(--ui-radius-md) !important;
}

body.home-page .tabs > .tab::before,
body.home-page .tabs > .tab::after,
body.home-page .tabs-group-trigger::before,
body.home-page .tabs-group-trigger::after,
body.home-page .tabs-group-item::before,
body.home-page .tabs-group-item::after {
  content: none !important;
  display: none !important;
}

body.home-page .tabs > .tab:hover,
body.home-page .tabs > .tab:active,
body.home-page .tabs > .tab:focus-visible,
body.home-page .tabs-group-trigger:hover,
body.home-page .tabs-group-trigger:active,
body.home-page .tabs-group-trigger:focus-visible,
body.home-page .tabs-group-item:hover,
body.home-page .tabs-group-item:active,
body.home-page .tabs-group-item:focus-visible,
body.home-page .overview-module-row:hover,
body.home-page .overview-module-row:active,
body.home-page .overview-action-button:hover,
body.home-page .overview-action-button:active,
body.home-page .overview-text-action:hover,
body.home-page .overview-text-action:active,
body.home-page .overview-shortcuts button:hover,
body.home-page .overview-shortcuts button:active {
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}

body.home-page .tabs-group-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--ui-space-3);
}

.tabs-group-item__icon {
  width: 36px;
  height: 36px;
  display: inline-grid !important;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
}

.tabs-group-item__icon svg {
  width: 20px;
  height: 20px;
}

body.home-page .tabs-group-item:hover .tabs-group-item__icon,
body.home-page .tabs-group-item.active .tabs-group-item__icon {
  color: var(--ui-text);
}

body.home-page.theme-light .tabs-group-item__icon {
  background: #f1f5f9;
  border-color: #d5dde8;
  color: #475569;
}

/* One continuous page canvas: content width is constrained by padding, not background. */
html.theme-dark,
html.theme-dark body.home-page,
body.home-page.theme-dark {
  background: #0f172a !important;
}

html.theme-light,
html.theme-light body.home-page,
body.home-page.theme-light {
  background: #f1f5f9 !important;
}

body.home-page > main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px max(20px, calc((100vw - var(--site-frame-width)) / 2)) 40px;
  box-sizing: border-box;
  background: #0f172a !important;
}

body.home-page.theme-light > main {
  background: #f1f5f9 !important;
}

/* Shared themed chrome for the home, profile and profile editor pages. */
body.home-page > header,
body.profile-page > header,
body.profile-edit-page > header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  background: #0f172a !important;
  box-shadow: none !important;
}

body.home-page .site-footer,
body.home-page .site-footer.site-footer--profile-like,
body.profile-page .site-footer,
body.profile-edit-page .site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: #0f172a !important;
  box-shadow: none !important;
}

html.theme-dark body.profile-page,
body.theme-dark.profile-page {
  background: #0f172a !important;
  background-image: none !important;
  background-attachment: scroll !important;
}

body.theme-dark.profile-page > main,
body.theme-dark.profile-edit-page > main {
  background: #0f172a !important;
}

html.theme-light body.profile-page,
body.theme-light.profile-page,
body.theme-light.profile-page > main,
body.theme-light.profile-edit-page > main {
  background: #f1f5f9 !important;
  background-image: none !important;
}

body.home-page .site-footer__link,
body.home-page .site-footer__icon-link,
body.profile-page .site-footer__link,
body.profile-page .site-footer__icon-link,
body.profile-edit-page .site-footer__link,
body.profile-edit-page .site-footer__icon-link {
  color: #f6f6f6 !important;
}

body.home-page .site-footer__copy,
body.profile-page .site-footer__copy,
body.profile-edit-page .site-footer__copy {
  color: #959599 !important;
}

body.theme-light.home-page > header,
body.theme-light.profile-page > header,
body.theme-light.profile-edit-page > header {
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  background: #000000 !important;
}

body.theme-light.home-page .site-footer,
body.theme-light.home-page .site-footer.site-footer--profile-like,
body.theme-light.profile-page .site-footer,
body.theme-light.profile-edit-page .site-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: #000000 !important;
}

body.theme-light.home-page .site-footer__link:hover,
body.theme-light.home-page .site-footer__icon-link:hover,
body.theme-light.profile-page .site-footer__link:hover,
body.theme-light.profile-page .site-footer__icon-link:hover,
body.theme-light.profile-edit-page .site-footer__link:hover,
body.theme-light.profile-edit-page .site-footer__icon-link:hover {
  color: #ffffff !important;
}

@media (max-width: 520px) {
  .overview-heading {
    padding-inline: 2px;
  }

  .overview-readiness,
  .overview-panel {
    padding: 12px;
  }

  .overview-metric {
    padding: 10px 12px;
  }
}
