/* <--- 1. ШРИФТЫ И БАЗОВЫЕ СТИЛИ ВСЕГО ПРОЕКТА ---> */
/* BEGIN */

@font-face {
    font-family: 'TildaSansWebRegular';
    src:
        url('/app/assets/fonts/tilda-sans_vf.woff2') format('woff2'),
        url('/app/assets/fonts/tilda-sans_vf.woff') format('woff');
}

/* Основной шрифт и цвет текста */
h1, h2, p, a {
    font-family: TildaSansWebRegular;
    color: #626262;
}

table, span, summary, div, label, input, textarea, select {
    font-family: TildaSansWebRegular;
}

/* Общий фон и отступы страницы */
body {
    background: #f9f9f9;
    margin: 0 auto;
    padding: 10px;
}

/* Ссылки */
a {
    text-decoration: underline;
}

a:hover {
    text-decoration: underline;
    opacity: 0.5;
}

/* Основной заголовок страницы */
h1 {
    font-size: 40px;
    font-family: TildaSansWebRegular;
    color: #266252;
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: normal;
}

/* Подзаголовок страницы */
h2 {
    color: #272727;
    opacity: 0.5;
    font-size: 18px;
    margin-top: 0px;
    font-weight: normal;
}

/* Обычные абзацы */
p {
    font-size: 14px;
    line-height: 1.5;
    margin: 7px 0px 7px 0px;
}

/* <--- 1. ШРИФТЫ И БАЗОВЫЕ СТИЛИ ВСЕГО ПРОЕКТА ---> */
/* END */



/* <--- 2. ПОЛЯ ФОРМ И ЭЛЕМЕНТЫ ВВОДА ---> */
/* BEGIN */

/* Выпадающие списки */
select {
    padding: 15px 10px 15px 10px;
    border-width: 0px;
    border-radius: 10px;
    background-color: #eaeaea;
    -webkit-appearance: none;
}

/* Обычные поля ввода и многострочные поля */
input, textarea {
    padding: 15px 10px 15px 10px;
    border-width: 0px;
    border-radius: 10px;
    background-color: #eaeaea;
}

/* Крупные поля ввода, используемые на отдельных страницах */
.input-table {
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 24px;
    width: 400px;
    margin-bottom: 15px;
    margin-right: 15px;
    display: block;
    font-family: 'TildaSansWebRegular';
}

/* Поля ввода внутри таблиц */
.inputtable {
    padding: 10px;
    border: 0px;
    background-color: #f6f6f6;
    margin-bottom: 10px;
    border-radius: 3px;
}

/* <--- 2. ПОЛЯ ФОРМ И ЭЛЕМЕНТЫ ВВОДА ---> */
/* END */



/* <--- 3. СТИЛИЗАЦИЯ КНОПОК ---> */
/* BEGIN */

/* Универсальная кнопка. Можно использовать для input, button, a и label */
.button {
    font-size: 14px;
    font-weight: 400;
    padding: 15px;
    padding-left: 45px;
    padding-right: 45px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    border-radius: 10px;
    background: rgb(2, 100, 81);
    transition: opacity 0.1s ease 0s;
    text-decoration: none;
    color: rgb(255, 255, 255);
    cursor: pointer;
    font-family: 'TildaSansWebRegular';
    border: none;
}

.button:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Скрытое поле выбора файла. Видимая кнопка создается через label с классом button */
.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

/* Добавляется вместе с button, если кнопку нужно закрепить справа внизу */
.fixed_position_right_bottom {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 999;
}

/* Фиксированная подпись над кнопкой fixed_position_right_bottom */
.fixed_p {
    position: fixed;
    bottom: 100px;
    right: 50px;
}

/* <--- 3. СТИЛИЗАЦИЯ КНОПОК ---> */
/* END */



/* <--- 4. ОБЩИЕ БЛОКИ И ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ---> */
/* BEGIN */

