/* === Киберпротект: фирменные переменные (брендбук 3.2) === */
:root {
    --cp-deep-blue: #00204D;      /* главный */
    --cp-electric: #003FFF;
    --cp-accent: #0055CC;         /* web-акцент */
    --cp-accent-hover: #1A79FF;
    --cp-light-blue: #D4E5F7;
    --cp-ultra-light: #E7F2FB;
    --cp-red: #D20A10;            /* сигнальный, только для удаления */
    --cp-grad-sidebar: linear-gradient(180deg, #001533 0%, #004099 100%);
    --cp-grad-btn: linear-gradient(90deg, #0055CC 0%, #1A79FF 100%);
}

html, body {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Loos', Arial, sans-serif;
    padding: 0;
    margin: 0;
    color: #243143;
}

*, a:focus {
    outline: none !important;
    box-sizing: border-box;
}
 .up  {
    width: 50px;
    height: 50px;
    background: var(--cp-accent);
    border-radius: 25px;
    position: fixed;
    right: 20px;
    bottom: 20px;
    opacity: 0.8;
    z-index: 9999;
 }
 .up a {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
 }
 .up a .fa-chevron-up {
     color:#fff;
 }
a {
    color: #000;
    text-decoration: none;
}

.wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--cp-deep-blue) url('../images/login_bg.jpg') center / cover no-repeat;
}

/* ui */

:root {
    --scrollbarBg: rgba(0, 0, 0, 0);
    --scrollbarThumb: rgba(141, 141, 141, 0.79);
    --scrollbarWidth: 5px;
    --scrollbarBorder: 3px solid var(--scrollbarBg);
    --scrollbarBorderRadius: calc(var(--scrollbarWidth) / 2);
}
* {
    scrollbar-width: var(--scrollbarWidth);
    scrollbar-color: var(--scrollbarThumb) var(--scrollbarBg);
}
*::-webkit-scrollbar {
    width: var(--scrollbarWidth);
}
*::-webkit-scrollbar-track {
    background: var(--scrollbarBg);
    border-radius: var(--scrollbarBorderRadius);
}
*::-webkit-scrollbar-thumb {
    background-color: var(--scrollbarThumb);
    border-radius: var(--scrollbarBorderRadius);
    border: var(--scrollbarBorder);
}


