main > .container {
    padding: 90px 15px 20px;
}

/* Уменьшенные заголовки h1 */
h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    h1 {
        font-size: 1.5rem;
    }
}





.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
    .nav li > form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

/* Улучшенные стили для навигационной панели */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-brand {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    left: 1rem;
    bottom: 0.25rem;
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(to right, #007bff, #28a745);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.navbar-brand:hover::after {
    opacity: 0;
    display: none;
}

/* Анимация моргания для букв 'o' в логотипе */
.blink-o {
    display: inline-block;
    transition: opacity 0.1s ease;
}

.navbar-brand.clicked .blink-o:nth-of-type(1) {
    animation: blink 0.8s ease-in-out;
}

.navbar-brand.clicked .blink-o:nth-of-type(2) {
    animation: blink 0.8s ease-in-out 0.1s;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    20% { opacity: 0; }
    40% { opacity: 1; }
    60% { opacity: 0; }
    80% { opacity: 1; }
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 1) !important;
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#language-switcher {
    padding: 2px;
}

/* Стили для языкового переключателя с темной рамкой */
.language-switcher .btn {
    border: 1px solid rgba(150, 150, 150, 1) !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.language-switcher .btn:hover {
    border-color: rgba(180, 180, 180, 1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.language-switcher .btn:focus {
    border-color: rgba(200, 200, 200, 1) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* Улучшенные мобильные стили для навигации */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0;
        border-radius: 0.375rem;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: none;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.25rem;
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand::after {
        left: 0.75rem;
        width: calc(100% - 1.5rem);
    }
    
    .navbar-nav .nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }
    
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0.375rem;
        box-shadow: none;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 0.25rem;
        margin: 0.125rem;
        transition: all 0.3s ease;
    }

    .navbar-nav .dropdown-item:hover {
        color: rgba(255, 255, 255, 1);
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateX(4px);
    }

    .language-switcher .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.1rem;
        padding: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .navbar-nav .nav-link i {
        margin-right: 0.375rem;
        width: 14px;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Bootstrap pagination styles */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.375rem;
    margin: 20px 0;
}

.page-item:not(:first-child) .page-link {
    margin-left: -1px;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-link {
    position: relative;
    display: block;
    color: #007bff;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
    padding: 0.375rem 0.75rem;
}

.page-link:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-link:focus {
    z-index: 3;
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #ced4da;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Responsive pagination styles */
@media (max-width: 768px) {
    .pagination {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .page-item {
        margin: 2px;
    }
    
    .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .pagination .page-item:not(.page-item:first-child):not(.page-item:last-child):not(.active) {
        /* Удаляем display: none;, чтобы показать все кнопки */
    }
    
    .pagination .page-item.active,
    .pagination .page-item.active + .page-item {
        display: inline-block !important;
    }
    
    .table-responsive {
        border: none;
    }
    
    .table-responsive .table {
        margin-bottom: 0;
    }
    
    .table-responsive .table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .page-link {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
        /* Удаляем display: none;, чтобы показать все кнопки */
    }
}

/* Глобальные стили для карточек */
.card {
    background-color: #fafbfc !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    transition: all 0.15s ease-in-out !important;
    overflow: hidden;
}

.card:hover {
    background-color: #f8f9fa !important;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
    border-color: #ced4da !important;
}

.card-header {
    background-color: #e9ecef !important;
    border-bottom: 1px solid #ced4da !important;
}

.card-body {
    background-color: inherit !important;
    padding: 1.5rem;
    overflow: hidden;
}

/* Стили для элементов с закругленными углами */
.form-control,
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-dark):not(.btn-light),
.input-group-text,
.dropdown-menu,
.modal-content,
.alert,
.badge,
.progress,
.list-group-item {
    border-color: #dee2e6 !important;
}

.form-control:focus,
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-dark):not(.btn-light):focus,
.input-group-text:focus {
    border-color: #ced4da !important;
}

.form-control:hover,
.btn:hover:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-dark):not(.btn-light),
.input-group-text:hover {
    border-color: #ced4da !important;
}

/* Убираем закругления между кнопками в input-group */
.input-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

.input-group .btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group .btn:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-append .btn:not(:last-child) {
    border-right: 0 !important;
}

.input-group-append .btn + .btn {
    border-left: 1px solid #dee2e6 !important;
}

/* Стили для валидации форм */
.has-error .form-control {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.has-error .form-control:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.has-error .control-label,
.has-error .form-label {
    color: #dc3545 !important;
}

.help-block {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: block;
}

.help-block-error {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: block;
}

/* Обязательные поля */
.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.text-danger {
    color: #dc3545 !important;
}

/* Анимация для полей с ошибками */
.has-error .form-control {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}



/* Простой футер с серым фоном */
.footer-styled {
    margin-top: auto;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-background-styled {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    color: #495057;
    padding: 15px 0;
    position: relative;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-pattern {
    display: none;
}

.footer-background-styled::before {
    display: none;
}





.footer-links-styled {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.footer-link:hover {
    color: #495057;
    text-decoration: none;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-title-styled {
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    position: relative;
}

.footer-title-styled::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #adb5bd;
    border-radius: 1px;
}

.footer-links-styled {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-styled li {
    margin-bottom: 0.6rem;
}

.footer-links-styled a {
    color: #6c757d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links-styled a:hover {
    color: #495057;
    text-decoration: none;
}

.footer-links-styled a i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
    color: #adb5bd;
    transition: color 0.3s ease;
}

.footer-link:hover i {
    color: #6c757d;
}

.footer-separator {
    color: #ced4da;
    font-size: 0.8rem;
    margin: 0 0.1rem;
    user-select: none;
}

.footer-links-styled a:hover i {
    color: #495057;
}

.footer-stats-styled {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.stat-item-styled {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.stat-item-styled i {
    font-size: 1rem;
    width: 20px;
    color: #adb5bd;
}



/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .footer-background-styled {
        padding: 12px 0;
    }
    
    .footer-links-styled {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-background-styled {
        padding: 10px 0;
    }
}

/* Исправление закруглений для карточек */
.card {
    overflow: hidden;
}

.card-body:last-child {
    border-bottom-left-radius: calc(0.375rem - 1px);
    border-bottom-right-radius: calc(0.375rem - 1px);
}

.card-header:first-child {
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

/* Убираем отступы у последних элементов в card-body */
.card-body > *:last-child,
.card-body > .form-inline > *:last-child,
.card-body > .row > *:last-child > *:last-child {
    margin-bottom: 0 !important;
}

/* Стили для JSON-блоков в документации API */
pre code.language-json {
    display: block;
    background: #23272e;
    color: #f8f8f2;
    border-radius: 8px;
    padding: 1em 1.2em;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    font-size: 0.98em;
    line-height: 1.5;
    margin-bottom: 0;
    overflow-x: auto;
}

