/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    line-height: 1.6;
}

/* Estilos de Login - Específicos y Únicos */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    box-sizing: border-box;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.login-header {
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-right: 15px;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.login-subtitle {
    color: #718096;
    font-size: 0.9rem;
}

/* Formulario de login específico */
#login-form.login-form {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
    display: block;
}

#login-form .form-group {
    margin-bottom: 25px;
    width: 100%;
    max-width: 100%;
    display: block;
}

#login-form .form-label {
    display: block;
    margin-bottom: 10px;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

#login-form .form-label i {
    margin-right: 10px;
    color: #667eea;
    font-size: 1rem;
}

/* Campos de entrada específicos del login */
#login-form #username,
#login-form #password,
#login-form .form-input,
#login-form .form-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0;
    flex: none;
}

#login-form #username:hover,
#login-form #password:hover,
#login-form .form-input:hover,
#login-form .form-select:hover {
    border-color: #cbd5e0;
    background-color: #f8fafc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#login-form #username:focus,
#login-form #password:focus,
#login-form .form-input:focus,
#login-form .form-select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

#login-form #username:readonly,
#login-form #password:readonly,
#login-form .form-input:readonly {
    background-color: #f7fafc;
    color: #4a5568;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Botón de login específico */
#login-form .login-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.025em;
}

#login-form .login-btn i {
    margin-right: 10px;
    font-size: 1rem;
}

/* Selector de tipo de usuario específico */
.user-type-selector {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
    width: 100%;
    max-width: 100%;
    display: block;
}

.user-type-selector .form-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.user-type-selector #role,
.user-type-selector .form-select {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
    margin: 0;
    flex: none;
}

.user-type-selector #role:hover,
.user-type-selector .form-select:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e0;
}

.user-type-selector #role:focus,
.user-type-selector .form-select:focus {
    border-color: #94a3b8;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

#login-form .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

#login-form .login-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.demo-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.demo-text {
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.demo-text i {
    color: #667eea;
    margin-right: 5px;
}

.credentials-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credential-item {
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.3;
    border-left: 3px solid #4CAF50;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .login-card {
        padding: 40px 30px;
    }
    
    #login-form #username,
    #login-form #password,
    #login-form .form-input,
    #login-form .form-select,
    .user-type-selector #role,
    .user-type-selector .form-select {
        padding: 14px 16px;
        font-size: 0.95rem;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #login-form .login-btn {
        padding: 16px 20px;
        font-size: 1rem;
    }
}

/* Estilos adicionales para asegurar que los campos del login usen todo el ancho */
body.login-body #login-form input,
body.login-body #login-form select,
body.login-body .user-type-selector select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 !important;
    flex: none !important;
}

