@import url("colors.css");

/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Estilos de los botones */
/* Quita un pequeño margen derecho a los iconos de todos los botones que tengan la clase me-1 */
.btn .me-1 {
    margin-right: 0px !important;
}

/* Estilos del navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand { /* Logo de JornadIA */
    font-weight: bold;
    font-size: 1.5rem;
}

/* Estilos de las tarjetas */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    margin-bottom: 1.5rem;
}

.card-header {
    /*background-color: #f8f9fa;*/
    background-color: #0d6efd;
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
    font-weight: bold;
}

.card-header h6 {
    color: #fff !important;
    text-transform: uppercase;
}

/* Estilos de los botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding: 0.6rem 0.8rem;
    min-height: 40px;
    min-width: 40px;
    font-weight: 500;
}

.badge {
    line-height: normal;
    min-width: 30px;
}

/* Estilos de las tablas */
.table {
    margin-bottom: 0;
}

.table > tbody > tr:nth-of-type(even) > td,
.table > tbody > tr:nth-of-type(even) > th {
  background-color: #f7f7f7 !important;
}

.table > tbody > tr:nth-of-type(odd) > td,
.table > tbody > tr:nth-of-type(odd) > th {
  background-color: #fff !important;
}

/* Estilos de las cabeceras de las tablas */
.table th {
    background-color: #495057;
    border-top: none;
    font-weight: 600;
    color: #ffffff;
}

.table tr {
    vertical-align: middle; 
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.03);
}

/* Estilos de los formularios */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.caja-sombreada{
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 1rem;
}

/* Estilos de las alertas */
.alert {
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0 1.2rem;
}

.alert p { /* Quitar margin-bottom de los parrafos en los mensajes de alerta */
    margin-bottom: 0;
}

/* Fix UI notificaciones: evitar solapamiento de la "x" de cierre */
.alert.alert-dismissible {
    padding-right: 3rem; /* espacio para el botón de cierre */
    position: relative;  /* referencia para posicionar .btn-close */
}
.alert.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
}
/* Opcional: limitar ancho de notificaciones flotantes */
.alert.position-fixed {
    max-width: 480px;
}

/* Estilos de la consola */
.consola-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Estilos del fichaje */
.fichaje-card {
    text-align: center;
    padding: 2rem;
}

.fichaje-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.fichaje-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.fichaje-button:hover {
    transform: scale(1.05);
}

.fichaje-button i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Estilos del toggle-password */
.toggle-password {
    width: 3rem;
    background-color: #f2f2f2;
    text-align: center;
    padding: 0;
    border-color: #CED4DA;
}

.toggle-password:hover, .toggle-password:focus, .toggle-password:active {
    background-color: #fafafa !important;
    border-color: #CED4DA;
}

.toggle-password i {
    width: 2em;
    color: #6c7175;
    text-align: center;
    display: inline-block;
}

/* Estilos del cuadrante */
#calendar {
    width: 100%;
    margin: 40px auto;
}
.fc-timeline-slot-frame a {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
}
.fc-timeline-header-row {
    background-color: #2c3e50 !important;
}
.fc-event {
    cursor: pointer;
}

/* Estilos de los informes */
.report-filters {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Estilos responsive */
@media (max-width: 768px) {
    .consola-stats {
        flex-direction: column;
    }
    
    .fichaje-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .fichaje-button {
        width: 100px;
        height: 100px;
    }
    
    .fichaje-button i {
        font-size: 1.5rem;
    }
}

/* Estilos para el modo mantenimiento */
.maintenance-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.maintenance-card {
    max-width: 500px;
    text-align: center;
    padding: 2rem;
}

.maintenance-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

/* Estilos para el modal de confirmación */
.confirmation-modal .modal-content {
    border-radius: 10px;
}

.confirmation-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
}

.confirmation-modal .modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Estilos para las notificaciones */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Estilos para los gráficos */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Estilos para la página de login */
.login-container {
    margin-top: 5rem;
}

.login-card {
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
}

