/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: url("../pics/bg-1.jpg") center bottom no-repeat fixed;
    background-size: cover;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
}

.login-container{
    border-radius: 30px;
    padding: 3px;
    background: linear-gradient(-90deg, rgba(0,138,153,0.25), rgba(8,37,103,0.5) );
    box-shadow: 0 0 20px rgba(0, 0, 0, 1);
    backdrop-filter: blur(10px);
    margin: 20px 10px;
    font-size: 20px;
    color: #000;
    display: flex;
    color: #fff;
    min-width: 90%;
}
.login-container-mini{
    width: 100%;
    border-radius: 30px;
    padding: 40px;
    border: 1px solid #fff;
    display: flex;
    flex-direction: column;
    gap:20px;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.33);
}

.login-logo{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.login-logo .img-wrapper-{
    border-radius: 50%;
    padding: 20px;
    background: rgba(255,255,255,0.5);
}

.login-logo img{
    height: 150px;
}

.login-restore-link{
    display: flex;
    justify-content: center;
    padding-top: 40px;
}
.login-restore-link a{
    border-bottom: 1px solid #fff;
}

.item-block{
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(-90deg, rgba(0,138,153,0.25), rgba(8,37,103,0.5) );
    box-shadow: 0 0 20px rgba(0, 0, 0, 1);
    backdrop-filter: blur(10px);
    margin: 0 5px;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    color: #fff;
    min-width: 90%;
}
.item-block-mini{
    width: 100%;
    border-radius: 20px;
    border: 1px dotted rgba(255,255,255,0.75);
    display: flex;
    flex-direction: column;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.75);
}
.item-block-page-title{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    font-weight: 300;
    padding: 15px 10px;
    color: #fff;
}

.item-block-white{
    background: #fff;
    color: #333;
    letter-spacing: 0.05em;
    text-shadow: none;
    font-size: 14px;
    padding: 30px 10px;
    padding-bottom: 50px;
}
.item-block-manage-buttons{
    display: flex;
    gap: 20px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 30px;
}
.item-block-label{
    font-size: 16px;
    color: rgba(0,138,153,1);
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: row;
    align-items: center;
}

.item-block-manage-buttons button{
    box-shadow: 0 0 5px rgba(255,255,255,1);
}

.item-select-status{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    background: rgba(0,138,153,0.05);
    padding: 5px;
    text-shadows: 1px 1px 1px rgba(0,0,0,1);
}



/* Sidebar стили */
.sidebar {
    background: linear-gradient(to bottom, rgba(8,37,103,0.75), rgba(0,138,153,0.75));
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    overflow-y: hidden;
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    width: 90px;
}

.sidebar.expanded {
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    width: 290px;
    opacity: 1;
}

/* Logo секция */
.sidebar-header {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00e4ff, #00ffd8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 228, 255, 0.3);
    flex-shrink: 0;
}

.logo-icon img {
    width: 53px;
    height: auto;
}

.logo-text h2 {
    font-weight: bold;
    font-size: 20px;
    color: white;
    margin: 0;
    white-space: nowrap;
}

.logo-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
    white-space: nowrap;
}

/* Навигация */
.sidebar-nav {
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 0;
}