/* Estilos para paneles */
.panel-container {
    display: none;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.panel-container.active {
    display: flex;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2d3748 0%, #4a5568 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #4a5568;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 0.8rem;
    color: #a0aec0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background-color: #667eea;
    color: white;
    transform: translateX(5px);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
}

.user-profile {
    padding: 20px;
    border-top: 1px solid #4a5568;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-info p {
    font-size: 0.8rem;
    color: #a0aec0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f7fafc;
    margin-left: 280px;
    height: 100vh;
    overflow-y: auto;
}

.header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header-top .page-title {
    margin: 0;
    flex: 1;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clinic-selector {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
}

.logout-btn {
    padding: 8px 16px;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #c53030;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* Cards y componentes */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: #667eea;
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 25px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Stats cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-success:hover {
    background-color: #38a169;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    display: block;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal.active {
    display: block;
}

.modal-body {
    padding: 1.5rem;
    color: #374151;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 0.75rem;
}

.modal-body strong {
    color: #1f2937;
    font-weight: 600;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Professional Details */
.professional-details {
    max-width: 500px;
}

.professional-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.professional-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.professional-info h3 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.professional-info .specialty {
    color: #6b7280;
    margin: 0 0 0.25rem 0;
}

.professional-info .clinic {
    color: #9ca3af;
    margin: 0;
}

.professional-details-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
}

.detail-item label {
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.detail-item span {
    color: #6b7280;
}

/* Exam Info */
.exam-info {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.exam-info h3 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.exam-info p {
    margin: 0.25rem 0;
    color: #6b7280;
}

/* Dropdown Styles */
.dropdown-menu {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.dropdown-toggle:hover {
    background: #f3f4f6;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 100;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Calendar Component Styles */
.calendar-component {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    text-transform: capitalize;
}

.calendar-views {
    display: flex;
    gap: 0.5rem;
}

.calendar-body {
    padding: 1.5rem;
}

/* Month View */
.calendar-grid.month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
}

.weekday {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-day.other-month {
    background: #f8fafc;
    color: #a0aec0;
}

.calendar-day.today {
    background: #ebf8ff;
    border-color: #3182ce;
}

.calendar-day.selected {
    background: #667eea;
    color: white;
}

.calendar-day.selected .day-number {
    color: white;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: #2d3748;
}

.event-indicator {
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-item {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.event-item.appointment {
    background: #c6f6d5;
    color: #22543d;
    border-left: 3px solid #38a169;
}

.event-item.exam {
    background: #fed7d7;
    color: #742a2a;
    border-left: 3px solid #e53e3e;
}

.event-item.consultation {
    background: #bee3f8;
    color: #2a4365;
    border-left: 3px solid #3182ce;
}

.event-item:hover {
    transform: scale(1.02);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-time {
    font-weight: 600;
    font-size: 0.7rem;
}

.event-title {
    font-weight: 500;
    line-height: 1.2;
}

.more-events {
    font-size: 0.7rem;
    color: #667eea;
    font-weight: 500;
    text-align: center;
    padding: 0.25rem;
    background: #f7fafc;
    border-radius: 4px;
}

/* Week View */
.calendar-grid.week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.week-day {
    background: white;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.week-day.today {
    background: #ebf8ff;
    border-color: #3182ce;
}

.week-day .day-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.day-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    display: block;
}

.week-day .day-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2d3748;
}

/* Day View */
.calendar-grid.day-view {
    display: flex;
    flex-direction: column;
}

.day-view .day-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.day-view .day-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.time-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-slot {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.time-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 60px;
    font-size: 0.875rem;
}

.slot-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
}

/* Professional Schedule */
.professional-schedule {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.schedule-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(6, 1fr);
    gap: 1px;
    background: #e2e8f0;
}

.time-column, .day-column {
    background: white;
}

.time-header, .day-header {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.time-slot-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #718096;
    border-bottom: 1px solid #f1f5f9;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-cell {
    padding: 0.5rem;
    min-height: 40px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.schedule-cell.has-events {
    background: #f7fafc;
}

.schedule-event {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.schedule-event.appointment {
    background: #c6f6d5;
    color: #22543d;
    border-left: 2px solid #38a169;
}

.schedule-event.exam {
    background: #fed7d7;
    color: #742a2a;
    border-left: 2px solid #e53e3e;
}

.schedule-event.consultation {
    background: #bee3f8;
    color: #2a4365;
    border-left: 2px solid #3182ce;
}

.schedule-event:hover {
    transform: scale(1.02);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Calendar Booking (Original) */
.calendar-booking {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.calendar-view {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    gap: 0.5rem;
}

.calendar-day {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
}

.calendar-day.available {
    border-color: #10b981;
    background: #f0fdf4;
}

.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-slot {
    padding: 0.25rem 0.5rem;
    background: #10b981;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.time-slot:hover {
    background: #059669;
}

.booking-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Dashboard Styles */
.dashboard-header {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.activity-list {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

/* Professional/Patient/Appointment Cards */
.professional-card,
.patient-card,
.appointment-card,
.result-card,
.exam-card,
.clinic-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.professional-card:hover,
.patient-card:hover,
.appointment-card:hover,
.result-card:hover,
.exam-card:hover,
.clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Settings and Profile */
.settings-form,
.profile-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dashboard specific styles */
.dashboard {
    width: 100%;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grid.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.clinic-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clinic-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.clinic-name {
    font-weight: 500;
    color: var(--text-primary);
}

.clinic-count {
    font-weight: 600;
    color: var(--primary-color);
}

.recent-appointments {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.appointment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.appointment-date {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.appointment-details {
    flex: 1;
    margin: 0 1rem;
}

.appointment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.appointment-status.confirmada {
    background: var(--success-light);
    color: var(--success-color);
}

.appointment-status.pendiente {
    background: var(--warning-light);
    color: var(--warning-color);
}

.appointment-status.cancelada {
    background: var(--danger-light);
    color: var(--danger-color);
}

.appointment-time {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
}

.appointment-specialty {
    font-size: 0.85rem;
    color: #718096;
    margin-left: 8px;
}

.daily-appointments,
.weekly-appointments,
.my-appointments {
    max-height: 300px;
    overflow-y: auto;
}

.no-appointments {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 20px;
}

/* Section controls and filters */
.section-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
}

.form-select, .form-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 140px;
    max-width: 200px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.form-select:hover, .form-input:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1em;
    padding-right: 2.5rem;
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Stats items for sections */
.professionals-stats, .patients-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 120px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    border: 2px solid white;
}

.status-indicator.active {
    background: var(--success-color);
}

.status-indicator.inactive {
    background: var(--danger-color);
}

/* Professional and Patient Cards */
.professionals-grid, .patients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.professional-card, .patient-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.professional-card:hover, .patient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.professional-avatar, .patient-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.professional-avatar img, .patient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.professional-info h3, .patient-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.professional-info p, .patient-info p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.professional-info i, .patient-info i {
    width: 16px;
    color: var(--primary-color);
}

.professional-actions, .patient-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.professional-actions .btn, .patient-actions .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .professionals-grid, .patients-grid {
        grid-template-columns: 1fr;
    }
    
    .section-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-select, .form-input {
        min-width: 120px;
        max-width: none;
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid.grid-2 {
        grid-template-columns: 1fr;
    }
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #718096;
    font-size: 1rem;
}

/* Stats grid for dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-content {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Activity list */
.activity-list {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #718096;
    font-size: 0.875rem;
}

/* Improved Grid Layouts for Lists */
.clinics-grid, .exams-grid, .results-grid, .appointments-grid, .professionals-grid, .patients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.clinic-card, .exam-card, .result-card, .appointment-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.clinic-card:hover, .exam-card:hover, .result-card:hover, .appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Appointment Card Specific Styles */
.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.appointment-date {
    text-align: center;
}

.appointment-date .date {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.appointment-date .time {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 0.25rem;
}

.appointment-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.appointment-details p {
    color: #64748b;
    margin: 0.25rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.appointment-details i {
    width: 16px;
    color: #667eea;
}

.appointment-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.clinic-icon, .exam-icon, .result-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.clinic-info h3, .exam-info h3, .result-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.clinic-info p, .exam-info p, .result-details p {
    color: #718096;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.clinic-actions, .exam-actions, .result-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Improved Form Controls */
.form-control, .form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #1a202c;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus, .form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder, .form-input::placeholder {
    color: #a0aec0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a202c;
    font-size: 0.9rem;
}

/* Section Headers and Controls */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.section-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters .form-select {
    min-width: 150px;
}

.filters .form-input {
    min-width: 200px;
}

/* Stats Items */
.professionals-stats, .patients-stats, .clinics-stats, .exams-stats, .results-stats, .appointments-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Enhanced Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #a31818 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #5a67d8;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-nav .nav-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #1a202c;
    text-decoration: none;
    border-bottom: 1px solid #f7fafc;
    transition: background-color 0.2s ease;
}

.mobile-menu-nav .nav-item:hover {
    background: #f7fafc;
}

.mobile-menu-nav .nav-item.active {
    background: #667eea;
    color: white;
}

.mobile-menu-nav .nav-item i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .header-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .clinic-selector {
        width: 100%;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .professionals-grid, .patients-grid,
    .clinics-grid, .exams-grid, .results-grid, .appointments-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .section-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters .form-select,
    .filters .form-input {
        min-width: auto;
    }
    
    .professionals-stats, .patients-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .professional-actions, .patient-actions,
    .clinic-actions, .exam-actions, .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-booking {
        grid-template-columns: 1fr;
    }
    
    /* Calendar responsive */
    .calendar-component {
        margin: 0 1rem;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .calendar-nav {
        justify-content: center;
    }
    
    .calendar-views {
        justify-content: center;
    }
    
    .calendar-grid.month-view {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
    }
    
    .event-item {
        font-size: 0.65rem;
        padding: 0.125rem 0.25rem;
    }
    
    .schedule-grid {
        grid-template-columns: 60px repeat(6, 1fr);
        font-size: 0.75rem;
    }
    
    .time-slot-header {
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
        min-height: 30px;
    }
    
    .schedule-cell {
        padding: 0.25rem;
        min-height: 30px;
    }
    
    .schedule-event {
        font-size: 0.6rem;
        padding: 0.125rem 0.25rem;
    }
    
    .modal {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .card, .professional-card, .patient-card,
    .clinic-card, .exam-card, .result-card, .appointment-card {
        padding: 1rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Enhanced Calendar Component Styles */
.calendar-component {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.calendar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

.calendar-nav, .calendar-views {
    position: relative;
    z-index: 2;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.calendar-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    text-transform: capitalize;
    letter-spacing: -0.025em;
}

.calendar-views {
    display: flex;
    gap: 0.75rem;
}

.calendar-views .btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
}

.calendar-views .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.calendar-views .btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calendar-body {
    padding: 2rem;
}

.calendar-grid.month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.weekday {
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-weight: 700;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #e2e8f0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    background: white;
    min-height: 140px;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.calendar-day.other-month {
    background: #fafafa;
    color: #94a3b8;
}

.calendar-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.calendar-day.today .event-item {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.calendar-day.selected .event-item {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.day-number {
    font-weight: 700;
    font-size: 1.25rem;
    color: inherit;
}

.event-indicator {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.event-item {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.event-item.appointment {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left-color: #3b82f6;
}

.event-item.exam {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left-color: #f59e0b;
}

.event-item:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-time {
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 35px;
}

.event-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.more-events {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.event-types {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.375rem;
}

.event-type-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-type-indicator.appointment {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.event-type-indicator.exam {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Grid View Styles */
.calendar-grid-view {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

.grid-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.grid-filters {
    display: flex;
    gap: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.event-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.event-card.appointment {
    border-left: 4px solid #3b82f6;
}

.event-card.exam {
    border-left: 4px solid #f59e0b;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

.event-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.event-card.appointment .event-type-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.event-card.exam .event-type-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.event-date {
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
}

.event-content {
    padding: 1.5rem;
}

.event-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

.event-time {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
}

.event-clinic {
    margin: 0;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.8rem;
}

.event-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* Enhanced Professional Schedule */
.professional-schedule {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.schedule-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.schedule-actions {
    display: flex;
    gap: 0.75rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 100px repeat(6, 1fr);
    gap: 2px;
    background: #f1f5f9;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.time-column {
    background: #f8fafc;
}

.time-header {
    padding: 1.5rem 1rem;
    text-align: center;
    font-weight: 700;
    color: #475569;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #cbd5e1;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.time-slot-header {
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    background: white;
}

.day-column {
    background: white;
}

.day-header {
    padding: 1.5rem 1rem;
    text-align: center;
    font-weight: 700;
    color: #475569;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}

.schedule-cell {
    min-height: 80px;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    background: white;
}

.schedule-cell.has-events {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.schedule-event {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.schedule-event.appointment {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left-color: #3b82f6;
}

.schedule-event.exam {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left-color: #f59e0b;
}

.schedule-event:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Estilos para FullCalendar */
.calendar-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.calendar-container {
    padding: 1.5rem;
    min-height: 600px;
}

/* Personalización de FullCalendar */
.fc {
    font-family: 'Inter', sans-serif !important;
}

.fc-header-toolbar {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0 !important;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.fc-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.fc-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.fc-button:active {
    transform: translateY(0) !important;
}

.fc-button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.fc-button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
}

.fc-daygrid-day {
    border-color: #e2e8f0 !important;
}

.fc-daygrid-day-number {
    font-weight: 600 !important;
    color: #475569 !important;
}

.fc-day-today {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
}

.fc-day-today .fc-daygrid-day-number {
    background: #3b82f6 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 2rem !important;
    height: 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0.25rem !important;
}

/* Eventos del calendario */
.fc-event {
    border-radius: 6px !important;
    border: none !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.fc-event:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.fc-event-title {
    font-weight: 600 !important;
}

/* Colores específicos para tipos de eventos */
.fc-event[data-event-type="appointment"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.fc-event[data-event-type="exam"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

/* Vista de semana */
.fc-timegrid-slot {
    border-color: #e2e8f0 !important;
}

.fc-timegrid-slot-label {
    font-size: 0.875rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.fc-timegrid-slot-lane {
    border-color: #e2e8f0 !important;
}

.fc-timegrid-col-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-color: #cbd5e1 !important;
}

.fc-col-header-cell {
    padding: 1rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.875rem !important;
}

/* Vista de lista */
.fc-list-day {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-color: #cbd5e1 !important;
}

.fc-list-day-text {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 1rem !important;
}

.fc-list-event {
    border-color: #e2e8f0 !important;
    padding: 0.75rem !important;
}

.fc-list-event:hover {
    background: #f8fafc !important;
}

.fc-list-event-title {
    font-weight: 600 !important;
    color: #1e293b !important;
}

.fc-list-event-time {
    color: #64748b !important;
    font-weight: 500 !important;
}

/* Tooltips del calendario */
.calendar-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 250px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-container {
        padding: 1rem;
    }
    
    .fc-header-toolbar {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
    }
    
    .fc-button {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.25rem !important;
    }
}

/* Modal de detalles de eventos */
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.modal-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
}

.modal-actions .btn-outline {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.modal-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos para exámenes */
.exams-section {
    padding: 20px;
}

.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.exam-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.exam-date {
    text-align: center;
}

.exam-date .date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.exam-date .time {
    font-size: 0.9rem;
    color: #667eea;
    margin-top: 2px;
}

.exam-icon {
    text-align: center;
    margin-bottom: 15px;
}

.exam-icon i {
    font-size: 2.5rem;
    color: #667eea;
}

.exam-info h3 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.exam-info p {
    margin: 5px 0;
    color: #718096;
    font-size: 0.9rem;
}

.exam-info strong {
    color: #4a5568;
}

.exam-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.exam-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Estilos para la página de agendamiento unificada */
.appointment-calendar-section {
    padding: 20px;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-header h2 {
    color: #2d3748;
    margin-bottom: 10px;
}

.section-header p {
    color: #718096;
    font-size: 1.1rem;
}

.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.booking-tabs {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tab-buttons {
    display: flex;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #718096;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.tab-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
}

.booking-form h3 {
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.upcoming-appointments {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upcoming-appointments h3 {
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upcoming-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.upcoming-item.exam {
    border-left-color: #48bb78;
}

.upcoming-date {
    text-align: center;
    margin-right: 20px;
    min-width: 80px;
}

.upcoming-date .date {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.upcoming-date .time {
    font-size: 0.9rem;
    color: #667eea;
    margin-top: 2px;
}

.upcoming-details {
    flex: 1;
}

.upcoming-details h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.upcoming-details p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.status.confirmed {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Estilos para pestañas principales y secundarias */
.main-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.main-tabs .tab-buttons {
    display: flex;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.main-tabs .tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.main-tabs .tab-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.main-tabs .tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.main-tabs .tab-content {
    padding: 30px;
}

.main-tabs .tab-pane {
    display: none;
}

.main-tabs .tab-pane.active {
    display: block;
}

/* Pestañas secundarias (sub-tabs) */
.sub-tab-buttons {
    display: flex;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.sub-tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sub-tab-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.sub-tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.sub-tab-content {
    padding: 25px;
}

.sub-tab-pane {
    display: none;
}

.sub-tab-pane.active {
    display: block;
}
