
:root {
    /* Strong easings — built-in CSS curves are too weak */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

    --dur-press: 140ms;
    --dur-hover: 160ms;
    --dur-tooltip: 180ms;
    --dur-dropdown: 200ms;
    --dur-modal: 240ms;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 120ms !important;
    }
    /* keep opacity/colour transitions for legibility, drop motion */
    .notify-toast,
    .message,
    .ctx-switcher__dropdown {
        transform: none !important;
    }
}

html {
    box-sizing: border-box;
    overflow-y: scroll;
}

@font-face {
    font-family: robotom;
    src: local(roboto), url('../static/fonts/Roboto-Medium.ttf') format("truetype");
}

@font-face {
    font-family: robotol;
    src: local(roboto), url('../static/fonts/Roboto-Light.ttf') format("truetype");
}

body {
    margin: 0;
    font-family: robotom, sans-serif;
    color: black;
    background: #f1f3f7;
}

header {
    background: #ffffff;
}

a, a:visited {
    text-decoration: none;
    color: black;
}

.content_block {
    max-width: 80%;
    margin-right: auto;
    margin-left: auto;
    padding: 10px 15px 20px 15px;
    font-weight: 400;
    line-height: 1.5 ;
}

@media (min-width: 900px) {
    .content_block { min-width: 660px; }
}

.content_header {
    max-width: 80%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*margin-top: 5px;*/
}
.logo_header {
    display: flex;
    font-size: 25px;
    font-family: calibri, sans-serif;
    margin-top: 5px;
}

.header_left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.header_divider {
    width: 1px;
    height: 36px;
    background-color: #333;
    margin: 0 14px;
}

.header-login-hint {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 6px;
    padding: 7px 14px;
    border: 1px dashed #C7D4E3;
    border-radius: 10px;
    background: transparent;
    color: #6B7B8C;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.header-login-hint__icon {
    flex-shrink: 0;
    opacity: 0.7;
    margin-right: 4px;
}
.header-login-hint__link {
    color: #2980B9 !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(41, 128, 185, 0.45);
    transition: color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out);
}
.header-login-hint__link:hover,
.header-login-hint__link:focus-visible {
    color: #1F6093 !important;
    border-bottom-color: #1F6093;
    outline: none;
}
.header-login-hint__sep {
    color: #9AA7B5;
    font-weight: 400;
}
.header-login-hint__tail {
    color: #6B7B8C;
}
@media (max-width: 720px) {
    .header-login-hint__tail {
        display: none;
    }
}

.menu_header {
    display: flex;
    justify-content: left;
}

/* Кнопки «Анализ» и «Отчёт» в меню — это формы (POST переключает режим и
   открывает квартальную страницу). Убираем отступы формы, чтобы кнопка
   вставала в ряд наравне с остальными пунктами меню. */
.menu-mode-form {
    margin: 0;
    padding: 0;
    display: inline-flex;
}


.user_header {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-left: 16px;
    margin-right: 0;
    /* Совпадает с шириной кнопки «Выход» (.btn3, 100px), чтобы chip
       организации в верхней строке не заезжал за её левый край. */
    min-width: 100px;
    font-size: 13px;
    color: #4A5A6C;
    line-height: 1;
    flex-shrink: 0;
}
.user_header__icon {
    color: #9AA7B5;
    flex-shrink: 0;
}
.user_header__name {
    font-weight: 600;
    color: #1F3A52;
    letter-spacing: 0.01em;
}
.user_header__status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
    margin-left: 2px;
    flex-shrink: 0;
}

.menu_exit {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Только прямые формы (выход) растягиваются по флексу — формы внутри
   .mode-toggle живут по своим правилам. */
.menu_exit > form {
    display: flex;
    align-items: center;
}

/* «Выход» — приглушённый ghost-вариант .btn3,
   чтобы безобидное действие не выглядело как destructive-delete */
.menu_exit .btn3 {
    background: #ffffff;
    border: 1px solid #FECACA;
    color: #B91C1C;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color   var(--dur-hover) var(--ease-out),
                color          var(--dur-hover) var(--ease-out);
}
.menu_exit .btn3:hover {
    background: #FEF2F2;
    border-color: #F87171;
    color: #991B1B;
}
.menu_exit .btn3:active {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

.nav_bar_row {
    padding: 6px 0;
}



.line {
    /*margin-top: 5px;*/
    background: linear-gradient(to right, #ff3d01 0%, #ffb200 17%, #9ace03 34%, #8dc41a 50%, #9ace03 66%, #ffb200 83%, #ff3d01 100%);
    height: 2px;
}

.norms_list_buton_block {
    display: flex;
}

.norms-action-bar {
    display: flex;
    gap: 8px;
    padding: 8px 0 6px;
}

.norms-action-bar .btn_menu {
    background: #007EB7;
    border-color: #007EB7;
    color: #FFFFFF;
}

.norms-action-bar .btn_menu:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
}

.btn_year {
    border: none;
    background: #007EB7;
    color: #FFFFFF;
    font-size: 12px;
    line-height: normal;
    padding: 0 12px;
    text-decoration: none;
    text-shadow: none;
    border-radius: 5px;
    box-shadow: none;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 28px;
    margin: 0 8px 0 0;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .btn_year:hover {
        background: #0071A5;
    }
}

.btn_year:active {
    transform: scale(0.97);
}

.hover-text {
  display: none;
  top: 0;
  left: 0;
}

.btn_year:hover .default-text {
  display: none;
}

.btn_year:hover .hover-text {
  display: inline;
}

/* Стили для модального окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}


#copyModal {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#copyModal .modal-transfer {
  margin: 0;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 5px;
  border: 1px solid #888;
  width: min(300px, 92vw);
  height: auto;
  max-height: 90vh;
  overflow: auto;
  padding-bottom: 16px;
  box-sizing: border-box;
}

/* Модальные окна фактического расхода — центрируем по экрану */
#myModalFactFuel .modal-content,
#myModalFactHeat .modal-content,
#myModalFactElectric .modal-content {
  margin: auto;
  max-height: 90vh;
  overflow: auto;
}

.year-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(15, 23, 42, 0.42);
  font-size: 14px;
}

.year-modal[style*="display: block"] {
  display: flex !important;
}

.year-modal .year-modal__card {
  width: min(340px, 92vw);
  margin: 0;
  padding: 0;
  border: 1px solid #e9eef5;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  background: #ffffff;
  overflow: hidden;
}

.year-modal .year-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px;
  position: relative;
  background: #4f9acb;
}

.year-modal .year-modal__heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-modal .year-modal__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.18);
}

.year-modal .year-modal__title {
  margin: 0;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.year-modal .year-modal__close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: #e8f4ff;
  background: transparent;
  cursor: pointer;
}

.year-modal .year-modal__close:hover,
.year-modal .year-modal__close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.year-modal .year-modal__close:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.year-modal .year-modal__body {
  padding: 14px;
  background: #f6f8fb;
}

.year-modal .year-modal__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.year-modal .year-modal__controls {
  display: block;
}

.year-modal .year-modal__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #4b5563;
  font-weight: 500;
}

.year-modal .year-modal__content select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #a7c6de;
  background: #fdfefe;
  font-size: 14px;
  font-weight: 400;
  color: #111827;
  box-sizing: border-box;
}

.year-modal .year-modal__content select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  outline: none;
}

.year-modal .year-modal__actions {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.year-modal .year-modal__actions .btn2 {
  margin: 0;
}

@media (max-width: 520px) {
  .year-modal {
    padding: 16px;
  }

  .year-modal .year-modal__card {
    width: min(340px, 92vw);
  }

  .year-modal .year-modal__controls {
    width: 100%;
  }

  .year-modal .year-modal__content select {
    width: 100%;
  }

  .year-modal .year-modal__actions {
    justify-content: center;
  }
}

/* Кнопка закрытия модального окна */
.close {
  color: #525252;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal_X {
    text-align: right;
    background: #badbf1;
    padding: 5px;
    line-height: 0.5;
}

.modal_block {
    /*position: fixed;*/
    /*top: 50%;*/
    /*left: 50%;*/
    /*transform: translate(-50%, -50%);*/
}
.modal_block_label {
    margin-top: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal_block_button {
    display: flex;
    justify-content: center;
}

.modal-transfer {
  width: 360px;
  margin: auto;
  padding: 0;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 30px rgba(31, 41, 55, 0.18);
  overflow: hidden;
  background: #ffffff;
}

.modal-transfer__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: #f3f6ff;
  border-bottom: 1px solid #e2e8f0;
}

.modal-transfer__header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.modal-transfer__header p {
  margin: 1px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.modal-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.modal-close:hover,
.modal-close:focus {
  color: #374151;
}

.modal-transfer__body {
  padding: 10px 12px 12px;
}

.modal-transfer .modal_block_label {
  margin-top: 0;
  margin-bottom: 6px;
  height: auto;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 10px;
}

.modal-transfer .modal_block_label label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  min-width: 118px;
}

.modal-transfer .modal_block_label select,
.modal-transfer-year {
  width: 8.5ch !important;
  min-width: 8.5ch !important;
  max-width: 8.5ch !important;
  margin: 0;
  padding: 4px 6px !important;
  border-radius: 10px;
  border-color: #d1d5db;
  background-color: #ffffff;
  font-size: 14px;
  text-align: left;
  flex: 0 0 auto;
}

.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 13px;
  color: #111827;
}

