.main {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	overflow: auto;
	font-size: 13px;
	font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}

.block {
	width: 960px;
	height: 700px;
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -350px 0 0 -480px;
}

input.search {
	width: 97%;
	font-size: 28px;
	padding:10px;
	margin-bottom: 30px;
}

.table-responsive {
	overflow-x: auto;
	overflow-y: auto;
	height: calc(100vh - 300px);
	-webkit-overflow-scrolling: touch;
}
.table-responsive .table thead th { position: sticky; top: 0; z-index: 2; background: #fff; }

/* thead th — единый стиль, см. ниже в секции «Таблицы» */

/*
.line {
	width: 100%;
	height: 32px;
}

.line div{
	padding: 7px;
}

.line:nth-child(odd){
	background-color: #fff;
}

.line:nth-child(even){
	background-color: #eee;
}

.line div:nth-child(1){
	width: 20px;
	text-align: center;
	float:left;
	padding: 6px;
}

.line div:nth-child(2){
	width: 66px;
	text-align: center;
	float:left;
}

.line div:nth-child(3){
	width: 450px;
	float: left;
	overflow: hidden;
	white-space: nowrap;
}

.line div:nth-child(4){
	width: 86px;
	float: left;
	text-align: right;
}

.line div:nth-child(5){
	width: 86px;
	float: left;
	text-align: center;
}

.line div:nth-child(6){
	width: 100px;
	float: left;
	text-align: center;
}
*/

/*
.log div:nth-child(1){
	width: 150px;
}

.log div:nth-child(2){
	width: 100px;
	text-align:left;
}

.log div:nth-child(3){
	width: 100px;
	text-align:left;
}

.log div:nth-child(4){
	width: 100px;
	text-align:center;
	overflow: hidden;
	white-space: nowrap;
}

.log div:nth-child(5){
	width: 20px;
	text-align:center;
}

.log div:nth-child(6){
	width: 100px;
	text-align:center;
	overflow: hidden;
	white-space: nowrap;
}

.log div:nth-child(7) {
	width: 260px;
	text-align: left;
	float: left;
	overflow: hidden;
	white-space: nowrap;
	color:#ccc;
}
*/

.allinfo {
	color: #4B49AC;
}

/*
.allinfo div:nth-child(1) {
	width: 54px;
}

.allinfo div:nth-child(2) {
	width: 570px;
	text-align: left;
	overflow: hidden;
	white-space: nowrap;
}

.allinfo div:nth-child(3),
.allinfo div:nth-child(4),
.allinfo div:nth-child(5){
	width: 80px;
	text-align: left;
}
*/

.invoice {
	cursor: pointer;
}

.grey {
	color: #222;
}

.red {
	color: rgb(221, 74, 74);
}

.gradient {
	height: 40px;
	margin-top: -40px;
	z-index: 2;
	position: relative;
	background: rgb(255,255,255);
	background: -moz-linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
	background: -webkit-linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
	background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#ffffff",GradientType=1);
	margin-bottom: 30px;
}
.addproduct,
.addinvoice,
.upinvoice,
.printtags,
.inventprint,
.roboblock {
	display:none;
}

.upinvoice form,
.printtags form,
.inventprint form,
.roboblock form {
	text-align:center;
}

/*
.addproduct input[type="text"],
.addinvoice input[type="text"]{
	margin: 30px 0 0 125px;
	padding: 7px;
	font-size: 16px;
	width: 520px;
}

.addproduct input[type="submit"],
.addinvoice input[type="submit"],
.upinvoice input[type="submit"],
.printtags input[type="submit"],
.printtags input[type="button"],
.roboblock input[type="submit"],
.inventprint input[type="submit"],
.inventprint input[type="button"] {
	margin: 0 0 0 10px;
	padding: 7px 20px;
	font-size: 16px;
}
*/

.topmenu {
	text-align:left;
	height: 20px;
	margin-bottom: 10px;
}

.topmenu a {
	text-decoration: none;
	margin-right: 16px;
	font-size: 16px;
	color: #000;
}

#orderlink{
	display:none;
}

sup {
	font-size: 10px;
}

/*
.line td.list_inp {
	width: 95px;
	text-align: center;
	float: left;
	margin-bottom: -3px;
}


.line td.list_inp input {
	width: 75px;
	font-size: 16px;
	text-align:center;	
	margin-top: -3px;
}


.line td.barcode {
	width: 120px;
	text-align: left;
}
*/

