@font-face {
    font-family: 'rouble';
    src: url('/css/rouble/rouble-webfont.eot');
    src: url('/css/rouble/rouble-webfont.eot?#iefix') format('embedded-opentype'),
         url('/css/rouble/rouble-webfont.woff') format('woff'),
         url('/css/rouble/rouble-webfont.ttf') format('truetype'),
         url('/css/rouble/rouble-webfont.svg#rouble') format('svg');
    font-weight: normal;
    font-style: normal;
}

body{
        margin:0;
        font-family:"Arial","Helvetica","Verdana","sans-serif";
        font-size:12px;
        height:100%;
}
h1{
    font-size:16px;
}
table{
    border-collapse: collapse;
}
td{
    vertical-align: top;
}
input,textarea,select{
    margin:0;
}
.clear{
    clear:both;
}
.no-scroll {
    overflow: hidden;
    -ms-touch-action: none;
      touch-action: none;
    -ms-scroll-chaining: none;
      overscroll-behavior: none;
}

.rouble{
    font-family:'rouble';
    font-weight:normal;
}
.freePrice{
    color:#22c522;
}

/* Верхняя панель (видна всегда) */
.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #2c3e50;
    color: #fff;
    min-height: 50px;
}
.topbar .user {
    font-weight: bold;
    margin-right: auto; /* прижимает вправо всё, что после */
}
.topbar .logout {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
}
.topbar .logout:hover {
    background: rgba(255,255,255,0.1);
}

/* Бургер-кнопка (скрыта на десктопе) */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
}
.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
/* Анимация бургера в крестик */
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Основная раскладка */
.layout-body {
    display: flex;
    align-items: flex-start;
}
.sidebar {
    width: 180px;
    flex: 0 0 180px;
    background: #f5f5f5;
    border-right: 1px solid #ddd;
    min-height: calc(100vh - 70px);
    text-align: center;
}
.sidebar h2 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}
.content {
    flex: 1;
    padding: 10px;
    min-width: 0; /* критично для flex-children с контентом */
    background: #E6F2FF;
}

/* Оверлей-затемнение (только мобильное) */
.moverlay {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    height:calc(100vh - 70px);
    background: rgba(0,0,0,0.4);
    z-index: 998;
}
.moverlay.show { display: block; }

/* === Адаптив === */
@media (max-width: 768px) {
    .burger { display: flex; }

    .sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 180px;
        max-width: 85vw;
        height: calc(100vh - 70px);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        margin-top: 70px; /* чтобы не налезало на topbar */
    }
    .sidebar.open { transform: translateX(0); }

    .content {
        padding: 12px;
        width: 100%;
    }
}
@media (max-width :400px){
    .sidebar{
        width:100vw;
        max-width: 100vw;
    }
}

.adminmenu .item{
    margin:2px;
}
.adminmenu .item a{
    border:1px solid black;
    display:block;
    padding:3px;
    background: #FFE0E1;
    text-decoration: none;
    font-weight: bold;
    color:black;
}
.adminmenu .item a:hover{
    background: #FFA0A2;
}
.adminmenu .item.active a{
    background: #e3a345;
}


table.listing{
    border-collapse: collapse;
}
table.listing tr{
    background: #C5FBBD;
}
table.listing td{
    border:1px solid black;
    vertical-align: middle;
}
table.listing .header td{
    background: #76C376;
}

table.listing td.id{
    width:30px;
    text-align: center;
}
table.listing td.actions{
    text-align: center;
}
.listing .item .kit{
    background-image: url(i/kit.png);
    background-position: left 50%;
    background-repeat: no-repeat;
    padding-left: 32px;
}
.proto{
    display:none !important;
}

div.add{
    text-align: center;
}

input.error, textarea.error, select.error{
    border-color:red;
}

.pager{
    margin:3px 0;
}

/*EditDlg*/
.editForm .tabs{
    border:none;
    background: none;
    padding:0;
    margin: -3px;
}
.editForm .tabs_panel{
    background: none;
}
.editForm .attr{
    margin:3px 0;
    padding:2px 0;
}
.editForm .attr.error{
    border:1px solid red;
    background: yellow;
}
.editForm .attr .errText{
    display:none;
    color:red;
}
.editForm .attr.error .errText{
    display:inline;
}
.editForm label{
    font-weight: bold;
    border-bottom:1px solid #76C376;
    line-height: 20px;
}
.editForm .attr .file{
    float:left;
}
.editForm .attr .uploader{
    text-align: center;
}
.editForm .attr .uploader .pbar{
    width:450px;
    margin: 0 auto;
}
.editForm .attr .uploader .button{
    margin:0 auto;
}
.editForm .attr .file .image, .editForm .attr .images .image{
    float:left;
    border:1px dashed black;
    margin:0 5px 5px 0;
}
.editForm .attr .images .image{
    position: relative;
}
.editForm .attr .images .image .dim{
    color:blue;
    background: #00ccff;
    opacity: 0.5;
    position: absolute;
    top:0;
    right:0;
}
.keywordsHint{
    display:none;
    position:absolute;
    top:0;
    xright:0;
    left:0;
    border:1px solid black;
    padding:3px;
    background:#C5FBBD;
    filter:alpha(opacity=30);
    opacity: 0.3;
    cursor:move;
}
.keywordsHint:hover{
    filter:alpha(opacity=100);
    opacity:1;
}
.tabs .tabs_panel{
    padding:2px 3px;
}

.yaDiskFiles .file{
    display: block;
    margin:5px;
    padding:5px;
    border:1px dotted #666666;
    float:left;
    background: #aafeed;
    min-width:188px;
    text-decoration: none;
}
.yaDiskFiles .file .preview{

    margin-right:5px;
    float:left;
}
.yaDiskFiles .file .name{
    color:blue;
    font-size:14px;
    text-decoration: none;
}
.yaDiskFiles .file .name:hover{
    text-decoration: underline;
}
.yaDiskFiles .file .staff{
    color:#666666;
}
.yaDiskFiles .file .btnDel{
    float: right;
    border: 1px solid black;
    background: red;
    color: white;
    text-decoration: none;
    font-weight: bold;
    width: 15px;
    text-align: center;
    cursor: pointer;
}