/* Горизонтальный блок загрузки файла */
.upload-row {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Зеленая галочка в информационных списках */
.check {
    font-size: 70%;
    margin-right: 10px;
    color: #337352;
}

/* Темный информационный блок со сводными данными */
.main-info-block {
    display: flex;
    justify-content: space-around;
    background: #2a2a2a;
    color: #ececec;
    padding: 25px;
    border-radius: 20px;
    max-width: 850px;
    margin: 0 auto;
    margin-bottom: 50px;
    margin-top: 50px;
    align-items: center;
}

/* Минимальная ширина блока с итоговой суммой в статистике */
.stat-block-total-sum {
    min-width: 350px;
}

/* Скрывает элемент на мобильных устройствах */
.hide-on-mob {
    /* Основное правило задается внутри мобильного media-запроса */
}

/* Скрывает элемент на компьютерах */
.hide-on-desktop {
    /* Основное правило задается внутри десктопного media-запроса */
}

/* <--- 4. ОБЩИЕ БЛОКИ И ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ---> */
/* END */



/* <--- 5. ШАПКА САЙТА И ГЛАВНОЕ МЕНЮ ---> */
/* BEGIN */

/* Общий контейнер шапки */
.header {
    background: #f9f9f9;
    max-height: 76px;
    margin-bottom: 45px;
}

/* Внутренний контейнер десктопной шапки */
.header-elements {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    align-items: center;
    max-height: 76px;
}

/* Ссылки и пункты главного меню */
.mainmenu {
    color: #272727;
    text-decoration: none;
    margin-right: 25px;
    font-size: 16px;
}

/* Кнопка раскрытия выпадающего меню */
.dropbtn {
    font-size: 16px;
    border: none;
    color: #272727;
    text-decoration: none;
    background: none;
    font-family: TildaSansWebRegular;
    padding-left: 0px;
}

/* Контейнер выпадающего меню */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Скрытое содержимое выпадающего меню */
.dropdown-content {
    padding-top: 8px;
    padding-bottom: 8px;
    display: none;
    position: absolute;
    min-width: 190px;
    box-shadow: rgba(19, 19, 19, 0.08) 0px 2px 4px 0px;
    border-radius: 8px;
    z-index: 1;
    background-color: #f9f9f9;
}

/* Ссылки внутри выпадающего меню */
.dropdown-content a {
    color: #272727;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-family: TildaSansWebRegular;
    font-size: 16px;
}

/* Наведение на ссылку выпадающего меню */
.dropdown-content a:hover {
    text-decoration: underline;
    opacity: 50%;
}

/* Открытие выпадающего меню при наведении */
.dropdown:hover .dropdown-content {
    display: block;
}

/* <--- 5. ШАПКА САЙТА И ГЛАВНОЕ МЕНЮ ---> */
/* END */



/* <--- 6. ТАБЛИЦЫ ---> */
/* BEGIN */

/* Дополнительный мелкий текст в обычных таблицах */
.table-description-element {
    font-size: 12px;
    color: #626262;
}

/* Основной текст строки в некоторых таблицах. Размер на мобильных задается ниже */
.table-main-element {
}

/* Таблица для вывода остатков */
.table {
    width: 100%;
    max-width: 1200px;
    border: none;
    margin-bottom: 20px;
    border-collapse: separate;
    margin: 0 auto;
}

/* Заголовки таблицы остатков */
.table thead th {
    font-weight: bold;
    text-align: left;
    border: none;
    padding: 10px 15px;
    background: #EDEDED;
    font-size: 30px;
    font-family: TildaSansWebRegular;
    border-top: 1px solid #ddd;
}

/* Боковые границы таблицы */
.table tr th:first-child,
.table tr td:first-child {
    border-left: 1px solid #ddd;
}

.table tr th:last-child,
.table tr td:last-child {
    border-right: 1px solid #ddd;
}

/* Скругление верхних углов */
.table thead tr th:first-child {
    border-radius: 20px 0 0 0;
}

.table thead tr th:last-child {
    border-radius: 0 20px 0 0;
}

/* Ячейки таблицы остатков */
.table tbody td {
    text-align: left;
    border: none;
    padding: 10px 15px;
    font-size: 28px;
    font-family: TildaSansWebRegular;
    vertical-align: top;
}

/* Чередование цвета строк */
.table tbody tr:nth-child(even) {
    background: #eeeeee;
}

/* Нижняя граница последней строки */
.table tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}

/* Скругление нижних углов */
.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 20px;
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 20px 0;
}

/* <--- 6. ТАБЛИЦЫ ---> */
/* END */



/* <--- 7. МЕТКИ ТИПОВ ТРАНЗАКЦИЙ И СТАТУСОВ ---> */
/* BEGIN */