/* Скрываем текст по умолчанию */
.sidebar-changing-visibility {
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    display: inline-block;
    width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.sidebar.expanded .sidebar-changing-visibility {
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    width: 200px;
    opacity: 1;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: linear-gradient(to right, #00e4ff, #00ffd8);
    color: #082567;
    box-shadow: 0 4px 12px rgba(0, 228, 255, 0.3);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Профиль пользователя - ВСЕГДА ВНИЗУ */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;

    position: static; /* убираем fixed */
    width: 100%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c73d28, #009982);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
}

.user-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    white-space: nowrap;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.logout-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Основной контент */
.main {
    flex: 1;
    padding: 50px;
    overflow-y: auto;
    min-height: 100vh;
}

.main-content {
    border-radius: 20px 20px 20px 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    margin: 0 5px;
    margin-bottom: 5px;
}

/* Стили для скроллбара */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.references-list{
    list-style : none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
}

.references-list li{
    width: 100%;
}

.references-list a{
    display: flex;
    flex-direction: row;
    width: 100%;
    border-bottom: 1px dashed rgba(0,138,153,0.2);
    border-left: 5px solid rgba(0,138,153,0.2);
    padding: 20px;
    color: rgba(0,138,153,1);
    font-size: 16px;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}


.items-categories{
    list-style : none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
}

.items-categories li{
    width: 100%;
   /* border-bottom: 1px dashed rgba(0,138,153,0.2);*/
    padding-bottom: 10px;
}

.items-categories a{
    display: flex;
    flex-direction: row;
    width: 100%;
    border-left: 5px solid rgba(0,138,153,0.2);
    background: rgba(0,138,153,0.05);
    padding: 5px 10px;
    color: rgba(0,138,153,1);
    font-size: 20px;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.items-list{
    background: none;
    list-style : none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    padding: 20px 0;
}

.items-list li{
    background: none;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;

}

.items-list-li-pic{
    width: 100px;

}
.items-list-li-content{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
}

.items-list a{
    display: flex;
    flex-direction: row;
    width: 100%;
    border-bottom: 1px dashed rgba(0,138,153,0.2);
    border-left: none;
    color: rgba(0,138,153,1);
    font-size: 16px;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    background: none;
}

a.item-link{
    display: inline-block;
    width: auto;
    padding: 0;
    font-size: 16px;
    border-bottom: 1px dotted rgba(0,138,153,1);
}

a.item-link-flex{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: auto;
    padding: 0;
    font-size: 16px;
    border-bottom: 1px dotted rgba(0,138,153,1);
}

.items-image-preview-list a{
    border: none;
}
.items-ico{
    display: flex;
    justify-content: center;
    align-items: center;
    width:10px;
    margin-right: 5px;
}

.show-item-description{
    background: rgba(0,0,0,0.05);
    padding: 10px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    border-radius: 5px;
    color: #333;
    font-size: 12px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-actions .btn-primary {
    background: linear-gradient(to right, #00e4ff, #00ffd8);
    color: #082567;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.header-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 228, 255, 0.3);
}

/* Сетка карточек */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.card p {
    font-size: 16px;
    color: #666;
}

.page-marked-block{
    position: relative;
}

.page-mark{
    position: absolute;
    top: 5px;
    left: -44px;
    width: 10px;
    height: 40px;
    background: var(--c-b);
}

.block-page-title{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    font-weight: 300;
}

.page-title{
    font-size: 24px;
    letter-spacing: 0.05em;
    color: var(--c-dc);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.page-subtitle{
    font-size: 24px;
    color: rgba(0,0,0,0.5);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.block-new-entity{
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

/*.page-nav{
    border-bottom:1px solid var(--c-dc-25);
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 10px;
    width:100%;
}*/

.page-nav{
    background: rgba(0,138,135,1);
    border-radius: 3px;
    margin: 10px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width:100%;
    gap: 2px;
}

.page-nav a{
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    border: 1px solid var(--c-dc-25);
    padding:13px 10px;
    border-radius: 3px;
    background: rgba(255,255,255,0.75);
    display: flex;
    flex-direction: row;
    gap: 7px;
    justify-content: flex-start;
    align-items: center;
    color: var(--c-dc);
}
.page-nav a:hover{
    transform: scale(1.02);
    box-shadow: 0 0 5px var(--c-dc);
    background:linear-gradient(180deg,rgba(0,138,135, 0.33), rgba(0,138,135, 0.9));
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    color: #fff;
}

.page-nav a.active{
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    border: none;
    padding:10px 30px;
    border-radius: 7px 7px 0 0;
    background: rgba(0,138,135,0.25);
    border-bottom: 2px solid rgba(0,138,135,1);
    display: flex;
    flex-direction: row;
    gap: 7px;
    justify-content: flex-start;
    align-items: center;
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    cursor: initial;
    margin:0 1px;
}
.page-nav a.active:hover{
    transform: none;
    box-shadow: none;
}


.entity-list{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}
.entity-sublist{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.entity-item{
    -webkit-transition: all 0.2s ease;-o-transition: all 0.2s ease;-moz-transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    gap: 10px;

    background: rgba(0,86,153,0.025);
}
.entity-item:hover{
    background: rgba(0,86,153,0.075);
    box-shadow: 0 0 10px rgba(0,86,153,0.075);
}
.item-content{
    padding: 10px 0;
}
.entity-item i.num-title{
    background: rgba(0,86,153,0.075);
    padding: 10px;
    min-width: 30px;
    text-align: right;
}


.entity-item a{
    color: var(--c-dc);
    border-bottom: 1px dotted var(--c-dc);
}
.entity-item a:hover {
    color: rgba(224,70,79, 1);
    border-bottom: 1px solid rgba(224,70,79, 1);
}
.entity-item i{
    color: rgba(0,86,153,0.5);
}


i.entity-item-descr{
    color: #666;
}

.page-section{
    margin-top: 30px;
}

.region-select{
    width: 250px;
}

.place-description{
    background: rgba(0,86,153,0.05);
    color:#333;
    padding: 20px;
    font-size: 12px;
    border-radius: 0 10px 10px 10px;
    line-height: 1.5;
}

.place-hidden-info{
    display: none;
}

.block-named-blue{
    padding: 20px;
    padding-top: 30px;
    margin-top: 30px;
    border: 1px solid var(--c-b);
    border-radius: 10px;
    position: relative;
}

.block-named-title-blue1{
    background: var(--c-b1);
    color: #fff;
    padding: 5px 10px;
    position: absolute;
    top: -15px;
    left: 20px;
    border-radius: 5px;
}

.block-named-blue1{
    padding: 20px;
    padding-top: 30px;
    margin-top: 30px;
    border: 1px solid var(--c-b1);
    border-radius: 10px;
    position: relative;
}

.block-named-title-blue{
    background: var(--c-b);
    color: #fff;
    padding: 5px 10px;
    position: absolute;
    top: -15px;
    left: 20px;
    border-radius: 5px;
}

.block-content-dates{
    display: flex;
    gap: 40px;
    font-size: 20px;
    padding: 10px 0;
    padding-bottom: 30px;
    margin: 10px 0;
    margin-bottom: 20px;
}

.deadlines-container{
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}
.deadline-item{
    padding-top: 10px;
}

.block-event-short-title{
    padding-top:30px;
    padding-left: 30px;
}

.round-num{
    width: 100px;
    height: 100px;
    background: rgba(0,86,153,1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    text-shadow: 1px 1px 1px rgba(0,0,0, 0.5);
}

.events-link-title{
    color: var(--c-b);
    font-size: 24px;
    letter-spacing: 0.01em;
}
.events-link-title:hover{

}

.page-nav-idx{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 5px;
    gap: 5px;
    z-index: 1000;
}

.page-nav-idx-item-wrapper{
    border-radius: 10px;
    padding: 10px;
    background: linear-gradient(-90deg, rgba(0,138,153,0.33), rgba(0,138,153,0.25) );
    backdrop-filter: blur(10px);
    font-size: 24px;
    display: flex;
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0,138,153,0.25);

}

.page-nav-idx-menu-side{
    flex-shrink: 0;
    cursor: pointer;
}

.search-wrapper {
    width: 100%;
    flex: 1;
}
.search-wrapper form {
    position: relative;
    width: 100%;
}

.search-field {
    width: 100%;
    padding: 10px 50px 10px 10px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    color: rgba(0,138,153,1);
    letter-spacing: 0.05em;
}

.search-field:focus {
    border-color: #6c5ce7;
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0,138,153,1);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.search-icon:hover {
    color: #6c5ce7;
}




.search-highlight {
    background: yellow;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
}

.search-section {
    margin-bottom: 30px;
}

.search-section-title {
    font-size: 20px;
    color: #008a99;
    border-bottom: 2px solid #008a99;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.search-results-list {
    list-style: none;
    padding: 0;
}

.search-result-item {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: box-shadow 0.2s;
}

.search-result-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-result-link {
    display: flex;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}

.search-item-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.search-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.search-thumb-empty {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.search-result-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.search-result-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.search-result-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

.search-result-type {
    font-size: 11px;
    color: #008a99;
    text-transform: uppercase;
}

.search-empty {
    text-align: center;
    padding: 50px;
    color: #999;
}




.menu-list-wrapper{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1001;
    width: 100%;
    display: none;
}

.menu-list{
    border-radius: 0 0 20px 20px;
    padding: 3px;
    background: linear-gradient(-90deg, rgba(0,138,153,0.5), rgba(8,37,103,0.75) );
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    backdrop-filter: blur(10px);
    margin: 0 5px;
    font-size: 16px;
    display: flex;
    color: #fff;
}
.menu-list-mini{
    width: 100%;
    border-radius: 0 0 15px 15px;
    padding: 30px;
    padding-bottom: 5px;
    border: 1px solid #fff;
    border-top: 0;
    display: flex;
    flex-direction: column;
    gap:20px;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.33);
}
.menu-list-ico{
    width: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-list-close{
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height:0.2;
    font-size: 24px;
}


.menu-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 10px;           /* Добавить отступы */
    margin: 0;
}

.menu-list ul li{
    display: flex;
    flex-direction: row;
    width: 100%;
}

.menu-list ul li a{
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    padding: 30px 0;
    border-bottom: 1px dotted rgba(255,255,255,0.5);
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.new-item-btn-bg {
    position: fixed;
    bottom: 3px;
    left: 3px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;
    border: 1px solid rgba(224, 70, 79, 1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 44px;
    box-shadow: 0 0 5px rgba(224, 70, 79, 1);
    color: #fff;
    z-index: 999;
}
.new-item-btn {
    position: fixed;
    bottom: 3px;
    left: 3px;
    border-radius: 50%;
    padding: 3px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    background: linear-gradient(180deg, rgba(224, 70, 79, 0.25), rgba(224, 70, 79, 0.75));
    border: 1px solid rgba(224, 70, 79, 1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 44px;
    box-shadow: 0 0 5px rgba(224, 70, 79, 1);
    color: #fff;
    z-index: 999;
}
.new-item-form{
    width: 100%;
}
.block-new-item{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    gap: 30px;
    font-size: 16px;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: white;
}

.select-selected:hover {
    border-color: #aaa;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.select-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.select-items.show {
    display: block;
}

.select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.select-item:hover {
    background: #f0f0f0;
}

.qr-code-wrapper{
    padding-top: 10px;
}


/* Модальное окно */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Скролл если контент больше экрана */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
}

/* Этот псевдоэлемент центрирует по вертикали */
.qr-modal::before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.qr-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 20px auto;
}

.qr-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.qr-close:hover {
    color: #000;
}

.qr-large {
    margin: 20px auto;
    display: flex;
    justify-content: center;
}

.qr-large svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.qr-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}


/* История изменений */
.revisions-timeline {
    position: relative;
    padding-left: 0px;
}

/*.revisions-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #008a99, #e0e0e0);
}*/

.revision-item {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 138, 153, 0.05);
    border-radius: 10px;
    border-left: 3px solid #008a99;
}

/*.revision-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #008a99;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #008a99;
}*/

.revision-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: #999;
}

.revision-header .fa {
    margin-right: 5px;
    color: #008a99;
}

.revision-date {
    font-weight: 500;
}

.revision-user {
    color: #666;
}

.revision-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.change-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}

.change-field {
    min-width: 110px;
    font-weight: 600;
    color: #555;
    padding-top: 2px;
}

.change-values {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.change-old {
    background: #ffeaea;
    color: #c0392b;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: line-through;
    font-size: 12px;
}

.change-arrow {
    color: #008a99;
    font-size: 12px;
}

.change-new {
    background: #eafaf1;
    color: #27ae60;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.revision-created-label {
    font-size: 13px;
    color: #008a99;
    font-weight: 500;
}

.revision-created-label .fa {
    margin-right: 5px;
}













    /* Темная тема */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #f8fafc;
    }

    .main-content {
        background-color: #0f172a;
    }

    .content-header h1 {
        color: #f8fafc;
    }

    .card {
        background-color: #1e293b;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .card h3 {
        color: #f8fafc;
    }

    .card p {
        color: #cbd5e1;
    }
}



/* Адаптивность */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
    }

    .nav-item {
        white-space: nowrap;
        flex: 0 0 auto;
        width: auto;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}
