/* Цветовая палитра: белый, коралловый, серый */
:root {
    --white: #ffffff;
    --coral: #FF6B6B;
    --coral-dark: #ee5a5a;
    --gray-light: #f5f5f5;
    --gray: #9e9e9e;
    --gray-dark: #424242;
    --text: #333333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--gray-light);
    color: var(--text);
}

#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: var(--white);
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
}

.sidebar__header {
    padding: 0 20px 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--coral);
    border-bottom: 1px solid #e0e0e0;
}

.sidebar__nav {
    list-style: none;
    padding: 10px 0;
}

.sidebar__nav li {
    margin: 2px 0;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: var(--gray-dark);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--gray-light);
    color: var(--coral);
}

.nav-link.active {
    background: var(--coral);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.header__title {
    font-size: 24px;
    color: var(--text);
}

.header__user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header__logout {
    background: var(--coral);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.header__logout:hover {
    background: var(--coral-dark);
}

.content {
    padding: 30px;
    flex: 1;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card__title {
    font-size: 18px;
    color: var(--gray-dark);
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
    transition: all 0.2s;
}

.btn:hover {
    background: var(--gray-light);
}

.btn-primary {
    background: var(--coral);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: var(--coral-dark);
}

.btn-secondary {
    background: var(--gray-light);
    border-color: var(--gray);
}

.btn-danger {
    background: var(--white);
    color: var(--coral);
    border-color: var(--coral);
}

.btn-danger:hover {
    background: var(--coral);
    color: var(--white);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

th {
    background: var(--gray-light);
    color: var(--gray-dark);
    font-weight: 600;
}

tr:hover {
    background: var(--gray-light);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal__content {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal__content h3 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--coral);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.modal__buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card__title {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card__value {
    font-size: 32px;
    font-weight: 700;
    color: var(--coral);
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(9, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

.schedule-cell {
    background: var(--white);
    padding: 8px;
    text-align: center;
    font-size: 12px;
}

.schedule-header {
    background: var(--gray-light);
    font-weight: 600;
}

.schedule-room {
    background: var(--gray-light);
    font-weight: 500;
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--gray-light);
}

.tab-btn.active {
    background: var(--coral);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Session Actions */
.modal__content--small {
    max-width: 400px;
}

.session-info {
    background: var(--gray-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.session-info p {
    margin: 8px 0;
}

.session-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-block {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
}

.btn-warning {
    background: #fd7e14;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-badge.scheduled { background: var(--coral); color: white; }
.status-badge.completed { background: #28a745; color: white; }
.status-badge.cancelled { background: #dc3545; color: white; }
.status-badge.pending_reschedule { background: #fd7e14; color: white; }

/* Client Card */
.modal__content--wide {
    max-width: 800px;
    width: 95%;
}

.client-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.client-info-section,
.client-subs-section,
.client-schedule-section,
.client-history-section {
    background: var(--gray-light);
    padding: 15px;
    border-radius: 8px;
}

.client-info-section h4,
.client-subs-section h4,
.client-schedule-section h4,
.client-history-section h4 {
    margin: 0 0 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-schedule-section,
.client-history-section {
    margin-bottom: 15px;
}

.sub-card {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid var(--coral);
}

.sub-card.paid {
    border-left-color: #28a745;
}

.sub-card.expired {
    border-left-color: #dc3545;
    opacity: 0.7;
}

.sub-card-header {
    font-weight: 600;
    margin-bottom: 5px;
}

.sub-card-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--gray-dark);
}

.sub-card-actions {
    margin-top: 8px;
    display: flex;
    gap: 5px;
}

.session-mini {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.session-mini-date {
    font-weight: 500;
}

.payment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.payment-status.paid {
    background: #d4edda;
    color: #155724;
}

.payment-status.unpaid {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .client-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Session Actions Submenu */
.action-group {
    position: relative;
    display: inline-block;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    padding: 5px;
}

.submenu button {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 5px;
}

.submenu button:last-child {
    margin-bottom: 0;
}

.session-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.session-actions-buttons .btn {
    width: 100%;
}

.dropdown-toggle::after {
    margin-left: 5px;
}

/* Отменённые занятия - перечёркнутый текст */
.session-cancelled {
    background: #ffebee !important;
    border-left: 3px solid #f44336;
}

.session-cancelled .session-client,
.session-cancelled .session-employee {
    text-decoration: line-through;
    color: #999;
}

.session-cancelled::after {
    content: "отменено";
    display: block;
    font-size: 10px;
    color: #f44336;
    font-weight: bold;
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.autocomplete-item.selected {
    background: #e3f2fd;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Широкая модалка */
.modal__content--wide {
    max-width: 700px;
    width: 95%;
}

/* Расписание слоты */
.schedule-slot {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.schedule-slot select {
    flex: 1;
}

.schedule-slot .btn-danger {
    flex: 0 0 auto;
}

/* Радио группа */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Калькулятор */
.calc-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.calc-info p {
    margin: 5px 0;
}

.calc-total {
    font-size: 1.2em;
    color: #2e7d32;
    margin-top: 10px !important;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.card-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.template-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 5px;
}

.template-item .weekday {
    font-weight: bold;
    min-width: 30px;
}

.calc-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.total-field {
    font-weight: bold;
    font-size: 1.1em;
    background: #e8f5e9 !important;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 3px;
}

/* === СООБЩЕНИЯ / МЕССЕНДЖЕР === */
.messages-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.conversations-list {
    width: 320px;
    min-width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.conversations-header input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.conversations-items {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: #e9ecef;
}

.conversation-item.active {
    background: #007bff;
    color: white;
}

.conversation-item.active .conv-phone,
.conversation-item.active .conv-time {
    color: rgba(255,255,255,0.8);
}

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

.conv-name {
    font-weight: 600;
    font-size: 14px;
}

.conv-time {
    font-size: 11px;
    color: #888;
}

.conv-preview {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.active .conv-preview {
    color: rgba(255,255,255,0.9);
}

.conv-phone {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.unread-badge {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    background: #f8f9fa;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.message-bubble.incoming {
    background: #e9ecef;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble.outgoing {
    background: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
}

.chat-input {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    background: #f8f9fa;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
}

.chat-input button {
    align-self: flex-end;
}

.no-conversations {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* === МЕССЕНДЖЕР === */
.messages-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.conversations-list {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.conversations-header input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.conversations-items {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.conversation-item:hover { background: #e9ecef; }
.conversation-item.active { background: #007bff; color: white; }
.conversation-item.active .conv-time { color: rgba(255,255,255,0.8); }

.conv-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.conv-name { font-weight: 600; }
.conv-time { font-size: 11px; color: #888; }
.conv-preview { font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item.active .conv-preview { color: rgba(255,255,255,0.9); }

.unread-badge {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    background: #f8f9fa;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 12px;
}

.message-bubble.incoming {
    background: #e9ecef;
    align-self: flex-start;
}

.message-bubble.outgoing {
    background: #007bff;
    color: white;
    align-self: flex-end;
}

.message-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
}

.no-conversations {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* === МЕССЕНДЖЕР === */
.messages-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.conversations-list {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.conversations-header input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.conversations-items {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.conversation-item:hover { background: #e9ecef; }
.conversation-item.active { background: #007bff; color: white; }

.conv-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.conv-name { font-weight: 600; }
.conv-time { font-size: 11px; color: #888; }
.conv-preview { font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item.active .conv-preview { color: rgba(255,255,255,0.9); }
.conversation-item.active .conv-time { color: rgba(255,255,255,0.8); }

.unread-badge {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    background: #f8f9fa;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 12px;
}

.message-bubble.incoming {
    background: #e9ecef;
    align-self: flex-start;
}

.message-bubble.outgoing {
    background: #007bff;
    color: white;
    align-self: flex-end;
}

.message-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
}

.no-conversations {
    padding: 20px;
    text-align: center;
    color: #888;
}

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

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

/* === Расписание таблица === */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e0e0e0;
    padding: 8px;
    text-align: center;
    min-width: 120px;
    height: 60px;
    vertical-align: top;
}

.schedule-table th {
    background: var(--coral);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.schedule-table .time-cell {
    background: #f8f9fa;
    font-weight: 600;
    min-width: 70px;
    vertical-align: middle;
}

.session-cell {
    background: #e3f2fd;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.session-cell:hover {
    background: #bbdefb;
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.session-cell.cancelled {
    background: #ffebee;
    opacity: 0.7;
    text-decoration: line-through;
}

.session-cell.indication-will_cancel {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.session-cell.indication-will_reschedule {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.session-cell.indication-need_confirmation {
    background: #fce4ec;
    border-left: 4px solid #e91e63;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}

.session-client {
    font-weight: 600;
    color: #1565c0;
}

.session-employee {
    color: #666;
}

.session-direction {
    color: #888;
    font-size: 11px;
}

.empty-cell {
    cursor: pointer;
    transition: background 0.2s;
}

.empty-cell:hover {
    background: #f0f0f0;
}

/* Неделя */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    padding: 10px;
}

.week-day {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.week-day-header {
    background: var(--coral);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 600;
}

.week-day-content {
    padding: 10px;
    min-height: 200px;
}

.week-session {
    background: #e3f2fd;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.week-session:hover {
    background: #bbdefb;
}

.week-session.cancelled {
    background: #ffebee;
    text-decoration: line-through;
}

.no-sessions {
    color: #999;
    text-align: center;
    padding: 20px;
}

/* Меню ячейки */
.cell-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cell-menu__content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    min-width: 350px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.cell-menu__content h4 {
    margin-bottom: 15px;
    color: var(--coral);
    font-size: 18px;
}

.cell-menu__content p {
    margin: 8px 0;
}

.cell-menu__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.cell-menu__buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* Контролы расписания */
.schedule-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.branch-switcher,
.view-switcher {
    display: flex;
    gap: 5px;
}

.branch-btn,
.view-btn {
    padding: 8px 16px;
    border: 1px solid var(--coral);
    background: white;
    color: var(--coral);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.branch-btn:hover,
.view-btn:hover {
    background: #fff0f0;
}

.branch-btn.active,
.view-btn.active {
    background: var(--coral);
    color: white;
}

.date-nav {
    display: flex;
    gap: 5px;
    align-items: center;
}

.date-nav input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Отмена занятия */
.makeup-info {
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.makeup-info.makeup-yes {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.makeup-info.makeup-no {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.autocomplete-item:last-child {
    border-bottom: none;
}
