/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.admin-logo i {
    font-size: 1.5rem;
}

.admin-logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.admin-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-preview {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-preview:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-save {
    background: #4CAF50;
    color: white;
}

.btn-save:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-logout {
    background: #f44336;
    color: white;
}

.btn-logout:hover {
    background: #da190b;
}

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 250px;
    height: calc(100vh - 70px);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 999;
}

.admin-nav ul {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f8f9fa;
    border-left-color: #4A90E2;
}

.nav-item.active {
    background: #e3f2fd;
    border-left-color: #4A90E2;
    color: #4A90E2;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
}

.nav-item span {
    font-weight: 500;
}

/* Admin Main Content */
.admin-main {
    margin-left: 250px;
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

.admin-section {
    display: none;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-section.active {
    display: block;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #4A90E2;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

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

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

/* Image Upload Styles */
.image-upload {
    position: relative;
}

.image-upload input[type="file"] {
    display: none;
}

.upload-area {
    border: 2px dashed #4A90E2;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #357ABD;
    background: #f0f4ff;
}

.upload-area i {
    font-size: 2rem;
    color: #4A90E2;
    margin-bottom: 10px;
    display: block;
}

.upload-area span {
    color: #4A90E2;
    font-weight: 500;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Doctor Editor Styles */
.doctors-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.doctor-editor {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    position: relative;
}

.doctor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.doctor-editor h3 {
    color: #4A90E2;
    margin: 0;
    font-size: 1.3rem;
}

/* Section Actions */
.section-actions {
    margin-top: 15px;
}

.btn-add {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Services Editor Styles */
.services-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.service-editor {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.service-editor h3 {
    color: #4A90E2;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Gallery Editor Styles */
.gallery-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.gallery-item-editor {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.gallery-item-editor h3 {
    color: #4A90E2;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Testimonials Editor Styles */
.testimonials-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.testimonial-editor {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.testimonial-editor h3 {
    color: #4A90E2;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 100px;
    right: 30px;
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

.success-message.show {
    display: flex;
}

.success-message i {
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #4A90E2;
    margin-bottom: 15px;
    display: block;
}

.loading-spinner span {
    color: #333;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main {
        margin-left: 200px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .doctors-editor,
    .services-editor,
    .gallery-editor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: 20px;
    }
    
    .admin-header-content {
        padding: 15px 20px;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-actions button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .admin-section {
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .success-message {
        right: 20px;
        left: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .admin-header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-logo h1 {
        font-size: 1.3rem;
    }
    
    .admin-main {
        padding: 15px;
    }
    
    .admin-section {
        padding: 15px;
    }
    
    .form-grid {
        gap: 20px;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .upload-area i {
        font-size: 1.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #357ABD;
}

/* Animation for section transitions */
.admin-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form validation styles */
.form-group input.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Button hover effects */
.admin-actions button {
    position: relative;
    overflow: hidden;
}

.admin-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.admin-actions button:hover::before {
    left: 100%;
}
