/* Archivo — self-hosted so a remote font CDN request can never hang and block CSS application
   on throttled networks. Latin + latin-ext subsets only (Archivo ships no Cyrillic subset), so
   Cyrillic text renders in the system fallback declared in --font. */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&display=swap');
*,
*::before,
*::after {
  box-sizing: border-box;
}
*:focus { 
  outline: none;
 }

 * {
  box-sizing: border-box;
}

:root {
  --bg-main: #f4f8fb;

  /* Цвета топбара / сайдбара */
  --bg-topbar: #ffffff;
  --bg-sidebar: #ffffff;

  /* Цвета пунктов бокового меню */
  --sidebar-item-bg: #ffffff;           /* фон по умолчанию */
  --sidebar-item-bg-hover: #e7fffa;     /* фон при наведении */
  --sidebar-item-bg-active: #bcf1e7;    /* фон активной кнопки */

  --bg-card: #ffffff;
  --border-main: #d5e4e8;
  --text-main: #1e293b;
  --text-muted: #6b7280;
  --accent: #41c0a9;
  --accent-light: #4cd9c0;
  --danger: #f97373;
  --shadow-card: 
    0px 0px 1px 0px rgba(9, 30, 66, 0.31),
    0px 3px 8px 0px rgba(9, 30, 66, 0.16);
}

:root {
  --cell-h: 36px;
  --wA: 2.4%;
  --wB: 30%;
  --wC: 5.2%;
  --wD: 5.2%;
  --wE: 5.2%;
  --wF: 5.2%;
  --wG: 5.2%;
  --wH: 5.2%;
  --wI: 5.2%;
  --wJ: 5.2%;
  --wK: 5.2%;
  --wL: 5.2%;
  --wM: 5.2%;
  --wN: 5.2%;
  --wO: 5.2%;
  --gap: 8px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  --sticky-offset: 0px;
  --ps1-h: 53px; /* will be updated by JS */
  --sticky-gap: 0px;
}
html,
html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
  background: #cfd8e3;
  overflow: hidden;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  background: var(--bg-main);
  overflow: hidden;
}

/* TOPBAR */


