:root {
    --primary-color: #2e7d32;
    --primary-light: #60ad5e;
    --primary-dark: #005005;
    --text-on-primary: #ffffff;
    --background: #f5f5f5;
    --card-bg: #ffffff;
    --error-color: #d32f2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: #333;
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    margin-right: 15px;
}

.hospital-info h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.hospital-info p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.admin-login {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.3s;
}

.admin-login:hover {
    background-color: rgba(255,255,255,0.1);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.page-title {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.search-container {
    display: flex;
    margin-bottom: 2rem;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-container button {
    padding: 0 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.search-container button:hover {
    background-color: var(--primary-dark);
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.doctor-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
}

.doctor-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-light);
}

.doctor-header {
    background-color: var(--primary-light);
    color: var(--text-on-primary);
    padding: 15px;
}

.doctor-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.doctor-specialty {
    font-size: 0.9rem;
    opacity: 0.9;
}

.doctor-schedule {
    padding: 15px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.schedule-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.day {
    font-weight: 500;
}

.time {
    color: var(--primary-dark);
    font-weight: 600;
}

.doctor-actions {
    display: flex;
    padding: 0 15px 15px;
    gap: 10px;
}

.edit-btn, .delete-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.edit-btn {
    background-color: #ff9800;
    color: white;
}

.edit-btn:hover {
    background-color: #f57c00;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

footer {
    background-color: var(--primary-dark);
    color: var(--text-on-primary);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.login-btn:hover {
    background-color: var(--primary-dark);
}

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-top: 1rem;
}

/* Admin Dashboard Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.logout-btn {
    background-color: var(--error-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background-color: #b71c1c;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.add-doctor-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.add-doctor-btn:hover {
    background-color: var(--primary-dark);
}

.doctor-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.schedule-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.schedule-item-row select, .schedule-item-row input {
    flex: 1;
}

.remove-schedule {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.save-btn {
    background-color: var(--primary-color);
    color: white;
}

.save-btn:hover {
    background-color: var(--primary-dark);
}

.cancel-btn {
    background-color: #757575;
    color: white;
}

.cancel-btn:hover {
    background-color: #424242;
}

@media (max-width: 768px) {
    .doctor-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .schedule-item-row {
        flex-direction: column;
    }
}
