* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f9f5;
    color: #1b5e20;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background-color: white;
    padding: 20px 0;
    border-bottom: 2px solid #4caf50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.logo {
    color: #2e7d32;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: #2e7d32;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav a:hover {
    background-color: #e8f5e9;
}

.nav-auth, .nav-guest {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-name {
    font-weight: bold;
    color: #2e7d32;
}

.btn, button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover, button:hover {
    background-color: #2e7d32;
}

.btn-secondary {
    background-color: #9e9e9e;
}

.btn-secondary:hover {
    background-color: #757575;
}

.btn-cancel {
    background-color: #9e9e9e;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}

.btn-cancel:hover {
    background-color: #757575;
}

form {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 30px auto;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4caf50;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2e7d32;
}

.error, .error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #f44336;
}

.success, .success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: #e8f5e9;
    border-radius: 16px;
    margin: 30px 0;
}

.hero h2 {
    color: #2e7d32;
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    color: #1b5e20;
    font-size: 18px;
    margin-bottom: 25px;
}

.clinics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.clinic-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #c8e6c9;
}

.clinic-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.clinic-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.clinic-card h3 a {
    color: #2e7d32;
    text-decoration: none;
}

.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #c8e6c9;
    color: #666;
}

table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8f5e9;
    text-align: left;
}

th {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.search-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    background: none;
    padding: 0;
    box-shadow: none;
}

.search-form input {
    flex: 1;
    margin: 0;
}

.search-form button {
    width: auto;
    margin: 0;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    margin: 0;
}

.btn-filter {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-reset {
    background: #9e9e9e;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.appointment-card {
    background: white;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.clinic-name {
    font-weight: bold;
    color: #2e7d32;
    font-size: 18px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-ожидает {
    background: #fff3e0;
    color: #ff9800;
}

.status-подтверждена {
    background: #e8f5e9;
    color: #4caf50;
}

.status-отменена {
    background: #ffebee;
    color: #f44336;
}

.status-завершена {
    background: #e3f2fd;
    color: #2196f3;
}

.appointment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 10px 0;
    font-size: 14px;
}

.detail-label {
    font-weight: bold;
    color: #555;
}

.status-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-select {
    padding: 6px 12px;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}

.btn-update {
    background: #2196f3;
    color: white;
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #c8e6c9;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #2e7d32;
}

.stat-label {
    color: #666;
    margin-top: 10px;
}

.admin-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.admin-menu-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    flex: 1;
    min-width: 150px;
    text-decoration: none;
    border: 1px solid #c8e6c9;
}

.admin-menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-menu-title {
    font-size: 18px;
    font-weight: bold;
    color: #2e7d32;
}

.admin-menu-desc {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.info-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.field-error {
    color: #c62828;
    font-size: 12px;
    margin-top: 5px;
}

.form-actions {
    margin-top: 30px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.doctor-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid #c8e6c9;
}

.doctor-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.services-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}

.services-table th {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.review-card {
    background: white;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.review-date {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.rating {
    color: #ff9800;
    font-weight: bold;
}

.add-review {
    margin: 20px 0;
    text-align: right;
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #2e7d32;
}

.clinic-logo-large {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.info-section {
    background: white;
    border-radius: 16px;
    padding: 5px 20px 20px 20px;
    margin-bottom: 20px;
}

.login-message {
    background-color: #f5f9f5;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    text-align: center;
    color: #2e7d32;
}

.login-message a {
    color: #4caf50;
    font-weight: bold;
    text-decoration: underline;
}

.clinic-actions {
    margin-top: 30px;
    text-align: center;
    padding-bottom: 20px;
}

.clinics-list {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.clinic-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.clinic-checkbox input {
    width: auto;
    margin: 0;
}

.slot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.slot-btn {
    padding: 10px 15px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    cursor: pointer;
}

.slot-btn:hover {
    background: #4caf50;
    color: white;
}

.slot-btn.selected {
    background: #2e7d32;
    color: white;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.doctor-photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e8f5e9;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

/* Стили для страницы appointments */
.filter-group {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 150px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.filter-item select {
    width: 100%;
    padding: 8px;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}

.btn-filter {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-reset {
    background: #9e9e9e;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* Таблица как у клиник */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8f5e9;
    text-align: left;
}

th {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Форма в строке таблицы */
td form {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

td form select.status-select-sm {
    width: 100px;
    padding: 6px 8px;
    font-size: 13px;
    margin: 0;
    background: white;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}

td form .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

td form .btn-sm:hover {
    background: #1976d2;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    .nav {
        justify-content: center;
    }
    .clinics-grid {
        grid-template-columns: 1fr;
    }
    .hero h2 {
        font-size: 28px;
    }



}