﻿* {
  --main-color-green: #0A74AF;
  --main-color-green-transparent: #0A74AF17;
  --main-color-hover-green: #003b60;
  --main-color-purple: #D15A3A;
  --main-color-hover-purple: #7c7e8b;
  --shadow2: 2px 2px 6px #999;
}
html{
  height: unset;
}
#maindiv {
  width: 100%;
min-height: unset;
}
#content {
    gap: 15px;
}
header {
  max-width: 100%;
}
body.noheight {
  height: unset;
  min-height: unset;
}
.pagination {
    border-top: 1px solid #D15A3A;
    border-bottom: 1px solid #D15A3A;
    padding: 10px;
}
a, a:hover {
    font-size: 16px !important;
    color: var(--main-color-green);
}
.hidden {display: none;}
.form-container {
    max-width: 300px;
    padding: 10px 10px 20px 10px;
    background-color: white;
    margin: 0;
}
.menu_up {
  min-height: 30px;
  justify-content: end;
  gap: 15px;
  padding-right: 20px;
  box-shadow: 0 1px 4px #333;
  z-index: 100000;
  max-width: 100%;
}
summary {
  cursor: pointer;
}
fieldset {
    background-color: #fafafa;
    border: 2px solid var(--main-color-purple);
    border-radius: 0;
    padding: 0;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}
.noheight fieldset {
  margin: 5px;
}
fieldset#filter {
    margin: 0;
}
fieldset .legend {
  background-color: var(--main-color-purple);
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  padding: 10px 20px;
  margin: 0;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: none;
  justify-content: space-between;
}

.legend-part {
  background: #0a74af;
  color: #ffffffff;
  font-weight: bold;
  font-size: 1.0em;
  padding: 10px 30px 10px 20px;
  margin: 0;
  display: flex;
  border-radius: 0 20px 20px 0; /* скругление справа, как у закладки */
  box-shadow: 2px 2px 8px #ccc;
  position: relative;
}
.legend-part::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  background: var(--main-color-purple);
  border-radius: 0 0 8px 0;
}
.legend-subpart {
  background: #e0e7ef;           /* светло-серый-голубой фон */
  color: #333;                   /* тёмно-серый текст */
  font-weight: 500;              /* чуть менее жирный */
  font-size: 0.95em;             /* немного меньше шрифт */
  padding: 6px 18px 6px 12px;    /* меньше отступы */
  margin: 0;
  display: flex;
  border-radius: 0 12px 12px 0;  /* меньше скругление */
  box-shadow: 1px 1px 4px #bbb;  /* более лёгкая тень */
  position: relative;
}

.legend-subpart::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  background: #0a74af;
  border-radius: 0 0 8px 0;
}
.inline-form-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    flex-direction: column;
}
.filters, .results {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: center;
    gap: 15px;
}
#filter label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

input[type=text],input[type=number], select, textarea {
    width: 100%;
    padding: 10px;
    margin: 0px;
    border: 1px solid #f1f1f1;
    background-color: #fff;
}
.select2 textarea {
    padding: 0;
}
#lmenu .select2 textarea {
    max-width: 230px !important;
    min-width: 230px !important;
}

.pagination {
    gap: 10px;
    align-items: center;
    align-content: center;
    justify-content: space-between;
}
.pagination *,.pagination *:hover {
    font-size: 15px !important;
    gap: 10px;
}
.step-links {
  display: flex;
  gap: 10px;
}
.step-links a {
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 2px;
  display: flex !important;
  box-shadow: var(--shadow);
}
.step-links a:hover {
  box-shadow: var(--shadow);
}
.step-links img {
  width: 15px;
}
.step-links photo {
  width: 35px;
}

.page_title {
  color: black;
  font-weight: bold;
  font-size: 20px;
}
.req:after {
    content: "*";
    color: red;
}
.req {
    font-weight: bold !important;
}
.tablediv {
    display: table;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    box-shadow: 0 0 3px #aaa;
    width: 100%;
    border-collapse: collapse;
}
.tablediv .th {
    box-shadow: inset 1px 1px 1px #fff;
    text-shadow: 1px 1px 1px #fff;
}

.thead {
    display: table-row;
    background-color: #eee;
}

.thead > div {
    display: table-cell;
		padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-bottom: 0;
    border-right: 0;
    font-weight: 400;
}
.tr {
    display: table-row;
}