.line td.barcode input {
	width: 115px;
	text-align:left;	
}

/*
.line td.divname {
	width: 455px;
	text-align: left;
}

.line td.divname input {
	width: 450px;
	text-align: left;
}
*/
input.zakupblur {
	text-align: right;
}

.left {
	text-align: left;
}

.right {
	text-align: right;
}

.acenter {
	text-align: center;
}


.loader {
	position: absolute;
	right: 20px;
	display: none;
}

.loader img {
	width:52px
}

#addproductcodeinput {
	margin: 0 0 0 10px;
	width: 120px;
}

.delbarcode {
	cursor: pointer;
}

.authblock{
	width: 410px;
	height: 100px;
	margin: -150px 0 0 -205px;
}

/*
.authinput {
	width: 400px;
	font-size: 28px;
	padding: 10px;
	margin-bottom: 30px;
}
*/

.pinfo{
	cursor: pointer;
	text-decoration: underline;
	text-align: center;
}

.pinfo:hover{
	cursor: pointer;
	text-decoration: none;
	color: #555;
}

.table td img.pcompet {
	width: 18px;
	height: 18px;
	float: left;
	cursor: pointer;
}

.table td img.pcompet:hover {
	width: 16px;
	height: 16px;
	margin: 1px 0 0 1px;
	/* transition: all 0.5s ease-out; */
}

#roboblockform {
	text-align: left;
}

#roboblockinput {
	/*width: 550px;*/
	float: left;
	text-align: right;
	font-size: 16px;
	padding: 7px;
}

#roboblockprice {
	width: 100px;
	float: left;
	text-align: right;
	font-size: 16px;
	padding: 7px;
}

#images {
	margin-top:20px;
}

#images img {
	height: 150px;
	margin-right: 10px;
}




.table td.qtyedit,
.table td.pcodeedit,
.table td.nameedit,
.table td.snameedit,
.table td.priceedit,
.table td.barcode {
	padding: 0.5rem 0.5rem;
}

.nameedit {
	width: 50%;
}

.snameedit {
	width: 30%;
}

.qtyedit input {
	text-align: center;
	min-width: 85px;
}

.priceedit input {
	text-align: right;
	min-width: 110px;
	max-width: 130px;
}

.pcodeedit input {
	text-align: left;
	min-width: 110px;
	max-width: 130px;
}


.barcode div {
    float: right;
    margin-top: -30px;
	margin-right: 10px;
}

.barcode div img {
    width: 16px;
	height: 16px;
	border-radius: 0px;
}

.nowrap {
	white-space: nowrap;
}

.znak img {
	width: 14px;
}

