/* GitLab Reporter - Estilos personalizados */

/* Variables CSS */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;

    --sidebar-width: 250px;
    --transition-speed: 0.3s;
}

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

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Navbar personalizada */
.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-title {
    color: var(--dark-color);
    font-weight: 600;
}

/* Botones */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d39e00);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #117a8b);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
}

/* Estadísticas cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border: none;
    position: relative;
    overflow: hidden;
}

.card.bg-primary::before,
.card.bg-success::before,
.card.bg-warning::before,
.card.bg-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.card-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.card h2 {
    font-weight: 700;
    font-size: 2.5rem;
    margin: 0;
    line-height: 1;
}

/* Chart containers */
canvas {
    max-height: 300px !important;
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 0.25rem;
    transition: width 0.6s ease;
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Utilidades */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.border-radius-custom {
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card h2 {
        font-size: 2rem;
    }

    .btn {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .card h2 {
        font-size: 1.75rem;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #484848ab;
        color: #e9ecef;
    }

    .card {
        /*background-color: #2d3748;
        color: #e9ecef;*/
    }

    .table {
        color: #e9ecef;
    }

    .table thead th {
        background-color: #1a202c;
    }

    .table tbody tr:hover {
        background-color: #4a5568;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

/* Estados de conexión */
.connection-status {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    min-width: 250px;
}

.connection-status.connected {
    border-left: 4px solid var(--success-color);
}

.connection-status.disconnected {
    border-left: 4px solid var(--danger-color);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===================================
   ESTILOS PARA PÁGINA DE ASIGNACIONES
   =================================== */
/* Tabla de asignaciones */
.assignments-page {
    background-color: #f8f9fa;
}

.assignments-table {
    font-size: 0.9rem;
}

.assignments-table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.assignments-table tbody tr {
    transition: all 0.2s ease;
}

.assignments-table tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Estados de asignación */
.assignment-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

.status-backlog {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-todo {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.status-in-progress {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffb74d;
}

.status-in_progress {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffb74d;
}

.status-in-review {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.status-in_review {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.status-done {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

/* Prioridades */
.priority-high {
    color: #dc3545;
    font-weight: bold;
}

.priority-high i {
    color: #dc3545;
}

.priority-medium {
    color: #fd7e14;
    font-weight: bold;
}

.priority-medium i {
    color: #fd7e14;
}

.priority-low {
    color: #28a745;
}

.priority-low i {
    color: #28a745;
}

/* Sección de filtros */
.filter-section {
    background-color: #ffffff;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.filter-section label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.filter-section .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.filter-section .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

/* Avatar de asignado */
.assignee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tarjetas de estadísticas */
.stats-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card h5 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card p {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0;
}

/* Barra de progreso personalizada */
.progress {
    height: 22px;
    border-radius: 0.375rem;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 0.375rem;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* Badges personalizados */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
}

/* Modal personalizado */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #212529;
}

/* Animaciones adicionales */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive para asignaciones */
@media (max-width: 992px) {
    .assignments-table {
        font-size: 0.8rem;
    }

    .assignee-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .assignment-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        min-width: 80px;
    }
}

@media (max-width: 768px) {
    .filter-section {
        padding: 1rem;
    }

    .filter-section .col-md-1 {
        margin-top: 1rem;
    }

    .stats-card h5 {
        font-size: 1.5rem;
    }

    .assignments-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {

    .assignments-table th,
    .assignments-table td {
        padding: 0.5rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tooltips personalizados */
.tooltip-inner {
    background-color: #212529;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.tooltip .arrow::before {
    border-top-color: #212529;
}