* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-header {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 14px;
    color: #6c757d;
}

.deploy-notification-block {
    display: flex;
    justify-content: center;
    align-items: center;
}

.deploy-notification {
    background: white;
    border-radius: 12px;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #2d3748;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#feedbackRequestBlock {
    background: white;
    border-radius: 12px;
    padding: 10px 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #2d3748;
    font-weight: 401;
    letter-spacing: 0.3px;
}

#feedbackRequestBlock .bx-error-circle {
    font-size: 28px;
}

#feedbackRequestBlock span {
    margin-left: 8px;
}

.archive-link {
    text-decoration: none;
    color: #2d3748;
    font-size: 16px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.aggregator-access-btn-completed,
.aggregator-access-btn {
    text-decoration: none;
    background: none;
    border: none;
    display: inline-block;
    padding: 0;
}

.aggregator-access-completed {
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    align-items: center;
}

.archive-link:hover {
    transform: translateY(-1px);
    display: block;
    transition: all 0.3s ease;
    opacity: 0.75;
}

.login-link:hover {
    transform: translateY(-1px);
    transition: all 0.3s ease;
    opacity: 0.75;
}

.layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.left-block {
    height: fit-content;
}

.privacy-sidebar,
.search-sidebar,
.sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.sidebar-toggle {
    transition: transform 0.6s ease;
    cursor: pointer;
    align-content: end;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-content {
    transition: all 0.5s ease;
    overflow: hidden;
    padding: 10px 0;
}

.sidebar.collapsed .sidebar-content {
    height: 0;
    opacity: 0;
    margin-bottom: 0;
}

 .user-rubrics h4 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.rubric-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #2d3748;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.login-link {
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
}

.page-button:hover,
.rubric-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;

}

.active-rubric {
    background-color: #e3e3e3;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    height: calc(100vh - 145px);
}

.content-wrapper .container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 95%;
}

.search-words-block {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.search-words {
    display: flex;
    justify-content: space-evenly;
    max-width: fit-content;
    gap: 10px;
    background: #dee4ef;
    border-radius: 12px;
    padding: 5px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-words p {
    margin: 0;
}

.delete-search-btn {
    all: unset;
    cursor: pointer;
    opacity: 0.7;
    font-size: 18px;
}

.delete-search-btn:hover {
    opacity: 1;
}

.filter-words p {
    margin: 0;
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
        align-items: stretch;
    }

    .privacy-sidebar,
    .search-sidebar,
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
    }

    .content-wrapper .container {
        max-width: 100%;
    }
    
    /* Для мобильных можно сразу свернуть */
    .sidebar.collapsed {
        height: auto;
    }
    
    .sidebar.collapsed .sidebar-content {
        display: none;
    }
}

#cards-container {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    overflow-y: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

#cards-container::-webkit-scrollbar {
    width: 8px;
}
#cards-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00c6ff, #0072ff);
    border-radius: 10px;
}
#cards-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.card:last-child {
    margin-bottom: 0;
}

.card:hover {
    transform: translateY(-8px);
    border-radius: 16px;
    box-shadow: 0 6px 5px rgba(0, 0, 0, 0.13);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover .empty-teg::after {
    transform: scaleX(1);
}


.empty-teg {
    position: relative;
    height: 4px;
    overflow: hidden;
}

.empty-teg::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card-content {
    padding: 15px 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    padding: 0;
    align-items: center;
}

.card-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.card-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #61646a;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.card-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    opacity: 0.75;
}

.card-is-archive,
.card-has-note {
    color: #0072ff;
} 

