/* Admin Panel Styles */
body.admin-page {
    margin: 0;
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
}

/* Admin Panel Styles */
.admin-navbar {
    background: #1a1a1a;
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100vw;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-navbar .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-navbar .nav-logo h2 {
    color: #2c5aa0;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.admin-navbar .nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background: #f8f9fa;
    border-right: 2px solid #e9ecef;
    padding: 2rem 0;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
    font-size: 1rem;
}

.menu-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.menu-item.active {
    background: #e3f2fd;
    border-left-color: #2c5aa0;
    color: #2c5aa0;
    font-weight: 600;
}

.menu-item i {
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
    min-width: 0;
    overflow-x: auto;
    width: calc(100vw - 280px);
    max-width: calc(100vw - 280px);
    box-sizing: border-box;
}

/* Additional carousel fixes for 100% resolution */
@media (min-width: 1000px) {
    .admin-main {
        padding: 2rem 3rem;
    }
    
    .carousel-controls {
        padding: 0;
        margin: 0;
    }
    
    .carousel-settings {
        padding: 2rem 3rem;
    }
    
    .slides-management {
        padding: 2rem 3rem;
    }
    
    .slide-item {
        padding: 2rem 3rem;
    }
}

/* Ensure proper spacing and visibility */
.admin-section {
    display: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.admin-section.active {
    display: block;
    width: 100%;
    max-width: 100%;
}

.section-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h1 {
    color: #2c5aa0;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.section-header p {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Department Management */
.department-controls {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.control-panel {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.control-panel h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.control-panel p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.department-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-height: 180px;
    width: 100%;
}

.department-card:hover {
    border-color: #2c5aa0;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.15);
    transform: translateY(-3px);
}

.dept-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.dept-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dept-icon i {
    font-size: 1.8rem;
    color: white;
}

.dept-info {
    flex: 1;
}

.dept-info h3 {
    color: #2c5aa0;
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.dept-info p {
    color: #666;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.dept-toggle {
    margin-left: 1rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2c5aa0;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.dept-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid #f8f9fa;
    margin-top: 1rem;
}

.status-indicator {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dept-stats {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.admin-actions {
    padding: 2rem;
    background: #f8f9fa;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* CRITICAL: Force carousel section to always be visible when active */
#carousel-section {
    display: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 10;
}

#carousel-section.active {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
}

#carousel-section.active * {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Specific overrides for carousel section children */
#carousel-section.active .carousel-controls {
    display: flex !important;
}

#carousel-section.active .carousel-settings {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

#carousel-section.active .slides-management {
    display: block !important;
}

#carousel-section.active .admin-actions {
    display: flex !important;
}

#carousel-section.active .form-group input[type="checkbox"] {
    display: inline-block !important;
}

/* Carousel Management */
.carousel-controls {
    background: white !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 2rem !important;
}

.carousel-controls * {
    visibility: visible !important;
    opacity: 1 !important;
}

.carousel-settings {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    padding: 2rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
}

/* Force setting groups to always be visible */
.setting-group {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Force form groups to always be visible */
.form-group {
    margin-bottom: 1.5rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    color: #333 !important;
    font-weight: 500 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100% !important;
    padding: 0.8rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: white !important;
    box-sizing: border-box !important;
    min-width: 200px !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    position: relative !important;
    z-index: 10 !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none !important;
    border-color: #2c5aa0 !important;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1) !important;
}

.form-group input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Force slides management to always be visible */
.slides-management {
    padding: 2rem !important;
    border-top: 1px solid #e9ecef !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    overflow: visible !important;
    background: white !important;
    border-radius: 8px !important;
    margin-top: 2rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Force admin actions to always be visible */
.admin-actions {
    padding: 2rem !important;
    background: #f8f9fa !important;
    display: flex !important;
    gap: 1rem !important;
    justify-content: flex-end !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.setting-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

/* Clinic Hours Styling */
.hours-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.day-group {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.day-group label {
    display: block;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.time-inputs input[type="time"] {
    flex: 1;
    min-width: 120px;
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
}

.time-inputs input[type="time"]:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.time-inputs span {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

.checkbox-group {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

.slides-management {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.slides-management h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.slides-list {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.slide-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.slide-item:hover {
    border-color: #2c5aa0;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.1);
}

.slide-preview {
    width: 150px;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.slide-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.slide-info h4 {
    color: #2c5aa0;
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.slide-info p {
    color: #666;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.slide-info small {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.slide-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.slide-actions button {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-slide {
    background: #2c5aa0;
    color: white;
}

.edit-slide:hover {
    background: #1e3d6f;
}

.delete-slide {
    background: #dc3545;
    color: white;
}

.delete-slide:hover {
    background: #c82333;
}

.slide-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: none;
}

.slide-form.active {
    display: block;
}

.slide-form h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Settings Panel */
.settings-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.setting-group {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.setting-group h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    min-width: 200px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}


.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.card-content h3 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 0.25rem;
}

.stat-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

.stat-change.neutral {
    color: #6c757d;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 10px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: #2c5aa0;
    color: white;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

/* Gallery Management Styles */
.gallery-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.gallery-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
}

.gallery-items-management {
    width: 100%;
}

.gallery-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.gallery-item-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.gallery-item-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item-preview {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.gallery-item-preview img,
.gallery-item-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.gallery-item-info {
    padding: 15px;
}

.gallery-item-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.gallery-item-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.gallery-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #868e96;
}

.gallery-item-category {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gallery-item-actions button {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.gallery-item-actions .btn-edit {
    background: #007bff;
    color: white;
    border: none;
}

.gallery-item-actions .btn-delete {
    background: #dc3545;
    color: white;
    border: none;
}

.gallery-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gallery-form-modal.active {
    display: flex;
}

.gallery-form-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.gallery-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gallery-form-header h3 {
    margin: 0;
    color: #2c3e50;
}

.gallery-form-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.gallery-form-group {
    margin-bottom: 20px;
}

.gallery-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.gallery-form-group input,
.gallery-form-group textarea,
.gallery-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.gallery-form-group input:focus,
.gallery-form-group textarea:focus,
.gallery-form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.gallery-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.gallery-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-icon {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.file-upload-text {
    color: #495057;
    margin-bottom: 10px;
}

.file-upload-hint {
    font-size: 0.85rem;
    color: #868e96;
}

.file-preview {
    margin-top: 15px;
    text-align: center;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* Responsive Gallery Styles */
@media (max-width: 768px) {
    .gallery-settings {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-items-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-form-content {
        width: 95%;
        padding: 20px;
    }
    
    .gallery-form-actions {
        flex-direction: column;
    }
}

@media (min-width: 1024px) {
    .gallery-controls {
        max-width: 1400px;
    }
    
    .gallery-items-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 1rem 0;
        border-right: none;
        border-bottom: 2px solid #e9ecef;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .admin-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .menu-item {
        white-space: nowrap;
        padding: 1rem;
        min-width: 140px;
    }
    
    .admin-main {
        padding: 1.5rem;
        max-width: 100vw;
        width: 100vw;
    }
    
    .carousel-settings {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .slide-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .slide-preview {
        width: 100%;
        height: 150px;
    }
    
    .slide-actions {
        justify-content: center;
    }
}

/* Specific carousel responsive fixes */
@media (min-width: 1024px) {
    .carousel-controls {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .carousel-settings {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .setting-group {
        min-width: 300px;
    }
    
    .slides-management {
        min-width: 0;
    }
    
    .slide-item {
        min-width: 0;
    }
}

@media (min-width: 1200px) {
    .carousel-controls {
        max-width: 1600px;
    }
    
    .carousel-settings {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .setting-group {
        min-width: 350px;
    }
}

@media (max-width: 768px) {
    .admin-navbar .nav-container {
        padding: 0 1rem;
    }
    
    .admin-navbar .nav-actions {
        gap: 0.5rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .slide-item {
        flex-direction: column;
        text-align: center;
    }
    
    .slide-preview {
        width: 100%;
        height: 120px;
    }
    
    .slide-actions {
        justify-content: center;
        margin-top: 1rem;
    }

}

@media (max-width: 480px) {
    .admin-navbar .nav-logo h2 {
        font-size: 1.2rem;
    }
    
    .admin-navbar .nav-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-navbar .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .admin-main {
        padding: 0.5rem;
    }
    
    .section-header h1 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .department-card {
        padding: 1rem;
    }
    
    .dept-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .dept-toggle {
        margin-left: 0;
    }
    
    .control-panel {
        padding: 1rem;
    }
    
    .carousel-settings {
        padding: 1rem;
    }
    
    .slides-management {
        padding: 1rem;
    }
    
    .setting-group {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .setting-group h3 {
        font-size: 1.1rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .analytics-card {
        padding: 1rem;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
    }
    
    .card-icon i {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
}

/* Carousel Settings Always Visible */
@media screen and (min-width: 768px) {
    .carousel-settings {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .setting-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 1.5rem;
    }
    
    .hours-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .time-inputs {
        flex-wrap: nowrap;
    }
}

/* Carousel Section Specific Fixes for 100% Resolution */
@media screen and (min-width: 1024px) {
    .carousel-controls {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .carousel-settings {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem;
        box-sizing: border-box;
    }
    
    .setting-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 1.5rem;
    }
    
    .slides-management {
        width: 100%;
        max-width: 100%;
        padding: 2rem;
        box-sizing: border-box;
    }
    
    .slides-list {
        width: 100%;
        max-width: 100%;
    }
    
    .slide-item {
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem;
        margin-bottom: 1.5rem;
        box-sizing: border-box;
    }
    
    .slide-preview {
        width: 150px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .slide-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .slide-actions {
        flex-shrink: 0;
        display: flex;
        gap: 0.5rem;
    }
}

/* 100% Resolution Specific Fixes */
@media screen and (min-width: 1200px) {
    .admin-container {
        width: 100vw;
        max-width: 100vw;
    }
    
    .admin-main {
        width: calc(100vw - 280px);
        max-width: calc(100vw - 280px);
        padding: 2rem;
    }
    
    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
        width: 100%;
    }
    
    .department-card {
        width: 100%;
        max-width: 100%;
    }
    
    .carousel-settings {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    .slides-management {
        padding: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    .slide-item {
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .slide-preview {
        width: 150px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .slide-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .slide-actions {
        flex-shrink: 0;
    }
}

/* High DPI / 100% Resolution Improvements */
@media (min-resolution: 96dpi) and (max-width: 1920px) {
    .admin-container {
        width: 100vw;
        max-width: 100vw;
    }
    
    .admin-main {
        width: calc(100vw - 280px);
        max-width: calc(100vw - 280px);
        padding: 2rem;
    }
    
    .section-header h1 {
        font-size: 2.2rem;
    }
    
    .section-header p {
        font-size: 1.2rem;
    }
    
    .department-card {
        padding: 2rem;
        width: 100%;
    }
    
    .dept-info h3 {
        font-size: 1.3rem;
    }
    
    .dept-info p {
        font-size: 1rem;
    }
    
    .control-panel h3 {
        font-size: 1.4rem;
    }
    
    .control-panel p {
        font-size: 1.1rem;
    }
    
    .setting-group h3 {
        font-size: 1.3rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .analytics-card h3 {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-text {
        font-size: 1.3rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .admin-container {
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .admin-sidebar {
        width: 300px;
    }
    
    .admin-main {
        padding: 3rem;
    }
    
    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3d6f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.show {
    display: block;
}

/* Image Upload Styles */
.image-upload-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-upload-container:hover {
    border-color: #2c5aa0;
    background: #f8f9ff;
}

.image-upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    text-align: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c5aa0;
}

.upload-placeholder p {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.upload-placeholder small {
    font-size: 0.8rem;
    color: #adb5bd;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    z-index: 3;
}

.remove-image:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Media Preview Styles (for gallery) */
.media-preview {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.remove-media {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    z-index: 3;
}

.remove-media:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Drag and drop styles */
.image-upload-container.dragover {
    border-color: #2c5aa0;
    background: #e3f2fd;
    transform: scale(1.02);
}

.image-upload-container.dragover .upload-placeholder {
    transform: scale(1.05);
}

/* File size validation styles */
.image-upload-container.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.image-upload-container.error .upload-placeholder {
    color: #dc3545;
}

/* Loading state */
.image-upload-container.loading {
    pointer-events: none;
    opacity: 0.7;
}

.image-upload-container.loading .upload-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2c5aa0;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments for image upload */
@media (max-width: 768px) {
    .image-upload-container {
        min-height: 150px;
    }
    
    .upload-placeholder {
        height: 150px;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
    
    .upload-placeholder p {
        font-size: 0.9rem;
    }
    
    .image-preview,
    .media-preview {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .image-upload-container {
        min-height: 120px;
    }
    
    .upload-placeholder {
        height: 120px;
    }
    
    .upload-placeholder i {
        font-size: 1.5rem;
    }
    
    .upload-placeholder p {
        font-size: 0.8rem;
    }
    
    .image-preview,
    .media-preview {
        height: 120px;
    }
}

/* Callback Management Styles */
.callback-management {
    padding: 2rem 0;
}

.callback-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #2c5aa0;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    color: #2c5aa0;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.callback-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.callback-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.callback-filters select,
.callback-filters input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 150px;
    background: white;
}

.callback-filters input {
    min-width: 200px;
}

.callback-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.callback-actions button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.callback-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.callback-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.callback-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.callback-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.callback-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
}

.callback-table tbody tr:hover {
    background: #f8f9fa;
}

.callback-table tbody tr:last-child td {
    border-bottom: none;
}

.callback-name {
    font-weight: 600;
    color: #2c5aa0;
}

.callback-phone {
    color: #666;
    font-family: monospace;
}

.callback-department {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.callback-message {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-style: italic;
}

.callback-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.urgent {
    background: #f8d7da;
    color: #721c24;
}

.callback-actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.callback-actions-cell button {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: auto;
}

.mark-completed-btn {
    background: #28a745;
    color: white;
}

.mark-completed-btn:hover {
    background: #218838;
}

.mark-urgent-btn {
    background: #dc3545;
    color: white;
}

.mark-urgent-btn:hover {
    background: #c82333;
}

.delete-callback-btn {
    background: #6c757d;
    color: white;
}

.delete-callback-btn:hover {
    background: #545b62;
}

.callback-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-controls button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-controls button:hover {
    background: #f8f9fa;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls button:disabled:hover {
    background: white;
    border-color: #ddd;
    color: #666;
}

#current-page {
    font-weight: 600;
    color: #2c5aa0;
    min-width: 30px;
    text-align: center;
}

/* Responsive design for callback management */
@media (max-width: 768px) {
    .callback-stats {
        grid-template-columns: 1fr;
    }
    
    .callback-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .callback-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .callback-filters select,
    .callback-filters input {
        min-width: 100%;
    }
    
    .callback-actions {
        justify-content: center;
    }
    
    .callback-table-container {
        overflow-x: auto;
    }
    
    .callback-table {
        min-width: 800px;
    }
    
    .callback-table th,
    .callback-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .callback-message {
        max-width: 150px;
    }
    
    .callback-actions-cell {
        flex-direction: column;
    }
    
    .callback-actions-cell button {
        width: 100%;
        justify-content: center;
    }
    
    .callback-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