/* ======================= ШАПКА / TOPBAR ======================= */
.topbar {
  height: 50px;
  background: var(--bg-topbar);
  border-bottom: 1px solid #b1e7e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 32px;
  width: auto;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

.icon-button {
  position: relative;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-dot {
  position: absolute;
  top: 0px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  background: #18c8aa;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-username {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: #1e293b;
}

.topbar-caret {
  font-size: 10px;
  color: #6b7280;
}

/* AVATARS (fallback на avatar.svg) */

.avatar {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 50%;
  background-image: url("avatar.svg");
}

.avatar-40 {
  margin-left: 20px;
  width: 35px;
  height: 35px;
  border: 2px solid #4cd9c0;
}

.avatar-70 {
  width: 65px;
  height: 65px;
  border: 1px solid #aeaeae;
}

.avatar-32 {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* если картинка не загрузилась и подставлена заглушка */
.img-fallback-placeholder {
  background-color: #e5e7eb;
  object-fit: cover;
}

/* BODY LAYOUT */

.app-body {
  display: flex;
  width: 100%;
  height: calc(100vh - 50px);
  overflow: hidden;
}

/* SIDEBAR */


/* ======================= ЛЕВАЯ ПАНЕЛЬ / SIDEBAR ======================= */
.sidebar {
  width: 200px;
  height: 100%;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
}

.sidebar-profile-card {
  width: 200px;
  min-height: 130px;
  border-bottom: 1px solid #b1e7e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-profile-name {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #4b4d4d;
}

.sidebar-profile-role {
  font-size: 14px;
  font-weight: 400;
  color: #9c9c9c;
  text-align: center;
}

.sidebar-menu {
  width: 200px;
  background: #ffffff;
}

.sidebar-menu-title {
  font-size: 22px;
  font-weight: 500;
  margin: 15px 15px 10px;
}

/* MENU ITEMS */

.menu-item {
  width: 100%;
  height: 50px;
  border: none;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sidebar-item-bg);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: var(--sidebar-item-bg-hover);
}

/* неактивная по умолчанию — лёгкий вес */
.menu-item-label {
  font-size: 16px;

  color: #6b6b6b;
}

.menu-item--active {
  background: var(--sidebar-item-bg-active);
}

/* у активной кнопки — 600 */
.menu-item--active .menu-item-label {
  font-weight: 600;
  color: #000000;
}

.menu-item-left,
.menu-item-left-pass {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-chevron {
  font-size: 12px;
}

/* ICONS */

.menu-item-icon {
  width: 16px;
  height: 16px;
}

.menu-item-icon-edit {
  width: 20px;
  height: 20px;
}

.menu-item-icon-pass {
  width: 10px;
  height: 10px;
}

/* SUBMENU */

.menu-subgroup {
  margin: 10px 0 5px 41px;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-subgroup.menu-subgroup--visible {
  display: flex;
}

.submenu-item {
  border: none;
  background: transparent;
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  color: #606060;
  font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}

.submenu-item:hover {
  color: #4b4b4b;
}

.submenu-item--active {
  color: #41c0a9;
  font-weight: 500;
}

/* MAIN */

.main {
  flex: 1;
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* KPI ROW (укорочено) */

.kpi-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex: 0 0 auto;
}

.kpi-card {
  width: 256px;
  height: 118px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  padding: 13px 20px 20px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.kpi-value {
  font-weight: 600;
  font-size: 28px;
  line-height: 36px;
  color: #111827;
}

.kpi-title {
  font-weight: 400;
  font-size: 14px;
  color: #475569;
  margin-top: 10px;
}
.kpi-icon-currency{
  height: 25px;
  margin-top: 5px;
}

.kpi-badge {
  position: absolute;
  top: 51px;
  right: 20px;
  height: 18px;
  padding: 0 5px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-badge-down {
  background: #f87171;
  margin-top: 9px;
}

.kpi-badge-up {
  background: #18c8aa;
  margin-top: 9px;
}

.kpi-progress {
  left: 20px;
  bottom: 20px;
  width: 100%;
  height: 4px;
  
  background: #e2e8f0;
  overflow: hidden;
}

.kpi-progress-fill {
  height: 100%;

  background: #41c0a9;
}

.topup-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.topup-form input {
  width: 120px;
  max-width: 100%;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

/* MAIN BOTTOM ROW (Выписка + Люди) */

.main-row {
  display: flex;
  gap: 24px;
  flex: 1;
  min-height: 0; /* v003: позволяем дочерним блокам ужиматься и скроллиться */
  overflow: hidden; /* v003: прячем переполнение внутри строки */
    margin: -2px;
    margin-top: -2px;
    margin-bottom: -10px;
    padding-bottom: 10px;
}

/* Выписка */

.invoice-card {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;           /* v003: растягиваем по высоте строки */
  min-height: 0;          /* v003: разрешаем внутренним блокам ужиматься */
  background: var(--bg-card);
  
  box-shadow: var(--shadow-card);
  padding: 15px;
  display: flex;
  flex-direction: column;
  margin-left: 2px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.invoice-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.invoice-label {
  font-size: 14px;
  color: #6b7280;
}

.invoice-total {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.invoice-period {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.invoice-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoice-sort-label {
  font-size: 14px;
  color: #6b7280;
}

.invoice-select {
  
  border: 1px solid #d1d5db;
  padding: 4px 8px;
  font-size: 14px;
  background: #ffffff;
}


/* Легенда */

.invoice-footer {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.Legen-dot {
  gap: 8px;
  margin-right: 7px;
  height: 10px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-label {
  font-size: 12px;
  color: #6b7280;
}

.legend-value {
  font-size: 14px;
  font-weight: 500;
  margin-left: 16px;
  margin-top: 3px;
}

.legend-item {
margin-right: 15px;
}

.invoice-date-start {
border-color: #bdbdbd;
border-width: 0.5px;
color: #434343;  
}

.invoice-date-end{
border-color: #bdbdbd;
border-width: 0.5px;
}


/* ======================= СЕКЦИЯ: DASHBOARD ======================= */
.screen-dashboard, .screen-accounts{
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
}


/* Карточка с людьми */

.people-card {
  flex: 0 0 260px;
  background: var(--bg-card);
  
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden; /* v003: чтобы список скроллился внутри, а не вылезал */
  }
.button-people-card-plus{
width: 50px;
height: 50px;
}
.button-people-card-sort{
height: 22px; 
margin-right: 8px;
}

.people-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #4CD9C0;
}

.people-plus {
  background: #41c0a9;
  color: #ffffff;
  cursor: pointer;
  margin: 0px;
  padding: 0px;
  border: 0px;
  height: 50px;
}

.people-menu {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}

.people-menu span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6b7280;
}

.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow: auto;
  /* v002: скрываем полосу прокрутки, но оставляем скролл */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge Legacy */
  touch-action: pan-y;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.people-list::-webkit-scrollbar { /* Chrome/Safari/Edge */
  width: 0;
  height: 0;
}

.people-list.is-dragging {
  cursor: grabbing;
  user-select: none;
}


.people-list > li {
  margin: 0;
  padding: 0;
}

.people-item {
  width: 100%;
  height: 50px;
  border-bottom-color: #ffffff !important;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 10px 15px 10px 12px;
  cursor: pointer;
  border-bottom-width: 1px;
  border-top-width: 0px;
  border-left-width: 0px;
  border-right-width: 0px;
}

.people-item:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.people-item:hover {
  background: rgba(65, 192, 169, 0.06);
}

.people-item:focus {
  outline: none;
}

.people-item:focus-visible {
  outline: 2px solid rgba(65, 192, 169, 0.5);
  outline-offset: 2px;
}

.people-info {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 500;
  text-align: start;
  margin-left: 15px;
}

.people-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.people-role {
  font-size: 12px;
  color: #6b7280;
}

/* Статусы */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-online {
  background: #3eae99;
}

.status-offline {
  background: #d1d5db;
}


/* ===== Экран аккаунтов ===== */
.screen {
  display: none;
}

.screen.screen--active {
  display: block;
}




/* =========================================================
   FILL MAIN AREA (100% width/height) — target only screens
   that were short/narrow: notify templates + template editor
   ========================================================= */

/* Make these screens behave like full-height flex columns */
.screen-notify-templates.screen--active,
.screen-template-editor.screen--active{
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
}

/* NOTIFY TEMPLATES: card + table take full height */
.screen-notify-templates .notify-pane--active{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.screen-notify-templates .notify-card{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.screen-notify-templates .notify-table-wrap{
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* TEMPLATE EDITOR: take full width (remove centered max-width) and full height */
.screen-template-editor .template-editor{
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* чтобы высота блока аккаунтов не "раздувалась" больше дашборда */
.screen-accounts {
  margin-top: 0px;
}


/* ======================= СЕКЦИЯ: АККАУНТЫ ======================= */
.accounts-card {
  background: #ffffff;
 
  box-shadow: var(--shadow-card);
  padding: 20px;
  max-height: 540px;
  display: flex;
  flex-direction: column;
}

/* Вкладки */
.accounts-tabs {
  display: flex;
  gap: 24px;
  font-size: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.accounts-tab {
  padding: 0 0 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 24px;
  color: #6b7280;
  position: relative;
}

.accounts-tab.accounts-tab--active {
  color: #10b981;
  font-weight: 500;
}

.accounts-tab.accounts-tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #10b981;
}

/* Тело экрана */
.accounts-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
}

.accounts-subbody, .accounts-pane-2{
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 185px);
gap: 12px;
}

.accounts-pane {
  display: none;
  height: 100%;
}

.accounts-pane.accounts-pane--active {
  display: block;
}

/* Таблица аккаунтов */
.accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.accounts-tab-head{
  text-align: center;
  font-weight: 500;
  padding: 10px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #cecece;
 }

 .fio{
 text-align: left !important;
 }

.accounts-th-name{
  padding: 7px 16px 7px 16px;
}

.accounts-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.accounts-th-budget,
.accounts-th-track,
.accounts-th-actions,
.accounts-cell-center {
  text-align: center;
}

.accounts-input-number {
  width: 90px;
  padding: 4px 8px;
  
  border: 1px solid #d1d5db !important;
  font-size: 14px;
  outline:none;
}

.accounts-checkbox {
  width: 18px;
  height: 18px;
}

.accounts-icon-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px 8px;
}

/* v91.4: иконки действий в таблице аккаунтов (как в notify) */
.accounts-table td.accounts-cell-center:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.accounts-table td.accounts-cell-center:last-child .notify-icon {
  margin-left: 0;
}

/* Иконки действий */
.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.accounts-table thead th{
  position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f9f9f9;
  }

/* Футер таблицы */
.accounts-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;      
  padding-top: 16px;  
  background-color: #fff; 
}
  

/* Общие кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 20px;
  padding: 8px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  min-width: 140px;
}

.brn-right{
  margin-left: auto;
}


.btn-primary {
  background: #3eae99;
  color: #ffffff;
  border-color: #d1d5db;
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  background: #3eae9993;
}

.btn-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: var(--shadow-card);
}

.btn-danger {
  border-color: #d1d5db;
  color: #ff6d6d;
  background: #eeeeee;
  box-shadow: var(--shadow-card);
}

/* Форма редактирования аккаунта */
.account-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 48px;
  overflow-y: auto;
}

.account-edit-main {
  min-width: 0;
}

.account-edit-title {
  font-size: 24px;
  line-height: 32px;
  margin: 0 0 10px;
  font-weight: normal;
}

.account-edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.account-field-row, .tests-submit-spacer{
  display: flex;
  align-items: center;
  gap: 24px;
}

.account-field-label {
  width: 180px;
  font-size: 14px;
  color: #9ca3af;
}

.account-field-input {
  flex: 1 1 auto;
  
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 14px;
  outline:none;
}

/* Телефон */
.account-phone-wrapper {
  display: flex;
  align-items: center;
}

.account-phone-prefix {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-right: none;
  background: #f9fafb;
  font-size: 14px;
}


/* Пароль */
.account-password-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-password-toggle {
border: 0;
background: #fff;
cursor: pointer;
}

.password-eye{
  height: 19px;
}

/* Роль */
.account-select {
  max-width: 240px;
}

/* Блок с фотографией */
.account-edit-aside {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.account-photo-uploader {
  width: 220px;
  height: 260px;
 
  border: 1px dashed #d1d5db;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}


.account-photo-uploader.is-dragover{
  border-color: #4aa3ff;
  background: #f1f8ff;
}
.account-photo-avatar {
  width: 88px;
  height: 88px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  margin-bottom: 16px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-photo-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9999px;
}

.account-photo-text {
  font-size: 13px;
  color: #6b7280;
}

.account-photo-link {
  color: #3b82f6;
}

.account-edit-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}


/* === POPUPS FROM POP VERSION === */
.topbar-popups {
  position: absolute;
  top: 64px;
  right: 24px;
  z-index: 50;
  pointer-events: none;
}

.popup-card {
  display: none;
  width: 420px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  border: 1px solid #e5e7eb;
  pointer-events: auto;
}

.popup-header-row {
  padding: 15px 20px 15px 20px;
  background: #e5e7eb;
}

/* generic show state */
.popup-card.is-visible {
  display: block;
}

/* account popup */
.popup-card-account {
  display: none;
  width: 460px;
}

.popup-account-main {
  display: flex;
  gap: 24px;
  margin: 20px;
}

.popup-account-avatar-wrapper {
  flex-shrink: 0;
}

.popup-account-avatar-ring {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #41c0a9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-account-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-image: url("avatar.svg");
  background-size: cover;
  background-position: center;
}

.popup-account-avatar-camera {
  position: absolute;
  bottom: 0px;
  padding: 0px;
  right: -7px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* account text */
.popup-account-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.popup-account-name {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.popup-account-email {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

.popup-account-manage-btn {
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #9ca3af;
  background: #ffffff;
  cursor: pointer;
  margin-left: auto;
  order: 10;
}

/* logout row */
.popup-account-logout {
  margin: 8px 0 16px;
  padding: 10px 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #111827;
}

.popup-account-logout-icon {
  width: 20px;
  height: 20px;
  
  border: 2px solid #111827;
  border-right: none;
  position: relative;
}

.popup-account-legal {
  display: flex;
  justify-content:space-between;
  gap: 26px;
  font-size: 14px;
  margin-top: 4px;
}

.popup-account-legal-link {
  color: #2563eb;
  text-decoration: none;
}

/* help popup */
.popup-card-help {
  display: none;
  width: 420px;
}

.popup-card-help-text{
padding: 20px;


}

.popup-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  padding: 9px 20px 11px 20px;
  margin: 0px;
  background: #e5e7eb;

}

.popup-help-link {
  padding: 0;
  margin: 0 0 4px;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 16px;
  cursor: pointer;
}

.popup-help-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  color: #4b5563;
}

.popup-help-section {
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.popup-help-section-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.popup-help-status {
  display: inline-block;
  padding: 6px 20px 8px 20px;
  background: #d1d5db;
  font-size: 13px;
  margin-bottom: 10px;
  Color: #FFF;
  letter-spacing: 1px;
  text-shadow:
    -1px -1px 1px silver,
    1px -1px 1px silver;
}

.popup-help-text {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 12px;
}

.popup-help-messengers {
  display: flex;
  gap: 12px;
}

.messenger-btn {
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messenger-btn-tg {
  background-color: #2ca4f7;
}

.messenger-btn-wa {
  background-color: #20b266;
}

.messenger-btn-tg::before,
.messenger-btn-wa::before {
  content: attr(data-label);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.popup-help-contacts {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.popup-help-contact {
  color: #2563eb;
  text-decoration: none;
}

/* notifications popup */
.popup-card-notifications {
  display: none;
}

.popup-header-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #2563eb;
  cursor: pointer;
}

.popup-notifications-list {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.popup-notification-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 20px 10px 20px;
  gap: 15px;
  align-items: center;
}

.popup-notification-item + .popup-notification-item {
  border-top: 1px solid #e5e7eb;
}

.popup-notification-icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.popup-notification-body {
  flex: 1;
 
}

.popup-notification-text {
  font-size: 14px;
  color: #111827;
}

.popup-notification-link {
  color: #1861ff;
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 12px;
}

.popup-notification-meta {
  font-size: 12px;
  color: #6b7280;
}


.popup-notification-delete {
    width: 20px;
    height: 20px;
    background: url("Del.svg") center center / contain no-repeat;
    border: none;
    cursor: pointer;
    padding: 0;
}


.popup-footer-row {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
}

.popup-footer-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #2563eb;
  cursor: pointer;
}


/* --- Notification icons with SVG --- */
.popup-notification-icon-plus {
  background-image: url('circle+.svg');
}

.popup-notification-icon-info {
  background-image: url('circle-i.svg');
}

.popup-notification-icon-warning {
  background-image: url('circle-!.svg');
}

.popup-notification-icon-warning-plus {
  background-image: url('circle-!+.svg');
}

/* --- Messenger buttons with SVG icons --- */
.messenger-btn {
  width: 44px;
  height: 44px;
  border: none;
  cursor: pointer;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.messenger-btn-tg {
  background-image: url('telegram.svg');
}

.messenger-btn-wa {
  background-image: url('whatsapp.svg');
}

/* --- Logout icon uses SVG --- */
.popup-account-logout-icon {
  width: 24px;
  height: 24px;
  border: none;
  background: url('exit.svg') center center / contain no-repeat;
}

.popup-account-logout-icon::before,
.popup-account-logout-icon::after {
  content: none;
}

/* --- Common grey footers for all popups --- */
.popup-card {
  position: relative;
  overflow: hidden;
}

.popup-footer-row,
.popup-help-contacts,
.popup-account-footer {
  padding: 15px 20px 15px 20px;
  background: #e5e7eb;
 
}

.popup-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-footer-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #2563eb;
  cursor: pointer;
}

.popup-help-contacts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.popup-help-contact {
  color: #2563eb;
  text-decoration: none;
}

.popup-account-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.popup-account-logout {
  display: flex;
    gap: 10px;
    background: none;
    padding: 4px 0;
    cursor: pointer;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

.popup-account-legal {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 26px;
  font-size: 14px;
  margin-top: 4px;
}


/* ===== Экраны main (dashboard / accounts) ===== */
.screen {
  display: none;
}

.screen.screen--active {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
}

/* ===== Аккаунты (экран) ===== */
.accounts-wrapper {
  margin: 0 auto;
}

.accounts-header {
  margin-bottom: 16px;
  display:flex;
  justify-content: space-between;
}

.accounts-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.accounts-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.accounts-card {
  background: var(--bg-card);
  
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.accounts-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.accounts-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  background: #f3f4f6;
}

.accounts-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  color: #727272;
  min-width: 150px;
  
}

.accounts-tab--active {
  background: #ffffff;
  color: #111827;
}

.accounts-card-body {
  margin-top: 8px;
}

.accounts-panel {
  display: none;
}

.accounts-panel.accounts-panel--active {
  display: block;
}


.accounts-table th {
  font-weight: 500;
  color: #343434;
}

.accounts-row-edit,
.accounts-row-delete {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.accounts-row-edit {
  margin-right: 6px;
  background: url('Group 34.svg') center center / contain no-repeat;
}

.accounts-row-delete {
  background: url('Del.svg') center center / contain no-repeat;
}

.accounts-form {
  margin-top: 4px;
}

.accounts-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.accounts-field-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.accounts-input {
  width: 100%;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 13px;
}

.accounts-form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.accounts-save-btn {
  border: none;
  border-radius: 50%;
  padding: 6px 16px;
  font-size: 13px;
  background: #41c0a9;
  color: #ffffff;
  cursor: pointer;
}

.accounts-cancel-btn {
  border-radius: 50%;
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
}

/* ===== Управление уведомлениями (экран) ===== */
.screen-notify-settings {
  height: 100%;
}


/* ======================= СЕКЦИЯ: НАСТРОЙКА ОПОВЕЩЕНИЙ ======================= */


.notify-header .notify-title {
  margin: 10px 0 4px;
  display: flex;
  justify-content: center;
}


.notify-tabs {
  display: inline-flex;
  gap: 48px;
  border-bottom: 1px solid #e5e7eb;
}

.notify-tab {
  border: none;
  background: transparent;
  padding: 0 0 8px;
  font-size: 20px;
  line-height: 1.4;
  cursor: pointer;
  color: #6b7280;
}

.notify-tab--active {
  color: #10b981;
  font-weight: 500;
  border-bottom: 2px solid #10b981;
}

.notify-pane--active {
  display: block;
  height: 100%;
}

.notify-card {
  background: #ffffff;
  overflow: hidden;
  height: 100%;
  display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

/* таблица */
.notify-table {
  
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  grid-template-columns: 5fr 1fr 1fr 1fr 2fr;
}

.table-skroll{
   overflow: auto
  
}

.notify-th {
  padding: 12px 24px;
  background: #e2e2e27b;
  font-weight: 600;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.notify-th--left {
  text-align: left;
  width: 50%;
}

.notify-th--right {
  text-align: right;
  padding-right: 40px;
  width: 20%;
}

.notify-td {
  padding: 12px 24px;
  border-bottom: 1px solid #f1f5f9;
  color: #111827;
  vertical-align: middle;
}

.notify-tp {
  padding: 12px 24px;
  border-bottom: 1px solid #f1f5f9;
  color: #3b3b3b;
  vertical-align: middle;
  font-size: 14px;
  line-height: 26px;
}

.notify-td--left {
  text-align: left;
}

.notify-td--center {
  text-align: center;
}

.notify-td--actions {
  text-align: right;
  padding-right: 40px;
}

/* чекбоксы в матрице */
.notify-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notify-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notify-check-box {
  width: 22px;
  height: 22px;
  
  border: 1px solid #cfd3dd;
  background: #ffffff;
}

.notify-check-box--filled {
  border-color: #1ba586;
  background: #20b997;
  position: relative;
}

.notify-check-box--filled::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(40deg);
}

/* футер матрицы */
.notify-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 18px;
}

.notify-show {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #9da2b1;
}

.notify-show input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notify-show-box {
  width: 18px;
  height: 18px;
  
  border: 1px solid #d4cee9;
  background: #f4f3ff;
  position: relative;
}

.notify-show-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #a18cd9;
  border-bottom: 2px solid #a18cd9;
  transform: rotate(40deg);
}

/* шаблоны: иконки и футер */
.notify-templates-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 18px;
}

.notify-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cfd3dd;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notify-add-icon {
  font-size: 22px;
  line-height: 1;
  color: #a0a5b8;
}

/* иконки редактировать / удалить */
.notify-icon {
  width: 40px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  margin-left: 12px;
}


/* красный крест */
.notify-icon--edit



.notify-icon--delete::after {
  transform: rotate(-45deg);
}

/* animated checkbox state for notifications matrix */
.notify-check-box {
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.notify-check-box::after {
  transition: opacity 0.35s ease, transform 0.35s ease;
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}

.notify-check input:checked + .notify-check-box {
  border-color: #1ba586;
  background: #20b997;
  box-shadow: var(--shadow-card);
}

.notify-check input:checked + .notify-check-box::after {
  opacity: 1;
  transform: scale(1) rotate(40deg);
}

/* scroll container for templates table with sticky header */
.notify-table-wrap {
  max-height: calc(100% - 81px);
  overflow: hidden;
  margin-bottom: 10px; /* оставить отступ до футера */
}

.notify-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* override old filled class to behave as empty outline by default */
.notify-check-box--filled {
  background: #ffffff;
  border-color: #cfd3dd;
  box-shadow: none;
}

/* animated state for "Показывать уведомления" toggle */
.notify-show-box {
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.notify-show-box::after {
  transition: opacity 0.35s ease, transform 0.35s ease;
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}

.notify-show input:checked + .notify-show-box {
  background: #f4f3ff;
  border-color: #a18cd9;
}

.notify-show input:checked + .notify-show-box::after {
  opacity: 1;
  transform: scale(1) rotate(40deg);
}

.notify-show input:not(:checked) + .notify-show-box {
  background: #ffffff;
  border-color: #d4cee9;
}

.notify-show input:not(:checked) + .notify-show-box::after {
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}

/* v6 override: animated matrix checkbox with green filled state */
.notify-check-box {
  width: 22px;
  height: 22px;
  
  border: 1px solid #cfd3dd;
  background: #ffffff;
  position: relative;
  transition: background-color 0.35s ease,
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}

.notify-check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: scale(0.6) rotate(40deg);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.notify-check input:checked + .notify-check-box {
  background: #20b997;
  border-color: #1ba586;
  box-shadow: var(--shadow-card);
}

.notify-check input:checked + .notify-check-box::after {
  opacity: 1;
  transform: scale(1) rotate(40deg);
}

/* v6 override: bottom "Показывать уведомления" checkbox */
.notify-show-box {
  width: 18px;
  height: 18px;
  
  border: 1px solid #d4cee9;
  background: #ffffff;
  position: relative;
  transition: background-color 0.35s ease,
              border-color 0.35s ease;
}

.notify-show-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #a18cd9;
  border-bottom: 2px solid #a18cd9;
  transform: scale(0.6) rotate(40deg);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.notify-show input:checked + .notify-show-box {
  background: #f4f3ff;
  border-color: #a18cd9;
}

.notify-show input:checked + .notify-show-box::after {
  opacity: 1;
  transform: scale(1) rotate(40deg);
}

.notify-show input:not(:checked) + .notify-show-box {
  background: #ffffff;
  border-color: #d4cee9;
}

.notify-show input:not(:checked) + .notify-show-box::after {
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}

/* v7: notifications popup "Подробно" behaviour */
.popup-card-notifications .popup-notifications-list {
  max-height: 300px; 
  overflow-y: hidden;
  transition: max-height 0.25s ease;
}

.popup-card-notifications.popup-notifications-expanded .popup-notifications-list {
  max-height: 420px; /* ~5 уведомлений */
  overflow-y: auto;
}

/* ===== Template editor screen ===== */


/* ======================= СЕКЦИЯ: КОНСТРУКТОР / ШАБЛОНЫ ======================= */
.template-editor {

  margin: 0 auto;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.template-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.template-editor-head{
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.template-editor__title {
  font-size: 22px;
  font-weight: 500;
  color: #111827;
  margin: 0;
}

.template-editor__back {
  border: none;
  background: none;
  padding: 4px 0;
  font-size: 14px;
  color: #4f46e5;
  cursor: pointer;
}

.template-editor__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-editor__field {
  display: flex;
  gap: 10px;
}
.template-text-editor__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.template-editor__label {
  font-size: 13px;
  color: #6b7280;
}

.template-editor__input {
  height: 36px;
  padding: 6px 10px;
  
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  width: 280px;
}

.template-editor__input:focus {
  border-color: #20b997;
  box-shadow: var(--shadow-card);
}

.template-editor-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  background: #f9fafb;
}

.template-editor-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1.1;
  cursor: pointer;
  
  color: #4b5563;
}

.template-editor-btn span {
  font-weight: 600;
}

.template-editor-btn:hover {
  background: #e5e7eb;
}

.template-editor-toolbar__divider {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 2px;
}

.template-editor-body {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  flex: 1;
  min-height: 0;
}

.template-editor-body:focus {
  border-color: #20b997;
  box-shadow: var(--shadow-card);
}

.template-editor__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* простенькая secondary-кнопка */
.btn.btn-secondary {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn.btn-secondary:hover {
  background: #f3f4f6;
}

/* v10: improve template editor scrolling & source mode */
.template-editor-body {
  min-height: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: #ffffff;
}

.template-editor__source {
  display: none;
}

.template-editor-source {
  width: 100%;
  min-height: 260px;
  max-height: 360px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
  resize: vertical;
  box-sizing: border-box;
}

.template-editor-toolbar--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.template-editor-btn--mode {
  margin-left: 4px;
  font-weight: 500;
}

/* ==== v11: Template editor layout & toolbar icons, scroll fixes ==== */

/* экран редактора — внутри общей высоты приложения, с прокруткой при переполнении */
.screen-template-editor {
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* сам редактор — ограничиваем высоту области с текстом */
.template-editor {
  min-height: 100%;
  overflow-y: auto;
}

.template-editor-body {
  min-height: 100%;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.4;
}

/* HTML-режим */
.template-editor__source {
  display: none;
}

.template-editor__source textarea {
  width: 100%;
  min-height: 260px;
  max-height: calc(100vh - 260px);
  resize: vertical;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
  font-size: 13px;
  line-height: 1.5;
  box-sizing: border-box;
}

/* Toolbar layout */
.template-editor-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  background: #f9fafb;
}

.template-editor-btn {
  border: none;
  background: transparent;
  padding: 4px 6px;
  cursor: pointer;
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.template-editor-btn:hover {
  background-color: #e5e7eb;
}

.template-editor-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}

/* undo / redo */
.template-editor-btn-icon-undo::before,
.template-editor-btn-icon-redo::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #4b5563;
  border-radius: 50%;
  border-right-color: transparent;
}

.template-editor-btn-icon-redo {
  transform: scaleX(-1);
}

/* bold / italic / underline / strike */
.template-editor-btn-icon-bold::before {
  content: "Ж";
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}

.template-editor-btn-icon-italic::before {
  content: "К";
  font-style: italic;
  font-size: 14px;
}

.template-editor-btn-icon-underline::before {
  content: "Ч";
  text-decoration: underline;
  font-size: 14px;
}

.template-editor-btn-icon-strike::before {
  content: "Ч";
  text-decoration: line-through;
  font-size: 14px;
}

/* font size */
.template-editor-fontsize {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.template-editor-fontsize-select {
  
  border: 1px solid #d4d4d4;
  padding: 2px 4px;
  font-size: 12px;
  background: #ffffff;
}

/* align icons */
.template-editor-btn-icon-align-left::before,
.template-editor-btn-icon-align-center::before,
.template-editor-btn-icon-align-right::before,
.template-editor-btn-icon-align-justify::before {
  content: "";
  position: absolute;
  inset: 3px 4px;
  box-shadow: var(--shadow-card);
}

.template-editor-btn-icon-align-center::before {
  inset: 3px 6px;
}

.template-editor-btn-icon-align-right::before {
  inset: 3px 8px;
}

.template-editor-btn-icon-align-justify::before {
  inset: 3px 4px;
}

/* link / image / table / spacing */
.template-editor-btn-icon-link::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 8px;
  
  border: 2px solid #4b5563;
}

.template-editor-btn-icon-image::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #4b5563;
  box-shadow: var(--shadow-card);
}

.template-editor-btn-icon-table::before {
  content: "";
  position: absolute;
  inset: 4px;
   border: 1px solid #4b5563;
  box-shadow: var(--shadow-card);
}

.template-editor-btn-icon-spacing::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 4px;
  bottom: 4px;
  border: 1px dashed #4b5563;
}

/* clear */
.template-editor-btn-icon-clear::before {
  content: "⨯";
  font-size: 14px;
  color: #ef4444;
}

/* code */
.template-editor-btn-icon-code::before {
  content: "</>";
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
}

/* active mode button */
.template-editor-btn--mode {
  border-left: 1px solid #d1d5db;
  margin-left: 4px;
  padding-left: 10px;
}

/* === v12: font-family selector & upload custom font === */

.template-editor-fontface {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.template-editor-fontface-select {
  
  border: 1px solid #d4d4d4;
  padding: 2px 4px;
  font-size: 12px;
  background: #ffffff;
}

/* upload font icon: small arrow into a box */
.template-editor-btn-icon-font-upload::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 1px solid #4b5563;
}

.template-editor-btn-icon-font-upload::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 3px;
  height: 6px;
  border-left: 2px solid #4b5563;
  border-bottom: 2px solid #4b5563;
  transform: rotate(-45deg);
}

/* ===== v14: FINANCE SCREENS ===== */

.screen-finance-invoice,
.screen-finance-act,
.screen-finance-price {
  height: 100%;
  width: 100%;
}

.finance-price-add{
height: 35px;
width: 35px;
border-radius: 50%;
border: 1px #cacaca;
background-color: #ececec;
}

.finance-price-add:hover{
background-color: #acffec;
}


.finance-act-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}


/* ======================= СЕКЦИЯ: ФИНАНСЫ ======================= */
.finance-wrapper {

  margin: 0 auto;
  height: 100%;
  width: 100%;
}

.finance-tabs {
  display: inline-flex;
  gap: 40px;
  border-bottom: 2px solid #e5e7eb;
}

.finance-sum-footer{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  justify-content: flex-end;
}

.finance-tab {
  position: relative;
  padding: 0 0 10px;
  border: none;
  background: none;
  font-size: 22px;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
}

.finance-tab--active {
  color: #111827;
}

.finance-tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 50%;
  background: #20b997;
}

.finance-card {
  background: #ffffff;
   box-shadow: var(--shadow-card);
  padding: 20px 20px 20px;
  height: 100%;
}

.finance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.finance-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  font-weight: normal;
}

.finance-invoice-body {
  display: flex;
  flex-direction: column;
  
 
 }

.finance-details {
  margin: 0;
}

.finance-details-row {
  display: flex;
  gap: 40px;
  padding: 6px 0;
}

.finance-details-term {
  min-width: 260px;
  font-size: 16px;
  color: #9ca3af;
}

.finance-details-value {
  font-size: 16px;
  color: #111827;
}

.finance-details-input {
  width: 280px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  color: #111827;
}

.finance-details-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: var(--shadow-card);
}

.finance-amount-label {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.finance-amount-title {
  font-size: 16px;
}

.finance-amount-input {
  min-width: 220px;
  height: 40px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  font-size: 16px;
}

.finance-card-footer {
  display: flex;
  gap: 16px;
  height: fit-content;
  flex-shrink: 0;
  padding-top: 5px;
}

.finance-table th {
    position: sticky;
    top: 0;
    /* Обязательно задайте цвет фона, иначе текст строк будет просвечивать сквозь заголовки */
    background-color: #ffffff; 
    z-index: 1;
}

.finance-card-footer--right {
  justify-content: flex-end;
}

/* Act of reconciliation */

.finance-act-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
}

.finance-act-left {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: flex-end;
}

.finance-act-label {
  font-size: 16px;
  color: #4b5563;
}

.finance-act-tabs {
  display: inline-flex;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 50%;
  gap: 4px;
}

.finance-act-tab {
  border: none;
  background: transparent;
  padding: 6px 16px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: #4b5563;
}

.finance-act-tab--active {
  background: #ffffff;
  color: #111827;
  box-shadow: var(--shadow-card);
}

.finance-act-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.finance-act-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 20px;
}

.finance-act-period {
  white-space: nowrap;
  font-size: 16px;
}

.finance-act-body {
  display: grid;
  flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}

.finance-table-wrapper {
  overflow: visible;
  height: auto;
  margin-bottom: 20px; /* leave 20px gap above footer button */
 }

.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  padding-bottom: 20px;
  margin-top: 20px;
}

.finance-table thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  padding: 7px 16px 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-weight: 600;
  color: #000;
 }
 
 .finance-price-table{
  margin-top: 0px;   
 }

.finance-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.finance-cell-bold {
  font-weight: 600;
}

.finance-cell-muted {
  color: #6b7280;
}

.finance-cell-center {
  text-align: center !important;
}

.finance-act-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finance-act-filter {
  width: 100%;
  padding: 10px 16px;
 
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.finance-act-filter--primary {
  background: #20b997;
  border-color: #20b997;
  color: #ffffff;
}

/* Price list */

.finance-price-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.finance-price-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 50%;
  margin-bottom: 16px;
}

.finance-price-tab {
  border: none;
  background: transparent;
  padding: 6px 18px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: #4b5563;
}

.finance-price-tab--active {
  background: #ffffff;
  box-shadow: var(--shadow-card);
  color: #111827;
}

.finance-price-body {
  margin-top: 4px;
}

/* Reuse .finance-table for price list */

/* Finance price list panes */
.finance-price-pane {
  display: none;
}

.finance-price-pane.finance-price-pane--active {
  display: block;
}

/* === Accordion v17 === */
.acc-l1, .acc-l2 {
   border-bottom:1px solid #e6e6e6;
  }


.acc-icon {
   font-size:22px;
   width:18px;
   display:inline-block;
   transition:.3s; 
  }



.acc-l1-body, .acc-l2-body { 
  max-height:0;
  overflow:hidden;
  padding-left:44px;
  transition:max-height .35s ease,padding .3s ease; 
}



/* === Tests / Invitations summary & form v17.5 === */

/* ======================= СЕКЦИЯ: ТЕСТЫ ======================= */
.tests-summary {
  margin-top: 24px;
  margin-bottom: 28px;
}


.body-dolgn{
  display: flex;
  flex-direction: column;
  gap: 15px;
 }

.tests-summary-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  column-gap: 40px;
  font-size: 18px;
  line-height: 1.5;
  color: #555555;
  margin-bottom: 12px;
}

.tests-single-name{
  font-size: 18px;
  font-weight: 100;
  text-align: left;
  cursor: pointer;
}

/* v91: actions (edit/delete) for должности */
.tests-single {
  width: 100%;
  justify-content: flex-start;
}

.tests-single-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tests-single-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tests-single-action-btn img {
  width: 18px;
  height: 18px;
}


/* v91.1: inline-редактирование должности — как tests-field */
.tests-single-edit-input{
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  outline: none;
  min-width: 120px;
}

.tests-single-edit-input {
  font-size: 18px;
  font-weight: 100;
  border: 1px solid #d4d4d4;
  padding: 4px 8px;
  outline: none;
  width: 100%;
  max-width: 520px;
}

.tests-summary-label {
  text-align: left;
}

.tests-summary-value {
  color: #555555;
}

/* form fields */
.tests-form {
display: flex;
width: 100%;
gap: 20px;
}

.tests-field{
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  background: #f5f5f5;
  padding: 12px 16px;
  width: 50%;
  box-shadow: var(--shadow-card);
}

.tests-field-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 18px;
  outline: none;
}

 .tests-field-label {
  width: 90px;
  font-size: 20px;

}

.tests-field-label-fio{
  width: 65px;
  font-size: 20px;
}

/* === Tests / Invitations layout tune v17.5 === */
.screen-tests-all {
  height: 100%;
  overflow-y: hidden;
  box-shadow: var(--shadow-card);
  background: #ffffff;
  padding: 20px !important;
}

.tests-invite-section {

  margin: 0 auto;
  background: var(--bg-card);
 
  box-shadow: var(--shadow-card);
  padding: 20px 32px 28px;
  height: auto;
  min-height: 0;
}

/* Accordion density */

.acc-l1 {
  padding: 4px 0;
}

.acc-l1-header {
  padding: 10px 0;
  font-size: 20px;
  font-weight: 400;
}

.acc-l1.open .acc-l1-body,
.acc-l2.open .acc-l2-body {
  padding-top: 8px;
  padding-bottom: 8px;
}

.acc-l2-body label {
  padding: 2px 0;
  font-size: 14px;
  cursor: pointer;
}

/* === Layout экрана "Приглашения" v17.6 === */


.tests-invite-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;

}

/* Белая карточка, как на макете */
.tests-card {
  background: #ffffff;
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 20px; 
  scrollbar-width: thin;
  box-shadow: none;
  }

/* Строки верхнего и нижнего аккордеона (первый уровень) */
.tests-card-block {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
 }

 .tests-picker-card-block {
  border-bottom: 1px solid #ffffff;
  padding: 0 30px 0px 30px;
  background: #ffffff;
  position:relative;
  height: 100%;
 }

.tests-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tests-card-line-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-top: 12px;
}