.modal-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #2f6df6;
}

.modal-transfer .modal_block_button {
  margin-top: 10px;
  justify-content: center;
}

.modal-transfer__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.modal-transfer__actions .btn2 {
  margin: 0;
}

.modal-cancel {
    background: #D9E7F1;
    color: #263C54;
    border-color: #D9E7F1;
}

.modal-cancel:hover {
    background: #BED0DF;
    border-color: #BED0DF;
}

.modal-transfer__footer {
  padding: 7px 12px 9px;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

/* Стили для контейнера выпадающего списка */
.modal_block_label select {
    width: 30%;
    padding: 3px;
    margin-left: 10px;
    margin-top: 10px;
    margin-bottom: 8px;
    box-sizing: border-box;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-size: 14px;
    text-align: center;
}

/* Стили для каждого элемента списка */
.modal_block_label option {
    padding: 8px;
    background-color: #ffffff;
}

/* Стили для активного (выбранного) элемента списка */
.modal_block_label select:focus {
    outline: none;
    border-color: #9fb5d5;
    box-shadow: 0 0 10px rgba(151, 189, 239, 0.5);
}

/* Стили для стрелки в выпадающем списке */
.modal_block_label select::-ms-expand {
    display: none;
}

/* Стили для hover-эффекта элементов списка */
.modal_block_label option:hover {
    background-color: #f1f5f9;
}

body.modal-open {
  overflow: hidden;
}

.notify-modal#notifyModal {
  background-color: rgba(0, 0, 0, 0.45);
}

.notify-modal#notifyModal .modal-dialog {
  width: 100%;
  max-width: 300px;
  margin: 1.75rem auto;
}

.notify-modal#notifyModal .modal-dialog-centered {
  min-height: calc(100% - 3.5rem);
  display: flex;
  align-items: center;
}

.notify-modal#notifyModal .modal-content {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 14px;
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.2);
}

.notify-modal#notifyModal .modal-header,
.notify-modal#notifyModal .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px;
  border: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0;

}


.notify-modal#notifyModal .modal-header {
  padding-bottom: 0;
}

.notify-modal#notifyModal .modal-footer {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 16px;
}

.notify-modal#notifyModal .modal-body {
  padding: 8px 24px 0;
  text-align: center;
}

.notify-modal#notifyModal .notify-modal-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.notify-modal#notifyModal .notify-modal-icon {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  background: rgba(26, 167, 95, 0.12);
  color: #1aa75f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-modal#notifyModal .notify-modal-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.notify-modal#notifyModal .notify-modal-text {
  font-size: 16px;
  margin: 0;
}

.notify-modal#notifyModal .btn-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.notify-modal#notifyModal .btn-close:hover,
.notify-modal#notifyModal .btn-close:focus {
  opacity: 1;
}

.notify-modal#notifyModal .notify-modal-button {
  width: 100px;
  height: 25px;
  line-height: 10px;
  padding: 0;
  margin: 0;
}

.messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  pointer-events: none;
}

.message {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e7f6f1;
  color: #0f5132;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 240ms var(--ease-out),
              transform 240ms var(--ease-out);
}

@starting-style {
  .message {
    opacity: 0;
    transform: translateX(110%);
  }
}

.message::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1d8f5f;
  color: #ffffff;
  font-size: 14px;
  flex: 0 0 24px;
}

.message.error {
  background: #f8d7da;
  color: #842029;
}

.message.error::before {
  content: "!";
  background: #dc3545;
}

.message.success {
  background: #e7f6f1;
  color: #0f5132;
}

.notify-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e7f6f1;
  color: #0f5132;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(110%);
  pointer-events: none;
  /* exit (180ms) faster than enter (260ms) — system response should feel snappy */
  transition: opacity 180ms var(--ease-out),
              transform 180ms var(--ease-out);
  max-width: 320px;
}

.notify-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity 260ms var(--ease-out),
              transform 260ms var(--ease-out);
}

.notify-toast.notify-toast--error {
  background: #f8d7da;
  color: #842029;
}

.notify-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d8f5f;
  color: #ffffff;
  flex: 0 0 24px;
}

.notify-toast.notify-toast--error .notify-toast-icon {
  background: #dc3545;
}

.notify-toast-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.notify-toast-text {
  font-size: 14px;
  line-height: 1.4;
}

.notify-toast-close {
  border: none;
  background: transparent;
  color: #0f5132;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}

.notify-toast.notify-toast--error .notify-toast-close {
  color: #842029;
}

.notify-toast-close:hover {
  color: #0b3d26;
}

.notify-toast.notify-toast--error .notify-toast-close:hover {
  color: #5f1c23;
}

.home {
  margin: 0;
  transform: translate(-50%, -50%);
  position: absolute;
  top: 50%;
  left: 50%;
}


.content_home {
    max-width: 80%;
    margin: auto;
    display: flex;
    justify-content: center;
}

.button_input {
  margin-left: 50px;
  width: 170px;
  height: 50px;
  background-color: #3498DB;
  font-family: "Times New Roman", cursive;
  font-size: 20px;
  font-weight: bold;
  color: white;
  border-style: none;
  border-radius: 10px 1px 10px 1px;
  box-shadow: 10px 10px 10px #C5E5F5;
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .button_input:hover {
    background-color: #2980B9;
  }
}

.button_input:active {
  transform: scale(0.97);
}

.organization {
    display: inline-block;
    font-size: 18px;
    color: #2980B9;
    margin-top: 10px;
}

.current_name {
    margin: 10px 0 5px 0;
    font-weight: bold;
    font-size: 20px;
    height: 26px;
}

.my_table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}


.table_header {
    display: table-row;
    height: 25px;
    background-color: #badbf1;
}

.table_line {
    display: table-row;
}

.table_line:hover {
    background-color: #dbe9fd;
}
.table_line a {
    display: block;
}

.clickable_line {
    cursor: pointer;
}

.table_line_depart {
    display: table-row;
    background-color: #f1f3f7;
    font-size: 14px;
    font-weight: 200;
    padding: 10px 2px;
}

.table_heading {     
    /* display: table-caption; */
    display: table-row-group;
    text-align: center;
    border-left: 1px solid #2980B9;
    border-right: 1px solid #2980B9;
    vertical-align: middle;
    padding: 0 5px 0 5px;
    font-weight: bold;
    font-size: 16px;
    border-collapse: collapse;
    /* height: 30px; */    
}

.table_cell {
    display: table-cell;
    text-align: center;
    border: 1px solid #2980B9;
    vertical-align: middle;
    padding: 0 5px 0 5px;
    height: 30px;
}

.table_type_ter {
    display: table-row;
    border: 1px solid #2980B9;
    text-align: left;
    font-weight: bold;
    vertical-align: middle;
    line-height: 30px;

}

.table_type_ter_text {
    padding-left: 10px;
}


.table_name_org {
    width: 45%;
}

.table_dim {
    width: 15%;
}

.table_value {
    width: 10%;
}

.table_year {
    width: 12%;
}

.table_left {
    text-align: left;
}

.table_bold {
    font-weight: bold;
}

.table_depat {
    font-weight: bold;
    vertical-align: middle;
    line-height: 30px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    border-collapse: collapse;
}

.table_depat_text {
    border-left: 1px solid #2980B9;
    border-right: 1px solid #2980B9;
    display: table;
    width: 100%;
    text-align: center;
}


.remains_days {
    color: blue;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
  20% {
    opacity: 0.3;
  }
}

.login {
    box-shadow: 0 0 5px 2px rgba(119, 119, 119, 0.4);
    margin: auto;
    margin-top: 150px;
    width: 300px;
}

.login-screen {
    background-color: #FFF;
    padding: 20px;
    border-radius: 5px
}

.app-title {
    text-align: center;
    color: #777;
}

.login-form {
    text-align: center;
}



.login input {
    text-align: center;
    background-color: #ECF0F1;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 200;
    padding: 10px 0;
    width: 250px;
    transition: border-color 150ms var(--ease-out),
                box-shadow 150ms var(--ease-out);
    /*box-shadow: 0 0 2px 1px rgba(119, 119, 119, 0.5);*/
}

.btn {
    border: none;
    background: #007EB7;
    color: #FFFFFF;
    font-size: 15px;
    line-height: normal;
    padding: 10px 0;
    text-decoration: none;
    text-shadow: none;
    border-radius: 5px;
    box-shadow: none;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
    display: block;
    width: 250px;
    margin: 0 auto;
    cursor: pointer;
    box-sizing: border-box;
}
.btn-margin {
    margin-top: 15px;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        background: #0071A5;
    }
}

.btn:active {
    transform: scale(0.97);
}

.login-link {
  font-size: 12px;
  color: #444;
  display: block;
  margin-top: 12px;
}

.error {
    text-align: center;
    color: red;
}