/* Зеленая метка: продажи и успешные операции cron */
.transaction-type-green {
    background-color: #d8e8df;
    color: #13a463;
    padding: 7px 20px 7px 20px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

/* Красная метка: продажи и ошибки cron */
.transaction-type-red {
    background-color: #edc7c5;
    color: #ae281e;
    padding: 7px 20px 7px 20px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

/* Желтая метка: предупреждение в логах cron */
.transaction-type-yellow {
    background-color: #f7f2de;
    color: #eacc52;
    padding: 7px 20px 7px 20px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

/* Фиолетовая метка: отдельный тип операции в логах cron */
.transaction-type-lavand {
    background-color: #e3e6fe;
    color: #7a63f1;
    padding: 7px 20px 7px 20px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

/* <--- 7. МЕТКИ ТИПОВ ТРАНЗАКЦИЙ И СТАТУСОВ ---> */
/* END */



/* <--- 8. УВЕДОМЛЕНИЯ И СООБЩЕНИЯ ---> */
/* BEGIN */

/* Красное уведомление в верхней части страницы */
.notification-type-red {
    margin: 0 auto;
    text-align: left;
    max-width: 650px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    background-color: #f8edef;
}

/* Иконка красного уведомления */
.notification-type-red-icon {
    color: #f18b8e;
}

/* Желтое уведомление в верхней части страницы */
.notification-type-yellow {
    margin: 0 auto;
    text-align: left;
    max-width: 650px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    background-color: #f7f2de;
}

/* Желтая иконка уведомления. Название класса сохранено для совместимости с PHP */
.notification-type-red-yellow {
    color: #f3c614;
}

/* Универсальный контейнер текстового сообщения */
.message-wrap {
    margin: 0 auto;
    text-align: center;
    margin-top: 35px;
    margin-bottom: 25px;
}

/* Красный текст ошибки */
.red-message {
    color: #ad271e;
}

/* Зеленый текст успешной операции */
.green-message {
    color: #026450;
}

/* <--- 8. УВЕДОМЛЕНИЯ И СООБЩЕНИЯ ---> */
/* END */



/* <--- 9. РАСКРЫВАЮЩИЕСЯ БЛОКИ DETAILS ---> */
/* BEGIN */

/* Контейнер раскрывающегося блока */
details {
    max-width: 600px;
    text-align: left;
    margin: 0 auto;
    border: 1px solid #aaa;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 10px;
}

/* Отступ после заголовка открытого блока */
details[open] summary {
    margin-bottom: 20px;
}

/* <--- 9. РАСКРЫВАЮЩИЕСЯ БЛОКИ DETAILS ---> */
/* END */



/* <--- 10. СТРАНИЦА CDEK: КНОПКИ БЫСТРОГО ВЫБОРА КОММЕНТАРИЯ ---> */
/* BEGIN */

/* Контейнер радиокнопок */
.cdek-comment-ui__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 150px;
    margin-top: 6px;
}

/* Обертка одной радиокнопки */
.cdek-comment-ui__option {
    display: inline-block;
    cursor: pointer;
}

/* Скрытое стандартное поле radio */
.cdek-comment-ui__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Видимая кнопка radio */
.cdek-comment-ui__option span {
    display: inline-block;
    background: #efefef;
    border-radius: 8px;
    font-size: 12px;
    padding: 10px 15px;
    line-height: 1.2;
    color: inherit;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Выбранная кнопка radio */
.cdek-comment-ui__option input:checked + span {
    background: #dae7e4;
    color: #016551;
}

/* Обводка при управлении с клавиатуры */
.cdek-comment-ui__option input:focus-visible + span {
    outline: 2px solid #016551;
    outline-offset: 2px;
}

/* На более узких экранах убираем левый отступ */
@media (max-width: 1019px) {
    .cdek-comment-ui__options {
        margin-left: 0 !important;
    }
}

/* <--- 10. СТРАНИЦА CDEK: КНОПКИ БЫСТРОГО ВЫБОРА КОММЕНТАРИЯ ---> */
/* END */



/* <--- 11. СТИЛИ ОТДЕЛЬНЫХ СТРАНИЦ ---> */
/* BEGIN */

/* Страница входа: убирает верхний отступ у заголовка внутри формы */
form h1 {
    margin-top: 0px;
}

/* <--- 11. СТИЛИ ОТДЕЛЬНЫХ СТРАНИЦ ---> */
/* END */



/* <--- 12. МОБИЛЬНАЯ ВЕРСИЯ ---> */
/* BEGIN */

@media (max-width: 850px) {

    /* Шапка и меню */
    .header-elements {
        display: none;
    }

    .mainmenu {
        border: 1px solid black;
        background-color: white;
        color: black;
        padding: 12px 14px 12px 14px;
        border-radius: 30px;
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 8px;
    }

    .header {
        max-height: none;
        margin-bottom: 10px;
    }

    /* Заголовки */
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 14px;
    }

    /* Основные информационные блоки */
    .main-info-block {
        display: block;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .main-info-block div {
        margin-bottom: 10px;
    }

    .stat-block-total-sum {
        min-width: 0px;
    }

    /* Вспомогательные классы */
    .hide-on-mob {
        display: none !important;
    }

    .input-mob-main {
        width: 200px;
    }

    /* Таблицы */
    .table tbody td {
        font-size: 12px;
        padding: 15px 5px;
    }

    .table thead th {
        font-size: 12px;
    }

    .table-main-element {
        font-size: 12px;
    }

    .table-description-element {
        font-size: 9px;
    }
}

/* <--- 12. МОБИЛЬНАЯ ВЕРСИЯ ---> */
/* END */



/* <--- 13. ДЕСКТОПНАЯ ВЕРСИЯ ---> */
/* BEGIN */

@media (min-width: 850px) {

    /* Скрываем мобильную шапку */
    .header-elements-mob, .mobile-menu-overlay, .mobile-side-panel{
        display: none;
    }

    /* Скрываем элементы, предназначенные только для мобильной версии */
    .hide-on-desktop {
        display: none !important;
    }
}

/* <--- 13. ДЕСКТОПНАЯ ВЕРСИЯ ---> */
/* END */



/* <--- 14. ПЕЧАТЬ ЧЕКА НА СТРАНИЦЕ RECIEPT ---> */
/* BEGIN */

@media print {

    .print-reciept {
        margin: 0;
    }

    @page {
        size: A4 landscape;
        margin: 0;
    }

    /* Не выводим URL после ссылок */
    .print-reciept a[href]:after {
        content: none;
    }

    /* По умолчанию скрываем все содержимое */
    .print-reciept * {
        visibility: hidden;
    }

    /* Показываем только область чека */
    .print-reciept #printarea,
    .print-reciept #printarea * {
        visibility: visible;
    }

    .print-reciept #printarea {
        position: absolute;
        left: 0;
        top: 0;
    }

    /* Сохраняем цвета при печати */
    .print-reciept * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* <--- 14. ПЕЧАТЬ ЧЕКА НА СТРАНИЦЕ RECIEPT ---> */
/* END */


/* МОБИЛЬНЫЙ HEADER */
/* BEGIN */

@media (max-width: 850px) {

	/* Верхняя строка */
	.header-elements-mob {
		height: 64px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: relative;
		box-sizing: border-box;
	}


	/* Затемнение остальной страницы */
	.mobile-menu-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.30);
		z-index: 9998;

		opacity: 0;
		visibility: hidden;

		transition: opacity 0.25s ease;
	}


	.mobile-menu-overlay.open {
		opacity: 1;
		visibility: visible;
	}


	/* Общие стили выдвижных панелей */
	.mobile-side-panel {
		position: fixed;
		top: 0;

		width: 78%;
		max-width: 340px;
		height: 100%;

		background: #f9f9f9;

		z-index: 9999;

		padding: 25px 20px;
		box-sizing: border-box;

		overflow-y: auto;

		transition: transform 0.25s ease;
	}


	/* Левое меню */
	.mobile-side-panel-left {
		left: 0;
		transform: translateX(-100%);
	}


	/* Правое меню */
	.mobile-side-panel-right {
		right: 0;
		transform: translateX(100%);
	}


	/* Открытая панель */
	.mobile-side-panel.open {
		transform: translateX(0);
	}


	/* Ссылки меню */
	.mobile-menu-link {
		display: block;

		color: #272727;
		text-decoration: none;

		font-size: 16px;

		padding: 13px 5px;

		border-bottom: 1px solid #e7e7e7;
	}


}


/* ВЫПАДАЮЩЕЕ МЕНЮ В МОБИЛЬНОМ HEADER */

.mobile-side-panel .mobile-submenu {
	max-width: none;
	text-align: left;
	margin: 0;
	border: none;
	border-radius: 0;
	padding: 0;
}


/* Убираем глобальный отступ у открытого details */
.mobile-side-panel .mobile-submenu[open] summary {
	margin-bottom: 0;
}


.mobile-submenu summary {
	cursor: pointer;
	list-style: none;

	display: flex;
	align-items: center;
	justify-content: space-between;
}


/* Убираем стандартную стрелку браузера */
.mobile-submenu summary::-webkit-details-marker {
	display: none;
}


/* Наша стрелка */
.mobile-submenu-arrow {
	font-size: 10px;
	transition: transform 0.2s ease;
}


/* Поворачиваем стрелку при открытии */
.mobile-submenu[open] .mobile-submenu-arrow {
	transform: rotate(180deg);
}


/* Ссылки внутри подменю */
.mobile-submenu-content a {
	display: block;

	padding: 11px 5px 11px 20px;

	color: #666666;
	text-decoration: none;

	font-size: 14px;

	border-bottom: 1px solid #eeeeee;
}

/* МОБИЛЬНЫЙ HEADER */
/* END */