/* assets/css/style.css */

/* Fuentes */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Color de fondo general */
}

/* Colores primarios */
:root {
    --primary-color: #007bff; /* Azul vibrante */
    --primary-light: #66b2ff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d; /* Gris */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
}

.primary-text {
    color: var(--primary-color) !important;
}

.primary-text-link {
    color: var(--primary-color) !important;
    font-weight: 600;
}
.primary-text-link:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light)) !important;
}

/* Estilos para cards y formularios */
.auth-card {
    max-width: 450px;
    width: 100%;
    border-radius: 1.5rem !important; /* Bordes más redondeados */
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.register-card {
    max-width: 900px; /* Más ancho para el formulario de registro */
}


.form-control.rounded-pill,
.form-select.rounded-pill {
    border-radius: 50rem !important; /* Botones y campos de texto completamente redondeados */
    padding: 0.75rem 1.25rem;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control.rounded-pill:focus,
.form-select.rounded-pill:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.form-control.rounded-lg,
.form-select.rounded-lg {
    border-radius: 0.75rem !important; /* Bordes más redondeados para textareas etc. */
    padding: 0.75rem 1.25rem;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control.rounded-lg:focus,
.form-select.rounded-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}


.btn-primary.rounded-pill,
.btn-success.rounded-pill,
.btn-info.rounded-pill,
.btn-secondary.rounded-pill {
    border-radius: 50rem !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary.rounded-pill {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
}
.btn-primary.rounded-pill:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-success.rounded-pill {
    background-color: var(--success-color);
    color: white;
}
.btn-success.rounded-pill:hover {
    background-color: darken(var(--success-color), 10%);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-info.rounded-pill {
    background-color: var(--info-color);
    color: white;
}
.btn-info.rounded-pill:hover {
    background-color: darken(var(--info-color), 10%);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-secondary.rounded-pill {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary.rounded-pill:hover {
    background-color: darken(var(--secondary-color), 10%);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-warning.rounded-pill {
    background-color: var(--warning-color);
    color: white;
}
.btn-warning.rounded-pill:hover {
    background-color: darken(var(--warning-color), 10%);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}


/* General layout for sidebar and content */
#wrapper {
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin 0.25s ease-out;
    background-color: var(--dark-color) !important;
    color: white;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

#sidebar-wrapper .list-group-item {
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    background-color: transparent;
    border: none;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }
    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* Navbar styles */
.navbar {
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar .nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dashboard cards */
.dashboard-card {
    padding: 20px;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card .fs-2 {
    color: var(--primary-color);
}

.dashboard-card .dashboard-btn {
    margin-top: 15px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 50rem;
    transition: all 0.3s ease;
}

/* Table styles */
.table {
    border-collapse: separate;
    border-spacing: 0 10px; /* Espacio entre filas */
}

.table th, .table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: none; /* Eliminar bordes superiores de filas */
    border-bottom: 1px solid #e9ecef; /* Solo bordes inferiores */
}

.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.table tbody tr {
    background-color: white;
    border-radius: 0.75rem; /* Bordes redondeados para filas */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table tbody tr:first-child {
    border-top: none; /* No top border for the first row */
}

.table tbody tr td:first-child {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

.table tbody tr td:last-child {
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 50rem;
    font-weight: 600;
    font-size: 0.8em;
}

/* Modals */
.modal-content {
    border-radius: 1rem !important;
    overflow: hidden; /* Ensure rounded corners apply to header/footer */
}

.modal-header.bg-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light)) !important;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.btn-close-white {
    filter: invert(1);
}

.modal-footer {
    border-top: none;
    padding: 1rem 1.5rem;
}

/* Timeline for credit tracking */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #e9ecef;
    margin-left: -1px;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: "";
    display: table;
}
.timeline-item::after {
    content: "";
    display: table;
    clear: both;
}

.timeline-badge {
    color: #fff;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.2em;
    text-align: center;
    position: absolute;
    top: 16px;
    left: 50%;
    margin-left: -25px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 100;
    box-shadow: 0 0 0 5px rgba(0, 123, 255, 0.2);
}

.timeline-panel {
    width: 45%;
    float: left;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.timeline-panel::before {
    content: '';
    position: absolute;
    top: 26px;
    right: -14px;
    border-top: 14px solid transparent;
    border-left: 14px solid #d4d4d4;
    border-bottom: 14px solid transparent;
    border-right: 0 solid #d4d4d4;
}

.timeline-panel::after {
    content: '';
    position: absolute;
    top: 27px;
    right: -13px;
    border-top: 13px solid transparent;
    border-left: 13px solid #fff;
    border-bottom: 13px solid transparent;
    border-right: 0 solid #fff;
}

.timeline-item:nth-child(even) .timeline-panel {
    float: right;
}

.timeline-item:nth-child(even) .timeline-panel::before {
    border-left-width: 0;
    border-right: 14px solid #d4d4d4;
    left: -14px;
    right: auto;
}

.timeline-item:nth-child(even) .timeline-panel::after {
    border-left-width: 0;
    border-right: 13px solid #fff;
    left: -13px;
    right: auto;
}

@media (max-width: 767px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-badge {
        left: 20px;
        margin-left: 0;
        top: 0;
        transform: translateX(-50%);
    }
    .timeline-panel {
        width: calc(100% - 70px);
        float: right;
        margin-left: 70px;
    }
    .timeline-panel::before {
        border-left-width: 0;
        border-right: 14px solid #d4d4d4;
        left: -14px;
        right: auto;
    }
    .timeline-panel::after {
        border-left-width: 0;
        border-right: 13px solid #fff;
        left: -13px;
        right: auto;
    }
}