.table {
    display: table;
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 20px !important;
}
h1{
    text-align: center;
    margin: 0;
    padding: 10px;
    /*background-color: #f5f5f5;*/
    /*border-bottom: 2px solid #ddd;*/
}


.header-list div {
    display: table-cell;
    padding: 8px 12px;
    border: 1px solid #ddd;
}
.header-list div {
    font-weight: bold;
    background-color: #f5f5f5;
    text-align: center;
}


/* START paginator */
.page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.page-numbers .page {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: bold;
    padding: 0 6px;
}

.page-numbers .page:hover {
    background-color: #3498db;
    color: white;
}

.page-numbers .active {
    background-color: #5bc0de;
    color: white;
    pointer-events: none;
}

.page-numbers .dots {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: transparent;
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

.page-numbers .total-count {
    margin-left: 10px;
    color: #2c3e50;
    font-weight: bold;
}

/* START search---*/
/* START search-vikladach---*/
.search-form.search-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 10px 0;
}

.search-form.search-inline input[type="text"] {
    width: 400px;
    flex: 0 1 auto;
    margin: 0;
}

.search-form.search-inline .btn,
.search-form.search-inline .add-button {
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 798px) {
    .search-form.search-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .search-form.search-inline input[type="text"] {
        width: 100%;
    }
    .search-form.search-inline button[type="submit"] {
        width: 100%;
        margin-top: 8px;
    }
    .search-form.search-inline .add-button {
        width: 100%;
        margin-top: 8px;
    }
}
/* STOP search-vikladach---*/
.search-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

.search-form .search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 200px;
    min-width: 0; /* Дозволяє елементам звужуватися */
}

.search-form .form-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.search-form label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.search-form input[type="text"],
.search-form input[type="date"] {
    padding: 8px 12px;
    font-size: 16px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.search-form input[type="text"]:focus,
.search-form input[type="date"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-form .submit-button {
    align-self: flex-end;
    margin-top: auto; /* Краще ніж фіксований відступ */
    min-width: 120px; /* Щоб кнопка не була занадтя вузькою */
}

/* Адаптація для мобільних */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        gap: 20px;
    }

    .search-form .search-group {
        flex: 1 1 auto;
        width: 100%;
    }

    .search-form .submit-button {
        align-self: stretch; /* Розтягує кнопку на всю ширину */
        width: 100%;
        margin-top: 10px;
    }
}
.search-info {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: #f0f8ff;
    border-left: 4px solid #007acc;
    color: #2c3e4f;
    font-size: 1.5rem;
    border-radius: 4px;
    text-align: center;
}

.clear-search {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.clear-search:hover {
    background-color: #c0392b;
}
/* END search---*/
/* START new batton vikladach */
.add-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-left: auto;
}

.add-button:hover {
    background-color: #2ecc71;
}
/* END new batton vikladach */
.edit-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.edit-button:hover {
    background-color: #3498db;
}

.delete-button {
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #c0392b;
}

.delete-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* Змінюємо ширини інших колонок */
/*.number { width: 30px; }*/
/*.fullname { width: 250px; }*/
/*.firstname { width: 150px; }*/

/* stop */
/* buttons edit and delete */
/* Додаємо в style-list.css */
.cancel-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #7f8c8d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.cancel-button:hover {
    background-color: #95a5a6;
    color: white;
}
/* END buttons edit and delete */
/* Стилі для детальної сторінки викладача */
.vikladach-detail {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vikladach-detail h1 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.detail-info {
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.detail-label {
    font-weight: bold;
    width: 150px;
    color: #34495e;
}

.detail-value {
    flex: 1;
}

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.status-inactive {
    color: #e74c3c;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.back-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #7f8c8d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #95a5a6;
}
.teacher{
    width: 170px;
}
/* Додайте ці стилі до вашого CSS файлу */
.table-container .sys {
    display: table-cell;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: center;
}
/*.sys {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    width: 100%;*/
/*}*/

.sys .checkbox-wrapper {
    position: relative;
    cursor: pointer;
}

.sys input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
}

.sys .checkbox-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s;
}

.sys .checkbox-custom::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
}

.sys input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3498db;
}

.sys input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
}

.sys .checkbox-label {
    margin-left: 8px;
    font-size: 0.9em;
    color: #555;
}
/* END sys */

.form {
    width: 200px;
}
/* Пагінація  */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.page {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #2c3e50;
}

.page:hover {
    background-color: #f0f0f0;
}

.page.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page.dots {
    border: none;
    pointer-events: none;
}

.total-count {
    margin-left: 10px;
    color: #555;
    font-size: 0.9em;
}
.table-container {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
    font-size: 1.2rem;
}
/* Спеціальна ширина колонок для списку викладачів */
.vikladach-list .name {
    width: 280px; /* Збільшити ширину */
}

.vikladach-list .sys {
    width: 100%; /* Зменшити ширину */
    display: flex;
}
/* ---- */
.table-header, .table-row {
    display: table-row;
}

.table-header .teacher div {
    width: 170px;
    padding: 8px 12px;
}

.table-header .number,
.table-row .number {
    text-align: center;
    width: 50px;
}
.table-row .archive{
    text-align: center;
}

.table-header div, .table-row div {
    display: table-cell;
    border: 1px solid #ddd;
    padding: 2px 12px;
}

.table-header div {
    font-weight: bold;
    background-color: #ADC4CE !important;
    text-align: center;
}

.table-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.table-row:hover {
    background-color: #f9f9f9;
}

.actions {
    width: 80px;
    text-align: center;
}

.delete-form {
    display: inline;
    margin: 0;
}
/* Стилі для кнопок дій у рядку програми - архіви */
.archive-toggle-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-wrapper-17 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-label-text {
    font-size: 1rem;
    color: #333;
    white-space: nowrap;
}
/* Стилі для активного рядка */

.active-row::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #4CAF50; /* Зелена лінія справа */
}

.active-row div {
    font-weight: 500; /* Напівжирний текст */
}

/* Альтернативний варіант (якщо потрібен більш виразний стиль) */

.active-row {
    background-color: #acd0ef !important;
    border-left: 4px solid #007acc !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#results-section { /* Секція результатів пошуку */
    display: none;
}
/* Забезпечимо контрастність при наведенні */
.active-row:hover {
    background-color: #D4E7C5 !important; /* Трохи темніший відтінок при наведенні */
}

/* Адаптація для мобільних пристроїв */
@media (max-width: 576px) {
    .table-container {
        display: block;
    }

    .table-header {
        display: none;
    }

    .table-row {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 12px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    /* Верхній блок у три колонки */
    .table-row .top-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        text-align: center;
        margin-bottom: 10px;
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
    }

    .table-row .top-row div::before {
        display: block;
        font-weight: bold;
        margin-bottom: 4px;
        content: attr(data-label);
        color: #333;
    }

    /* Інші поля в стовпчик */
    .table-row .field {
        display: flex;
        justify-content: center;
        margin: 6px 0;
    }

    .table-row .field::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        margin-right: 6px;
        color: #333;
    }

    /* Блок дій внизу */
    .table-row .actions {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }

    .table-row .actions a,
    .table-row .actions button {
        min-width: 80px;
    }
    .table-row .d-flex[data-label="Дії:"] {
        display: flex;
        flex-wrap: nowrap; /* щоб не переносилися */
        gap: 8px;
        width: 100%;
    }

    /* Кнопки усередині */
    .table-row .d-flex[data-label="Дії:"] a {
        flex: 1 1 50%;  /* кожна по 50% ширини */
        max-width: 50%;
        text-align: center;
    }
}