.tr > div {
    display: table-cell;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    border: 1px solid #ddd;
    border-bottom: 0;
    border-right: 0;
    font-weight: 400;
}
.tr > div.notuse {
    empty-cells: show;
    background: linear-gradient(-45deg,rgba(0, 0, 0, 0) 48%,rgba(0, 0, 0, 0.2) 50%,rgba(0, 0, 0, 0) 52%);
    background-size: 0.5em 0.5em;
    background-color: #f9b1b1;
}

.tr:hover > div {
    background-color: #eeeeee7d;
}
.tr:hover > div.th {
    background-color: #eeeeee7d !important;
}
.tr > div.th {
    text-align: left;
    background-color: #fbfbfB;
}
.tr.thead2 > div.th {
    background-color: #eee;
}
.tr:hover {
    background-color: #eeeeee7d;
}
.td.left {
  text-align: start;
}
.td.right {
  text-align: end;
  justify-content: end;
}
.td.bottom {
  vertical-align: bottom !important;
}
.td.minwidth {
  width: min-content;
  max-width: 300px;
}
.td a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    display: inline-block;
}
.search_results{
    flex-grow: 1;
}
.btn {
  border: 2px solid var(--main-color-green);
  display: inline-block;
  padding: 1px;
  border-radius: 5px;
  align-content: center;
  text-align: center;
}
.btn:hover {
  box-shadow: var(--shadow);
}
.btn_border{
  background-color: #fff;
  color: var(--main-color-green);
}
.btn_border:hover{
  background-color: #fff;
  color: var(--main-color-hover-green) !important;
}
.btn img {
    width: 15px;
    height: 15px;
}
.btn_del {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 5px;
  box-shadow: var(--shadow);
  margin: 2px;
}
.btn_del:hover {
  box-shadow: var(--shadow);
}
.btn_del img {
    width: 15px;
    height: 15px;
}
.btn_plus_minus img {
    width: 15px;
    height: 15px;
}
.btn_plus_minus img {
    width: 15px;
    height: 15px;
}
.btn_approve {
  border: 2px solid var(--main-color-green);
  display: inline-block;
  padding: 2px;
  border-radius: 5px;
}
.btn_approve:hover {
  box-shadow: var(--shadow);
}
.btn_approve img {
    width: 20px;
    height: 20px;
}
.works-list {
  text-align: left;
}
.btn_add {
    width: 30px;
    height: 30px;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding: 5px;
    display: flex !important;
    box-shadow: var(--shadow);
}
.btn_add img {
    width: 35px;
    height: 35px;
    display: block;
}
.btn_add.imgsmall img {
    width: 20px;
    height: 20px;
    display: block;
}
.btn_add:hover{
  background-color: #fff;
    box-shadow: var(--shadow2);
}
textarea {
  padding: 0px 5px;
  width: 100%;
  border: 1px solid #f1f1f1;
}
.book_add img {
  max-width: 30px;
}
.book_add {
  display: flex;
}
.menu{
    background-color: transparent !important;
    max-width: 100%;
}
.cell_menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    align-self: baseline;
    flex-grow: 1;
}
.cell_menu:not(:last-child){
  border-right: 3px solid #fff;
}
.cell_menu > div {
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px;
  background-color: var(--main-color-hover-green);
  /* border-radius: 0 0 10px 0; */
}
.cell_menu > ul {
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
}
.cell_menu:has(.active) > div {
    background-color: var(--main-color-green);
    box-shadow: 0px 3px 3px #00000085;
    z-index: 2;
    /* border-bottom: 3px solid #0000001f; */
    /* box-shadow: 0px 2px 3px #000; */
}
.sub_cell_menu a.mnu {
    padding: 10px;
    background-color: var(--main-color-hover-green);
    position: relative;
    border-radius: 0 0 10px 10px;
}
.sub_cell_menu a.mnu:hover {
    background: linear-gradient(var(--main-color-hover-green) 5%, var(--main-color-hover-green));
}
.sub_cell_menu a.mnu.active:hover {
  background: var(--main-color-green);}
.sub_cell_menu a.mnu.active {
  background-color: var(--main-color-green);
  z-index: 2;
  box-shadow: 0px 3px 3px #00000085;
}
.logo_place {
  background-color: #fff;
  border-radius: 100%;
  margin: 10px;
}
.logo {
  width: 80px;
}
/* Toast container (правый нижний угол) */

#toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

/* Toast */
.toast {
  display: flex;
  min-width: 260px;
  max-width: 420px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  color: #111;
}

.toast-icon {
  flex: 0 0 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}
/* увеличить сам SVG внутри иконки */
.toast-icon svg {
  width: 50px;
  height: 50px;
  display: block;
}
/* text */
.toast-text {
  flex: 1 1 auto;
  line-height: 1.4;
  word-break: break-word;
}
.toast-body {
  padding: 12px 14px;
  font-size: 15px;
}
/* close */
.toast-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  margin-left: 6px;
}

/* color variants (backgrounds applied to SVG inlines already provide color hints) */
.toast-success { background-color: rgba(112, 250, 152, 0.95); }
.toast-error { background-color: rgba(248, 133, 133, 0.98); }
.toast-warning { background-color: rgba(248, 222, 138, 0.98); }
.toast-info { background-color: rgba(148, 212, 249, 0.98); }

/* small screens */
@media (max-width: 480px) {
  #toast-container { left: 10px; right: 10px; bottom: 10px; align-items: stretch; }
  .toast { min-width: auto; width: 100%; }
}

ul.works-list {
    list-style: none;
    padding-left: 0;
}

/* Иконка по умолчанию */
ul.works-list li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0px;
  vertical-align: middle;
  background-image: url('/static/library/img/check.svg');
}

/* Разные иконки для скрытых/видимых элементов */
ul.works-list li.work-allowed::before {
    background-image: url('/static/library/img/check-mark.svg');
}

ul.works-list li.work-pending::before {
    background-image: url('/static/library/img/exclamation-question-mark.svg');
}
.mark {
  width: 15px;
}
.img .approval-controls {
  margin-top: 20px;
}
.list_with_mark {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list_with_mark li {
  display: flex;
  align-content: start;
  align-items: start;
  gap: 5px;
  margin-bottom: 10px;
}
.list_with_mark li:has(.book_item) {
  align-content: start;
  align-items: start;
}
.list_with_mark li *{
  text-align: left;
}
.book_cover {
  width: 100%;
  max-width: 75px;
  box-shadow: var(--shadow);
}
.book_item .book_cover {
  margin: 10px;
  float: left;
}
.author_photo {
  width: 100%;
  max-width: 100px;
  box-shadow: var(--shadow);
}
.book_item .author_photo {
  margin: 10px;
  float: left;
}
.show-full {
  position: relative;
  display: inline-block;
  padding: 6px 6px;
  padding-right: 20px;
  font-size: 11px !important;
  font-weight: 500;
  color: #0A74AF;
  background: rgba(10, 116, 175, 0.06);
  border: 1px solid rgba(10, 116, 175, 0.2);
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.show-full::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0A74AF;
  transition: transform 0.2s;
}
.full-desc.show + .show-full::after {
    transform: translateY(-50%) rotate(180deg); /* стрелка вверх */
}
.show-full:hover {
  background: rgba(10, 116, 175, 0.12);
  border-color: rgba(10, 116, 175, 0.4);
  color: #085a8a;
  text-decoration: none;
  font-size: 11px !important;
  box-shadow: var(--shadow);
}
.show-full:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 116, 175, 0.2);
}
.toggle {
    width: 100%;
}

.toggle .short-desc,
.toggle .full-desc {
    transform: translateY(0);
    transition: display 0.5s, transform 0.3s, max-height 0.4s;
}

.no-bullets ul, .no-bullets ul li {
    list-style-type: none;
    margin-left: 0;
    padding-left: 0;
}

