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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #5d4037;
    margin-bottom: 20px;
    text-align: center;
}

/* Кнопки (как в первом варианте) */

.btn-add,
.btn-save,
.btn-cancel,
.btn-edit,
.btn-delete {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

/* Основная коричневая кнопка */

.btn-add,
.btn-save {
    background-color: #795548;
    color: #fff;
}

.btn-add:hover,
.btn-save:hover {
    background-color: #6d4c41;
}

/* Серая отмена */

.btn-cancel {
    background-color: #9e9e9e;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #757575;
}

/* Кнопки действий в таблицах */

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-edit {
    background-color: #8d6e63;
    color: #fff;
}

.btn-edit:hover {
    background-color: #7a5c52;
}

.btn-delete {
    background-color: #d84315;
    color: #fff;
}

.btn-delete:hover {
    background-color: #bf360c;
}

/* Таблицы */

.doctors-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.doctors-table th,
.doctors-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.doctors-table th {
    background-color: #757575;
    color: #fff;
    font-weight: bold;
}

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

.actions {
    display: flex;
    gap: 10px;
}

/* Модальное окно */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Формы */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #5d4037;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Боковое меню */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #3e2723;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    z-index: 900;
    transition: width 0.2s ease;
}

.sidebar-collapsed {
    width: 60px;
}

.sidebar-expanded {
    width: 280px;
}

.sidebar-toggle {
    cursor: pointer;
    padding: 10px;
    text-align: left;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.sidebar-toggle-icon {
    display: inline-block;
    width: 32px;
    text-align: center;
}

.sidebar-toggle-text {
    white-space: nowrap;
}

/* Текст "Меню" скрыт в сжатом состоянии */

.sidebar-collapsed .sidebar-toggle-text {
    display: none;
}

/* В расширенном состоянии показываем "Меню" */

.sidebar-expanded .sidebar-toggle-text {
    display: inline-block;
    margin-left: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    background-color: #4e342e;
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: #5d4037;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

/* Текст пунктов меню: скрыт в сжатом состоянии, показан в расширенном */

.sidebar-text {
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.sidebar.sidebar-expanded .sidebar-text {
    opacity: 1;
    width: auto;
    margin-left: 4px;
    overflow: visible;
}

/* Область контента справа от меню */

.content-wrapper {
    margin-left: 60px;
    padding: 20px;
    transition: margin-left 0.2s ease;
}

/* Стили для заблокированных кнопок */
.btn-edit:disabled,
.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #9e9e9e;
}

.btn-edit:disabled:hover,
.btn-delete:disabled:hover {
    background-color: #9e9e9e;
}