.tests-title-wrapper {
  font-size: 22px;
  font-weight: 100;
  margin-bottom: 20px;
}

/* Заголовок 1 уровня */
.acc-l1-header {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 400;
  padding: 1px;
}
.tests-header-actions{
  display:flex;
  gap: 15px;
  flex-direction: row-reverse;
  width: 110px;
  position: absolute;
  right: 40px;
  top: 88%;
}

.acc-l1-header-1 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 400;
  padding: 1px;
  margin-bottom: 15px;
}

.acc-icon {
  font-size: 24px;
  width: 18px;
  text-align: center;
  transition: transform 0.25s;
}
.acc-l1.open .acc-icon-l1,
.acc-l2.open .acc-icon-l2 {
  transform: rotate(45deg);
}



.tests-add-btn {
  border: none;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  padding: 6px 18px;
  font-size: 16px;
  color: #ff6d6d;
  cursor: pointer;
}

/* Тело 1 и 2 уровня аккордеона */
.acc-l1-body,
.acc-l2-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
}

/* чуть меньше паддинги, чтобы всё влезало в экран в свернутом виде */
.acc-l1.open .acc-l1-body,
.acc-l2.open .acc-l2-body {
  max-height: 800px;
  padding: 10px 0 10px 0;
}

/* Заголовок 2 уровня (категории тестов) */
.acc-l2 {
  padding: 5px 0;
}

