/* Тёмная тема, совместимая со style.css */
.dark-theme {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: #121212;
    color: #e0e0e0;
}

.dark-theme .container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    background-color: #1e1e1e;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.dark-theme h1, .dark-theme h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #bb86fc;
    font-weight: 700;
    background: linear-gradient(90deg, #bb86fc, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.dark-theme h1:hover, .dark-theme h2:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(187,134,252,0.4);
}

.dark-theme h1 {
    font-size: 32px;
    padding: 10px 0;
}

.dark-theme h2 {
    font-size: 24px;
    padding: 8px 0;
}

.dark-theme .header-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dark-theme .search-guide {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 13px;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.dark-theme .search-guide h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.dark-theme .search-guide ul {
    margin: 0 0 10px 15px;
    list-style-type: disc;
}

.dark-theme .search-guide li {
    margin-bottom: 6px;
}

.dark-theme .search-guide p {
    margin: 0;
    line-height: 1.4;
}

.dark-theme .search-form, .dark-theme .login-form, .dark-theme .add-form, .dark-theme .register-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.dark-theme .search-form .input-group {
    flex: 1;
    min-width: 200px;
}

.dark-theme .search-form button {
    align-self: center;
    width: 100%;
}

.dark-theme .search-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.dark-theme input, .dark-theme textarea, .dark-theme button {
    padding: 12px;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

.dark-theme input[type="text"], .dark-theme input[type="password"], .dark-theme input[type="email"], .dark-theme textarea, .dark-theme input[type="file"] {
    flex: 1;
    min-width: 100%;
    background: #2a2a2a;
    color: #e0e0e0;
}

.dark-theme input[type="text"]:focus, .dark-theme input[type="password"]:focus, .dark-theme input[type="email"]:focus, .dark-theme textarea:focus {
    border-color: #bb86fc;
    box-shadow: 0 0 8px rgba(187,134,252,0.4);
    outline: none;
}

.dark-theme textarea {
    resize: vertical;
    min-height: 80px;
}

.dark-theme button {
    background: linear-gradient(90deg, #bb86fc, #7c4dff);
    color: #e0e0e0;
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dark-theme button:hover {
    background: linear-gradient(90deg, #7c4dff, #bb86fc);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(187,134,252,0.4);
}

.dark-theme .delete-btn {
    background: linear-gradient(90deg, #e57373, #ef5350);
    padding: 8px 15px;
}

.dark-theme .delete-btn:hover {
    background: linear-gradient(90deg, #ef5350, #e57373);
    transform: translateY(-2px);
}

.dark-theme .edit-btn {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    margin-left: 5px;
    padding: 8px 15px;
}

.dark-theme .edit-btn:hover {
    background: linear-gradient(90deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
}

.dark-theme .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dark-theme table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #2a2a2a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border-radius: 8px;
    min-width: 600px;
}

.dark-theme th, .dark-theme td {
    padding: 12px;
    border: 1px solid #555;
    text-align: left;
}

.dark-theme th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
}

@media screen and (max-width: 600px) {
    .dark-theme table {
        min-width: 100%;
    }
    .dark-theme th, .dark-theme td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .dark-theme th {
        background: #333;
        font-weight: bold;
    }
    .dark-theme td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 50%;
        padding-right: 10px;
        color: #e0e0e0;
    }
    .dark-theme tr {
        margin-bottom: 10px;
        border-bottom: 2px solid #555;
    }
    .dark-theme .thumbnail, .dark-theme video {
        max-width: 100%;
        height: auto;
    }
}

.dark-theme .thumbnail {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.dark-theme td img.thumbnail, .dark-theme td video.thumbnail {
    margin: 0 auto;
}

.dark-theme .doc-link {
    color: #bb86fc;
    text-decoration: none;
    font-size: 14px;
}

.dark-theme .doc-link:hover {
    text-decoration: underline;
    color: #7c4dff;
}

.dark-theme .admin-link, .dark-theme .logout {
    display: block;
    text-align: center;
    color: #bb86fc;
    text-decoration: none;
    font-size: 16px;
}

.dark-theme .admin-link:hover, .dark-theme .logout:hover {
    text-decoration: underline;
}

.dark-theme .admin-icon {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.dark-theme .admin-icon a {
    margin-right: auto;
}

.dark-theme .admin-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.dark-theme .results {
    margin-top: 20px;
}

.dark-theme .error {
    color: #ef5350;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
}

.dark-theme .error-light {
    background: #2a2a2a;
    color: #ef5350;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #e57373;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.dark-theme .success {
    background: #2a2a2a;
    color: #4caf50;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #4caf50;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.dark-theme .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.dark-theme .input-group label {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 14px;
}

.dark-theme .input-group input, .dark-theme .input-group textarea {
    padding: 12px;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 14px;
    background: #2a2a2a;
    color: #e0e0e0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dark-theme .input-group input:focus, .dark-theme .input-group textarea:focus {
    border-color: #bb86fc;
    box-shadow: 0 0 8px rgba(187,134,252,0.4);
    outline: none;
}

.dark-theme .input-group input:-webkit-autofill,
.dark-theme .input-group input:-webkit-autofill:hover,
.dark-theme .input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #2a2a2a inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
}

.dark-theme .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.dark-theme .modal-content {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.dark-theme .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #e0e0e0;
}

.dark-theme .close:hover,
.dark-theme .close:focus {
    color: #bb86fc;
    text-decoration: none;
}

.dark-theme .page-link {
    display: inline-block;
    padding: 8px 15px;
    text-decoration: none;
    color: #bb86fc;
    border: 1px solid #bb86fc;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    box-sizing: border-box;
}

.dark-theme .page-link:hover {
    background: #bb86fc;
    color: #121212;
    border-color: #bb86fc;
}

.dark-theme .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 16px;
    flex-wrap: nowrap;
}

.dark-theme .pagination-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-theme .pagination-jump {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dark-theme .pagination-jump input[type="number"] {
    width: 60px;
    padding: 6px;
    font-size: 14px;
    text-align: center;
    border-radius: 8px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #555;
}

.dark-theme .pagination-jump button {
    padding: 6px 12px;
    font-size: 14px;
}

.dark-theme .pagination-text {
    color: #e0e0e0;
    font-weight: 600;
    white-space: nowrap;
}

.dark-theme .footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    font-size: 14px;
    color: #888;
    border-top: 1px solid #555;
}

.dark-theme .spinner {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .dark-theme .search-form, .dark-theme .login-form, .dark-theme .add-form, .dark-theme .register-form {
        flex-direction: column;
        padding: 15px;
    }

    .dark-theme .search-form .input-group, .dark-theme .login-form .input-group, .dark-theme .register-form .input-group {
        min-width: 100%;
    }

    .dark-theme table {
        font-size: 14px;
    }

    .dark-theme th, .dark-theme td {
        padding: 8px;
    }

    .dark-theme .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 70vh;
    }

    .dark-theme .pagination {
        flex-direction: column;
        gap: 10px;
    }

    .dark-theme .pagination-center {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .dark-theme .pagination-jump {
        justify-content: center;
    }

    .dark-theme .page-link {
        padding: 8px 16px;
        font-size: 15px;
        min-width: 90px;
    }

    .dark-theme .pagination-text {
        font-size: 14px;
    }

    .dark-theme .search-actions {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .dark-theme .header-actions {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .dark-theme .search-guide {
        padding: 10px;
        font-size: 12px;
    }

    .dark-theme .search-guide h3 {
        font-size: 14px;
    }

    .dark-theme .footer {
        font-size: 12px;
        padding: 8px 0;
    }

    .dark-theme h1 {
        font-size: 24px;
        padding: 8px 0;
    }

    .dark-theme h2 {
        font-size: 20px;
        padding: 6px 0;
    }

    .dark-theme .spinner {
        padding: 15px 25px;
        border-radius: 8px;
    }

    .dark-theme .spinner span {
        font-size: 22px;
    }
}

.dark-theme .container .login-form, .dark-theme .container .register-form {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5) !important;
    max-width: 400px !important;
    width: 100% !important;
    margin: 20px auto !important;
}

.dark-theme .container .login-form .input-group input, .dark-theme .container .register-form .input-group input {
    padding: 12px !important;
    border: 1px solid #555 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
    transition: all 0.3s ease !important;
}

.dark-theme .container .login-form .input-group input:focus, .dark-theme .container .register-form .input-group input:focus {
    border-color: #bb86fc !important;
    background: #2a2a2a !important;
    box-shadow: 0 0 10px rgba(187,134,252,0.4) !important;
}

.dark-theme .container .login-form .input-group label, .dark-theme .container .register-form .input-group label {
    font-size: 14px !important;
    color: #e0e0e0 !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
}

.dark-theme .container .login-form button, .dark-theme .container .register-form button {
    background: linear-gradient(90deg, #bb86fc, #7c4dff) !important;
    padding: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin: 15px auto 0 !important;
    display: block !important;
}

.dark-theme .container .login-form button:hover, .dark-theme .container .register-form button:hover {
    background: linear-gradient(90deg, #7c4dff, #bb86fc) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(187,134,252,0.4) !important;
}

.dark-theme .container .login-form .search-actions, .dark-theme .container .register-form .search-actions {
    justify-content: center !important;
    margin-top: 15px !important;
}

.dark-theme .container .login-form .page-link, .dark-theme .container .register-form .page-link {
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    color: #bb86fc !important;
    border: 1px solid #bb86fc !important;
}

.dark-theme .container .login-form .page-link:hover, .dark-theme .container .register-form .page-link:hover {
    background: #bb86fc !important;
    color: #121212 !important;
}

@media (max-width: 768px) {
    .dark-theme .container .login-form, .dark-theme .container .register-form {
        padding: 15px !important;
        max-width: 100% !important;
    }

    .dark-theme .container .login-form .input-group input, .dark-theme .container .register-form .input-group input {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .dark-theme .container .login-form button, .dark-theme .container .register-form button {
        padding: 10px !important;
        font-size: 14px !important;
    }

    .dark-theme .container .login-form .page-link, .dark-theme .container .register-form .page-link {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
}

.dark-theme .action-button {
    padding: 8px 15px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dark-theme .approve {
    background-color: #4caf50;
    color: #e0e0e0;
}

.dark-theme .approve:hover {
    background-color: #66bb6a;
}

.dark-theme .reject {
    background-color: #ef5350;
    color: #e0e0e0;
}

.dark-theme .reject:hover {
    background-color: #e57373;
}

/* Стили для переключателя темы */
.dark-theme .theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 60px; /* Рядом с иконкой замка */
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #bb86fc, #7c4dff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000;
}

.dark-theme .theme-toggle:hover {
    background: linear-gradient(90deg, #7c4dff, #bb86fc);
    transform: scale(1.1);
}

.dark-theme .theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: #e0e0e0;
}

.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 60px;
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #007bff, #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000;
}

.theme-toggle:hover {
    background: linear-gradient(90deg, #0056b3, #007bff);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

/* ---- Карточки помощи (Help Cards) ---- */
.dark-theme .help-card {
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-theme .help-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.dark-theme .help-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #bb86fc;
    margin-bottom: 15px;
}

.dark-theme .help-card i {
    font-size: 22px;
    color: #bb86fc;
}

.dark-theme .help-card ul {
    margin: 0;
    padding-left: 20px;
    color: #e0e0e0;
    line-height: 1.6;
}

.dark-theme .help-card li {
    margin-bottom: 8px;
}

/* Для темной темы в dark-theme.css */
.dark-theme th {
    background: #8456fc !important; /* Темно-зеленый */
    color: #e0e0e0;
    font-weight: 600;
}