.btn2 {
    font-size: 12px;
    width: auto;
    min-width: 90px;
    height: 28px;
    line-height: normal;
    padding: 0 14px;
    margin: 8px 8px 8px 0;
    border: 1px solid transparent;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn2:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
    cursor: pointer;
}

.btn3 {
    background: #E7000B;
    border: 1px solid #E7000B;
    color: #FFFFFF;
    font-size: 12px;
    width: 100px;
    height: 28px;
    line-height: normal;
    padding: 0 12px;
    margin: 0;
    border-radius: 5px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn3:hover {
    background: #CC0009;
    border-color: #CC0009;
}

/* ── keyboard focus ring for all buttons ──────────────────── */
.btn:focus-visible,
.btn_menu:focus-visible,
.btn_menu_active:focus-visible,
.btn2:focus-visible,
.btn3:focus-visible,
.btn_year:focus-visible,
.tab_kv:focus-visible,
.tab_kv_active:focus-visible {
    outline: 2px solid #60A5FA;
    outline-offset: 2px;
}
.btn3:focus-visible {
    outline-color: #FCA5A5;
}

.table_line input {
    background-color: #f1f3f7;
    border: 2px solid transparent;
    font-size: 14px;
    font-weight: 200;
    padding: 10px 2px;
    outline:none
}

.my_input:hover {
    background-color: #f1f3f7;
}

.table_cell input {
    border: 0;
    padding: 0;
    font-size: 14px;
    font-family: robotom, sans-serif;
}

.table_cell button {
    border: 0;
    padding: 0;
    margin: 0;
}


.table_name_org input {
    text-align: left;
    width: 95%;
}

.table_dim input {
    text-align: center;
    width: 95%;
}

.table_value input {
    text-align: center;
    width: 90%;
}

.tab_create_year {
    width: 5%;
}
.tab_create_ter {
    width: 10%;
}
.tab_create_name {
    width: 33%;
    text-align: center;
}
.tab_create_norm {
    /*width: 57%;*/
    text-align: center;
}

.table_dim_create {
    width: 12%;
}
.table_value_create {
    width: 10%;
}

.tab_create_value {
    width: 10%;
}

.tab_create_value input{
    text-align: center;
    width: 90%;
}
.tab_create_name input {
    width: 95%;
}

.tab_create_dim input {
    text-align: center;
    width: 90%;
}

.table_input {
    background: white;
    box-sizing: border-box;
}

.table_input input{
    border: none;
    outline: none;
    width: 100%;
    color: #012acb;
}
.table_input_centre input {
    text-align: center;
}
.table_red input {
    color: #f50505;
}

.tab_create_year select,
.tab_create_ter select {
    border: none;
    font-family: robotom, sans-serif;
    font-size: 14px;
}

.btn4 {
    width: 26px;
    margin: 0;
}
.table_btn {
    display: flex;
    justify-content: center;
    margin: 0;
}

.btn_ok {
    width: 30px;
    background-color: rgb(31, 129, 31);
}

.btn_ok:hover {    
    background-color: rgb(8, 105, 8);
}

.btn_cancel{
    width: 30px;
    font-size: 18px;
}

.btn_del {
    width: 30px;
    margin: 15px;
    background-color: #e01616;
}

.btn_del:hover {
    background-color: #b81a1a;
}


/*Убрать стрелки Chrome*/
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*Убрать стрелки Firefox*/
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]:hover,
input[type="number"]:focus {
  -moz-appearance: number-input;
}

/*Убрать стрелки для других*/
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

ul {
    margin-left: 0;
    padding-left: 0;
}

li {
    list-style: none;
    float:left; 
    position:relative; 
    margin-left: 0; 
}

.add_line {
    border: 2px solid #3498DB;
    border-radius: 0 7px 7px 0;
    font-size: 12px;
    width: 125px;
    height: 22px;
    line-height: 22px;
    padding: 0;
    margin: 10px 10px 10px 0px;
    text-align: center;
    display: inline-block;
    vertical-align: middle;
}    

@media print {
    .no_print {
        display: none;
    }
}

/*Удаление норм*/
/* ── Delete confirmation card ───────────────────────────────── */
@keyframes delConfirmIn {
    0%   { opacity: 0; transform: translateY(8px) scale(.985); }
    100% { opacity: 1; transform: translateY(0)   scale(1);     }
}
@keyframes delIconPulse {
    0%, 100% { box-shadow: 0 0 0 0     rgba(225, 29, 72, .22); }
    50%      { box-shadow: 0 0 0 10px  rgba(225, 29, 72, 0);   }
}

.del_norm_block {
    position: relative;
    width: min(380px, 92vw);
    max-width: 380px;
    margin: 40px auto;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, .06);
    overflow: hidden;
    background: #ffffff;
    color: #0f172a;
    font-family: robotom, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    box-shadow:
        0 1px 0   rgba(255, 255, 255, .9) inset,
        0 1px 2px rgba(15, 23, 42, .04),
        0 6px 18px rgba(15, 23, 42, .06),
        0 18px 36px -14px rgba(15, 23, 42, .16);
    animation: delConfirmIn .38s cubic-bezier(.22, 1, .36, 1) both;
}

/* тонкая «лента опасности» сверху — без тяжёлой синей шапки */
.del_norm_block::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, #f43f5e 0%, #e11d48 50%, #b91c1c 100%);
}

.del_norm_block_text { display: none; }

/* header — иконка-кружок над заголовком, центр */
.del-confirm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 22px 4px;
    background: transparent;
    text-align: center;
}

.del-confirm-header__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:
        radial-gradient(120% 120% at 30% 25%, #fff1f2 0%, #fee2e2 60%, #fecaca 100%);
    border: 1px solid rgba(225, 29, 72, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #be123c;
    animation: delIconPulse 2.4s ease-out infinite;
}

.del-confirm-header__icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 2;
}

.del-confirm-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.005em;
}

/* body — текст по центру, выделение названия отдельной плашкой */
.del-confirm-body {
    padding: 10px 22px 0;
    text-align: center;
}

.del-confirm-message {
    margin: 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
}

/* название — отдельная карточка с тонким красным акцентом слева */
.del-confirm-name {
    display: block;
    margin: 10px auto 0;
    padding: 8px 12px;
    max-width: 100%;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff7f7 0%, #fff1f2 100%);
    border: 1px solid rgba(225, 29, 72, .14);
    border-left: 3px solid #e11d48;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* подсказка под сообщением: действие необратимо */
.del-confirm-body::after {
    content: "Это действие нельзя отменить.";
    display: block;
    margin-top: 10px;
    font-size: 11.5px;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

/* actions — чистая нижняя зона, без тяжёлого фона */
.del-confirm-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 14px 18px 16px;
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.del-confirm-actions .btn2,
.del-confirm-actions .btn3 {
    margin: 0;
}

/* ghost-кнопка отмены — переопределяем в скоупе модалки */
.del-confirm-actions .btn2 {
    height: 30px;
    min-width: 90px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.del-confirm-actions .btn2:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.del-confirm-actions .btn2:active { transform: translateY(1px); }

/* красная кнопка подтверждения — насыщенный градиент с мягкой тенью */
.del-confirm-actions .btn3 {
    height: 30px;
    min-width: 108px;
    width: auto;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid #b91c1c;
    border-radius: 7px;
    box-shadow:
        0 1px 0  rgba(255, 255, 255, .22) inset,
        0 1px 2px rgba(190, 18, 60, .35),
        0 5px 12px -4px rgba(220, 38, 38, .45);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.del-confirm-actions .btn3:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0  rgba(255, 255, 255, .25) inset,
        0 2px 4px rgba(190, 18, 60, .4),
        0 10px 22px -6px rgba(220, 38, 38, .55);
    cursor: pointer;
}
.del-confirm-actions .btn3:active {
    transform: translateY(0);
    filter: brightness(.97);
}

@media (max-width: 480px) {
    .del_norm_block { width: 94vw; margin: 28px auto; }
    .del-confirm-header { padding-top: 24px; }
    .del-confirm-actions {
        justify-content: stretch;
        flex-direction: column-reverse;
        gap: 8px;
    }
    .del-confirm-actions .btn2,
    .del-confirm-actions .btn3 {
        width: 100%;
        min-width: 0;
    }
}
/* ── /Delete confirmation card ──────────────────────────────── */

.card-like {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 28px rgba(31, 41, 55, 0.10);
}

.choice-depart__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    height: auto;
}


.card-divider {
    margin: 12px 0 14px 0;
    border-top: 1px solid #edf1f5;
}


.norms_list_buton_block_centr {
    justify-content: center;
}


.enterprise_index_block {
    display: table;
    /*display: table-cell;*/
    height: 50px;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.enterprise_index {
    text-align: left;
    width: 300px;
    /*max-width: 300px;*/
}
.enterprise_index_name {
    /*width: 50%;*/
    /*width: 100%;*/
    width: auto;
    text-align: left;
    position: relative;
    padding-right: 32px;
}

.enterprise_index_gear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #0071A5;
    transition: transform 220ms var(--ease-out);
}

.enterprise_index_name:hover .enterprise_index_gear,
.enterprise_index_name:focus .enterprise_index_gear {
    transform: translateY(-50%) rotate(60deg);
}
.departments_not {
    display: flex;
    margin-top: 20px;
}
.departments_not_text {
    margin: auto 10px auto 0;
}
.depart_table_head_name {
    width: 60%;
    text-align: center;
}

.depart_table_name {
    width: 60%;
    text-align: left;
}

.depart_table_lp {
    width: 20%;
}

.norm_month_kv {
    margin-top: 5px;
    margin-bottom: 8px;
    font-size: 14px;
    font-family: robotom, sans-serif;
}


.department_list select {
    margin: 7px auto 18px auto;
    font-size: 15px;
    height: 43px;
    border: 1px solid #d1d5db;
    width: 100%;
    text-align: left;
    background-color: #ffffff;
    box-sizing: border-box;
    border-radius: 9px;
    padding: 0 12px;
}

.department_list select:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.18);
    outline: none;
}