/* Estilos para la página de consentimiento */
.consent-container {
    margin-top: 2rem;
}

.consent-card {
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.consent-text {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Estilos para la página de fichaje */
.fichaje-status {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}


/* Estilos para la tabla de fichajes */
.fichaje-table .table th {
    background-color: #f8f9fa;
}

.fichaje-table .badge {
    font-size: 0.8rem;
}

/* Estilos para la página de perfil */
.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #dee2e6;
}

.profile-info {
    margin-top: 1rem;
}

.profile-info h3 {
    margin-bottom: 0.5rem;
}

/* Estilos para la página de configuración */
.config-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Estilos para la página de errores */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.error-card {
    max-width: 500px;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Estilos para la página de ayuda */
.help-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.help-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.help-section .accordion-button {
    font-weight: 500;
}

/* Estilos para la página de notificaciones */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: #f8f9fa;
}

.notification-item .notification-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Estilos para la página de informes */
.report-filters .row {
    margin-bottom: 1rem;
}

.report-filters .col-md-3 {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .report-filters .col-md-3 {
        margin-bottom: 0;
    }
}

/* Estilos para la página de usuarios */
.employee-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.employee-card:last-child {
    border-bottom: none;
}

.employee-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.employee-info {
    flex-grow: 1;
}

.employee-info h5 {
    margin-bottom: 0.25rem;
}

.employee-info p {
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.employee-actions {
    display: flex;
    gap: 0.5rem;
}

/* Estilos para la página de departamentos */
.department-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.department-card:last-child {
    border-bottom: none;
}

.department-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.department-info h5 {
    margin-bottom: 0;
}

.department-count {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Estilos para la página de horarios */
.schedule-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.schedule-card:last-child {
    border-bottom: none;
}

.schedule-info h5 {
    margin-bottom: 0.5rem;
}

.schedule-days {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.schedule-day {
    background-color: #e9ecef;
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.schedule-day.active {
}

/* Estilos para la página de ubicaciones */
.location-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.location-card:last-child {
    border-bottom: none;
}

.location-info h5 {
    margin-bottom: 0.5rem;
}

.location-map {
    height: 200px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6c757d;
}

/* Estilos para la página de festivos */
.holiday-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.holiday-card:last-child {
    border-bottom: none;
}

.holiday-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.holiday-info h5 {
    margin-bottom: 0;
}

.holiday-type {
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}


/* Estilos para la página de políticas de pausas */
.pause-policy-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.pause-policy-card:last-child {
    border-bottom: none;
}

.pause-policy-info h5 {
    margin-bottom: 0.5rem;
}

.pause-policy-details {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pause-policy-detail {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 0.5rem;
    flex-grow: 1;
    text-align: center;
}

.pause-policy-detail p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.pause-policy-detail strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

/* Estilos para la página de configuración de empresa */
.company-config-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.company-config-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Estilos para la página de métricas */
.metrics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    flex: 1;
    min-width: 250px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    padding: 1.5rem;
}

.metric-card h5 {
    margin-bottom: 1rem;
    color: #495057;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.metric-change {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


/* Estilos para la página de correcciones */
.correction-card {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.correction-card:last-child {
    border-bottom: none;
}

.correction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.correction-details {
    flex-grow: 1;
}

.correction-details h5 {
    margin-bottom: 0.25rem;
}

.correction-details p {
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.correction-notes {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.correction-date {
    color: #6c757d;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Estilos para el footer fijo en la parte inferior en escritorio */
@media (min-width: 992px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .container, .container-fluid {
        flex: 1;
    }
}

/* Estilos para el Chatbot Widget */
#chat-widget-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.2s ease-in-out;
}

#chat-widget-button:hover {
    transform: scale(1.1);
}

#chat-widget {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#chat-widget.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

#chat-widget-header {
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chat-widget {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#chat-widget-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    line-height: 1.4;
}

.chat-message p {
    margin: 0;
}

.chat-message.bot {
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-message.user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

#chat-widget-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#chat-widget-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
}

#chat-widget-send {
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 18px;
}