.allbarcodes {
	max-width: 100px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.consult td {
	vertical-align:top
}

.allgoods {
	max-width: 150px;
}

/* Контент */
.content-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid #dee2e6; }
.content-field { transition: border-color 0.3s; }
.content-row:hover { background-color: #f0f0f0 !important; }
.content-img-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; background: #dc3545; color: #fff; border-radius: 50%; font-size: 14px; line-height: 18px; text-align: center; cursor: pointer; display: none; }
.d-inline-block:hover .content-img-del { display: block; }

/* ========================================================== */
/*           Редактор товара                                  */
/* ========================================================== */

/* Шапка не должна переноситься на 2 строки (Bootstrap по умолчанию даёт flex-wrap: wrap) */
.navbar { flex-wrap: nowrap !important; }
.navbar .navbar-menu-wrapper { min-width: 0; }

/* Поиск над контентом */
.page-search { max-width: 720px; position: relative; }
.page-search .input-group { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.page-search .input-group:focus-within { border-color: #4B49AC; box-shadow: 0 0 0 2px rgba(75,73,172,.15); }
.page-search .input-group-text { background: transparent; border: 0; color: #6c7a89; padding: .5rem .75rem; }
.page-search .form-control { border: 0; box-shadow: none; padding: .55rem .25rem; font-size: 14px; background: transparent; }
.page-search .form-control:focus { box-shadow: none; }
.page-search .loader { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.page-search .loader img { width: 24px; height: 24px; }

/* Слот в шапке для page-specific контента (back-link, арт. и т.п.) */
.navbar-slot {
	min-width: 0; gap: 12px; padding: 0 .5rem;
	overflow: hidden;
}
.navbar-slot__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 575.98px) {
	.navbar-slot { padding: 0; gap: 8px; }
	.navbar-slot__meta { font-size: 11px; }
}

/* Hero-блок: имя + категория + видимость */
.product-hero { padding: 1.25rem 1.5rem; }
.product-hero-name {
	font-size: 1.6rem; font-weight: 600; line-height: 1.25;
	border: 0; padding: .25rem .5rem; margin: -.25rem -.5rem .75rem;
	width: 100%; background: transparent;
	border-radius: 6px;
}
.product-hero-name:focus { background: #fff; box-shadow: 0 0 0 2px #80bdff; outline: none; }
.product-hero-name::placeholder { color: #adb5bd; font-weight: 400; }
.product-hero-row {
	display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.product-hero-row > .form-group { flex: 1 1 240px; margin-bottom: 0; }

/* iOS-style toggle */
.toggle-switch {
	display: inline-flex; align-items: center; gap: 10px;
	cursor: pointer; user-select: none; margin: 0;
}
.toggle-switch input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-switch .track {
	width: 42px; height: 24px; background: #cfd8dc; border-radius: 12px;
	position: relative; transition: background .2s; flex-shrink: 0;
}
.toggle-switch .track::after {
	content: ''; position: absolute; top: 2px; left: 2px;
	width: 20px; height: 20px; background: #fff; border-radius: 50%;
	transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.toggle-switch input:checked + .track { background: #28a745; }
.toggle-switch input:checked + .track::after { transform: translateX(18px); }
.toggle-switch .label { font-weight: 500; color: #2b3a4b; }

/* Фото-галерея */
.photo-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 8px;
	margin-bottom: 1rem;
}
.photo-tile {
	position: relative; aspect-ratio: 1;
	background: #f6f8fb; border-radius: 8px; overflow: hidden;
	border: 1px solid #e9ecef;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.pending img { opacity: .75; }
.photo-tile.pending::after {
	content: 'Не загружено'; position: absolute; bottom: 0; left: 0; right: 0;
	background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
	padding: 2px 6px; text-align: center;
}
.photo-tile-del {
	position: absolute; top: 6px; right: 6px;
	width: 24px; height: 24px; border-radius: 50%;
	background: rgba(220,53,69,.95); color: #fff;
	border: 0; font-size: 16px; line-height: 22px; padding: 0;
	cursor: pointer; opacity: 0; transition: opacity .15s;
}
.photo-tile:hover .photo-tile-del { opacity: 1; }
.photo-empty {
	grid-column: 1 / -1; padding: 1.5rem; text-align: center;
	color: #adb5bd; font-size: 14px;
}

.photo-upload {
	display: block; cursor: pointer;
	border: 2px dashed #cfd8dc; border-radius: 8px;
	padding: 1.25rem; text-align: center;
	background: #fafbfc; color: #6c7a89;
	transition: border-color .15s, background .15s, color .15s;
	margin: 0;
}
.photo-upload:hover, .photo-upload.drag-over {
	border-color: #4B49AC; background: #f0f0fb; color: #4B49AC;
}
.photo-upload .icon { font-size: 22px; margin-bottom: 4px; display: block; }
.photo-upload .hint { display: block; font-size: 11px; margin-top: 4px; color: #adb5bd; }

/* Заголовки секций */
.section-title {
	font-size: 14px; font-weight: 600; color: #6c7a89;
	text-transform: uppercase; letter-spacing: .03em;
	margin: 0 0 .85rem;
	display: flex; align-items: center; justify-content: space-between;
}

/* Sticky bar для кнопки создания */
.create-bar {
	position: sticky; bottom: 0;
	margin: 1.5rem -1.25rem -1rem;
	padding: .85rem 1.25rem;
	background: rgba(255,255,255,.95);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border-top: 1px solid #e9ecef;
	display: flex; justify-content: flex-end; gap: 8px;
	z-index: 10;
}

/* Toast — статус сохранения */
.save-toast {
	position: fixed; top: 80px; right: 20px;
	padding: 10px 18px; border-radius: 8px;
	background: #28a745; color: #fff;
	font-size: 14px; font-weight: 500;
	box-shadow: 0 4px 12px rgba(0,0,0,.15);
	transform: translateX(140%); transition: transform .25s ease;
	z-index: 1080; pointer-events: none;
}
.save-toast.show { transform: translateX(0); }
.save-toast.error { background: #dc3545; }

/* Мобилка */
@media (max-width: 575.98px) {
	.product-hero { padding: 1rem; }
	.product-hero-name { font-size: 1.25rem; }
	.photo-gallery { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
	.create-bar { margin: 1rem -.75rem -1rem; padding: .75rem; }
	.create-bar .btn { width: 100%; }
	.save-toast { top: 70px; right: 10px; left: 10px; }
}
.gpt-preview { padding: 12px 16px; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; font-size: 14px; line-height: 1.6; color: #212529; }
.gpt-preview:empty { display: none; }
.gpt-preview p { margin-bottom: 0.5em; }
.gpt-preview ul, .gpt-preview ol { margin-bottom: 0.5em; padding-left: 1.5em; }
.gpt-preview strong { font-weight: 600; }
.siblings-card { background: #f8f9fa; border: 1px solid #dee2e6; }
.siblings-card .table-sm td, .siblings-card .table-sm th { font-size: 12px; vertical-align: middle; padding: 4px 6px; }
.siblings-card h6 { font-size: 14px; font-weight: 600; }

/* ========================================================== */
/*           Сайдбар — плоский, без цветных блоков            */
/* ========================================================== */

/* Убираем цветные фоны vendor-темы */
.sidebar .nav:not(.sub-menu) > .nav-item.active,
.sidebar .nav:not(.sub-menu) > .nav-item.active > .nav-link,
.sidebar .nav:not(.sub-menu) > .nav-item > .nav-link[aria-expanded="true"],
.sidebar .nav:not(.sub-menu) > .nav-item:hover > .nav-link {
	background: transparent !important;
	color: #6C7383 !important;
}
.sidebar .nav:not(.sub-menu) > .nav-item.active > .nav-link i,
.sidebar .nav:not(.sub-menu) > .nav-item.active > .nav-link .menu-title,
.sidebar .nav:not(.sub-menu) > .nav-item.active > .nav-link .menu-arrow,
.sidebar .nav:not(.sub-menu) > .nav-item > .nav-link[aria-expanded="true"] i,
.sidebar .nav:not(.sub-menu) > .nav-item > .nav-link[aria-expanded="true"] .menu-title,
.sidebar .nav:not(.sub-menu) > .nav-item > .nav-link[aria-expanded="true"] .menu-arrow,
.sidebar .nav:not(.sub-menu) > .nav-item:hover > .nav-link i,
.sidebar .nav:not(.sub-menu) > .nav-item:hover > .nav-link .menu-title,
.sidebar .nav:not(.sub-menu) > .nav-item:hover > .nav-link .menu-arrow {
	color: #4B49AC !important;
}

/* Суб-меню — белый фон, обычный текст */
.sidebar .nav.sub-menu {
	background: transparent !important;
	padding-left: 2.5rem;
}
.sidebar .nav.sub-menu .nav-item .nav-link {
	color: #6C7383 !important;
}
.sidebar .nav.sub-menu .nav-item .nav-link:hover {
	color: #4B49AC !important;
}

/* Активный пункт — только подчёркивание цветом */
.sidebar .nav.sub-menu .nav-item .nav-link.active {
	color: #4B49AC !important;
	font-weight: 600;
}

/* Стрелка активного раздела — та же иконка, что и у остальных
   (vendor подменяет на "\e64b", из-за чего стрелка крутится в обратную сторону) */
.sidebar .nav .nav-item.active > .nav-link i.menu-arrow:before {
	content: "\e649" !important;
}

/* ========================================================== */
/*           Единый плоский дизайн админки                    */
/* ========================================================== */

/* Контентная зона */
.content-wrapper { padding: 1.25rem; background: #f6f8fb; min-height: calc(100vh - 70px); }
.grid-margin { margin-bottom: 1rem; }

/* Все карточки внутри админки — плоские по умолчанию,
   контент сидит на бг страницы. Если нужен виджет с обводкой —
   используется доп. класс .card-section */
.content-wrapper .card { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
.content-wrapper .card-body { padding: 0; }

/* Карточка-секция — белый бокс с лёгкой обводкой (для product.php и т.п.) */
.card-section { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 1rem; }
.card-section .card-body { padding: 1rem 1.25rem; }

/* Заголовок страницы */
.card-title { font-size: 1.125rem; margin-bottom: .85rem; color: #2b3a4b; font-weight: 600; }
.card-description { display: none; }

/* Таблицы — единый вид по всем страницам */
.table { background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 0; }
.table th, .table td { padding: .6rem .75rem; vertical-align: middle; border-top: 1px solid #eef0f3; }
.table thead th {
	font-size: 12px; font-weight: 600; text-transform: uppercase;
	letter-spacing: .03em; color: #6c7a89;
	border-bottom: 1px solid #d8dee5;
	background: #f7f9fc;
	position: sticky; top: 0; z-index: 2;
	box-shadow: 0 2px 4px rgba(0,0,0,.06);
}
.table tbody tr:hover { background: #f4f7fc; }
.table tbody tr.line.grey { color: #adb5bd; }
.table-responsive { background: transparent; }
.line .pname a { color: #212529; text-decoration: none; }
.line .pname a:hover { color: #0d6efd; text-decoration: underline; }

/* Inline-edit input в таблицах — flat, рамка только по фокусу */
.table input.form-control { border: 1px solid transparent; background: transparent; padding: .35rem .5rem; }
.table input.form-control:focus { border-color: #80bdff; background: #fff; box-shadow: 0 0 0 .15rem rgba(0,123,255,.18); }

/* ========================================================== */
/*                       Адаптивность                         */
/* ========================================================== */

/* Удобные тапы и поля по умолчанию */
.form-control { min-height: 38px; }
.btn { min-height: 36px; }

/* Горизонтальный скролл только если действительно тесно */
@media (min-width: 992px) { .table-responsive table { min-width: 720px; } }

/* Поиск всегда видим (даже на мобиле — главный инструмент админки) */
.navbar-nav .nav-search.col-12 { display: block; }

/* === Мобильный (<576) === */
@media (max-width: 575.98px) {
	.content-wrapper { padding: 1rem .75rem; }
	.card-body { padding: 1rem; }
	.card-title { font-size: 1.15rem; }

	/* iOS не зумит при focus, если шрифт ≥16px */
	.form-control,
	.form-control-sm,
	textarea.form-control { font-size: 16px; }
	.form-control { min-height: 42px; }
	.btn { min-height: 40px; padding: .45rem .85rem; }
	.btn-sm { min-height: 32px; }

	/* Form-inline превращаем в стек */
	.form-inline { display: block; }
	.form-inline > * { display: block; width: 100% !important; margin-right: 0 !important; margin-bottom: .5rem; }
	.form-inline > *:last-child { margin-bottom: 0; }

	/* Таблицы — компактнее, без принудительной ширины */
	.table th, .table td { padding: .5rem .4rem; font-size: 13px; }

	/* Бейджи в сайдбаре — мельче */
	.menu-title { font-size: 14px; }
	.sub-menu .nav-link { padding: .55rem 1rem; font-size: 14px; }

	/* Превью изображений в редакторе */
	.content-thumb { width: 64px; height: 64px; }

	/* Двух-колоночная разметка product.php плотнее */
	.row > .col-md-4,
	.row > .col-md-8 { margin-bottom: 1rem; }
}

/* === Планшет (576–991) === */
@media (min-width: 576px) and (max-width: 991.98px) {
	.content-wrapper { padding: 1.25rem; }
	.card-body { padding: 1.25rem; }
	.table th, .table td { padding: .55rem .5rem; font-size: 13.5px; }
	.form-inline > * { margin-right: .5rem; margin-bottom: .5rem; }
}

/* === ≤991: компактный сайдбар, шапка-бренд гибче === */
@media (max-width: 991.98px) {
	.navbar .navbar-brand-wrapper { width: auto; padding: 0 1rem; }
}

/* === Узкая шапка на мобиле === */
@media (max-width: 575.98px) {
	.navbar { min-height: 60px; }
	.navbar .navbar-brand-wrapper { padding: 0 .5rem; }
	.navbar-brand img { height: 28px; }
	.navbar-menu-wrapper { padding: 0 .5rem; }
	.navbar-toggler { padding: .25rem .5rem; }
	.nav-search .form-control { font-size: 14px; }
}

/* === Шире 992: десктоп — таблица с большим лимитом высоты === */
@media (min-width: 992px) {
	.table-responsive {
		max-height: calc(100vh - 200px);
		overflow-y: auto;
	}
}