.radius-input { border-radius: 8px; border: 1px solid #D6E7FF; min-height: 48px; line-height: 20px; padding: 12px 16px; font-family: 'Loos', Arial, sans-serif; font-size: 15px; color: #243143; transition: border-color .15s ease; }
.radius-input:hover, .radius-input:focus { border-color: #1A79FF; }


/*Страница авторизации — канон форм Киберпротект (UI-kit)*/
.form-box {
    width: 440px;
    background: #fff;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 8px 40px rgba(0, 32, 77, 0.08);
}

.logo {
    width: 100%;
    text-align: center;
    margin: 0 0 40px 0;
}

.logo img {
    width: 300px;
}

.form-block { width: 100%; }
.form { width: 100%; }

/* UI-kit input: 56px, r8, border #D6E7FF -> hover/focus #1A79FF, floating label */
.input-field {
    position: relative;
    margin: 0 0 16px 0;
}

.input-field input {
    width: 100%;
    height: 56px;
    padding: 24px 16px 8px 16px;
    background: #fff;
    border: 1px solid #D6E7FF;
    border-radius: 8px;
    font-family: 'Loos', Arial, sans-serif;
    font-size: 16px;
    color: #243143;
    transition: border-color .15s ease;
}

.input-field input:hover,
.input-field input:focus {
    border-color: #1A79FF;
}

.input-field label {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #969696;
    pointer-events: none;
    transition: all .15s ease;
    margin: 0;
    min-width: 0;
}

/* глобальный label::before рисует квадрат чекбокса — в полях формы он не нужен */
.input-field label::before {
    content: none;
    display: none;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label,
.input-field input:-webkit-autofill + label,
.input-field input.filled + label {
    top: 8px;
    transform: none;
    font-size: 12px;
    line-height: 16px;
}

/* Chrome autofill: keep the kit's white field and dark text */
.input-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #243143;
}

/* UI-kit primary button: 56px, r8, Loos 400 16px */
.form .submit {
    padding: 0;
    width: 100%;
    height: 56px;
    background-image: linear-gradient(90deg, #0055CC 0%, #1A79FF 50%, #489DFF 100%);
    background-size: 200% 100%;
    background-position: 0% 0;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: 'Loos', Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-position .3s ease;
}

.form .submit:hover { background-position: 100% 0; }

input::placeholder {
    font-family: 'Loos', Arial, sans-serif;
    color: #969696;
}

/*Страница авторизации конец*/

/*Главная страница админа*/
/*Левое меню*/
.main-wrapper {
    width: 100%;
    height: auto;
    min-height: 100%;
    display: flex;
    justify-content: flex-start;
}

.block-menu {
    width: 350px;
    height: auto;
    background: var(--cp-grad-sidebar);
    min-width: 270px;
}

.block-menu a { color: #fff; }

.block-menu-user {
    width: 400px;
    height: auto;
    background-color: #fff;
    min-width: 270px;
    padding: 0 0 0 120px;
}

.block-menu .logo {
    width: 100%;
    text-align: center;
    margin: 100px 0 0 0;
}

.block-menu-user .logo {
    width: 100%;
    text-align: left;
    margin: 100px 0 0 0;
}

.block-menu .logo img {
    width: 170px;
}

.block-menu-user .logo img {
    width: 140px;
}

.list-menu {
    margin: 100px 0 0 0;
    list-style: none;
    text-align: center;
    padding: 0;

}

.list-menu li {
    margin: 40px 0;
    font-weight: 900;
}

.list-menu li span {
    display: inline-block;
    height: 30px;
}

.list-menu li span:hover {
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.active {
    border-bottom: 1px solid #fff;
}

/*Левое меню конец*/
/*Основная часть правая*/
.main-block {
    width: 100%;
    height: 100%;
    background-color: #fff;
    padding: 0 50px 0 70px;
}

.header-block {
    width: 100%;
    margin: 104px 0 0 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-block .title {
    font-weight: 900;
    font-size: 32pt;
    text-transform: uppercase;
    min-width: 200px;
    color: var(--cp-deep-blue);
}

.header-block .exit {
    display: flex;
    align-items: center;
}

.header-block .exit p {
    font-size: 16pt;
}

.header-block .exit img {
    width: 30px;
    margin: 0 0 0 15px;
}

.upload-block {
    width: 100%;
    margin: 60px 0 60px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.upload-block > .global-search {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.full_search { max-width: unset !important; margin-left: 0 !important;}

.upload-block > .global-search > input{
    width: 100%;
    max-width: 450px;
    margin-left: 30px;
    font-size: 12pt;
    padding-left: 30px;
}

.upload-button {
    width: 360px;
    height: 50px;
    line-height: 49px;
    text-align: center;
    background-image: linear-gradient(90deg, #0055CC 0%, #1A79FF 50%, #489DFF 100%);
    background-size: 200% 100%;
    background-position: 0% 0;
    border: 0;
    border-radius: 8px;
    font-weight: 400;
    font-size: 16px;
    padding: 0 24px;
    transition: background-position .3s ease;
}

.upload-button:hover { background-position: 100% 0; }

.upload-button a {
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
}

/*Основная часть правая*/
.content-block {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.filter-block {
    width: 20%;
    min-width: 270px;
    
}

.filter-block-user {
    margin: 70px 0 0 0;
}

.filter-box {
    margin: 0 0 34px 0;
}

.filter-block .filter-title {
    font-weight: 900;
    font-size: 14pt;
    color: var(--cp-deep-blue);
    margin: 0 0 10px 0;
}

.filter-block-user .filter-title {
    font-weight: 900;
    font-size: 14pt;
    color: var(--cp-deep-blue);
    margin: 0 0 10px 0;
}

.checkbox-form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin: 15px 0 0 0;
}

.item_filter {
    font-size: 14px;
    font-weight: 400;
    color: #6f6e6e;
    margin: 5px 0 7px 0;
    min-width: 50px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}
.item_filter > strong{
    font-size: 16px;
    color: #575656;
    font-weight: bold;
}

.item_filter[data-status=tag] > strong > span > i.fa-folder{
    color: var(--cp-accent);
}

.item_filter[data-status=no_tag] > strong > span > i.fa-folder{
    color: #9e9e9e
}
.item_filter > strong:hover{
    cursor: pointer;
}
.item_filter > div {
    display: none;
}
.item_filter.active{
    border: none;
}
.item_filter.active > div {
    display: flex;
    flex-direction: column;
    margin-top: 7px;
    padding-left: 12px;
}
.sub{
    color: #9f9898;
}
.item_filter.active i.fa-plus:before{
    content: "\f068";
}
.grey_plus{
    color: #9e9e9e;
}
.item_filter > div > div > i{
    font-size: 14px;
    margin-right: 6px;
    color: #d9d9d9;
}
.item_filter i:hover {
    cursor: pointer;
    color: var(--cp-accent);
}
.item_sub_tag {
    margin: 5px 0 7px 0;
    min-width: 50px;
}
.item_tag {
    font-size: 14px;
    font-weight: 400;
    color: #6f6e6e;
    margin: 5px 0 7px 0;
    min-width: 50px;
    display: flex;
    align-items: center;
}
.item_tag > i{
    margin-right: 6px;
    color: #d9d9d9;
}
.item_tag > i:hover {
    cursor: pointer;
    color: var(--cp-accent);
}

label {
    font-size: 14px;
    height: auto;
    min-height: 16px;
    font-weight: 400;
    color: #6f6e6e;
    margin: 5px 0 7px 0;
    min-width: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

label:before {
    content: " ";
    color: #000;
    display: inline-block;
    margin-right: 8px;
    position: relative;
    text-align: center;
    text-indent: 0px;
    min-width: 14px;
    min-height: 14px;
    background: #FFF;
    border: 1px solid #D6E7FF;
    border-radius: 3px;
    border-image: initial;
    vertical-align: middle;
}

input[type="checkbox"] {
    display: none;
}

input:checked + label:before {
    content: "\f00c";
    font-family: 'Font Awesome 5 PRO';
    font-size: 9pt;
    color: #ffffff;
    background-color: var(--cp-accent);
    border: 1px solid var(--cp-accent);
}

input:disabled + label:before {
    background: #eee;
    color: #aaa;
}
.search-filter-box{
    display: none;
    height: 30px;
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    padding-left: 16px;
    margin: 15px 0 13px 0;
    font-size: 12px;
    border: 1px solid #D6E7FF;
}
.filter-box > .checkbox-form {
    max-height: 140px;
    overflow: hidden;
    flex-wrap: nowrap;
    margin-top: 5px;
    margin: 5px 15px 0 0;
}
.filter-box.expand > .checkbox-form {
    max-height: 280px !important;
    overflow-y: auto;
    flex-wrap: nowrap;
}

.filter-box.expand > .close {
    display: block;
    cursor: pointer;
}

.filter-box.expand > .open-all {
    display: none!important;
}

.filter-box.expand > .search-filter-box {
    display: block;
}

.open-all {
    margin: 12px 0 0 0;
    display: none;
}

.open-all a {
    color: var(--cp-accent);
}

.open-all a:hover {
    color: var(--cp-accent-hover)
}

.close {
    display: none;
    margin: 15px 0 0 0;
}

.close a {
    color: var(--cp-accent);
}

.search {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #D6E7FF;
    padding: 0 0 0 15px;
    margin: 0 0 15px 0;
    color: #243143;
    transition: border-color .15s ease;
}

.search:hover, .search:focus { border-color: #1A79FF; }

.slide-gallery {
    width: 80%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.slide-gallery-user {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 50px 0 0 10px;
}

.slide {
    width: 450px;
    height: 250px;
    background-color: #6f6e6e;
    margin: 10px 10px;
    position: relative;
    -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.25);
    -moz-box-shadow:    0px 0px 5px 0px rgba(50, 50, 50, 0.25);
    box-shadow:         0px 0px 5px 0px rgba(50, 50, 50, 0.25);
}
.slide:not(.slide_logo):hover{
    cursor: zoom-in;
}
.slide_logo{
    background: unset !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
.slide > img {
    width: 100%;
    height: 100%;
    position: relative;
    object-fit: cover;
    /*object-position: top center;*/
}

.slide_logo > img {
    max-width: 85%;
    max-height: 85%;
    height: unset;
    width: unset;
    position: absolute;
}

.slide-gallery-user .slide {
    width: 500px;
    height: 281px;
    background-color: #6f6e6e;
    margin: 1px 10px 10px 0;
}

.slide-gallery-user .slide-logo {
    background-color: unset;
}
.slide > .fade{
    display: none;
}

.slide > .fade > img{
    width: 35px;
    height: 35px;
}

.slide > .fade > span{
    font-weight: bold;
    text-align: center;
    padding: 0 15px;
    font-size: 10pt;
}

.slide > .fade > div{
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 80%;
}

.slide > .fade > div > a {
    height: 30px;
    max-width: 200px;
    min-width: 150px;
    color: #FFFFFF;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    background: var(--cp-grad-btn);
    padding-left: 20px;
    padding-right: 20px;
    cursor: pointer;
}
.slide_logo > .fade > div > a {
    min-width: 100px;
}

.slide:hover > .fade{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    color: #FFFFFF;
    width: 100%;
    height: 100%;
    top: 0;
    position: absolute;
    background-color: rgba(0, 21, 51, 0.78);
}


.tags_list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 10px;
    justify-content: center;
    margin: 0;
    max-height: 100px;
    overflow-y: auto;
}
.tags_list > span{
    display: block;
    background: var(--cp-light-blue);
    color: var(--cp-deep-blue);
    border: 1px solid var(--cp-light-blue);
    padding: 3px 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 10px;
    min-height: 20px;
    line-height: 14px;
    border-radius: 5px;
    text-align: center;
}
/*Основная часть правая конец*/

.content-block-user {
    margin: 50px 0 0 0;
}

.content-block-tags .filter-block {
    width: 100%;
    display: flex;
    margin: 45px 0 0 0;
}

.content-block-tags .filter-box {
    width: 25%;
    padding: 0 20px 0 20px;
}

.edit {
    margin: 15px 0 0 0;
}

.edit a {
    color: var(--cp-accent);
}

/*Таблица пользователей*/
.user-table {
    width: 100%;
    margin: 74px 0 0 0;
    border-collapse: collapse;
}

.user-table-title {
    width: 100%;
    margin: 74px 0 0 0;
    border-collapse: collapse;
}

.user-table td {
    height: 50px;
    text-align: center;
}

.user-table th {
    height: 60px;
    text-align: center;
    font-weight: 900;
    color: var(--cp-deep-blue);
    font-size: 14pt;

}

.user-table tr:nth-child(2n+2) {
    background: #F5F5F5;
}

.edit-user a {
    color: var(--cp-accent);
}

.delete {
    min-width: 50px;
}

.delete a {
    color: var(--cp-red);
    font-size: 14pt;
}

/*404 page*/
.big_code_layout {font-family: 'Loos', Arial, sans-serif;}
.not_found_layout { margin:0 auto; width: 95%;}
.not_found_layout > p {font-family: 'Loos', Arial, sans-serif;font-style: normal;font-weight: normal;font-size: 18px;line-height: 130%;letter-spacing: 0.15px;color: #000000;}
.big_code_layout > svg {max-height: 445px;}
.cls-1_404 {isolation:isolate;}
.cls-2_404 {opacity:0.15;mix-blend-mode:multiply;}
.cls-3_404 {fill:#E1E4EB;}
.back_from_404_btn {width: 213px; height: 48px; border-radius: 4px; background: var(--cp-accent); display: block; margin:40px auto; line-height: 48px; text-align: center; color: #FFFFFF; text-decoration: none; font-size: 14px;}
.back_from_404_btn:hover {background: var(--cp-accent-hover);cursor: pointer;}

@media only screen and (max-width: 800px) {  .big_code_layout > svg {max-height: 170px;}  }

/* ============================================================
   LAYOUT 2.0 — перенос концепта design.html в прод
   ============================================================ */
.layout { display:flex; min-height:100vh; }

/* --- сайдбар --- */
.sidebar {
    width:264px; background:var(--cp-grad-sidebar); color:#fff; flex-shrink:0;
    display:flex; flex-direction:column; position:sticky; top:0; height:100vh;
    transition:width .25s ease; z-index:50;
}
.layout.mini .sidebar { width:76px; }
.sb-logo { padding:28px 24px 8px; height:92px; display:flex; align-items:center; overflow:hidden; }
.sb-logo img { width:150px; min-width:150px; transition:opacity .15s ease; }
.layout.mini .sb-logo img { opacity:0; }
.sb-nav { margin-top:28px; display:flex; flex-direction:column; gap:4px; padding:0 12px; }
.sb-item {
    display:flex; align-items:center; gap:14px; color:#fff !important; text-decoration:none;
    padding:12px 14px; border-radius:10px; font-size:15px; font-weight:500;
    white-space:nowrap; transition:background .15s ease; overflow:hidden;
}
.sb-item svg { width:22px; height:22px; flex-shrink:0; }
.sb-item span { transition:opacity .15s ease; border-bottom:none !important; height:auto !important; }
.layout.mini .sb-item span { opacity:0; width:0; }
.sb-item:hover { background:rgba(255,255,255,.10); }
.sb-item.active { background:rgba(255,255,255,.16); }
.sb-user {
    margin-top:auto; padding:16px; display:flex; align-items:center; gap:12px;
    border-top:1px solid rgba(255,255,255,.12); white-space:nowrap; overflow:hidden;
}
.sb-user .avatar {
    width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.18);
    display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px;
    flex-shrink:0; color:#fff;
}
.sb-user .info { line-height:1.25; transition:opacity .15s ease; }
.layout.mini .sb-user .info { opacity:0; }
.sb-user .info a { color:rgba(255,255,255,.75); font-size:13px; }
.sb-user .info a:hover { color:#fff; }
.sb-tab {
    position:absolute; top:20px; right:-28px; width:28px; height:44px;
    background:#001533; border-radius:0 10px 10px 0; border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    box-shadow:4px 2px 10px rgba(0,32,77,.18);
}
.sb-tab:hover { background:#004099; }
.sb-tab svg { width:16px; height:16px; }

/* --- контент --- */
.main { flex:1; min-width:0; background:#F4F8FE; }
.topbar {
    background:#fff; border-bottom:1px solid #D6E7FF;
    display:flex; align-items:center; gap:24px; padding:20px 48px;
    position:sticky; top:0; z-index:40; min-height:84px;
}
.topbar h1 { font-size:22px; font-weight:900; color:var(--cp-deep-blue); white-space:nowrap; margin:0; text-transform:none; }
.topbar h1 small { font-weight:400; font-size:14px; color:#7A8699; margin-left:10px; }
.topbar .t-exit { margin-left:auto; display:flex; align-items:center; gap:10px; font-size:14px; }
.topbar .t-exit a { color:#7A8699; }
.topbar .t-exit a:hover { color:var(--cp-accent); }

/* --- строка инструментов: поиск + загрузка --- */
.toolbar { display:flex; align-items:center; gap:16px; padding:28px 48px 0; }
.searchbox { flex:1; max-width:560px; position:relative; }
.searchbox svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; }
.searchbox input {
    width:100%; height:44px; padding:0 16px 0 44px; border:1px solid #D6E7FF;
    border-radius:8px; font-size:15px; font-family:'Loos',Arial,sans-serif; color:#243143;
    transition:border-color .15s ease; background:#fff; min-height:unset;
}
.searchbox input:hover, .searchbox input:focus { border-color:var(--cp-accent-hover); outline:none; }
.btn-upload {
    height:44px; padding:0 22px; border:none; border-radius:8px; color:#fff !important;
    font-size:15px; display:flex; align-items:center; gap:10px; cursor:pointer;
    background-image:linear-gradient(90deg,#0055CC 0%,#1A79FF 50%,#489DFF 100%);
    background-size:200% 100%; background-position:0 0;
    transition:background-position .3s ease; white-space:nowrap; text-decoration:none;
}
.btn-upload:hover { background-position:100% 0; }
.btn-upload svg { width:18px; height:18px; }

/* --- фильтры-дропдауны --- */
.filterbar { display:flex; align-items:flex-start; gap:10px; padding:20px 48px 4px; flex-wrap:wrap; }
.fdrop { position:relative; }
.fchip {
    height:38px; padding:0 16px; border-radius:8px; border:1px solid #D6E7FF;
    background:#fff; font-size:14px; color:#243143; display:flex; align-items:center; gap:8px;
    transition:border-color .15s ease; cursor:pointer; font-family:'Loos',Arial,sans-serif;
}
.fchip:hover { border-color:var(--cp-accent-hover); }
.fchip svg { width:14px; height:14px; transition:transform .2s ease; }
.fdrop.open .fchip svg { transform:rotate(180deg); }
.fchip .n {
    font-style:normal; background:var(--cp-accent); color:#fff; font-size:11px; font-weight:500;
    width:18px; height:18px; border-radius:50%; display:none; align-items:center;
    justify-content:center; line-height:1;
}
.fchip .n.on { display:inline-flex; }
.fmenu {
    position:absolute; top:44px; left:0; background:#fff; border:1px solid #D6E7FF;
    border-radius:12px; box-shadow:0 12px 32px rgba(0,32,77,.14); padding:10px;
    min-width:260px; max-height:340px; overflow:auto; display:none; z-index:30;
}
.fdrop.open .fmenu { display:block; }
.fmenu .search-filter-box { display:block; width:100%; max-width:unset; margin:4px 0 8px; }
.fmenu .checkbox-form { max-height:none !important; overflow:visible !important; margin:0 !important; }
.fmenu .checkbox-form > div { border-radius:8px; padding:2px 6px; }
.fmenu .checkbox-form > div:hover { background:#F4F8FE; }
.fmenu label { margin:4px 0; }
.fmenu .open-all, .fmenu .close { display:none !important; }

/* --- сетка карточек --- */
.grid {
    display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:22px; padding:24px 48px 56px; width:100%;
}
.gcard {
    background:#fff; border:1px solid #E3EEFF; border-radius:14px; overflow:hidden;
    box-shadow:0 1px 3px rgba(0,32,77,.06); transition:transform .18s ease, box-shadow .18s ease;
    display:flex; flex-direction:column;
}
.gcard:hover { transform:translateY(-3px); box-shadow:0 12px 28px rgba(0,32,77,.16); }
.gcard .thumb { position:relative; aspect-ratio:16/9; background:#0A1E3C; overflow:hidden; cursor:zoom-in; }
.gcard .thumb img.pv { width:100%; height:100%; object-fit:cover; display:block; }
.gcard.logo-card .thumb { background:#fff; display:flex; align-items:center; justify-content:center; cursor:default; }
.gcard.logo-card .thumb img.pv { object-fit:contain; width:85%; height:80%; }
.gcard .fmt {
    position:absolute; top:10px; right:10px; background:rgba(0,85,204,.92); color:#fff;
    font-size:11px; font-weight:700; letter-spacing:.4px; border-radius:6px;
    height:22px; display:inline-flex; align-items:center; line-height:1; padding:0 8px;
    text-transform:uppercase; backdrop-filter:blur(4px);
}
.gcard .acts {
    position:absolute; left:0; right:0; bottom:0; padding:34px 12px 12px;
    display:flex; gap:8px; justify-content:flex-end;
    background:linear-gradient(180deg,rgba(0,21,51,0) 0%,rgba(0,21,51,.65) 100%);
    opacity:0; transform:translateY(6px); transition:all .18s ease;
}
.gcard:hover .acts { opacity:1; transform:none; }
.gcard.logo-card .acts { background:linear-gradient(180deg,rgba(0,32,77,0) 0%,rgba(0,32,77,.28) 100%); }
.abtn {
    height:34px; min-width:34px; padding:0 12px; border:none; border-radius:8px;
    background:rgba(255,255,255,.94); color:var(--cp-deep-blue) !important; font-size:13px;
    font-weight:500; display:flex; align-items:center; gap:7px; cursor:pointer;
    text-decoration:none; font-family:'Loos',Arial,sans-serif;
}
.abtn:hover { background:#fff; }
.abtn.primary { background:var(--cp-accent); color:#fff !important; }
.abtn.primary:hover { background:var(--cp-accent-hover); }
.gcard .card-body { padding:14px 16px 16px; display:flex; flex-direction:column; gap:10px; }
.gcard .card-title {
    font-size:15px; font-weight:500; line-height:1.35; color:#243143;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    min-height:40px;
}
.gcard .card-tags { display:flex; gap:6px; flex-wrap:wrap; }
.gcard .tagchip {
    background:var(--cp-ultra-light); color:var(--cp-accent); font-size:12px; height:26px;
    display:inline-flex; align-items:center; line-height:1; border-radius:6px; padding:0 10px;
}
.gcard .card-meta { font-size:12px; color:#7A8699; display:flex; justify-content:space-between; align-items:center; }

/* --- доводка до макета design.html: счётчики меню, имя юзера, поиск справа, чипы/сортировка --- */
.sb-item .count { margin-left:auto; font-size:12px; font-weight:400; opacity:.65; font-style:normal; }
.layout.mini .sb-item .count { display:none; }
.sb-user .info b { display:block; font-size:14px; font-weight:500; color:#fff; }
.topbar .searchbox { margin-left:auto; }
.chips-active { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.achip { background:var(--cp-accent); color:#fff; border:none; border-radius:8px; height:38px; padding:0 14px; font-size:14px; display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-family:'Loos',Arial,sans-serif; }
.achip svg { width:13px; height:13px; }
.achip:hover { background:var(--cp-accent-hover); }
.freset { border:none; background:none; color:var(--cp-accent); font-size:14px; padding:0 6px; cursor:pointer; font-family:'Loos',Arial,sans-serif; white-space:nowrap; }
.freset:hover { color:var(--cp-accent-hover); }
.fsort { margin-left:auto; }

/* мини-логотип в свёрнутом сайдбаре */
.sb-logo .logo-min { display:none; }
.layout.mini .sb-logo { justify-content:center; padding-left:0; padding-right:0; }
.layout.mini .sb-logo .logo-full { display:none; }
.layout.mini .sb-logo .logo-min { display:block; width:44px; min-width:44px; height:44px; opacity:1; }

/* аккуратный крестик закрытия лайтбокса — в углу экрана, поверх фона, не на слайде */
.mclose {
    position:fixed; top:20px; right:24px; width:44px; height:44px; border:none; padding:0;
    border-radius:10px; background:rgba(255,255,255,.14); cursor:pointer; z-index:100000;
    display:flex; align-items:center; justify-content:center; transition:background .15s ease;
}
.mclose:hover { background:rgba(255,255,255,.28); }
.mclose svg { width:20px; height:20px; stroke:#fff; }

/* иконки поиска и стрелок фильтров — серые (--muted), как в макете (были тёмные currentColor) */
.searchbox svg { stroke:#7A8699; }
.fchip svg { stroke:#7A8699; }
/* отступ панели фильтров сверху — как в design.html */
.filterbar { padding-top:40px; }
/* бургер-иконка сворачивания сайдбара — белая (была чёрная currentColor, невидима на тёмном) */
.sb-tab svg { stroke:#fff; }
/* убрать legacy margin-bottom 34px у фильтров в шапке — он раздвигал карточки вниз */
.filterbar .filter-box { margin:0; }

/* --- layout 2.0: страницы Теги и Пользователи в новом каркасе --- */
.content-block-tags { padding: 28px 48px 48px; }
.content-block-tags h3 { color: var(--cp-deep-blue); margin: 24px 0 12px; font-size: 18px; }
.content-block-tags .filter-block { background: #fff; border: 1px solid #E3EEFF; border-radius: 14px; padding: 24px; margin: 12px 0 0 0; }
.main .user-table { background: #fff; border: 1px solid #E3EEFF; border-radius: 14px; overflow: hidden; margin: 20px 0 0 0; }
.main .user-table th { font-size: 15px; }


/* --- Layout 2.0: сайдбар крупнее --- */
.sidebar { width: 290px; }
.layout.mini .sidebar { width: 80px; }
.sb-logo img { width: 168px; min-width: 168px; }
.sb-item { padding: 14px 16px; font-size: 16px; }
.sb-item svg { width: 24px; height: 24px; }

/* --- Layout 2.0: модалка-редактор (.medit2) --- */
.modal_dialog > .medit2 { padding: 40px; min-height: auto; max-width: 920px; border-radius: 24px; }
.medit2 .mtitle { font-size: 22px; font-weight: 900; color: var(--cp-deep-blue); margin: 0 0 28px; }
.medit2 .erow { display: flex; gap: 24px; }
.medit2 .ethumb { width: 300px; flex-shrink: 0; }
.medit2 .twrap {
    border-radius: 12px; overflow: hidden; border: 1px solid #D6E7FF; background: #F4F8FE;
    min-height: 168px; display: flex; align-items: center; justify-content: center;
}
.medit2 .twrap img { width: 100%; display: block; }
.medit2 .twrap.logo-thumb img { width: auto; max-width: 85%; max-height: 150px; }
.medit2 .treplace {
    margin-top: 12px; width: 100%; height: 44px; border: 1px dashed var(--cp-accent-hover);
    border-radius: 8px; background: #F4F8FE; color: var(--cp-accent) !important; font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .15s ease;
}
.medit2 .treplace:hover { background: var(--cp-ultra-light); }
.medit2 .efields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.medit2 .ifield { position: relative; }
.medit2 .ifield input, .medit2 .ifield textarea {
    width: 100%; border: 1px solid #D6E7FF; border-radius: 8px;
    font-family: 'Loos', Arial, sans-serif; font-size: 16px; color: #243143;
    padding: 24px 16px 8px; background: #fff; transition: border-color .15s ease;
}
.medit2 .ifield input { height: 56px; }
.medit2 .ifield textarea { min-height: 88px; resize: vertical; padding-top: 26px; }
.medit2 .ifield label {
    position: absolute; left: 17px; top: 8px; font-size: 12px; line-height: 16px;
    color: #969696; pointer-events: none; margin: 0; min-width: 0;
}
.medit2 .ifield label::before { content: none; display: none; }
.medit2 .ifield input:hover, .medit2 .ifield input:focus,
.medit2 .ifield textarea:hover, .medit2 .ifield textarea:focus { border-color: var(--cp-accent-hover); outline: none; }
.medit2 .mtags { width: auto; min-width: 0; }
.medit2 .etags { margin: 4px 0 0; }
.medit2 .etags .lbl { font-size: 13px; color: #7A8699; margin-bottom: 10px; }
.medit2 .echips { display: flex; gap: 8px; flex-wrap: wrap; max-height: none !important; overflow: visible !important; margin: 0 !important; }
.medit2 .echips input[type=checkbox] { display: none; }
.medit2 .echip {
    height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #D6E7FF; background: #fff;
    font-size: 14px; color: #243143; display: inline-flex; align-items: center; cursor: pointer;
    transition: all .15s ease; user-select: none; margin: 0; min-width: 0;
}
.medit2 .echip::before { content: none !important; display: none !important; }
.medit2 .echip:hover { border-color: var(--cp-accent-hover); }
.medit2 .echips input:checked + label.echip { background: var(--cp-accent); border-color: var(--cp-accent); color: #fff; }
.medit2 .efoot {
    display: flex; gap: 12px; margin-top: 32px; padding-top: 24px;
    border-top: 1px solid #D6E7FF; align-items: center;
}
.medit2 .efoot .spacer { flex: 1; }

/* кнопки модалок */
.vbtn {
    height: 44px; padding: 0 20px; border: none; border-radius: 8px; font-size: 14px;
    font-weight: 500; display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
    font-family: 'Loos', Arial, sans-serif; text-decoration: none; transition: all .15s ease;
}
.vbtn.grad {
    color: #fff !important; min-width: 160px; justify-content: center;
    background-image: linear-gradient(90deg,#0055CC 0%,#1A79FF 50%,#489DFF 100%);
    background-size: 200% 100%; background-position: 0 0; transition: background-position .3s ease;
}
.vbtn.grad:hover { background-position: 100% 0; }
.vbtn.ghost { background: var(--cp-ultra-light); color: var(--cp-accent) !important; }
.vbtn.ghost:hover { background: #D6E7FF; }
.vbtn.danger { background: #FDECEC; color: #D20A10 !important; }
.vbtn.danger:hover { background: #FAD7D7; }

/* --- Layout 2.0: лайтбокс просмотра --- */
.mview { display: flex; flex-direction: column; }
.mview .vimg { background: #0A1E3C; border-radius: 16px 16px 0 0; overflow: hidden; }
.mview .vimg img { width: 100%; display: block; }
.mview .vbar {
    background: #fff; border-radius: 0 0 16px 16px; padding: 18px 24px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.mview .vbar .vt { font-size: 17px; font-weight: 500; color: #243143; }
.mview .vbar .tagchip {
    background: var(--cp-ultra-light); color: var(--cp-accent); font-size: 12px; height: 26px;
    display: inline-flex; align-items: center; line-height: 1; border-radius: 6px; padding: 0 10px;
}
.mview .vactions { margin-left: auto; display: flex; gap: 10px; }


/* --- фиксы аудита Layout 2.0 --- */
.filterbar.filter-block { width: 100%; min-width: 0; }
.sidebar .active { border-bottom: none; }
.fmenu .checkbox-form > div { padding: 0; }
.fmenu .checkbox-form > div:hover { background: transparent; }
.fmenu label { padding: 4px 8px; border-radius: 8px; width: 100%; }
.fmenu label:hover { background: #F4F8FE; }