.acc-l2-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
}

/* Список чекбоксов тестов */
.acc-l2-body label {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 2px 0;
  gap: 8px;
  justify-content: center;
}

/* === Блок "Выбрано" === */
.tests-summary {
  margin-top: 16px;
  margin-bottom: 24px;
}

.tests-summary-title {
  font-size: 22px;
  font-weight: 100;
  margin: 0 0 10px 25px;
}

.tests-summary-row {
  display: flex;
  font-size: 18px;
  font-weight: 100;
  line-height: 1.5;
  color: #555555;
  margin: 0 0 7px 25px;
}

.tests-summary-label {
  width: 280px;
}

.tests-summary-value {
  flex: 1;
  font-weight: 400;
}

/* === Низ: кнопка "Отправить" === */


.tests-submit-btn {
  border: none;
  color: #ff6d6d;
  font-size: 18px;
  padding: 8px 20px;
  cursor: pointer;
}

/* === v17.16 layout: separate tiles on white background === */

/* Белый общий фон */
.body {
 background: #ffffff; 
}

/* Внешняя обертка без серого фона */
.tests-invite-section {
  background: #ffffff;
  box-shadow: none;
}

/* Плашки 1-го уровня (Выбор тестов, Выбор должности) */
.tests-card-block.acc-l1 {
  background: #f5f5f5;
  padding: 0px 20px 0px 20px;
  box-shadow: var(--shadow-card);
}

/* Плашка "Выбрано" — белая, но тоже отдельный блок с отступами */
.tests-results-selected {
  background: #ffffff;
  margin: 20px 0;
  padding: 16px 24px;
}

/* Кнопки "Добавить тест/должность" и блок отправки */
.tests-add-btn {
  background: #f5f5f5;
  box-shadow: var(--shadow-card);
  margin-top: 20px;
  margin-left: 20px;
}

.tests-submit-btn {
  background: #f5f5f5;
  box-shadow: var(--shadow-card);
}

/* Отдельная плашка под кнопку "Отправить" */
.tests-submit-row {
  padding: 0 0px 10px 0px;
  text-align: right;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-content: center;
  align-items: flex-end;
  }

/* Контейнер для выравнивания */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  user-select: none; /* Чтобы текст не выделялся при быстрых кликах */
}

/* 1. Прячем стандартный системный чекбокс */
.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* 2. Создаем свой кастомный квадратик */
.custom-checkbox .checkmark {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #ccc;
   /* Скругление углов */
  margin-right: 10px; /* Отступ от текста */
  transition: background-color 0.2s, border-color 0.2s; /* Плавная анимация */
}

/* 3. Эффект при наведении (hover) */
.custom-checkbox:hover input ~ .checkmark {
  border-color: #4cd9c0; /* Цвет границы при наведении */
}

/* 4. Стили для ВКЛЮЧЕННОГО чекбокса */
.custom-checkbox input:checked ~ .checkmark {
  background-color: #4cd9c0; /* Основной цвет (например, коралловый как на ваших скринах) */
  border-color: #4cd9c0;
}

/* 5. Рисуем саму галочку (она скрыта по умолчанию) */
.custom-checkbox .checkmark::after {
  content: "";
  position: absolute;
  display: none;
  /* Формируем галочку из двух рамок */
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 6. Показываем галочку, когда чекбокс включен */
.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}
/* 7. Оформление тескста подписи */
.label-text{
  font-size: 18px;
  color: #555555;
  font-weight: 100;
  line-height: 1.5;
}


/* === v17.17 cognitive matrix & position selector === */
.tests-matrix-header,
.tests-matrix-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
  margin-top: 7px;
}
.tests-matrix-name-col {
  flex: 1;
}
.tests-matrix-name {
  flex: 1;
}
.tests-matrix-col,
.tests-matrix-cell {
 
  text-align: center;
}

/* simple custom checkbox for positions (can tweak later) */
.tests-single {
  display: inline-flex;
  align-items: center;
  margin-right: 24px;
  font-size: 14px;
}
.tests-single input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tests-single-box {
  width: 16px;
  height: 16px;
  border: 1px solid #d4d4d4;
  box-sizing: border-box;
  margin-right: 25px;
}
.tests-single input[type="checkbox"]:checked + .tests-single-box {
  background: #ff6d6d;
  border-color: #ff6d6d;
}

/* === v24: accordion SVG icons + position selector fix === */

/* override base acc-icon to use SVGs instead of rotated plus text */
.acc-icon {
  font-size: 0;
  width: 18px;
  height: 18px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: none;
}

/* level 1: bigger icons */
.acc-l1 .acc-icon-l1 {
  width: 22px;
  height: 22px;
  background-image: url("accordion-l1-closed.svg");
}
.acc-l1.open .acc-icon-l1 {
  background-image: url("accordion-l1-open.svg");
}

/* level 2: smaller icons */
.acc-l2 .acc-icon-l2 {
  width: 16px;
  height: 16px;
  background-image: url("accordion-l2-closed.svg");

}
.acc-l2.open .acc-icon-l2 {
  background-image: url("accordion-l2-open.svg");
}

/* cancel old rotation behavior */
.acc-l1.open .acc-icon-l1,
.acc-l2.open .acc-icon-l2 {
  transform: none;
  
}

/* fix for jumping checkbox in position selector */
.tests-single {
  position: relative;
}
.tests-single input[type="checkbox"] {
  left: 0;
  top: 0;
}


/* v38: плавное появление кнопок "Добавить тест" / "Добавить должность" */
.tests-add-btn {
  opacity: 0 !important;
  transform: translateY(-6px);
  transition: opacity 1.5s ease, transform 1.5s ease;
  pointer-events: none;
}