.fade-out {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-description.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toggle-desc-btn {
    display: inline-block;
    font-size: 16px;
    color: #2d3748;
    cursor: pointer;
    user-select: none;
    opacity: 0.7;
    font-weight: 600;
}

.toggle-desc-btn:hover {
    opacity: 0.5;
}

.card-description {
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 0px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.modal-description {
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-check-label {
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.card-region {
    margin: 15px 0;
}

.text {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

a {
    text-decoration: none;
}

.card-header a {
    color: #0072ff;
}

.link:hover {
    opacity: 0.7;
}

.checkbox-label-text {
    color: #4a5568;
    font-weight: 600;
}

.filter-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 5px 10px;
}

.login-input,
.search-input {
    flex: 1;
    min-width: 200px;
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.login-input {
    margin: 5px 0;
}

.search-input:focus {
    border-color: #0072ff;
}

.checkbox-label {
    margin-top: 10px;
}

@media (max-width: 600px) {
    body {
        padding: 20px 15px;
    }

    .card-content {
        padding: 20px;
    }

    .text {
        font-size: 16px;
    }

    .filter-panel {
        padding: 15px;
    }

    .login-input,
    .search-input {
        font-size: 14px;
        padding: 8px 12px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.page-size-select {
    padding: 10px 30px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    margin-left: auto;
    outline: none;
    cursor: pointer;
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") right 10px center/20px no-repeat white;
    transition: border-color 0.2s ease;
}

.region-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    outline: none;
    cursor: pointer;
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") right 10px center/20px no-repeat white;
    transition: border-color 0.2s ease;
}

.page-size-select:focus,
.region-select:focus {
    border-color: #0072ff !important;
}

.page-button {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-button.active {
    background: #0072ff;
    border-color: #0072ff;
    color: #4a5568;
}

.page-button.dots {
    border: none;
    padding: 8px 4px;
    cursor: default;
}

.page-button.dots:hover {
    color: #4a5568;
}

.filter-button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

@media (max-width: 600px) {
    .page-button {
        padding: 6px 10px;
        font-size: 14px;
    }
}

.filter-wrapper{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    white-space: nowrap;

}

.cards-count {
    gap: 20px;
    display: flex;
    justify-content: end;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    padding: 0 10px;
}

.select2,
.select2-container{
    width: 100% !important;
}

#regionSelectWrapper {
    width: 390px;
    max-width: 390px;
}

@media (max-width: 500px) {
    #regionSelectWrapper {
        width: 70%;
    }
}

.auth-container {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.login-container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.login-container {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
}

.login-form-btn {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.login-form-btn:hover {
    background-color: #0072ec;
}

.login-redirect {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.pagination-container {
    margin-top: auto;
    padding-top: 10px;
}

.bx-check,
.bx-chevron-up {
    font-size: 18px;
}

.bx-check-circle {
    font-size: 20px;
    color: #06ae60;
}

.bx-log-out,
.bx-log-in {
    font-size: 28px;
}

.modal-footer {
    gap: 10px;
}

.note-area-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d6dd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.rubric-checkbox,
.privacy-policy {
    border: 2px solid #d1d6dd;
    border-radius: 8px;
}

.form-check-label,
.privacy-policy-label{
    color: #2d3748;
}

.save-archive-period-btn,
.sand-email-btn,
.sand-note-btn,
.save-note-btn {
    border: none;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    color: white;
    padding: 5px 10px;
    width: 130px;
    background-color: #0072ff;
}


.sand-email-btn:disabled {
    background-color: #519dfa;
}

.delete-note-btn {
    border: none;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    color: #2d3748;
    padding: 5px 10px;
    width: 80px;
}

.save-archive-period-btn:hover,
.sand-note-btn:hover,
.delete-note-btn:hover,
.save-note-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.rubrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: left;
}

.privacy-policy-label span,
.aggregator-access-btn {
    color: #007bff;
    font-weight: 500;
    font-size: 16px;
}

.aggregator-access-btn-completed {
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spam-warning {
    font-size: 14px;
    color: #6c7482;;
    margin: 5px 0;
    /* display: none; */
}

.close-login-button {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.close-login-button:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.close-login-button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.privacy-link {
    font-size: 14px;
    color: #0072ff;
}

.privacy-sidebar {
    height: 88px;
    margin-bottom: 15px;
}