/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Estilos para login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.login-form p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

/* Estilos para dashboard */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #34495e;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover {
    background: #34495e;
    color: white;
}

.sidebar-menu li.active a {
    background: #3498db;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

/* EstadÃ­sticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Actividad reciente */
.recent-activity {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recent-activity h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Formularios */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.actions {
    display: flex;
    gap: 5px;
}

/* Botones */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-edit {
    background: #f39c12;
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-edit:hover {
    background: #e67e22;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ValidaciÃ³n de formularios */
.is-invalid {
    border-color: #e74c3c !important;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}
/* Estilos para fotos de especialistas */
.foto-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3498db;
    margin: 10px 0;
}


.foto-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    margin: 10px 0;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.specialist-name {
    display: flex;
    align-items: center;
}

.foto-actual {
    max-width: 20%;
    margin: 20px 0;
    border-radius: 10px;
}

/* Mejoras responsive para tablas con im¨¢genes */
@media (max-width: 768px) {
    .thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .specialist-name {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .specialist-name .thumbnail {
        margin-right: 0;
        margin-bottom: 5px;
    }
}
/* Estilos para el campo comuna y ubicaci¨®n */
.location-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

/* Mejoras para campos de ubicaci¨®n */
.form-group input[placeholder] {
    font-size: 0.9rem;
}

/* Responsive para ubicaci¨®n */
@media (max-width: 768px) {
    .location-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
}

/* Estilos para campos requeridos */
.form-group label[for]:after {
    content: " *";
    color: #e74c3c;
}

.form-group label:not([for]) {
    font-weight: normal;
}

/* Mejoras visuales para la tabla */
.data-table th {
    white-space: nowrap;
}

.data-table td {
    vertical-align: middle;
}