.choice-depart-page .choice-depart-modal {
    width: min(420px, 92vw);
    max-width: 420px;
    padding: 0 26px 24px;
    border-radius: 12px;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #111827;
}

.choice-depart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: -26px;
    margin-right: -26px;
    padding: 18px 26px 16px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #005f8e 0%, #2980B9 100%);
    border-radius: 12px 12px 0 0;
}

.choice-depart-header__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.choice-depart-page .choice-depart__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #ffffff;
}

.choice-depart-page .choice-depart-modal form {
    margin: 0;
}

.choice-depart-page .choice-depart-modal .department_list {
    display: none;
}

/* Custom dropdown */
.cd-wrap {
    position: relative;
}

.cd-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    text-align: left;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cd-trigger.is-open,
.cd-trigger:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cd-icon-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eff4fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.cd-trigger-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-chevron {
    flex-shrink: 0;
    color: #6b7280;
    transition: transform 0.15s;
}

.cd-trigger.is-open .cd-chevron {
    transform: rotate(180deg);
}

.cd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.cd-menu.is-open {
    display: block;
}

.cd-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: #111827;
    transition: background-color 100ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .cd-option:hover {
        background: #f9fafb;
    }
}

.cd-option.is-active {
    background: #eff4fe;
    color: #1e3a8a;
    font-weight: 500;
}

.cd-option-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-option.is-active .cd-option-badge {
    background: #fff;
    color: #2563eb;
}

.cd-option-name {
    flex: 1;
}

.cd-check {
    flex-shrink: 0;
    color: #2563eb;
    display: none;
}

.cd-option.is-active .cd-check {
    display: block;
}

.choice-depart-page .choice-depart-modal .actions-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.cd-btn-primary {
    background: #007EB7;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .cd-btn-primary:hover {
        background: #0071A5;
    }
}

.cd-btn-primary:active {
    transform: scale(0.97);
}

.cd-btn-cancel {
    background: #D9E7F1;
    color: #263C54;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .cd-btn-cancel:hover {
        background: #BED0DF;
    }
}

.cd-btn-cancel:active {
    transform: scale(0.97);
}

@media (max-width: 640px) {
    .choice-depart-page .choice-depart-modal {
        width: min(420px, 94vw);
        padding: 0 20px 18px;
    }

    .choice-depart-page .choice-depart__title {
        font-size: 16px;
    }

    .choice-depart-header {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

.table_norm_calc {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}
.table_header_norm_calc {
    height: 25px;
    background-color: #badbf1;
}
.table_cell_norm_calc {
    text-align: center;
    border: 1px solid #2980B9;
    vertical-align: middle;
    padding: 0 5px 0 5px;
    height: 30px;
}

.table_cell_norm_calc input {
    border: 0;
    padding: 0;
    font-size: 14px;
    font-family: robotom, sans-serif;
}


.table_header_name_calc {
    width: 40%;
    text-align: center;
    border: 1px solid #2980B9;
    vertical-align: middle;
    padding: 0 5px 0 5px;
    height: 30px;
}

.table_name_calc {
    width: 40%;
    text-align: left;
    border: 1px solid #2980B9;
    vertical-align: middle;
    padding: 0 5px 0 5px;
    height: 30px;
}

.table_value_calc {
    width: 10%;
}

/* norms_calc_kv: в графе «Норма» три столбца (размерн./утв./факт.) — всего 10
   колонок. Сужаем числовые колонки, чтобы их суммарная ширина не выходила за
   100% и браузер соблюдал заданные ширины (иначе «по норме» схлопывается). */
.table_norm_calc_kv .table_value_calc:not(.table_delta_calc) {
    width: 6.5%;
}

/* Горизонтальная прокрутка: на узких экранах таблица скроллится, а не
   обрезает содержимое и не ломает верстку страницы. */
.table_norm_calc_scroll {
    overflow-x: auto;
}

/* Числовые ячейки заполняют колонку целиком, а колонки с длинными числами
   (объём производства и фактический расход ТЭР) держат минимум ширины —
   так длинные значения не обрезаются даже при сужении экрана. */
.table_norm_calc_kv .table_value_calc input {
    width: 100%;
}
.table_norm_calc_kv thead tr:last-child th:nth-child(2) { min-width: 84px; }  /* Объём производства — величина */
.table_norm_calc_kv thead tr:last-child th:nth-child(8) { min-width: 64px; }  /* Расход ТЭР — фактически */

.table_delta_calc {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.table_value_calc input {
    text-align: center;
    width: 90%;
    /*color: #ec1111;*/
    color: #012acb;

}

.table_total {
    /*color: #012acb;*/
    /*font-weight: bold;*/
}

.table_right {
    text-align: right;
}

.positive {
    color: red;
}

.negative {
    color: inherit;
}
.table_nowrap {
    white-space: nowrap;
}


/* Контейнер вкладок примыкает вплотную к шапке-странице ниже,
   так что активная вкладка визуально врастает в неё. */
.table_tab_menu {
    display: flex;
    justify-content: right;
    position: relative;
    margin-bottom: 0;
}


.tab_kv {
    border: 1px solid #CCDAE4;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    line-height: normal;
    padding: 0 12px;
    width: 100px;
    height: 28px;
    margin: 3px 0 0 3px;
    background: #F2F6F8;
    color: #1A222B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    white-space: nowrap;
    z-index: 2;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out),
                box-shadow var(--dur-hover) var(--ease-out);
    cursor: pointer;
}

/* неактивные вкладки слегка «утоплены» — мягкая внутренняя тень сверху */
.tab_kv:not(.tab_kv_active) {
    box-shadow: inset 0 2px 3px -2px rgba(15, 23, 42, .08);
}

@media (hover: hover) and (pointer: fine) {
    .tab_kv:hover {
        background: #E6EFF5;
        border-color: #A7C6DE;
        color: #005f8e;
    }
}
.tab_kv:active {
    transform: scale(0.97);
}

/* Активная закладка — белая внутри, аккуратная 1px-обводка по
   трём сторонам, низ открыт → интерьер плавно переходит в страницу.
   ::after продолжает вертикали ещё на 1px вниз (ровно по толщине
   «обреза»), а его белая середина перекрывает линию под закладкой.
   Углы стыкуются без «дырочек». */
.tab_kv_active {
    background: #ffffff;
    border: 1px solid #007EB7;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    color: #005f8e;
    font-weight: 600;
    z-index: 3;
}
.tab_kv_active::after {
    content: "";
    position: absolute;
    left: -1px;       /* строго по внешним краям, чтобы синие хвостики */
    right: -1px;      /* совпадали с 1px-вертикалями (а не с padding-box) */
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        #007EB7              0,
        #007EB7              1px,
        #ffffff              1px,
        #ffffff              calc(100% - 1px),
        #007EB7              calc(100% - 1px),
        #007EB7              100%);
    z-index: 4;
    pointer-events: none;
}
.tab_kv_active:hover {
    background: #F7FBFD;
    border-color: #007EB7;
    color: #005f8e;
}

/* Quarterly tabs (contain an SVG calendar icon) */
.tab_kv:has(svg) {
    background: #D9E7F1;
    border-color: #CCDAE4;
    color: #263C54;
    font-weight: 600;
}
.tab_kv:has(svg):hover {
    background: #C9DCEA;
    border-color: #A7C6DE;
    color: #005f8e;
}
.tab_kv_active:has(svg) {
    background: #ffffff;
    border: 1px solid #007EB7;
    border-bottom: 0;
    color: #005f8e;
    font-weight: 600;
}

/* «Страница» — белый прямоугольник, обведённый 1px синей нитью
   по 3 сторонам (верх, левая, правая). Низ открыт: рамка продолжается
   в верхние границы таблицы ниже. Активная закладка через ::after
   аккуратно стыкуется с верхним кантом без шва. */
.table_tab_bloc {
    position: relative;
    text-align: center;
    margin: 0;
    border: 1px solid #007EB7;
    border-bottom: none;
    line-height: 35px;
    background: #ffffff;
    z-index: 1;
}

.table_tab_bloc .organization {
    margin: 0;
    color: #005f8e;
    font-weight: 600;
    letter-spacing: -0.005em;
}



.btn_menu {
    border: 1px solid #CCDAE4;
    background: #F2F6F8;
    color: #1A222B;
    font-size: 12px;
    height: 28px;
    line-height: normal;
    padding: 0 12px;
    margin: 0 4px 0 0;
    text-decoration: none;
    text-shadow: none;
    border-radius: 5px;
    box-shadow: none;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
    .btn_menu:hover {
        background: #E6EFF5;
        border-color: #A7C6DE;
        color: #005f8e;
    }
}

.btn_menu:active {
    transform: scale(0.97);
}

.btn_menu_active {
    background: #007EB7;
    color: #FFFFFF;
    border-color: #007EB7;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .btn_menu_active:hover {
        background: #0071A5;
        border-color: #0071A5;
        color: #FFFFFF;
    }
}

.year-nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #007EB7;
    border: 1px solid #007EB7;
    border-radius: 5px;
    overflow: hidden;
    height: 28px;
    margin: 0 4px 0 0;
    box-sizing: border-box;
}

