/* Base styles - общие для всего приложения */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    background-color: #f4f4f4;
    height: 100vh;
    margin: 0;
    align-items: center;
}
/* ================ ОБЩИЕ КОМПОНЕНТЫ ИНТЕРФЕЙСА ================ */
/* Navigation elements */

/* ================ СТИЛИ ФОРМ И ЭЛЕМЕНТОВ УПРАВЛЕНИЯ ================ */
/* Form elements - не применяются к .container */
/* select {
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;
    border: 1px solid #D5D5D5;
    padding: 5px;
    margin-bottom: 10px;
}

select:focus {
    border: 1px solid #B0B0B0;
    color: #333;
}

textarea {
    border: 1px solid #D5D5D5;
    color: #5F5F5F;
    padding: 5px;
    margin-bottom: 10px;
}

textarea:focus {
    border: 1px solid #B0B0B0;
    color: #333;
}*/

/* Button styles - не применяются к .container */
button, .submit {
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 12px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.next-button {
    background: #fff;
    color: #707070;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.next-button:hover {
    background-color: #f2f2f2;
}

.green-button {
    background-color: green;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.red-button {
    background-color: red;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ================ КОМПОНЕНТЫ ФИЛЬТРАЦИИ ================ */
/* Filter container styles */
.filter-container {
    display: none;
}

.filter-container.show {
    display: block;
}

.filter-summary {
    margin: 10px auto;
    padding: 6px 12px;
    border: 1px solid #aaa;
    background-color: #f0f0f0;
    font-size: 0.9em;
    color: #333;
    width: fit-content;
    border-radius: 5px;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.1);
}

/* ================ СТИЛИ ФОРМ РЕДАКТИРОВАНИЯ И ФИЛЬТРАЦИИ ================ */
/* Form layouts */
#editForm, #filterForm {
    display: none;
    border-left: 2px solid #ccc;
    padding: 15px;
    margin-left: 20px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#editForm {
    width: 400px;
    height: auto;
    transition: opacity 0.3s ease;
}

#filterForm {
    width: 320px;
    height: auto;
}

#editForm table, #filterForm table {
    width: 100%;
    border-collapse: collapse;
}

#editForm td {
    padding: 5px 8px;
    vertical-align: middle;
    height: 30px;
}

#filterForm td {
    padding: 5px 8px;
    vertical-align: top;
    height: 30px;
}

#editForm input[type="text"],
#editForm input[type="number"] {
    width: 100%;
    padding: 4px 6px;
    font-size: 13px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#filterForm input, #filterForm select {
    width: 100%;
    padding: 4px 6px;
    font-size: 13px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#editForm input[type="text"]:focus,
#editForm input[type="number"]:focus,
#filterForm input:focus,
#filterForm select:focus {
    border-color: #007BFF;
    outline: none;
}

#editForm small {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* Form button styles */
#editForm button, #filterForm button {
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    color: white;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#editForm button.save-btn, #filterForm button.save-btn {
    background-color: #28a745;
}

#editForm button.save-btn:hover, #filterForm button.save-btn:hover {
    background-color: #218838;
    transform: scale(1.03);
}

#editForm button.cancel-btn, #filterForm button.cancel-btn {
    background-color: #dc3545;
}

#editForm button.cancel-btn:hover, #filterForm button.cancel-btn:hover {
    background-color: #c82333;
    transform: scale(1.03);
}

/* ================ СТИЛИ ТЕМНОЙ ТЕМЫ ================ */
/* Dark theme styles - общие */
body.dark-theme {
    background-color: #121212;
    color: #E0E0E0;
}

/* Темная тема для других компонентов */


body.dark-theme #editForm,
body.dark-theme #filterForm {
    background-color: #2a2a2a;
    color: #E0E0E0;
    border-left: 2px solid #444;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

body.dark-theme input[type="text"],
body.dark-theme input[type="number"],
body.dark-theme select,
body.dark-theme #editForm textarea {
    background-color: #3a3a3a;
    color: #E0E0E0;
    border: 1px solid #555;
}

body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="number"]:focus,
body.dark-theme select:focus,
body.dark-theme #editForm textarea:focus {
    border-color: #4FC3F7;
    outline: none;
}

body.dark-theme .filter-summary {
    background-color: #1e1e1e;
    border-color: #444;
    color: #CCCCCC;
}

.white-button {
    background: #fff;
    color: #707070;
}

body.dark-theme button,
body.dark-theme .next-button,
body.dark-theme .green-button,
body.dark-theme .red-button,
body.dark-theme .white-button {
    background-color: #333;
    color: #E0E0E0;
    border: 1px solid #555;
}

body.dark-theme .green-button,
body.dark-theme .save-btn {
    background-color: #3a593a;
    color: #cce6cc;
}

body.dark-theme .green-button:hover,
body.dark-theme .save-btn:hover {
    background-color: #4e7a4e;
}

body.dark-theme .red-button,
body.dark-theme .cancel-btn {
    background-color: #593a3a;
    color: #e6cccc;
}

body.dark-theme .red-button:hover,
body.dark-theme .cancel-btn:hover {
    background-color: #7a4e4e;
}

.user-info {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    color: #333;
    text-align: right;
}

.logout-link {
    font-size: 16px;
    color: #007BFF;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: normal;
}

.logout-link:hover {
    color: #0056b3;
}

.dark-theme .user-info {
    color: #E0E0E0;
}

.dark-theme .logout-link {
    color: #FFD54F !important;
    background-color: #121212;
    border: 1px solid #121212;
}

.dark-theme .logout-link:hover {
    color: #FFFFFF !important;
}