/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Шапка */
header {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.system-title {
    color: #ff4444;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 30px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Левая панель */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Форма записи */
.booking-form {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.booking-form h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Кнопки */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Список услуг */
.services-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.services-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.services-container {
    display: grid;
    gap: 15px;
}

.service-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.service-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.service-desc {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.service-price {
    color: #27ae60;
    font-weight: 600;
}

/* Правая панель - список записей */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.appointments-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.section-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filters select,
.filters input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.filters input {
    flex: 1;
}

/* Таблица записей */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
    position: sticky;
    top: 0;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

tbody tr:hover {
    background: #f8f9fa;
}

td {
    padding: 15px;
}

/* Статусы */
.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status.pending {
    background: #f39c12;
    color: white;
}

.status.confirmed {
    background: #27ae60;
    color: white;
}

.status.completed {
    background: #2196F3;
    color: white;
}

.status.cancelled {
    background: #e74c3c;
    color: white;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #388E3C;
}

/* Статистика */
.stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #e74c3c;
}

.status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.status-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.status-btn.pending {
    background: #f39c12;
}

.status-btn.confirmed {
    background: #27ae60;
}

.status-btn.completed {
    background: #2196F3;
}

.status-btn.cancelled {
    background: #e74c3c;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Футер */
footer {
    background: #1B5E20;
    color: white;
    padding: 20px 40px;
    text-align: center;
}

.footer-info {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .main-content {
        padding: 20px;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .status-options {
        grid-template-columns: 1fr;
    }
}