.year-nav form {
    margin: 0;
    padding: 0;
    display: flex;
}

.year-nav__arrow {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 16px;
    line-height: normal;
    cursor: pointer;
    padding: 0 8px;
    height: 28px;
    display: flex;
    align-items: center;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out),
                opacity var(--dur-hover) var(--ease-out);
    box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
    .year-nav__arrow:hover:not(:disabled) {
        background: #0071A5;
    }
}

.year-nav__arrow:not(:disabled):active {
    transform: scale(0.92);
}

.year-nav__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.year-nav__label {
    color: #FFFFFF;
    font-size: 12px;
    line-height: normal;
    padding: 0 4px;
    user-select: none;
    text-align: center;
    white-space: nowrap;
}

.btn_fw {
    width: 100px;
    justify-content: center;
}

/* === Переключатель «Мес / Кв» — сегментированный тумблер в шапке === */
.mode-toggle {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    width: 100px;
    height: 28px;
    margin: 0;
    padding: 2px;
    border: 1px solid #CCDAE4;
    border-radius: 5px;
    background: #F2F6F8;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55),
                inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.mode-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: linear-gradient(180deg, #1496CE 0%, #007EB7 55%, #006FA3 100%);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 94, 142, 0.32),
                0 0 0 0.5px rgba(0, 94, 142, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 440ms cubic-bezier(0.34, 1.42, 0.5, 1),
                background-color var(--dur-hover) var(--ease-out);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    overflow: hidden;
}

.mode-toggle--quarter .mode-toggle__thumb {
    transform: translateX(100%);
}

/* Бликовая пробежка по бегунку при переключении */
.mode-toggle__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 70%);
    transform: translateX(-130%);
    opacity: 0;
    pointer-events: none;
}

.mode-toggle.is-shifting .mode-toggle__thumb::after {
    animation: mode-thumb-shine 520ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mode-thumb-shine {
    0%   { transform: translateX(-130%); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateX(130%); opacity: 0; }
}

/* «Жидкий» сквош бегунка во время перехода */
.mode-toggle.is-shifting.mode-toggle--quarter .mode-toggle__thumb {
    animation: mode-thumb-stretch-right 440ms cubic-bezier(0.34, 1.42, 0.5, 1);
}
.mode-toggle.is-shifting.mode-toggle--month .mode-toggle__thumb {
    animation: mode-thumb-stretch-left 440ms cubic-bezier(0.34, 1.42, 0.5, 1);
}

@keyframes mode-thumb-stretch-right {
    0%   { transform: translateX(0)    scaleX(1)    scaleY(1); }
    45%  { transform: translateX(60%)  scaleX(1.18) scaleY(0.94); }
    100% { transform: translateX(100%) scaleX(1)    scaleY(1); }
}
@keyframes mode-thumb-stretch-left {
    0%   { transform: translateX(100%) scaleX(1)    scaleY(1); }
    45%  { transform: translateX(40%)  scaleX(1.18) scaleY(0.94); }
    100% { transform: translateX(0)    scaleX(1)    scaleY(1); }
}

.mode-toggle__form {
    flex: 1 1 50%;
    margin: 0;
    padding: 0;
    display: flex;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.mode-toggle__btn {
    flex: 1;
    width: 100%;
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #5A6B78;
    font-size: 12px;
    line-height: normal;
    cursor: pointer;
    border-radius: 3px;
    transition: color 280ms var(--ease-out),
                transform 320ms cubic-bezier(0.34, 1.42, 0.5, 1),
                letter-spacing 280ms var(--ease-out),
                font-weight 280ms var(--ease-out);
    user-select: none;
    -webkit-user-select: none;
}

.mode-toggle__btn--active {
    color: #FFFFFF;
    letter-spacing: 0.3px;
    font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
    .mode-toggle__btn:hover:not(.mode-toggle__btn--active) {
        color: #1A222B;
    }
}

.mode-toggle__btn:active:not(.mode-toggle__btn--active) {
    transform: scale(0.94);
}

.mode-toggle__btn:focus-visible {
    outline: 2px solid #007EB7;
    outline-offset: 2px;
}

/* === Маскирующая «волна» поверх перезагрузки страницы === */
.mode-wash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    overflow: hidden;
}

.mode-wash::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background:
        radial-gradient(ellipse at 50% 0%,
            rgba(0, 126, 183, 0.10) 0%,
            rgba(0, 126, 183, 0.04) 35%,
            transparent 70%),
        linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.55) 45%,
            rgba(255, 255, 255, 0.78) 50%,
            rgba(255, 255, 255, 0.55) 55%,
            transparent 100%);
    transform: translateX(-100%);
}

.mode-wash.is-active {
    opacity: 1;
}

.mode-wash.is-active.dir-right::before {
    animation: mode-wash-right 520ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.mode-wash.is-active.dir-left::before {
    animation: mode-wash-left 520ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes mode-wash-right {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes mode-wash-left {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Мягкое «всплытие» свежезагруженной страницы после переключения.
   Только opacity: никаких transform/filter на <body>, иначе вся страница
   визуально прыгает (особенно вместе с восстановлением позиции скролла). */
body.mode-arrived {
    animation: mode-arrive 380ms var(--ease-out);
}

@keyframes mode-arrive {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mode-toggle.is-shifting .mode-toggle__thumb,
    .mode-toggle.is-shifting .mode-toggle__thumb::after,
    .mode-wash.is-active::before,
    body.mode-arrived {
        animation: none !important;
    }
    .mode-wash { display: none; }
}

.btn-icon,
.btn-chevron {
    flex-shrink: 0;
    display: block;
    margin-left: 5px;
}

.energy_source_name {
    display: inline-block;
    border: 1px solid #2980B9;
    border-bottom: 1px solid #f1f3f7;
    border-radius: 5px 5px 0 0;
    margin: 20px 0 -1px 0;
    width: auto;
    text-align: center;
    line-height: 25px;
    padding: 5px 10px 5px 10px;
}

.energy_source {
    border: 1px solid #2980B9;
    width: auto;
    padding-top: 10px;
    padding-bottom: 10px;
}

.heat-vent-defaults {
    margin: 4px 0 6px 22px;
    padding: 10px 14px;
    background: #eef6fc;
    border-left: 3px solid #2980B9;
    border-radius: 0 6px 6px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.heat-vent-defaults__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heat-vent-defaults__label {
    font-size: 11px;
    font-family: robotom, sans-serif;
    color: #4a7a9b;
    white-space: nowrap;
    line-height: 1.2;
}

.heat-vent-defaults input {
    width: 110px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #aac8e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: robotom, sans-serif;
    color: #1b3a55;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.heat-vent-defaults input:focus {
    border-color: #2980B9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
}

.heat-vent-defaults__computed {
    display: inline-block;
    min-width: 80px;
    height: 28px;
    line-height: 28px;
    padding: 0 10px;
    background: #e8f4fb;
    border: 1px solid #aac8e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: robotom, sans-serif;
    color: #1b3a55;
    font-weight: 600;
    text-align: center;
    box-sizing: border-box;
}

.heat-vent-defaults__hint {
    font-size: 10px;
    font-family: robotom, sans-serif;
    color: #7a9db8;
    display: block;
    margin-top: 2px;
    text-align: center;
}



.open_Modal_Ab {
    color: #012acb;
}

@media print {
    .table_tab_bloc {
        border: none;
    }
    .no_print {
        display: none !important;
    }
    .organization {
        /*display:inline-block;*/
        font-size: 16px;
        font-weight: bold;
        color: black;
        text-align: center;
        height: 30px;

    }
    .ctx-switcher-static {
        border: none;
        background: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        gap: 0;
    }
    .ctx-switcher-static .ctx-switcher__name {
        font-size: 16px;
        font-weight: bold;
        color: black;
    }
    .table_header_norm_calc {
        background-color: white;
    }
    .table_header_name_calc {
        border: 1px solid black;
    }
    .table_cell_norm_calc {
        border: 1px solid black;
    }
    .table_name_calc {
        border: 1px solid black;
    }
    .table_value_calc input {
        color: black;
    }
    .table_input input{
        color: black;
    }
    .open_Modal_Ab {
        color: black;
    }
    .positive {
        color: black;
    }
    .negative {
        color: black;
    }
}

/* ========= Переключатель контекста (выпадающий список в шапке) ========= */
.ctx-switcher {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
}

/* Название без подразделений — тот же chip, но без шеврона и без hover */
.ctx-switcher-static {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FC 100%);
    border: 1px solid #DBE5F0;
    padding: 5px 14px 5px 6px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
    margin-top: 6px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.ctx-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FC 100%);
    border: 1px solid #DBE5F0;
    cursor: pointer;
    padding: 5px 6px 5px 6px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
    transition: border-color var(--dur-hover) var(--ease-out),
                box-shadow var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
    color: #2980B9;
    margin-top: 6px;
    font-family: inherit;
    line-height: 1.15;
    width: 100%;
    min-width: 0;
    text-align: left;
}

.ctx-switcher__trigger:hover {
    border-color: #2980B9;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.14);
}
.ctx-switcher__trigger:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.06);
}
.ctx-switcher__trigger:focus-visible {
    outline: 2px solid #2980B9;
    outline-offset: 2px;
}

.ctx-switcher__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2E8FCB 0%, #1F6093 100%);
    color: #FFFFFF;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 1px 2px rgba(41, 128, 185, 0.25);
}

