/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    min-height: 100vh;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
}

/* Contenido principal */
main {
    background-color: #fff;
    min-height: 100vh;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Formularios */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Botones */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Tablas */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #343a40;
    color: #fff;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

/* Animaciones */
.content-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        padding: 48px 0 0;
        box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    }
    
    main {
        margin-left: 0;
    }
}

/* Estilos para el modal */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Estilos para los iconos */
.fas, .far, .fab {
    margin-right: 0.5rem;
}

/* Estilos para las alertas */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Estilos para los tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Estilos para los badges de estado */
.status-active {
    background-color: #198754;
}

.status-inactive {
    background-color: #6c757d;
}

/* Estilos para los botones de acción en la tabla */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Estilos para el contador de trabajadores */
.worker-counter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.worker-counter h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

.worker-counter p {
    margin: 0;
    opacity: 0.9;
}

/* Estilos para los campos requeridos */
.required-field::after {
    content: " *";
    color: #dc3545;
}

/* Estilos para la validación de formularios */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Estilos para el loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos para el footer */
.footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Estilos para los botones de exportación */
.export-options {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Estilos para la información de exportación */
.export-info {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Estilos para los campos de fecha */
input[type="date"] {
    font-family: inherit;
}

/* Estilos para los campos de número */
input[type="number"] {
    font-family: inherit;
}

/* Estilos para los textareas */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Estilos para los selectores */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Estilos para los grupos de input */
.input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
}

/* Estilos para las filas de la tabla */
.table tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,.02);
}

/* Estilos para los enlaces en la tabla */
.table a {
    color: #0d6efd;
    text-decoration: none;
}

.table a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Estilos para los botones de acción */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Estilos para el estado de carga */
.loading-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Estilos para los mensajes de error */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Estilos para los mensajes de éxito */
.success-message {
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Estilos para los tooltips personalizados */
.custom-tooltip {
    position: relative;
    cursor: help;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: #fff;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* Estilos para los campos de búsqueda */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Estilos para los filtros */
.filter-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Estilos para las estadísticas */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.stats-card h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

.stats-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

/* Estilos para la foto del personal */
#fotoPreview {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 10px;
    background-color: #f8f9fa;
}

#fotoPreviewImg {
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Estilos para Odontograma */
.odontograma-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.odontograma-row {
    display: contents;
}

.odontograma-tooth {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    position: relative;
}

.odontograma-tooth:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

.odontograma-tooth-number {
    font-size: 10px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.odontograma-tooth-geometric {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    padding: 2px;
}

.odontograma-tooth-face {
    background-color: #e9ecef;
    border: 1px solid #ccc;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooth-face {
    min-height: 15px;
    min-width: 15px;
}

.tooth-geometric-container {
    position: relative;
}

/* Estilos para fractura (rayado de cebra blanco y rojo) */
.tooth-face[data-tratamiento="fractura"] {
    background-image: repeating-linear-gradient(45deg, #EF152A, #EF152A 3px, #ffffff 3px, #ffffff 6px) !important;
    background-color: #EF152A !important;
}

/* Estilos para sellantes */
.tooth-face[data-tratamiento="sellantes"] {
    background-color: #39BD4F !important;
    color: #fff !important;
    font-weight: bold !important;
}

/* Estilos para prótesis */
.tooth-face[data-tratamiento="protesis"] {
    background-color: transparent !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Colores para diferentes tratamientos */
.tooth-sano { background-color: #d4edda !important; }
.tooth-caries { background-color: #f8d7da !important; }
.tooth-obturacion { background-color: #fff3cd !important; }
.tooth-corona { background-color: #cfe2ff !important; }
.tooth-puente { background-color: #d1ecf1 !important; }
.tooth-implante { background-color: #e2e3e5 !important; }
.tooth-extraccion { background-color: #000 !important; color: #fff !important; }
.tooth-endodoncia { background-color: #f0d6ff !important; }
.tooth-protesis { background-color: #ffeaa7 !important; }
.tooth-ausente { background-color: #ddd !important; }
.tooth-fractura { background-color: #ff6b6b !important; }
.tooth-movilidad { background-color: #ffa502 !important; }
.tooth-calculus { background-color: #747d8c !important; color: #fff !important; }
.tooth-gingivitis { background-color: #ff6348 !important; }

.odontograma-quadrant-label {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
}

.odontograma-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.odontograma-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
}

.odontograma-legend-color {
    width: 20px;
    height: 20px;
    border: 1px solid #333;
    border-radius: 3px;
} 