.btn-visible {
  opacity: 1 !important;
  transform: translateY(0);
  pointer-events: auto;
}

/* v38: мигающий псевдо-курсор в полях ФИО и E-mail */
.tests-field-input-wrap {
  position: relative;
  width: 100%;
  top: 2px; 
}


.tests-settings-input{
  position: relative;
  margin-left: 8px;
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
}

.tests-field-input-wrap::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 2px;
  height: 1.3em;
  background: rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.tests-field-input-wrap.caret-visible::before {
  opacity: 1;
  animation: blinkFieldCaret 1s steps(2, start) infinite;
}

.tests-settings-input::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 2px;
  height: 1.3em;
  background: rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}


@keyframes blinkFieldCaret {
  0% { opacity: 0.0; }
  50% { opacity: 0.6; }
  100% { opacity: 0.0; }
}


/* v39: модальные окна добавления должности */

/* ======================= МОДАЛЬНЫЕ ОКНА ======================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-window {
  background: #ffffff;
  padding: 28px 40px 32px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  min-width: 420px;
  max-width: 560px;
}

.modal-title {
  font-size: 24px;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  font-size: 16px;
  margin-bottom: 20px;
}

.modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 16px;
  cursor: pointer;
}

.modal-option-text {
  flex: 1;
  margin-right: 10px;
}

.modal-option-checkbox {
  display: none;
}

.modal-option-box {
  width: 18px;
  height: 18px;
  border: 1px solid #cccccc;
  background: #ffffff;
  box-sizing: border-box;
}

.modal-option-checkbox:checked + .modal-option-box {
  background: #ff6666;
  border-color: #ff6666;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 26px;
}

.modal-btn {
  min-width: 130px;
  padding: 8px 20px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}

.modal-btn-primary {
  color: #ff6666;
}

.modal-btn-cancel {
  color: #ff6666;
}

.modal-text-block {
  font-size: 16px;
  line-height: 1.4;
  color: #555555;
  max-width: 520px;
}

/* v42: простой список тестов, выравнивание как у когнитивных (первая колонка) */
.acc-l2-body-simple {
  max-width: 450px;
}

.acc-l2-body-simple label {
  justify-content: flex-start;
}

.acc-l2-body-simple .tests-simple-name {
  flex: 1;

}

.tests-matrix-header{
  font-size: 13px;  
  font-weight: 400;  
}
.mini-header {
  font-weight: 100;
  margin: 0px 0 5px 0px;
}

/* ======================= СЕКЦИЯ: КОНСТРУКТОР ТЕСТОВ (v76) ======================= */

.screen-constructor-tests {
  height: 100%;
  overflow: hidden; /* v80: no page scroll; internal panes scroll instead */
  min-height: 0;
}

.constructor-wrapper {
  width: 100%; 
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0; /* v80: allow flex children to shrink and scroll internally */


}

.constructor-header {
  margin: 7px;
}

.sub-constructor-header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: -20px;
}

.sub-picker-constructor-header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 10px;
}

.back-btn{
  width: 15px;
  height: 15px;
  border: 0px solid #d1d5db;
  background: #ffffff00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  margin-left: 25px;

}

.forth-btn{
  width: 15px;
  height: 15px;
  border: 0px solid #d1d5db;
  background: #ffffff00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  margin-left: 15px;
}

.back-forth-img{
  width: 15px;
  height: 15px;
  color:#16a34a;
}

.constructor-title {
  margin: 5px 0 4px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.constructor-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.constructor-question-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Навигация по билетам */

.constructor-ticket-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ticket-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0px solid #d1d5db;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.ticket-nav-btn:hover:not(:disabled) {
  background: #f9fafb;
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.12);
}

.ticket-nav-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.ticket-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.ticket-nav-label {
  display: flex;
  text-align: center;
  font-size: 16px;
}

.ticket-nav-title {
  color: var(--text-main);
}

.ticket-nav-count {
  color: var(--text-main);
}

/* Макет */

.ticket-nav-img{
  height: 30px;
  color:#16a34a;
}

.constructor-layout {
  display: flex;
  flex: 1 1 auto;      /* v80: occupy remaining height under header */
  min-height: 0;       /* v80: enable internal scrolling without growing parent */
  overflow: hidden;    /* v80: prevent layout from stretching when content overflows */
  position: relative;
 
   }

/* Левая панель: превью вопроса */
.test-setup-h{
margin-bottom: 20px;
}

.constructor-question {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* v80: make question area flexible; palette has fixed width */
  flex: 1 1 auto;
  min-width: 0;
}

/* v026: hover passthrough for ticket thumbnail under absolute overlay */
.screen-constructor-tests .constructor-question{ pointer-events: none; }
.screen-constructor-tests .constructor-question-top,
.screen-constructor-tests .constructor-question-footer,
.screen-constructor-tests .constructor-question-top *,
.screen-constructor-tests .constructor-question-footer *{ pointer-events: auto; }

.constructor-question-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.constructor-question-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.constructor-question-type {
  font-weight: 500;
  color: var(--text-main);
}