/* Текст обрезается с ellipsis, стрелка всегда видна */
.ctx-switcher__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    font-weight: 600;
    color: #1F3A52;
    line-height: 1;
}

.ctx-switcher__arrow-wrap {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #EAF1F8;
    color: #2980B9;
    margin-left: auto;
    transition: background-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out);
}

.ctx-switcher__trigger:hover .ctx-switcher__arrow-wrap {
    background: #2980B9;
    color: #FFFFFF;
}

.ctx-switcher__arrow {
    transition: transform 0.2s var(--ease-out);
}

.ctx-switcher__trigger[aria-expanded="true"] .ctx-switcher__arrow-wrap {
    background: #2980B9;
    color: #FFFFFF;
}

.ctx-switcher__trigger[aria-expanded="true"] .ctx-switcher__arrow {
    transform: rotate(180deg);
}

.ctx-switcher__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    /* Совпадает по ширине с триггер-chip-ом */
    min-width: 100%;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E1EAF3;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 39, 64, 0.06),
                0 12px 32px rgba(15, 39, 64, 0.12);
    z-index: 500;
    padding: 6px;
    /* Бренд-акцент: тонкий тёплый градиент сверху, как у .line */
    background-image:
        linear-gradient(90deg,
            #ff3d01 0%, #ffb200 17%, #9ace03 34%, #8dc41a 50%,
            #9ace03 66%, #ffb200 83%, #ff3d01 100%),
        linear-gradient(180deg, #F4F8FC 0%, #FFFFFF 70px);
    background-repeat: no-repeat;
    background-size: 100% 2px, 100% 100%;
    background-position: top, top;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transform-origin: top left;
    transform: scale(0.96);
    opacity: 0;
    transition: opacity var(--dur-dropdown) var(--ease-out),
                transform var(--dur-dropdown) var(--ease-out),
                display var(--dur-dropdown) allow-discrete;
}

.ctx-switcher__dropdown--open {
    display: block;
    opacity: 1;
    transform: scale(1);
}

@starting-style {
    .ctx-switcher__dropdown--open {
        opacity: 0;
        transform: scale(0.96);
    }
}

.ctx-switcher__header {
    padding: 10px 12px 4px;
}

.ctx-switcher__header-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8A98A8;
    font-weight: 700;
}

.ctx-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #1F3A52;
    cursor: pointer;
    text-align: left;
    transition: background-color 130ms var(--ease-out),
                color 130ms var(--ease-out);
    box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
    .ctx-switcher__item:hover {
        background: #F1F6FB;
    }
    .ctx-switcher__item:hover .ctx-switcher__item-icon {
        background: #DCE9F4;
    }
}

.ctx-switcher__item:focus-visible {
    outline: 2px solid #2980B9;
    outline-offset: -2px;
}

.ctx-switcher__item--active {
    background: linear-gradient(180deg, rgba(41, 128, 185, 0.10), rgba(41, 128, 185, 0.06));
    color: #1F6093;
}

@media (hover: hover) and (pointer: fine) {
    .ctx-switcher__item--active:hover {
        background: linear-gradient(180deg, rgba(41, 128, 185, 0.14), rgba(41, 128, 185, 0.08));
    }
}

.ctx-switcher__item-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #EAF1F8;
    color: #2980B9;
    transition: background-color 130ms var(--ease-out),
                color 130ms var(--ease-out),
                box-shadow 130ms var(--ease-out);
}

.ctx-switcher__item-icon--dept {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.ctx-switcher__item--active .ctx-switcher__item-icon {
    background: linear-gradient(135deg, #2E8FCB 0%, #1F6093 100%);
    color: #FFFFFF;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 1px 2px rgba(41, 128, 185, 0.3);
}

.ctx-switcher__item-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    line-height: 1.2;
    gap: 1px;
}

.ctx-switcher__item-name {
    font-weight: 600;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.ctx-switcher__item--active .ctx-switcher__item-name {
    color: #1F6093;
}

.ctx-switcher__item-meta {
    font-size: 11px;
    color: #8A98A8;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.ctx-switcher__item--active .ctx-switcher__item-meta {
    color: rgba(31, 96, 147, 0.75);
}

.ctx-switcher__item--dept {
    padding-left: 22px;
}

.ctx-switcher__check {
    flex-shrink: 0;
    opacity: 0;
    color: #2980B9;
    transform: scale(0.8);
    transition: opacity 130ms var(--ease-out),
                transform 130ms var(--ease-out);
}

.ctx-switcher__item--active .ctx-switcher__check {
    opacity: 1;
    transform: scale(1);
}

.ctx-switcher__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #E1EAF3 15%, #E1EAF3 85%, transparent 100%);
    margin: 6px 6px;
    border: none;
}

.ctx-switcher__group-label {
    padding: 8px 12px 4px;
    font-size: 9px;
    color: #8A98A8;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

/* === admin-panel: internal EnStaMonitor admin shell === */
.admin-panel {
    color: #1F3A52;
}

.admin-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin: 14px 0 10px;
}

.admin-panel__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    color: #1F3A52;
}

.admin-panel__subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #6B7B8C;
}

.admin-panel__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.admin-panel__nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #DBE5F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #1F3A52 !important;
    font-size: 13px;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out);
}

.admin-panel__nav-link:hover,
.admin-panel__nav-link--active {
    background: #007EB7;
    border-color: #007EB7;
    color: #FFFFFF !important;
}

.admin-panel__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.admin-card {
    min-height: 78px;
    padding: 12px;
    border: 1px solid #DBE5F0;
    border-radius: 8px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.admin-card span {
    display: block;
    font-size: 12px;
    color: #6B7B8C;
}

.admin-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1;
    color: #007EB7;
}

.admin-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.admin-panel__section {
    margin: 16px 0 22px;
}

.admin-panel__section h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1F3A52;
}

.admin-panel__section h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1F3A52;
}

.admin-panel__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-panel__table {
    background: #FFFFFF;
}

.admin-panel__table .table_cell {
    height: 34px;
    font-size: 13px;
}

.admin-panel__table--wide {
    min-width: 980px;
}

.admin-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    box-sizing: border-box;
}

.admin-panel__badge--ok {
    background: #E7F6F1;
    color: #0F5132;
}

.admin-panel__badge--stop {
    background: #F8D7DA;
    color: #842029;
}

.admin-panel__link {
    color: #007EB7 !important;
    font-weight: 600;
}

.admin-panel__link:hover {
    color: #005E8A !important;
}

.admin-panel__muted,
.admin-panel__empty {
    color: #7A8795;
}

.admin-panel__empty {
    display: block;
    padding: 10px;
    text-align: center;
}

.admin-panel__detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.admin-panel__info {
    padding: 14px;
    border: 1px solid #DBE5F0;
    border-radius: 8px;
    background: #FFFFFF;
}

.admin-panel__info dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px 12px;
    margin: 0;
    font-size: 13px;
}

.admin-panel__info dt {
    color: #6B7B8C;
}

.admin-panel__info dd {
    margin: 0;
    color: #1F3A52;
}

.admin-panel__placeholder {
    padding: 16px;
    border: 1px solid #DBE5F0;
    border-radius: 8px;
    background: #FFFFFF;
}

.admin-panel__placeholder p {
    margin: 0 0 12px;
    color: #4A5A6C;
}

.admin-panel__placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-panel__placeholder-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #DBE5F0;
    border-radius: 999px;
    background: #F4F8FC;
    font-size: 12px;
}

.admin-panel__btn {
    margin: 0;
}

/* === admin-panel 1.1 visual polish === */
.admin-panel {
    padding-top: 18px;
    padding-bottom: 36px;
}

.admin-panel__hero {
    margin: 14px 0 12px;
    padding: 16px 18px;
    border: 1px solid #DBE5F0;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

.admin-panel__eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2980B9;
}

