:root {
    --bg-color: #f4f7f6;
    --header-bg: #2c3e50;
    --text-color: #333;
    --active-color: #e74c3c;
    --link-hover: #34495e;
    --white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/*header start ==================== */
header {
    background-color: var(--header-bg);
    padding: 15px 0;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.main-menu {
    margin-bottom: 10px;
}


a {
    text-decoration: none;
    color: var(--white);
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 16px;
}


a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


.select {
    background-color: var(--active-color);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/*сортировка ============================= */
.submenu {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.submenu a {
    font-size: 14px;
    color: #bdc3c7;
    padding: 5px 10px;
}

.submenu a:hover {
    color: var(--white);
}

.submenu .select {
    background-color: transparent;
    color: var(--active-color) !important;
    border: 1px solid var(--active-color);
}

/* main start ========================= */
main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 12px;
    text-align: left;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f1f1f1;
}

/* forms ================================= */
input[type="text"],
input[type="date"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    border-color: var(--header-bg);
    outline: none;
}

.form-btn {
    background-color: var(--header-bg);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.form-btn:hover {
    background-color: #34495e;
}

.success {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* footer ========================================= */
footer {
    background-color: var(--header-bg);
    color: #bdc3c7;
    text-align: center;
    padding: 10px;
    margin-top: auto;
    font-size: 14px;
}

/* aside (delete/edit) ============================== */
.div-edit a {
    color: var(--text-color);
    border-bottom: 1px solid #eee;
}

.div-edit a:hover {
    background-color: #f9f9f9;
    color: var(--active-color);
}

.currentRow a {
    font-weight: bold;
    color: var(--active-color);
    border-left: 3px solid var(--active-color);
    padding-left: 8px !important;
}


/* стили пагнации =============================== */
.pagination {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination a {
    color: var(--header-bg) !important;
    background-color: white;
    border: 1px solid #ddd;
    padding: 5px 10px;
    margin: 0 3px;
    border-radius: 3px;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #eee;
}

.pagination span {
    background-color: var(--active-color);
    color: white !important;
    border: 1px solid var(--active-color);
    padding: 5px 10px;
    margin: 0 3px;
    border-radius: 3px;
}

/* скролл-контролер (в списках) */
.scroll-box {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    padding: 10px;

    scrollbar-width: thin;
    scrollbar-color: var(--header-bg) #f1f1f1;
}