.constructor-question-body {
  /* --- Позиционирование --- */
  position: absolute;
  top: 30px;
 
  height: 380px;
  min-height: 0;
  
  /* ВНИМАНИЕ: aspect-ratio игнорируется при жестких width и height (см. ниже) */
  aspect-ratio: 1400 / 760; 

  /* --- Flexbox --- */
  display: flex;
  flex-direction: column;

  /* --- Оформление --- */
  background: #f9fafb;
 
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* ===================== Full ticket preview on hover (v020) ===================== */
.ticket-full-preview-popover{
  position: fixed;
  z-index: 9999;
  left: 20px;
  top: 20px;
  max-width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  /* появляемся сразу, исчезаем плавно (см. .is-hiding) */
  transition: opacity 0ms linear;
}

.ticket-full-preview-popover.is-visible{
  opacity: 1;
}

.ticket-full-preview-popover.is-hiding{
  transition: opacity 3000ms ease;
}

.ticket-full-preview-popover .ticket-preview{
  width: fit-content;
  height: fit-content;
  padding: 0;
}

.constructor-field {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 8px 10px;
  
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}

.constructor-field::placeholder {
  color: #9ca3af;
}

.constructor-question-footer {
  margin: 0px 40px 14px 0px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Кнопки слева (Удалить, Копировать, Добавить) */

.constructor-btn-danger,
.constructor-btn-secondary,
.constructor-btn-primary {
  font-size: 14px;
  line-height: 20px;
  padding: 8px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-clip: padding-box;
}

.constructor-btn-danger {
  background: #ffffff;
  border-color: var(--danger);
  color: var(--danger);
}

.constructor-btn-danger:hover {
  background: #fef2f2;
}

.constructor-btn-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.constructor-btn-secondary:hover {
  background: #f9fafb;
}

.constructor-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.constructor-btn-primary:hover {
  background: var(--accent-light);
}

/* Правая панель: элементы конструктора */

.constructor-palette {
  display: flex;
  flex-direction: column;
  width: 480px;
  box-sizing: border-box;
  scrollbar-gutter: stable; /* keep width stable even when scrollbar toggles */
  gap: 20px;
  z-index: 2;
  overflow-y: auto;
  overflow-x: hidden;
  margin-right: -10px;
}


/* Текстовые поля внутри аккордеона конструктора */
.constructor-acc-field {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  border: 1px solid #d4d4d4;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}
/* Настройки теста внутри конструктора */

.test-settings {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.test-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.test-settings-row-title {
  align-items: center;
}

.test-settings-row-title {
  font-size: 20px;
  font-weight: 500;
}


.test-settings-title-input {
  flex: 1;
  min-width: 220px;
  border: none;
  border-bottom: 1px solid #d4d4d4;
  padding: 4px 0;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.test-settings-title-input::placeholder {
  color: #9ca3af;
}

.test-settings-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-settings-label {
  font-size: 14px;
  color: #777777;
  width: max-content;
}

.test-settings-oll{
  display: flex;
  width: 100%;
  margin-bottom: 24px;
}

.test-settings-time {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid #d4d4d4;
  padding-bottom: 2px;
}

.test-settings-time-input {
  border: none;
  outline: none;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
  font-size: 16px;
  background: transparent;
  width: 90px;
}

.test-settings-time-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #111827;
  margin-left: 6px;
  position: relative;
}

.test-settings-time-icon::before,
.test-settings-time-icon::after {
  content: "";
  position: absolute;
  background-color: #111827;
}

.test-settings-time-icon::before {
  width: 1px;
  height: 6px;
  left: 50%;
  top: 3px;
  transform: translateX(-50%);
}

.test-settings-time-icon::after {
  width: 6px;
  height: 1px;
  left: 50%;
  top: 9px;
  transform: translateX(-10%);
}

.test-settings-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #d4d4d4;
  padding-bottom: 2px;
}

.test-settings-stepper-value {
  min-width: 28px;
  text-align: center;
  font-size: 16px;
}

.test-settings-stepper-arrows {
  display: flex;
  flex-direction: column;
}

.test-settings-stepper-arrow {
  width: 14px;
  height: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.test-settings-stepper-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.test-settings-stepper-arrow-up::before {
  border-bottom: 6px solid #111827;
  transform: translate(-50%, -40%);
}

.test-settings-stepper-arrow-down::before {
  border-top: 6px solid #111827;
  transform: translate(-50%, -60%);
}

.test-settings-row-total {
  justify-content: flex-end;
  font-size: 16px;
  gap: 8px;
}

.test-settings-total-label {
  color: #111827;
}

.test-settings-total-value {
  font-weight: 500;
}


.constructor-acc-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.constructor-palette-item {
  background: #ffffff;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.constructor-palette-item:hover {
  background: #f9fafb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.constructor-palette-item.open {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.25);
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.constructor-palette-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.constructor-palette-field {
  width: 100%;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  resize: vertical;
  font-size: 14px;
  min-height: 60px;
  outline: none;
}

.constructor-palette-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.constructor-palette-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--text-main);
  background: #f9fafb;
}

.constructor-palette-label {
  flex: 1 1 auto;
  text-align: left;
}

/* Адаптив: стэк колонок на узких экранах */

@media (max-width: 960px) {
  /* v80: keep palette cards at 480px and prevent layout jumps */
  .constructor-layout {
    flex-direction: column;
  }

  .constructor-palette {
    width: 480px;
    min-width: 480px;
    max-width: 480px;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ================= КОНСТРУКТОР ТЕСТОВ: Варианты ответов ================= */



.answers-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.answers-header-line {
  width: 18px;
  height: 1px;
  background: #f97373;
  flex-shrink: 0;
}

.answers-header-title {
  font-size: 18px;
  font-weight: 500;
  color: #111827;
}

.answers-note {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.answers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.answers-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.answers-checkbox {
  width: 20px;
  height: 20px;
  
  border: 1px solid #d4d4d4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.answers-checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answers-checkbox-mark {
  width: 12px;
  height: 12px;
  background: transparent;
  transition: background 0.15s ease;
}

.answers-checkbox-input:checked + .answers-checkbox-mark {
  background: #f97373;
}

.answers-input {
  width: 100%;
  border: 1px solid #d4d4d4;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
}

.answers-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.answers-add-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.answers-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #16a34a;
  background: #ffffff;
  position: relative;
  cursor: pointer;
}

.answers-add-btn::before,
.answers-add-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 50%;
  background: #16a34a;
  transform: translate(-50%, -50%);
}

.answers-add-btn::after {
  transform: translate(-50%, -50%) rotate(90deg);
}



/* v80: all constructor palette cards have the same width */
.constructor-palette > * {
  width: 100%;
  box-sizing: border-box;
}



.constructor-field--hidden {
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ticket-preview {
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 18px 18px 12px;
  min-height: 320px;
}

.ticket-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.ticket-preview-label {
  font-weight: 600;
  white-space: nowrap;
}


.ticket-preview-num.is-active {
  color: #d00;
  font-weight: 700;
}

.ticket-preview-upper {
  padding: 12px 0 14px;
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ticket-preview-main {
  padding: 14px 0 16px;
  min-height: 160px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ticket-preview-lowers {
  padding: 14px 0 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ticket-preview-lower {
  font-size: 16px;
  line-height: 1.4;
  white-space: pre-wrap;
  color: #222;
}

.ticket-preview-answers {
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.ticket-preview-answer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.ticket-preview-answer input {
  width: 18px;
  height: 18px;
}


/* ===== v85: MainBlock image dropzone + editor modal ===== */
/* Ticket preview main image */
/* Modal */
.img-editor{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.img-editor.is-open{
  display: block;
}
.img-editor__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.img-editor__dialog{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(860px, calc(100vw - 24px));
  background: #fff;
  box-shadow: 0 18px 46px rgba(0,0,0,0.22);
  overflow: hidden;
}
.img-editor__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e6edf5;
}
.img-editor__title{
  font-size: 18px;
  font-weight: 600;
}
.img-editor__close{
  width: 34px;
  height: 34px;
 
  border: 1px solid #e6edf5;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.img-editor__body{
  padding: 16px;
}
.img-editor__frame{
  width: 100%;
  border: 1px solid #e6edf5;
  background: #f7fafc;
  overflow: hidden;
}
.img-editor__canvas{
  width: 100%;
  height: auto;
  display: block;
  cursor: grab;
}
.img-editor__canvas.is-dragging{
  cursor: grabbing;
}
.img-editor__controls{
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.img-editor__control{
  display: flex;
  align-items: center;
  gap: 10px;
}
.img-editor__control input[type="range"]{
  width: 280px;
}
.img-editor__hint{
  font-size: 12px;
  color: #7b8aa0;
}
.img-editor__foot{
  padding: 14px 16px;
  border-top: 1px solid #e6edf5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.img-editor__btn{
  border: 1px solid #2f80ed;
  background: #2f80ed;
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}
.img-editor__btn--ghost{
  background: #fff;
  color: #2f80ed;
}


/* ===== v87: Avatar editor (circular crop) ===== */
.avatar-editor__frame{
  max-width: 420px;
  margin: 0 auto;
}

/* v91.2: фикс — базовые правила скрывали input[type=text] в label.tests-single.
   Также фиксируем выравнивание экшенов именно в блоке должностей. */
.acc-l1-body.body-dolgn label.tests-single {
  width: 100%;
  justify-content: flex-start;
  margin-right: 0;
}
.tests-single-edit-input {
  color: #1e293b;
  background: #ffffff;
  caret-color: #1e293b;
}


/* v91.3: input for editing role label */
.tests-role-edit-input{
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.2;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
 
  padding: 8px 10px;
  outline: none;
  caret-color: auto;
}
.tests-role-edit-input:focus{
  border-color: rgba(0,0,0,0.35);
}


.people-item--active {
  background: #3eae9915;
}


/* ===== v91_10: скролл в таблице аккаунтов + стабильное сохранение ===== */
.screen-accounts .accounts-card{
  /* фиксируем высоту карточки, чтобы внутри работал overflow */
  height: 540px;
  max-height: 540px;
}

.screen-accounts .accounts-pane--list{
  justify-content: flex-start;
  gap: 12px;
  min-height: 0;
}

.screen-accounts .accounts-table-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.screen-accounts {
  flex: 0 0 auto;
}


/* ===================== v012: notify templates - выбор шаблона №1/№2 ===================== */
.notify-th--slot {
  text-align: center;
  width: 160px;
}

.notify-td--slot {
  text-align: center;
  vertical-align: middle;
}

/* кастомный чекбокс */
.notify-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}

.notify-slot__input {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(17, 24, 39, 0.25);
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.notify-slot__input:hover {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.notify-slot__input:checked {
  background: #3eae99;
  border-color: #3eae99;
}

.notify-slot__input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}



/* ===================== v012: Template editor - кнопка табуляции + Tab в редакторе ===================== */
.template-editor-btn--tab{
  background-image: url('add-tab-text.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}


/* ===================== v012: ticket-preview - масштабируемая миниатюра билета ===================== */
.ticket-preview {
  overflow: hidden;
}

.ticket-preview-canvas {
  /* --- Размеры и отступы --- */
  width: 1400px;
  height: 760px;
  min-height: 0;
  margin: 0;
  padding: 30px;
  box-sizing: border-box;

  /* --- Flexbox --- */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 20px;

  /* --- Оформление --- */
  background: #fff;
  overflow: hidden;
  box-shadow: none; /* Если нужна тень, замените на var(--shadow-card) */

  /* --- Типографика --- */
  font-size: var(--ticket-font-size, 18px);
  line-height: 1.45;

  /* --- Трансформации --- */
  transform: scale(var(--ticket-preview-scale, 1));
  transform-origin: top left;
  will-change: transform;
}


/* v013: spacing for mainBlock image uploader */
.mainblock-media{
  margin-bottom: 12px;
}

/* === v014: mainBlock image plate (screen-constructor-tests) === */
.screen-constructor-tests .mainblock-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}

/* растягиваем "аккаунтный" загрузчик на всю ширину и делаем плашкой как в макете */
.screen-constructor-tests [data-constructor-main-image-uploader] {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 92px;
  padding: 18px 20px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

/* скрываем круглый превью-блок, но оставляем в DOM для работы логики */
.screen-constructor-tests [data-constructor-main-image-uploader] .account-photo-avatar {
  display: none;
}

.screen-constructor-tests [data-constructor-main-image-uploader] .account-photo-text {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.screen-constructor-tests [data-constructor-main-image-uploader] .mainblock-plate-title {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  color: #111827;
  margin-bottom: 8px;
}

.screen-constructor-tests [data-constructor-main-image-uploader] .mainblock-plate-subtitle {
  display: block;
  font-size: 15px;
  color: #94a3b8;
}

/* кликабельный overlay для выбора файла (использует существующий .account-photo-link с уже привязанным обработчиком) */
.screen-constructor-tests [data-constructor-main-image-uploader] .account-photo-link.mainblock-plate-link {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Кнопка удаления */
.screen-constructor-tests .mainblock-remove-btn {
  align-self: flex-start;
}

.screen-constructor-tests .mainblock-remove-btn:disabled {
  opacity: 0.4;
  cursor: default;
}


/* v017: mainBlock image sizing helper (центрирование) */
.ticket-preview-img{
  display: block;
  margin-left: 0;
  margin-right: 0;
}



/* ===================== v019: Полная верстка билета (desktop + mobile) ===================== */

/* Отступы от края билета 30px (моб: 15px) + вертикальные отступы 20px (моб: 15px) */
.ticket-preview{
  padding: 0; /* padding переносим на canvas, чтобы считалось частью "билета" при масштабировании */
  min-height: 760px;
}



/* Верхняя строка */
.ticket-preview-head{
  padding: 0;
}

/* Основная сетка: контент слева + варианты справа */
.ticket-preview-grid{
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

/* Левый столбец: текст/картинка/доп. блоки */
.ticket-preview-left{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px; /* вертикальные отступы между блоками */
}

/* Правый столбец: варианты ответов — прижат к правому краю */
.ticket-preview-right{
  flex: 0 1 420px;
  width: 420px;
  margin-left: auto;
  min-width: 260px;
  max-width: 420px;
  text-align: left;
}

/* Сбрасываем старую "карточную" вертикальную раскладку */
.ticket-preview-upper,
.ticket-preview-main,
.ticket-preview-lowers{
  padding: 0;
  border: 0;
  min-height: 0;
}

/* Блок вариантов ответов */
.ticket-preview-answers{
  display: block;
  padding: 0;
  text-align: left;
}

.ticket-preview-answers-title{
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 20px;
}

/* Список ответов: 1 или 2 колонки, между колонками 40px */
.ticket-preview-answers-list{
  display: flex;
  align-items: flex-start;
  gap: 40px; /* между колонками 40px */
}

/* Колонка ответов (DOM-контейнер) */
.ticket-preview-answers-col{
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Скролл-режим: 1 колонка + прокрутка при количестве > 5 (на мобилке) */
.ticket-preview-answers-list.is-scroll{
  flex-direction: column;
  gap: 18px;
  max-height: 420px;
  overflow: hidden;
  padding-right: 8px;
}
/* Пункты списка */
.ticket-preview-answer{
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.ticket-preview-answer:last-child{
  margin-bottom: 0;
}

/* Кнопки навигации внизу билета */
.ticket-preview-actions{
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 30px; /* между кнопками 30px */
}

.ticket-preview-action-btn{
  width: 170px;
  height: 50px;
  min-width: 0;
  padding: 0 18px;
  box-shadow: var(--shadow-card);
}

.ticket-preview-action-btn:hover{
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.12);
}

/* Мобильная версия */
@media (max-width: 768px){
  .ticket-preview{
    min-height: 0;
  }



  .ticket-preview-grid{
    flex-direction: column;
    gap: 15px;
  }

  .ticket-preview-right{
    min-width: 0;
    max-width: none;
    width: 100%;
    margin-left: 0;
  }

  /* картинку — на всю ширину */
  .ticket-preview-img{
    width: 100% !important;
    height: auto !important;
  }

  .ticket-preview-answers-title{
    margin-bottom: 15px;
    font-size: 20px;
  }

  /* если ответов много — скролл (как и на desktop) */
  .ticket-preview-answers-list.is-scroll{
    max-height: 260px;
  }

  /* кнопки под вариантами, отступы 15px */
  .ticket-preview-actions{
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .ticket-preview-action-btn{
    width: 100%;
  }
}

/* ===================== v021: Ticket preview layout fix (full-width blocks + main flex row) ===================== */
/* Требование: все тестовые блоки во всю ширину; картинка и ответы в одном общем флекс-блоке (картинка слева, ответы справа)
   + ответы: 1 колонка если <=5, 2 колонки если >5 (иначе 1 колонка + скролл если не помещается).
*/

/* На desktop: верхний/нижние блоки — на всю ширину, а main + answers — одна строка */
.ticket-preview-upper,
.ticket-preview-lowers{
  width: 100%;
}

.ticket-preview-mainrow{
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}

.ticket-preview-main{
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-preview-answers{
  flex: 0 0 auto;
  margin-left: auto; /* прижимаем к правому краю */
  min-width: 260px;
  max-width: 420px;
  text-align: left;
}

.ticket-preview-lowers{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Ответы должны идти вертикальным списком (и корректно раскладываться по колонкам) */
.ticket-preview-answer{
  display: flex; /* вместо inline-flex, чтобы не складывались в строку */
  width: auto;
  max-width: 100%;
}

/* Картинка в левом столбце — слева (без центрирования) */
.ticket-preview-main .ticket-preview-img{
  margin-left: 0;
  margin-right: 0;
}

/* Мобильная версия: main + answers в колонку, ответы под картинкой */
@media (max-width: 768px){
  .ticket-preview-mainrow{
    flex-direction: column;
    gap: 15px;
  }

  .ticket-preview-answers{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
  }

  .ticket-preview-lowers{
    gap: 15px;
  }
}

/* ===================== FINAL: Ticket preview (pixel-perfect 1400x760, gaps 20, auto font shrink) ===================== */

/* Контейнер миниатюры (в конструкторе) */



/* Wrapper миниатюры ведёт себя как картинка (пропорции 1400x760). */
.screen-constructor-tests .ticket-preview{
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}


/* 1) Верхняя строка */
.ticket-preview-head{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
}
.ticket-preview-head-left{
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-width: 0 !important;
}
.ticket-preview-label{
  white-space: nowrap !important;
  font-weight: 400 !important;
}
.ticket-preview-nums{
  padding-top: 8px;
  font-size: 22px !important;
    display: flex;
  gap: 12px;


}
.ticket-preview-num{
  line-height: 1.15 !important;
}
.ticket-preview-num.is-active{
  color: #d00 !important;
  font-weight: 700 !important;
}
.ticket-preview-time{
  white-space: nowrap !important;
}

/* 2/4/5) Тексты */
.ticket-preview-upper,
.ticket-preview-lower{
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* 3) Main row: картинка слева, ответы справа */
.ticket-preview-mainrow{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 40px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.ticket-preview-main{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.ticket-preview-main .ticket-preview-img{
  display: block !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 100% !important;
}

/* Блок ответов справа */
.ticket-preview-answers{
  flex: 0 0 480px !important;
  width: 480px !important;
  max-width: 480px !important;
  text-align: left !important;
}
.ticket-preview-answers-title{
  font-weight: 700 !important;
  margin: 0 0 20px !important;
}
.ticket-preview-answers-list{
  display: flex !important;
  align-items: flex-start !important;
  gap: 40px !important; /* между колонками */
  margin: 0 !important;
  padding: 0 !important;
}
.ticket-preview-answers-col{
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important; /* вертикальные отступы между вариантами */
}
.ticket-preview-answer{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}
.ticket-preview-answer span{
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
.ticket-preview-answer input{
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
}

/* Нижние блоки — колонка с gap=20 */
.ticket-preview-lowers{
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* 6) Кнопки справа */
.ticket-preview-actions{
  margin-top: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 30px !important;
}
.ticket-preview-action-btn{
  width: 170px !important;
  height: 50px !important;
  box-shadow: var(--shadow-card) !important;
}



/* Full preview: масштаб включен (перебиваем старый transform:none) */
.ticket-full-preview-popover .ticket-preview{
  width: 100% !important;
  height: 100% !important;
}
.ticket-full-preview-popover {
  transform: scale(var(--ticket-preview-scale, 1)) !important;
}

/* Мобильная компоновка (структура сохраняется, ответы под картинкой) */
@media (max-width: 768px){
  .ticket-preview-mainrow{
    flex-direction: column !important;
    gap: 15px !important;
  }
  .ticket-preview-answers{
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }
  .ticket-preview-answers-list{
    gap: 0 !important;
    flex-direction: column !important;
  }
}



/* ticket preview wrapper: standard shadow (shadow NOT scaled) */
.ticket-preview{
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 !important;
  background: #fff;
  box-shadow: var(--shadow-card);
}



/* all text blocks inherit from canvas (JS changes only canvas font-size) */
.ticket-preview-head,
.ticket-preview-upper,
.ticket-preview-main,
.ticket-preview-answers,
.ticket-preview-answers-title,
.ticket-preview-answers-list,
.ticket-preview-lower,
.ticket-preview-label,
.ticket-preview-time,

.ticket-preview-answer{
  font-size: inherit !important;
  line-height: inherit !important;
}

/* vertical rhythm: no extra paddings, only gap=20 */
.ticket-preview-head{ padding: 0 !important; }
.ticket-preview-upper{ padding: 0 !important; white-space: pre-wrap; }
.ticket-preview-main{ padding: 0 !important; border: 0 !important; min-height: 0 !important; white-space: pre-wrap; }
.ticket-preview-lowers{
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}
.ticket-preview-lower{ white-space: pre-wrap; }
.ticket-preview-answers{ padding: 0 !important; }

/* main row: image left, answers right */
.ticket-preview-mainrow{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 40px !important;
  width: 100% !important;
}

/* answers columns (JS fills col1<=5, col2>5; col2 removed from DOM when <=5) */
.ticket-preview-answers-list{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 40px !important;
}
.ticket-preview-answers-col{
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* answer item */
.ticket-preview-answer{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.ticket-preview-answer input{
  width: 22px !important;
  height: 22px !important;
}

/* buttons: fixed font, never scaled */
.ticket-preview-actions{
  margin-top: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 30px !important;
}
.ticket-preview-action-btn{
  width: 170px !important;
  height: 50px !important;
  font-size: 26px !important;
}
.ticket-preview-actions .ticket-preview-action-btn:first-child{
  color: #ff3b30 !important; /* "Назад" красный */
}


/* ===================== Constructor tests picker (screen-constructor-tests-picker) ===================== */
/* --- Главный контейнер и шапка --- */
/* Кастомная стилизация радио-кнопок */
  .custom-radio-input {
    appearance: none; /* Убираем стандартный вид браузера */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #e4e4e4;
    border-radius: 50%; /* Делаем круглыми */
   
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    background-color: #fff;
    margin: 5px;
    transition: border-color 0.2s;
  }
  
  /* Состояние наведения */
  .custom-radio-input:hover {
    border-color: #a2f8e2;
    outline: 5px solid #a2f8e232;
    outline-offset: 0px;
  }

  /* Состояние, когда радио-кнопка выбрана */
  .custom-radio-input:checked {
    border-color: #4cd9c0; /* Цвет внешней рамки активной кнопки */
    border-width: 0.7px; /* Увеличиваем толщину рамки для выделения */
  }

  /* Внутренняя точка выбранной радио-кнопки */
  .custom-radio-input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background-color: #4cd9c0; /* Цвет внутренней точки */
    border-radius: 50%;
  }


.screen-constructor-tests-picker .acc-l1-body{
  /* Аккордеон использует overflow для анимации высоты.
     Чтобы правая колонка кнопок не «обрезалась» по X, разрешаем горизонтальный overflow. */
  overflow-x: visible;
  overflow-y: hidden;
}
.screen-constructor-tests-picker .constructor-picker-layout{
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
}

.screen-constructor-tests-picker .constructor-picker-list{
  flex: 1 1 0;
  min-width: 0; /* важно: иначе flex-элемент может «вытолкнуть» колонку кнопок и она окажется за overflow:hidden */
}

.screen-constructor-tests-picker .constructor-picker-actions{
  width: 220px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-constructor-tests-picker .tests-action-btn{
  background: #ffffff;
  border: 1px solid #d7dce1;
  color: #333;
  box-shadow: none;
  /* v38 в базовых стилях прячет .tests-add-btn через opacity/pointer-events.
     В picker-экране кнопки должны быть ВСЕГДА видимы. */
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

.screen-constructor-tests-picker .tests-action-btn--danger{
  background: #ffffff;
  border: 1px solid #d7dce1;
  color: #d93025; /* red text */
}

.screen-constructor-tests-picker .tests-action-btn:hover{
  background: #ffffff;
}

.screen-constructor-tests-picker .tests-action-btn--danger:hover{
  background: #ffffff;
}

/* Picker rows */
.screen-constructor-tests-picker .tests-picker-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.screen-constructor-tests-picker .tests-picker-right{
  width: 76px; /* фиксируем место под чекбокс + число, чтобы ничего не прыгало */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.screen-constructor-tests-picker .tests-ticket-badge{
  font-size: 14px;
  line-height: 18px;
  color: #6b7280;
  background: transparent;
  padding: 0;
  min-width: 18px;
  text-align: left;
  visibility: hidden; /* по умолчанию место зарезервировано, но число не видно */
}

.screen-constructor-tests-picker .tests-ticket-badge.is-visible{
  visibility: visible;
}

/* Checkboxes: как в остальной части сайта (нативные), но с зелёным акцентом */
.screen-constructor-tests-picker input[data-ctp-select]{
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #18c8aa;
}

/* matrix spacing */
.screen-constructor-tests-picker .tests-matrix-header{
  column-gap: 36px;
}
.screen-constructor-tests-picker .tests-matrix-row{
  column-gap: 36px;
}

/* constructor header back button */
.constructor-back-btn{
  background: #f2f4f6;
  border: 1px solid #d7dce1;
  padding: 12px 16px;
  font-size: 18px;
  line-height: 22px;
  cursor: pointer;
  margin-right: 16px;
}

.constructor-editing{
  margin-top: -5px;
  color: #6b7280;
  font-size: 18px;
  margin-left: 35px;
}







/* Базовые стили и контейнер */

.hr-app-container {
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
    color: #333;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-header {
    padding: 20px 30px;
}

.page-header h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c323f;
}

.breadcrumbs {
    font-size: 13px;
    color: #8a92a6;
}

/* Панель управления */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-top: 1px solid #eef0f4;
    border-bottom: 1px solid #eef0f4;
    background-color: #fff;
    margin-bottom: 5px;
    box-shadow: var(--shadow-card);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    
}

/* Переключатель Карточки/Таблица */
.view-toggle {
    display: flex;
    border: 1px solid #dce1e6;
    
    overflow: hidden;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.toggle-btn.active {
    background-color: #4fb49d;
    color: #fff;
}

/* Поиск и селекты */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px 8px 12px;
    border: 1px solid #dce1e6;
    
    width: 250px;
    font-size: 14px;
    outline: none;
    height: 38px;
}


.custom-select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #dce1e6;
    
    font-size: 14px;
    color: #444;
    background-color: #fff;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    min-width: 150px;
    max-width: 150px;
    height: 38px;
}

.results-count {
    font-size: 14px;
    color: #888;
    margin-left: 10px;
    width: 40px;
    text-align: right;
}

/* Фон под таблицей */
.table-container-bg {
    background-color: #f4f5f7;
    flex-grow: 1;
    overflow-x: auto;
}

/* Таблица */
.data-table {
    border: 1px solid #eef0f4;

    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Сетка для строк таблицы */
.table-row, .table-header {
    display: grid;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    padding: 10px 20px !important;
    font-size: 12px;
    font-weight: 600;
    color: #8a92a6;
    letter-spacing: 0.5px;
    background-color: #fff;
    position: sticky;
    top: 0; 
    z-index: 10;
    box-shadow: var(--shadow-card);
}

/* Стили ячеек */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: #2c323f;
}

.user-email {
    font-size: 13px;
    color: #4fb49d;
    text-decoration: none;
}

.date-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #929292;
    gap: 4px;
}
.date-info-1 {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #212121;
    gap: 4px;
}

/* Flex-сетка тестов */
.tests-grid {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Стандартная ячейка (вмещает 2 цифры) */
.test-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 35px; /* Базовая ширина */

    position: relative; /* anchor for .cell-indicator */
    background-color: #fff;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Ячейка для DISC (вмещает 4 цифры) */
.test-box.medium-box {
    min-width: 45px;
    width: auto;
    padding: 0 6px;
}

/* DISC: 4 значения осей в одну строку — не переносим, ячейка растёт по содержимому */
.test-box.medium-box .test-score {
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Широкая ячейка для METOD+ (до 19 знаков) */
.test-box.large-box {
    width: 145px; 
    padding: 0 8px;
}

/* Запрещаем перенос длинной строки, шрифт не уменьшаем */
.test-box.large-box .test-score {
    white-space: nowrap;
    letter-spacing: -1.5px;

}

.test-box.filled {
    border: 1px solid #eef0f4;
}

.test-box.empty {
    border: 1px dashed #dce1e6;
    background-color: #fafafa;
}

.test-abbr {
    font-size: 10px;
    color: #646464;
    font-weight: 400;
    text-transform: uppercase;
}

.test-score {
    font-size: 14px;
    font-weight: 400;
    margin-top: 2px;
}

.score-green { color: #4fb49d; }
.score-grey { color: #a0a5b1; }

/* Возвращаем нижний блок (кандидатов) в его исходное состояние — 
   для него никаких стилей не переопределяем! */

/* Стили только для верхнего блока (должность) */
.test-score--plate {
    display: flex !important;
    justify-content: flex-start !important; /* Прижимаем к левому краю, чтобы цифры не разлетались по ширине плашки */
    gap: 7px; /* Шаг между числами, соответствующий интервалам в строках кандидатов */
    padding-left: 2px; /* Микро-подгонка стартовой точки под первую цифру нижней строки */
}

.test-score--plate .mv--plate {
    display: inline-block;
    min-width: 14px; /* Ровно под 2 символа, без раздувания */
    text-align: center;
}
/* 1. Выравнивание в ровные столбцы (этот код у вас уже работает) */
.test-box.large-box .test-score {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    width: 145px; 
}

.test-box.large-box .test-score .mv {
    display: inline-block;
    min-width: 18px;
    text-align: center;
}

/* 2. ПРИНУДИТЕЛЬНЫЙ ВОЗВРАТ ЦВЕТОВОЙ ИНДИКАЦИИ */
/* Жестко привязываем цвета, чтобы их ничего не перебило */
.test-box.large-box .test-score .mv[class*="plus"],
.test-box.large-box .test-score .mv-plus {
    color: #0284c7 !important; /* Синий цвет (подогните HEX под ваш дизайн) */
}

.test-box.large-box .test-score .mv[class*="minus"],
.test-box.large-box .test-score .mv-minus {
    color: #dc2626 !important; /* Красный цвет */
}




/* Статусы */
.status-badge {
    display: inline-flex;
    background-color: #ffffff00;
}

.status-completed {
    background-color: #ffffff00;
    color: #3eae99;
}

.status-pending {
    background-color: #ffffff00;
    color: #e59045;
}

.status-badge.status-inprogress { color: #5b6270; }   /* dark grey hourglass/clock */
.status-badge.status-waiting    { color: #a0a5b1; }   /* neutral grey "sent" */
.status-badge.status-undelivered { color: #d64545; }  /* red — bounced/NDR */
.status-undelivered-label { color: #d64545; }

/* METOD/DISC индикатор — «!» в правом верхнем углу ячейки */
.cell-indicator {
    position: absolute;
    top: 1px;
    right: 0px;
    color: #e5484d;
    font-weight: 400;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
}


/* Кнопка печати */
.btn-print {
    background: transparent;
    border: 1px solid #e4e4e4;
    color: #979797;
    width: 35px;
    height: 40px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-print:hover {
    background: #eaeaea;
    color: #fff;
}
.status-column, .th-col-St {
    text-align: center;
}
.table-row {
   margin-top: 7px;
   background-color: #fff;
}

/* Task 9: pinned position-header plate — groups the Результаты testee list by
   должность. `.pinned` marks a group with at least one completed test. */
.position-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: #f5f6f8; font-weight: 600;
}
.position-header.pinned { border: 2px solid #6b7280; } /* tested должность — dark grey */
.position-header .position-counts { font-weight: 400; color: #6b7280; font-size: 13px; }

/* Task 6 (SP-B): «оценка должности» плашка (эталон-backed position groups)
   + per-candidate closeness score. Both are inline additions inside existing
   flex/column containers (.position-name, .user-info) — no new grid tracks,
   so unevaluated positions/rows (the overwhelming majority) render byte-identical. */
.position-badge--eval {
  display: inline-block; margin-left: 10px; padding: 2px 10px;
  border-radius: 999px; background: #eef2ff; color: #4338ca;
  font-weight: 600; font-size: 12px; vertical-align: middle;
}
.closeness-score {
  display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 600; color: #16a34a;
}
.closeness-score--partial { color: #9ca3af; font-weight: 400; }


.row-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7ed7c6;
    margin: 4px 20px 3px 4px;
    opacity: 0.65;
}









/* Контейнер */
.custom-select-wrapper {
    position: relative;
    width: 150px;
    height: 38px;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
    box-sizing: border-box;
}

/* Основное состояние поля */
.custom-select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 35px 0 15px; /* Внутренние отступы как в оригинале */
    background: #ffffff;
    border: 1px solid #e4e7eb; /* Цвет рамки со скриншота */
    
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    color: #333333;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.custom-select-trigger:hover {
    border-color: #cbd5e1;
}

/* Текст внутри поля */
.custom-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

/* Кастомная стрелочка (максимально похожая на оригинал) */
.arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 15;
    transition: transform 0.2s ease;
}

/* Поворот стрелки при открытии списка */
.custom-select-wrapper.open .arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Изменение скруглений триггера, когда список открыт */
.custom-select-wrapper.open .custom-select-trigger {

    border-color: #cbd5e1;
}

/* ЭФФЕКТ НАВЕДЕНИЯ: Расширение влево + сдвиг еще на 10px */
.custom-select-wrapper.is-overflowed:not(.open):hover .custom-select-trigger {
    position: absolute;
    right: 0;
    top: 0;
    left: auto;
    width: max-content;
    max-width: 450px;
    height: 38px;
    padding-left: 25px; /* Увеличиваем паддинг слева для визуального баланса при сдвиге */
    padding-right: 35px;
    margin-left: -10px; /* Сдвигаем текстовую часть еще на 10px влево */
    z-index: 12;
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: -6px 4px 12px rgba(0, 0, 0, 0.08); /* Мягкая тень */
    
}

.custom-select-wrapper.is-overflowed:not(.open):hover .custom-select-trigger span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

/* Выпадающий список (строго по ширине — 200px, скругления снизу) */
.custom-options {
    display: none;
    position: absolute;
    top: 37px; /* Накладывается на нижнюю рамку триггера */
        width: 300px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    z-index: 11;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    overflow: hidden;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

/* Элементы внутри списка */
.custom-option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #333333;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: #f8fafc; /* Светлый тон при наведении на пункт */
    color: #000000;
}


/* Главная обертка */
.status-badge-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Базовые стили для всех всплывающих кнопок */
.action-tooltip-btn {
    position: absolute; 
    right: calc(100% + 12px); /* Сдвигаем влево */
    top: 50%; 
    transform: translateY(-50%) translateX(10px); 
    white-space: nowrap; /* В одну строку */
    
    padding: 6px 14px;
    background-color: #333; /* default dark bg so tooltips without a btn-* override (in_progress, waiting) aren't white-on-white; matches the ::after arrow */
    color: #fff;
    font-size: 13px;
font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
    border: none;
    border-radius: 4px;

    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    
    /* Скрываем по умолчанию */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Показываем кнопку при наведении */
.status-badge-wrapper:hover .action-tooltip-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

/* Рисуем треугольник-указатель */
.action-tooltip-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #333; 
}

/* =========================================
   Индивидуальные цвета кнопок (Меняйте под свой дизайн)
========================================= */

/* Кнопка "Отправить отчет" */
.btn-report {
    background-color: #4cd2ba;
}
.btn-report::after {
    border-color: transparent transparent transparent #3eae99;
}
.btn-report:hover {
    background-color: #3eae99;
}

/* Кнопка "Повторить отправку" */
.btn-resend {
    background-color: #E64A19;
}
.btn-resend::after {
    border-color: transparent transparent transparent #E64A19;
}
.btn-resend:hover {
    background-color: #D84315;
}

/* Кнопка "Отправить напоминание" */
.btn-reminder {
    background-color: #F57C00;
}
.btn-reminder::after {
    border-color: transparent transparent transparent #F57C00;
}
.btn-reminder:hover {
    background-color: #EF6C00;
}

.action-tooltip-btn::before {
    content: '';
    position: absolute;
    top: -10px; /* Делаем зону захвата чуть больше сверху... */
    bottom: -10px; /* ...и снизу для комфорта */
    right: -15px; /* Перекрывает пустое пространство до иконки */
    width: 15px;
    /* background-color: rgba(255, 0, 0, 0.2); Расскомментируйте, чтобы увидеть мостик глазками (для теста) */
}

.gr-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 900px;
    padding: 30px 40px;
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.gr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    align-items: baseline;
}

.gr-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.gr-period-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 15px;
}

.gr-period-selector input {
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
    color: #000;
    outline: none;
}

.gr-summary {
    margin-top: 10px;
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
}

.gr-summary-label {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 5px;
}

.gr-summary-total {
    font-size: 28px;
    font-weight: 700;
}

/* Стилизация таблицы с фиксированной шириной колонок */
.gr-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
font-weight: 200;
    font-size: small;
}

.gr-th {
    font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
    font-weight: 500;
    text-align: right;
    padding: 7px 0;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
   
}

.gr-td {
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
   
    box-sizing: border-box;
    word-wrap: break-word; /* Перенос слов, если контент не помещается */
}

/* Фиксированная ширина колонок */
.gr-col-name {
    text-align: left;
    width: 55%; /* Название занимает половину таблицы */
    margin: 5px;

}
.gr-col-qty {
    width: 15%;
}
.gr-col-price {
    width: 15%;
}
.gr-col-total {
    width: 15%;
}

/* Выравнивание содержимого ячеек согласно их типу */
.gr-td.gr-col-name {
    text-align: left;
}

/* Убираем нижнюю границу у последней строки */
.gr-table tbody tr:last-child .gr-td {
    border-bottom: none;
}

/* Модальное окно "массовая вставка" */
/* Базовые стили для кнопок */
.pvo-btn {
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
}
.pvo-btn-primary {
  background: #007bff;
  color: #fff;
  border: none;
}

/* Оверлей затемнения фона */
.pvo-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.pvo-popup-overlay.pvo-hidden {
  display: none;
}

/* Контейнер попапа */
.pvo-popup-content {
  background: #ffffff;
  width: 800px;
  max-width: 95vw;
  border-radius: 8px;
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  outline: none; /* Убираем синюю рамку при фокусе */
}

/* Иконка закрытия */
.pvo-popup-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.pvo-popup-close:hover {
  color: #333;
}

.pvo-popup-hint {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

/* Обертка для таблицы со скроллом */
.pvo-table-wrapper {
  max-height: 400px; /* Высота, после которой появится скролл */
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Сетка таблицы */
.pvo-table-header, .pvo-table-row {
  display: grid;
  /* Пропорции 4fr 4fr 2fr */
  grid-template-columns: 5fr 5fr 1.555fr; 
}

.pvo-table-header {
  background: #f9fafb;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1; /* Чтобы шапка не перекрывалась контентом при скролле */
}

/* Светлые тонкие границы ячеек */
.pvo-table-header > div, .pvo-table-row > div {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-size: 14px;
}
.pvo-table-header > div:last-child, .pvo-table-row > div:last-child {
  border-right: none;
}
.pvo-table-row:last-child > div {
  border-bottom: none;
}

.pvo-empty-state {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  grid-column: 1 / -1; /* Занимает всю ширину */
}

.pvo-popup-footer {
  display: flex;
  justify-content: flex-end;
}

@media print {
  /* Shortened плашка (Евгений): multi-select print crops everything right of
     «Тесты и баллы» and pads the row 20px. Toggled by .print-short on the table. */
  .data-table.print-short .status-column,
  .data-table.print-short .action-column,
  .data-table.print-short .th-col-St,
  .data-table.print-short .th-col-C:last-child { display: none; }
  .data-table.print-short .table-row { padding-right: 20px; }
}

/* Пауза/плей блокировки приглашений в таблице аккаунтов */
.notify-icon--block { padding: 0; background: none; border: none; cursor: pointer; }
.notify-icon--block .menu-item-icon { width: 18px; height: 18px; }

/* «Приглашения» заблокированы для аккаунта — бледно-красный, неактивный */
.submenu-item--blocked {
    color: #e39a9a;
    cursor: default;
    opacity: 0.75;
}

/* Принудительный возврат цветовой индикации для METOD+ */
.mv-pos {
    color: #dc2626 !important; /* Синий цвет */
}

.mv-neg {
    color: #0284c7 !important; /* Красный цвет */
}

.position-plate-counts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap; /* Строго запрещаем перенос текста на новые строки */
}

.position-plate-main {
    flex: 1;
    min-width: 0; /* Обязательно для работы text-overflow внутри flex-контейнера */
    padding-right: 20px; /* Жесткий зазор от блока с результатами тестов */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
        width: 130%;
}

.position-plate-name,
.position-plate-filler {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* Запрещаем колонке растягивать таблицу */
    overflow: hidden;
}

.user-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.user-email{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.user-name{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.position-plate-name{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
      
}
.position-plate-filler{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
}



/* Стили для тултипа аббревиатур тестов */
.test-abbr[data-full] { 
    position: relative; 
    cursor: help; 
}

.test-abbr[data-full]:hover::after {
    content: attr(data-full);
    position: absolute; 
    left: calc(100% + 8px); 
    top: 50%; 
    transform: translateY(-50%);
    z-index: 20; 
    width: max-content; 
    max-width: 280px; 
    padding: 6px 10px;
    background: #fff; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    color: #0f172a; 
    font-size: 13px; 
    font-weight: 400; 
    line-height: 1.3; 
    text-transform: none; 
    white-space: normal;
}








































/* Стили кастомного всплывающего сообщения (тултипа) */
.custom-tooltip-box {
    position: absolute;
    z-index: 10000;
    max-width: 320px;
    padding: 8px 14px;
    
    /* Меняйте цвета под дизайн вашего личного кабинета */
    background: #ffffff;      /* Белый фон (или #1e293b для темного) */
    color: #1e293b;           /* Цвет текста */
    border: 1px solid #cbd5e1;/* Аккуратная рамка */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); /* Мягкая тень */
    border-radius: 6px;       /* Скругление углов */
    
    font-size: 14px;          /* Размер шрифта */
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;      /* Перенос строк, если текст длинный */
    word-break: break-word;
    pointer-events: none;     /* Чтобы мышка не «спотыкалась» о блок */
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Класс для плавного показа */
.custom-tooltip-box.is-visible {
    opacity: 1;
    visibility: visible;
}







 
}