/* Подключаем шрифт Roboto от Google */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    font-size: 24px;
    font-weight: 500;
    color: #4285f4; /* Google Blue */
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-nav li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.sidebar-nav li a:hover {
    background-color: #f1f3f4;
}

.sidebar-nav li a.active {
    background-color: #e8f0fe;
    color: #1967d2;
    border-left-color: #1967d2;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.sidebar-footer a {
    display: block;
    text-decoration: none;
    color: #d93025; /* Google Red */
    font-weight: 500;
    text-align: center;
}

.main-content {
    margin-left: 240px; /* Та же ширина, что и .sidebar */
    flex-grow: 1;
    padding: 24px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.content-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    color: #202124;
}

.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.302), 0 1px 3px 1px rgba(60,64,67,0.149);
}

/* --- Стили для форм --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    box-sizing: border-box; /* Важно! */
}

.form-control:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66,133,244,0.2);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #4285f4;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #1a73e8;
}
.btn-danger {
    background-color: #d93025;
    color: #ffffff;
}
.btn-secondary {
    background-color: #e0e0e0;
    color: #3c4043;
}

/* --- Стили для таблиц --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.data-table th {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    background-color: #f8f9fa;
}

.data-table td {
    font-size: 14px;
    color: #202124;
}

.data-table .actions a {
    color: #4285f4;
    text-decoration: none;
    margin-right: 15px;
}
.data-table .actions a.delete {
    color: #d93025;
}


/* --- Страница Входа (Login) --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    background-color: #f8f9fa;
}

.login-card {
    width: 400px;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.login-card h1 {
    text-align: center;
    color: #4285f4;
    font-size: 28px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 30px;
}

.login-card .alert {
    padding: 12px;
    background-color: #fbe9e7;
    color: #d93025;
    border: 1px solid #f9c9c5;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* --- Стили для ПУБЛИЧНОЙ СТРАНИЦЫ (index.php) --- */

body.public-body {
    background-color: #f1f3f4; /* Светло-серый фон */
    display: block; /* Убираем flex-контейнер админки */
    min-height: 100vh;
}

.public-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.public-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.public-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
    color: #202124;
    text-align: center;
}
.date-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.current-week {
    text-align: center;
    font-size: 20px;
    font-weight: 400;
    color: #4285f4; /* Google Blue */
    margin-top: 15px;
    margin-bottom: 0;
}

.schedule-grid-container {
    overflow-x: auto; /* Позволяет таблице скроллиться на мобильных */
}

.schedule-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Фиксированная ширина колонок */
}

.schedule-grid th,
.schedule-grid td {
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-align: center;
    vertical-align: top;
    height: 100px;
}

/* Заголовок таблицы */
.schedule-grid th {
    background-color: #f8f9fa;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    vertical-align: middle;
}
.schedule-grid th:first-child { /* Ячейка "Врач" */
    text-align: left;
    width: 250px;
}

/* Ячейка с информацией о враче */
.schedule-grid td:first-child {
    text-align: left;
    vertical-align: middle;
    background-color: #f8f9fa;
}

.doctor-info {
    display: flex;
    flex-direction: column;
}
.doctor-name {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}
.doctor-desc {
    font-size: 13px;
    color: #5f6368;
}
.doctor-cab {
    font-size: 13px;
    color: #1a73e8;
    margin-top: 4px;
}

/* Ячейки с расписанием */
.schedule-grid td.has-reception {
    font-size: 16px;
    font-weight: 500;
    color: #1e8e3e; /* Зеленый */
    line-height: 1.4;
    vertical-align: middle;
}
.schedule-grid td.has-reception small {
    font-size: 12px;
    font-weight: 400;
    color: #e67c73; /* Красный для перерыва */
}

.schedule-grid td.no-reception {
    font-size: 14px;
    color: #9aa0a6; /* Серый */
    vertical-align: middle;
}

.public-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #5f6368;
}