.book_item {
  display: block;
  gap: 15px;
  align-content: start;
  align-items: start;
  width: 100%;
}
.book_item > div {
  width: 100%;
}
.book-counts>div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-columns: 1fr auto;
  justify-items: end;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 3px;
}
.book-counts span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.btn_sml {
  padding: 1px;
  cursor: pointer;
}
.btn_sml:disabled {
  opacity: 0.5;
}
.approval-controls{
  display: inline-flex;
  align-items: center;
}
.select2-container--default .select2-selection--multiple {
    min-height: 70px !important;
    height: auto !important;
    font-size: 17px !important;
    padding: 4px !important;
    border: 1px solid #f1f1f1 !important;
    border-radius: 0 !important;
}
.select2-container {
    width: 100% !important;
}
#lmenu .select2-container {
    max-width: 250px !important;
    min-width: 250px !important;
}
.select2-search__field {
    min-width: 250px !important;
    font-size: 10pt !important;
}
.tr.new .td {
  background-color: #f0ffeb;
}
.tr.new .th {
  background-color: #f0ffeb;
}
button{
  color: var(--main-color-green);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 16px !important;
  cursor: pointer;
  background-color: #fff;
  border: 2px solid var(--main-color-green);
  display: inline-block;
  padding: 5px;
  border-radius: 5px;
}
button:hover {
  box-shadow: var(--shadow);
}
h3 {
  margin-bottom: 0;
}
#menu_left {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  max-height: 100vh;
  overflow-y: scroll;
}
.klass-education-row ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.klass-education-row ul li {
    display: flex;
    align-items: center;
    margin-right: 15px;
}
#lmenu {
  padding: 20px 0;
}

    /* Обёртка переключателя */
    .view-toggle-container {
      width: 240px;
      height: 23px;
      background: #e0e0e0;
      border-radius: 20px;
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
      user-select: none;
      border: 1px solid #fff;
    }

    /* Фон под надписи */
    .toggle-option {
      position: absolute;
      top: 0;
      width: 50%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: bold;
      color: #666;
      cursor: pointer;
      z-index: 1;
    }

    .toggle-option.left  { left: 0; }
    .toggle-option.right { right: 0; }

    /* Скрытый checkbox */
    #viewToggle {
      opacity: 0;
      position: absolute;
      width: 0;
      height: 0;
    }

    /* Ползунок */
    .toggle-slider {
      position: absolute;
      top: 2px;
      width: calc(50% - 4px);
      height: calc(100% - 4px);
      background: white;
      border-radius: 16px;
      transition: transform 0.3s ease;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      z-index: 0;
      left: 4px;
    }

    /* Когда подробный (чекбокс checked) — ползунок вправо */
    #viewToggle:checked + .toggle-slider {
      transform: translateX(100%);
    }

    /* Активный текст — белый на синем фоне */
    #viewToggle:checked ~ .toggle-option.right,
    #viewToggle:not(:checked) ~ .toggle-option.left {
      color: white;
      background: var(--main-color-green);
    }


.book-counts {
  display: table;
}
.book-counts > div {
  display: table-row;

}
.book-counts > div > span {
  display: table-cell;
  white-space: nowrap;
  text-align: left;
  padding: 0 2px;
}
.book-counts > div > span:last-child{
  text-align: right;
}
.fancybox-slide::before {
  content: "";
  display: inline-block;
  font-size: 0;
  height: unset;
  vertical-align: middle;
  width: 0;
  margin-top: 40px;
}
.fancybox-slide--iframe .fancybox-content {
  max-height: 90vh !important;
}

.field_part {
  border: 1px solid var(--main-color-green);
  box-shadow: var(--shadow);
  margin: 10px;
  padding: 5px;
  border-radius: 5px;
}
.field_part legend {
  background-color: #fafafa;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: bold;
  color: var(--main-color-green);
}
#toast-container {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.toast {
  display: flex;
  align-items: center;
  min-width: 260px;
  max-width: 420px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  border: 1px solid #ddd;
  font-size: 15px;
  font-family: Arial, sans-serif;
  padding: 12px 18px;
  margin-bottom: 10px;
  background: #f8f9fa;
  color: #333;
}

.toast-success { background-color: rgba(112, 250, 152, 0.95); }
.toast-error { background-color: rgba(248, 133, 133, 0.98); }
.toast-warning { background-color: rgba(248, 222, 138, 0.98); }
.toast-info { background-color: rgba(148, 212, 249, 0.98); }

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--main-color-green-transparent) !important;
  border: 1px solid var(--main-color-green) !important;
  max-width: 300px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  padding-left: 18px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
  color: var(--main-color-green) !important;
  border-right: 1px solid var(--main-color-green) !important;
}

.width300 {
  width: 30%;
  max-width: 30%;
  min-width: 30%;
}
.width60 {
  width: 60px;
  max-width: 60px;
  min-width: 60px;
}

.label_id_catalog {
  background-color: var(--main-color-green-transparent);
  margin: -10px;
  padding: 10px;
}