.admin-panel__title {
    font-size: 26px;
    font-weight: 700;
}

.admin-panel__subtitle {
    max-width: 760px;
    font-size: 14px;
    line-height: 1.45;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 6px;
    border: 1px solid #DCE8F2;
    border-radius: 8px;
    background: #FFFFFF;
}

.admin-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #1F3A52 !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-nav__link:hover {
        background: #EAF4FB;
        border-color: #BFD8EA;
        color: #005E8A !important;
    }
}

.admin-nav__link:active {
    transform: scale(0.97);
}

.admin-nav__link--active {
    background: #007EB7;
    border-color: #007EB7;
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(0, 94, 142, 0.18);
}

@media (hover: hover) and (pointer: fine) {
    .admin-nav__link--active:hover {
        background: #007EB7;
        border-color: #007EB7;
        color: #FFFFFF !important;
    }
}

.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.admin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
    padding: 14px 16px;
    border: 1px solid #D7E6F1;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFD 100%);
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

.admin-card span {
    color: #4A5A6C;
    font-size: 14px;
    line-height: 1.25;
}

.admin-card strong {
    margin: 0;
    color: #007EB7;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.admin-panel__section {
    margin: 18px 0 24px;
}

.admin-panel__section h2 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
}

.admin-panel__table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #2980B9;
    border-radius: 6px;
    background: #FFFFFF;
}

.admin-panel__table-wrap .my_table {
    border: 0;
}

.admin-panel__table {
    min-width: 720px;
}

.admin-panel__table--wide {
    min-width: 1100px;
}

.admin-panel__grid .admin-panel__table {
    min-width: 0;
    width: 100%;
}

.admin-panel__table .table_header {
    background: #BADBF1;
}

.admin-panel__table .table_cell {
    height: 38px;
    padding: 4px 8px;
    border-color: #2980B9;
    color: #1F3A52;
    line-height: 1.25;
}

.admin-panel__table .table_header .table_cell {
    font-weight: 700;
}

.admin-panel__table .table_line:hover {
    background: #EFF7FD;
}

.admin-badge,
.admin-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    box-sizing: border-box;
}

.admin-badge--ok,
.admin-panel__badge--ok {
    background: #E7F6F1;
    color: #0F5132;
    border: 1px solid #BFE7D8;
}

.admin-badge--stop,
.admin-panel__badge--stop {
    background: #F8D7DA;
    color: #842029;
    border: 1px solid #F1B8BE;
}

.admin-panel__badge--muted {
    background: #EEF2F6;
    color: #4A5A6C;
    border: 1px solid #D8E2EA;
}

.admin-panel__table-wrap--fit {
    overflow-x: visible;
}

.admin-panel__table--clients {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
    font-size: 12px;
}

.admin-panel__table--departments {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.admin-panel__table--access {
    table-layout: fixed;
    width: 100%;
    min-width: 960px;
    font-size: 12px;
}

.admin-panel__table--access .table_cell {
    overflow-wrap: anywhere;
}

.admin-panel__table--access .admin-panel__actions {
    justify-content: center;
}

.admin-panel__table--clients .table_cell {
    padding-left: 6px;
    padding-right: 6px;
    word-break: normal;
    overflow-wrap: anywhere;
}

.admin-panel__cell-org {
    width: 18%;
}

.admin-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-panel__link--button {
    min-height: 28px;
    border: 1px solid #C7DCEB;
    background: #FFFFFF;
    box-sizing: border-box;
}

.admin-panel__info--wide {
    max-width: none;
}

.admin-panel__settings-list {
    grid-template-columns: minmax(220px, 360px) 1fr;
}

.admin-panel__form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 14px;
}

.admin-panel__form-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}

.admin-panel__form,
.admin-panel__form .admin-panel__section,
.admin-panel__form-grid,
.admin-panel__form-card,
.admin-panel__form-field {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.admin-panel__section-head--form {
    min-width: 0;
    flex-wrap: wrap;
}

.admin-panel__section-head--form h2 {
    flex: 1 1 320px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-panel__actions--form {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
}

.admin-panel__actions--form > * {
    max-width: 100%;
    box-sizing: border-box;
}

.admin-panel__form-card {
    padding: 14px;
    border: 1px solid #D7E6F1;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

.admin-panel__form-card h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E4EEF6;
    font-size: 16px;
    color: #1F3A52;
}

.admin-panel__form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 11px;
    font-size: 13px;
    color: #1F3A52;
}

.admin-panel__form-field input[type="text"],
.admin-panel__form-field input[type="date"],
.admin-panel__form-field textarea {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #BFD8EA;
    border-radius: 5px;
    background: #FFFFFF;
    color: #1F3A52;
    font-family: robotom, sans-serif;
    font-size: 13px;
    box-sizing: border-box;
}

.admin-panel__form-field textarea {
    min-height: 78px;
    resize: vertical;
}

.admin-panel__form-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007EB7;
}

.admin-panel__submit {
    min-height: 28px;
    padding: 0 14px;
    border: 1px solid #007EB7;
    border-radius: 5px;
    background: #007EB7;
    color: #FFFFFF;
    font-family: robotom, sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-panel__submit:hover {
        background: #0071A5;
    }
}

.admin-panel__submit:active {
    transform: scale(0.97);
}

.admin-panel__hint {
    margin: -4px 0 12px;
    color: #6B7B8C;
    font-size: 12px;
    line-height: 1.4;
}

.admin-panel__form-errors {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #F1B8BE;
    border-radius: 6px;
    background: #F8D7DA;
    color: #842029;
}

.access-closed-page {
    min-height: 100vh;
    margin: 0;
    background: #F1F3F7;
    color: #1F3A52;
}

.access-closed__header {
    border-bottom: 1px solid #D7E6F1;
    background: #FFFFFF;
}

.access-closed__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1120px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    box-sizing: border-box;
}

.access-closed__brand,
.access-closed__account {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.access-closed__brand {
    font-size: 18px;
    font-weight: 700;
}

.access-closed__logo {
    width: auto;
    height: 44px;
}

.access-closed__identity {
    max-width: min(42vw, 420px);
    overflow: hidden;
    color: #4A5A6C;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-closed__account form {
    margin: 0;
}

.access-closed__logout {
    margin: 0;
}

.access-closed__main {
    display: grid;
    min-height: calc(100vh - 69px);
    padding: 32px 16px;
    place-items: center;
    box-sizing: border-box;
}

.access-closed {
    width: 100%;
    max-width: 720px;
    margin: 0;
    padding: 28px;
    border: 1px solid #D7E6F1;
    border-radius: 8px;
    background: #FFFFFF;
    color: #1F3A52;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
    box-sizing: border-box;
}

.access-closed h1 {
    margin: 0 0 12px;
    font-size: 24px;
}

.access-closed p {
    margin: 0;
}

@media (max-width: 560px) {
    .access-closed__header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 12px 0;
    }

    .access-closed__account {
        justify-content: space-between;
        width: 100%;
    }

    .access-closed__identity {
        max-width: calc(100vw - 140px);
    }

    .access-closed__main {
        min-height: calc(100vh - 116px);
    }
}

@media (max-width: 1100px) {
    .admin-panel__table-wrap--fit {
        overflow-x: auto;
    }

    .admin-panel__table--clients {
        min-width: 980px;
    }
}

.admin-panel__link {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 5px;
    color: #007EB7 !important;
    transition: background-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-panel__link:hover {
        background: #EAF4FB;
        color: #005E8A !important;
    }
}

.admin-panel__detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.admin-panel__info {
    border-color: #D7E6F1;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

.admin-panel__info h3 {
    padding-bottom: 8px;
    border-bottom: 1px solid #E4EEF6;
}

.admin-panel__placeholder {
    border-color: #D7E6F1;
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

@media (max-width: 720px) {
    .admin-panel__hero {
        padding: 14px;
    }

    .admin-panel__title {
        font-size: 22px;
    }

    .admin-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-dashboard {
        grid-template-columns: 1fr;
    }

    .admin-card {
        min-height: 58px;
    }
}

/* === admin-panel 1.2 standalone layout === */
.admin-panel-page {
    min-height: 100vh;
    background: #f1f3f7;
}

.admin-panel__header {
    background: #FFFFFF;
}

.admin-panel__header-inner {
    max-width: 80%;
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-panel__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #1F3A52 !important;
}

.admin-panel__logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.admin-panel__brand-name {
    font-family: calibri, sans-serif;
    font-size: 24px;
    color: #000000;
    white-space: nowrap;
}

.admin-panel__brand-divider {
    width: 1px;
    height: 32px;
    background: #1F3A52;
    opacity: 0.55;
}

.admin-panel__brand-section {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    background: #EAF4FB;
    color: #007EB7;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-panel__header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-panel__site-link,
.admin-panel__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 5px;
    font-family: robotom, sans-serif;
    font-size: 12px;
    box-sizing: border-box;
}

.admin-panel__site-link {
    border: 1px solid #C7DCEB;
    background: #FFFFFF;
    color: #1F3A52 !important;
}

.admin-panel__admin-login {
    color: #1F3A52;
    font-size: 13px;
    font-weight: 700;
}

.admin-panel__logout-form {
    margin: 0;
}

.admin-panel__logout {
    border: 1px solid #FECACA;
    background: #FFFFFF;
    color: #B91C1C;
    cursor: pointer;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-panel__site-link:hover {
        background: #EAF4FB;
        border-color: #AFCFE4;
    }

    .admin-panel__logout:hover {
        background: #FEF2F2;
        border-color: #F87171;
    }
}

.admin-panel__logout:active {
    transform: scale(0.97);
}

.admin-panel__brand-line {
    height: 2px;
    background: linear-gradient(to right, #ff3d01 0%, #ffb200 17%, #9ace03 34%, #8dc41a 50%, #9ace03 66%, #ffb200 83%, #ff3d01 100%);
}

.admin-panel__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 6px;
    border: 1px solid #DCE8F2;
    border-radius: 8px;
    background: #FFFFFF;
}

.admin-panel__nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #1F3A52 !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--dur-hover) var(--ease-out),
                border-color var(--dur-hover) var(--ease-out),
                color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-panel__nav-link:hover {
        background: #EAF4FB;
        border-color: #BFD8EA;
        color: #005E8A !important;
    }
}

.admin-panel__nav-link:active {
    transform: scale(0.97);
}

.admin-panel__nav-link--active {
    background: #007EB7;
    border-color: #007EB7;
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(0, 94, 142, 0.18);
}

.admin-panel__dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.admin-panel__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
    padding: 14px 16px;
    border: 1px solid #D7E6F1;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFD 100%);
    box-shadow: 0 1px 2px rgba(15, 39, 64, 0.04);
}

.admin-panel__card span {
    color: #4A5A6C;
    font-size: 14px;
    line-height: 1.25;
}

.admin-panel__card strong {
    margin: 0;
    color: #007EB7;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.admin-panel__table {
    width: 100%;
    min-width: 0;
}

.admin-panel__table--wide {
    min-width: 1100px;
}

.admin-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    box-sizing: border-box;
}

.admin-panel__badge--ok {
    background: #E7F6F1;
    color: #0F5132;
    border: 1px solid #BFE7D8;
}

.admin-panel__badge--stop {
    background: #F8D7DA;
    color: #842029;
    border: 1px solid #F1B8BE;
}

@media (max-width: 720px) {
    .admin-panel__header-inner {
        max-width: 92%;
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0;
    }

    .admin-panel__brand {
        flex-wrap: wrap;
    }

    .admin-panel__brand-name {
        font-size: 22px;
    }

    .admin-panel__brand-divider {
        display: none;
    }

    .admin-panel__nav,
    .admin-panel__dashboard {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-panel__card {
        min-height: 58px;
    }
}

/* === admin-panel 1.3 responsive data tables === */
.content_block.admin-panel,
.admin-panel__header-inner {
    width: min(1540px, calc(100% - 32px));
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

.content_block.admin-panel {
    padding-right: 0;
    padding-left: 0;
}

.admin-panel__table-wrap--responsive {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.admin-panel__table--clients,
.admin-panel__table--access,
.admin-panel__table--users,
.admin-panel__table--reminders {
    width: 100%;
    table-layout: fixed;
    font-size: 12px;
}

.admin-panel__table--clients {
    min-width: 1120px;
}

.admin-panel__table--access {
    min-width: 1280px;
}

.admin-panel__table--users {
    min-width: 920px;
}

.admin-panel__table--reminders {
    min-width: 900px;
}

.admin-panel__table--clients .table_cell,
.admin-panel__table--access .table_cell,
.admin-panel__table--users .table_cell,
.admin-panel__table--reminders .table_cell {
    word-break: normal;
    overflow-wrap: normal;
}

.admin-panel__cell--organization {
    width: 18%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere !important;
}

.admin-panel__cell--actions {
    min-width: 140px;
}

.admin-panel__table--clients .admin-panel__cell--actions {
    width: 160px;
}

.admin-panel__table--access .admin-panel__cell--actions {
    width: 220px;
}

.admin-panel__table--users .admin-panel__cell--actions {
    width: 120px;
}

.admin-panel__actions--table {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
}

.admin-panel__actions--table form {
    width: 100%;
    margin: 0;
}

.admin-panel__action-link {
    max-width: 100%;
    justify-content: center;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    box-sizing: border-box;
}

.admin-panel__actions--table .admin-panel__action-link {
    width: 100%;
}

@media (max-width: 720px) {
    .content_block.admin-panel,
    .admin-panel__header-inner {
        width: calc(100% - 20px);
    }
}

/* === admin-panel 1.4 controls and compact actions === */
.admin-panel__filters {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #D7E6F1;
    border-radius: 8px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.admin-panel__filters--search-only {
    grid-template-columns: minmax(280px, 640px) auto;
    justify-content: start;
}

.admin-panel__filter {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
    color: #4A5A6C;
    font-size: 12px;
    font-weight: 600;
}

.admin-panel__filter input,
.admin-panel__filter select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid #BFD8EA;
    border-radius: 5px;
    background: #FFFFFF;
    color: #1F3A52;
    font: 13px robotom, sans-serif;
    box-sizing: border-box;
}

.admin-panel__filter-actions,
.admin-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.admin-panel__filter-actions {
    min-height: 34px;
}

.admin-actions {
    justify-content: center;
}

.admin-actions form {
    margin: 0;
}

.admin-actions .admin-panel__action-link {
    width: auto;
    min-height: 24px;
    padding: 0 7px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-panel__table--clients .admin-panel__cell--actions,
.admin-panel__table--access .admin-panel__cell--actions {
    width: 210px;
    min-width: 210px;
}

.admin-panel__subtitle-nowrap {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .admin-panel__filters {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    .admin-panel__filter--search {
        grid-column: 1 / -1;
    }

    .admin-panel__filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .admin-panel__filters,
    .admin-panel__filters--search-only {
        grid-template-columns: 1fr;
    }

    .admin-panel__filter--search,
    .admin-panel__filter-actions {
        grid-column: auto;
    }

    .admin-panel__subtitle-nowrap {
        white-space: normal;
    }
}

/* === admin-panel 1.5 data-first row actions === */
.admin-panel__table--clients {
    min-width: 980px;
}

.admin-panel__table--access {
    min-width: 1120px;
}

.admin-panel__cell--more {
    position: relative;
    width: 54px;
    min-width: 54px;
    white-space: nowrap;
}

.admin-panel__organization-link {
    color: inherit !important;
    font-weight: inherit;
    text-decoration: none;
    transition: color var(--dur-hover) var(--ease-out);
}

.admin-panel__organization-link:focus-visible {
    border-radius: 3px;
    outline: 2px solid #007EB7;
    outline-offset: 2px;
}

.admin-panel__status-form {
    display: inline-flex;
    margin: 0;
}

.admin-panel__status-action,
.admin-panel__status-link {
    font-family: robotom, sans-serif;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.admin-panel__table .admin-panel__status-action {
    padding: 0 10px;
    border-style: solid;
    border-width: 1px;
    cursor: pointer;
    transition: filter var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

.admin-panel__table .admin-panel__status-action.admin-panel__badge--ok {
    border-color: #BFE7D8;
}

.admin-panel__table .admin-panel__status-action.admin-panel__badge--stop {
    border-color: #F1B8BE;
}

.admin-panel__status-link {
    transition: filter var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

.admin-panel__status-action:active,
.admin-panel__status-link:active,
.admin-panel__compact-action:active,
.admin-panel__row-menu summary:active {
    transform: scale(0.97);
}

.admin-panel__status-action:focus-visible,
.admin-panel__status-link:focus-visible,
.admin-panel__compact-action:focus-visible,
.admin-panel__row-menu summary:focus-visible {
    outline: 2px solid #007EB7;
    outline-offset: 2px;
}

.admin-panel__row-menu {
    position: relative;
    display: inline-block;
}

.admin-panel__row-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 26px;
    border: 1px solid #C7DCEB;
    border-radius: 5px;
    background: #FFFFFF;
    color: #007EB7;
    font-size: 20px;
    line-height: 1;
    list-style: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

.admin-panel__row-menu summary::-webkit-details-marker {
    display: none;
}

.admin-panel__row-menu-content {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    min-width: 170px;
    padding: 5px;
    border: 1px solid #C7DCEB;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(15, 39, 64, 0.14);
    box-sizing: border-box;
}

.admin-panel__row-menu-content a {
    padding: 7px 9px;
    border-radius: 4px;
    color: #1F3A52 !important;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.admin-panel__compact-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid #C7DCEB;
    border-radius: 5px;
    background: #FFFFFF;
    color: #007EB7 !important;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color var(--dur-hover) var(--ease-out),
                transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .admin-panel__organization-link:hover {
        color: #007EB7 !important;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    .admin-panel__status-action:hover,
    .admin-panel__status-link:hover {
        filter: brightness(0.96);
    }

    .admin-panel__row-menu summary:hover,
    .admin-panel__compact-action:hover,
    .admin-panel__row-menu-content a:hover {
        background: #EAF4FB;
    }
}
