/* Estilos personalizados para el Sistema de Tickets - v1.2 FIXED */

/* Mejoras de espaciado y tipografía */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: 600;
}

/* Estilos para las cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

/* Mejoras para los badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Estilos para las tablas */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Estilos específicos para tabla de tickets */
.ticket-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.ticket-table th,
.ticket-table td {
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Excepción para la columna de título - permitir texto completo */
.ticket-table td.col-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
}

.ticket-table td.col-title a {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline !important;
    max-width: none !important;
    width: auto !important;
}

.ticket-table td.col-title * {
    white-space: normal !important;
}

/* Asegurar que todos los elementos de texto estén en una línea (excepto col-title) */
.ticket-table td:not(.col-title) * {
    white-space: nowrap !important;
}

/* Excepción para badges que pueden ser múltiples */
.ticket-table td .badge {
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Estilos para el login */
.login-card {
    border: none;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

/* Animaciones sutiles */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Estilos para alertas */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Mejoras para formularios */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Estilos para el dashboard - Diseño minimalista */
.dashboard-stat-card {
    border-left: 4px solid #212529;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
    border-color: #212529;
}

/* Estilos para enlaces de estadísticas */
a .dashboard-stat-card {
    color: inherit;
}

a:hover .dashboard-stat-card {
    color: inherit;
    text-decoration: none;
}

/* Asegurar que el texto sea visible en hover */
a:hover .dashboard-stat-card * {
    color: inherit !important;
}

/* Indicador visual de que es clickeable */
.dashboard-stat-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.dashboard-stat-card:hover::after {
    opacity: 1;
}

.dashboard-stat-card {
    position: relative;
}

/* Tarjetas minimalistas con diferentes intensidades de gris */
.dashboard-stat-card.card-dark {
    background-color: #ffffff;
    color: #212529;
    border-left-color: #212529;
    border: 1px solid #dee2e6;
}

.dashboard-stat-card.card-dark:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.dashboard-stat-card.card-secondary {
    background-color: #ffffff;
    color: #212529;
    border-left-color: #6c757d;
    border: 1px solid #dee2e6;
}

.dashboard-stat-card.card-secondary:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.dashboard-stat-card.card-light {
    background-color: #f8f9fa;
    color: #212529;
    border-left-color: #212529;
}

.dashboard-stat-card.card-light:hover {
    background-color: #e9ecef;
    color: #212529;
}

.dashboard-stat-card.card-white {
    background-color: #ffffff;
    color: #212529;
    border-left-color: #495057;
    border: 1px solid #dee2e6;
}

.dashboard-stat-card.card-white:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Asegurar que los enlaces mantengan el color correcto en hover */
a .dashboard-stat-card.card-dark,
a:hover .dashboard-stat-card.card-dark,
a:focus .dashboard-stat-card.card-dark {
    color: #495057 !important;
    text-decoration: none;
}

a .dashboard-stat-card.card-secondary,
a:hover .dashboard-stat-card.card-secondary,
a:focus .dashboard-stat-card.card-secondary {
    color: #495057 !important;
    text-decoration: none;
}

a .dashboard-stat-card.card-light,
a:hover .dashboard-stat-card.card-light,
a:focus .dashboard-stat-card.card-light {
    color: #495057 !important;
    text-decoration: none;
}

a .dashboard-stat-card.card-white,
a:hover .dashboard-stat-card.card-white,
a:focus .dashboard-stat-card.card-white {
    color: #495057 !important;
    text-decoration: none;
}

/* Estilos para el control de horario */
.time-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.time-status-working {
    animation: pulse-green 2s infinite;
}

/* Navbar working status */
.navbar-brand .badge {
    font-size: 0.6rem;
    font-weight: 500;
    animation: pulse-green-soft 3s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

@keyframes pulse-green-soft {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Estilos para paginación */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Estilos para el navbar activo */
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Mejoras para dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

/* Estilos para filtros responsivos */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .filter-buttons {
        justify-content: flex-start;
    }
    
    .filter-buttons .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .filter-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

footer p {
    margin-bottom: 0.5rem;
}

footer .text-muted {
    color: #6c757d !important;
}

footer .small {
    font-size: 0.875rem;
}

/* ==========================================
   USER MANAGEMENT TABLE STYLES
   ========================================== */
.table th:nth-child(6),
.table th:nth-child(7),
.table th:nth-child(8),
.table th:nth-child(9) {
    min-width: 70px;
    font-size: 0.875rem;
}

.table td:nth-child(6),
.table td:nth-child(7),
.table td:nth-child(8),
.table td:nth-child(9) {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments for hours columns */
@media (max-width: 1200px) {
    .table th:nth-child(6),
    .table th:nth-child(7),
    .table th:nth-child(8),
    .table th:nth-child(9) {
        font-size: 0.8rem;
        min-width: 60px;
    }
    
    .table td:nth-child(6),
    .table td:nth-child(7),
    .table td:nth-child(8),
    .table td:nth-child(9) {
        font-size: 0.8rem;
    }
}

/* ==========================================
   NAVBAR TIME CONTROL BUTTONS
   ========================================== */
.navbar .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

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

/* Adjustments for mobile */
@media (max-width: 768px) {
    .navbar .btn-sm {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    .navbar .btn-sm i {
        margin-right: 0.25rem;
    }
}

/* ==========================================
   ENLACES CON COLOR GRIS OSCURO
   ========================================== */

/* Enlaces en el dashboard - color gris oscuro */
.dashboard-stat-card a,
.dashboard-stat-card a:hover,
.dashboard-stat-card a:focus,
.dashboard-stat-card a:visited {
    color: #495057 !important;
    text-decoration: none;
}

/* Enlaces en la tabla de tickets - color gris oscuro */
.table a,
.table a:hover,
.table a:focus,
.table a:visited {
    color: #495057 !important;
    text-decoration: none;
}

/* Enlaces generales del dashboard - color gris oscuro */
.card-body a.text-decoration-none,
.card-body a.text-decoration-none:hover,
.card-body a.text-decoration-none:focus,
.card-body a.text-decoration-none:visited {
    color: #495057 !important;
}

/* Asegurar que los enlaces en tarjetas mantengan el color gris oscuro */
a .dashboard-stat-card.card-dark,
a:hover .dashboard-stat-card.card-dark,
a:focus .dashboard-stat-card.card-dark,
a .dashboard-stat-card.card-secondary,
a:hover .dashboard-stat-card.card-secondary,
a:focus .dashboard-stat-card.card-secondary,
a .dashboard-stat-card.card-light,
a:hover .dashboard-stat-card.card-light,
a:focus .dashboard-stat-card.card-light,
a .dashboard-stat-card.card-white,
a:hover .dashboard-stat-card.card-white,
a:focus .dashboard-stat-card.card-white {
    color: #495057 !important;
    text-decoration: none;
}

/* Enlaces de botones "Ver todos" - gris oscuro */
.btn-outline-primary.text-decoration-none,
.btn-outline-primary.text-decoration-none:hover {
    color: #495057 !important;
    border-color: #495057 !important;
}

.btn-outline-primary.text-decoration-none:hover {
    background-color: #495057 !important;
    color: white !important;
}

/* ==================== TAG WIDGET STYLES ==================== */

#tags-container {
    position: relative;
}

#selected-tags .badge {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

#selected-tags .badge:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

#selected-tags .badge i {
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

#tag-search {
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out;
}

#tag-search:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background-color: white;
    margin-top: 2px;
}

#tag-dropdown .dropdown-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#tag-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

#tag-dropdown .dropdown-item .badge {
    font-size: 0.85rem;
    padding: 4px 8px;
}

#tag-dropdown .dropdown-divider {
    margin: 0.5rem 0;
}

/* Tag creation modal styles */
#createTagModal .form-control-color {
    height: 40px;
}

#createTagModal #color-preview {
    transition: background-color 0.15s ease;
}


/* ===== Tema CAT6 (azul corporativo) ===== */
:root{
  --cat6-primary:#1B54C0; --cat6-primary-rgb:27,84,192;
  --cat6-primary-hover:#154299; --cat6-dark:#0E2348;
  --cat6-accent:#2E97FF; --cat6-light-bg:#F4F7FB;
  --bs-primary:var(--cat6-primary); --bs-primary-rgb:var(--cat6-primary-rgb);
  --bs-link-color:var(--cat6-primary); --bs-link-hover-color:var(--cat6-primary-hover);
}
.btn-primary{--bs-btn-bg:var(--cat6-primary);--bs-btn-border-color:var(--cat6-primary);--bs-btn-hover-bg:var(--cat6-primary-hover);--bs-btn-hover-border-color:var(--cat6-primary-hover);--bs-btn-active-bg:var(--cat6-primary-hover);--bs-btn-active-border-color:var(--cat6-primary-hover);--bs-btn-disabled-bg:var(--cat6-primary);--bs-btn-disabled-border-color:var(--cat6-primary);}
.btn-outline-primary{--bs-btn-color:var(--cat6-primary);--bs-btn-border-color:var(--cat6-primary);--bs-btn-hover-bg:var(--cat6-primary);--bs-btn-hover-border-color:var(--cat6-primary);}
.bg-primary{background-color:var(--cat6-primary)!important;}
.text-primary{color:var(--cat6-primary)!important;}
.border-primary{border-color:var(--cat6-primary)!important;}
.badge.bg-primary,.badge.text-bg-primary{background-color:var(--cat6-primary)!important;}
.navbar.bg-dark,.navbar.bg-primary,.navbar-dark{background-color:var(--cat6-dark)!important;}
.pagination .page-item.active .page-link{background-color:var(--cat6-primary);border-color:var(--cat6-primary);}
.form-control:focus,.form-select:focus{border-color:var(--cat6-accent);box-shadow:0 0 0 .25rem rgba(var(--cat6-primary-rgb),.25);}
.table-hover tbody tr:hover{background-color:rgba(var(--cat6-primary-rgb),.06);}
.progress-bar{background-color:var(--cat6-primary);}
.list-group-item.active,.nav-pills .nav-link.active{background-color:var(--cat6-primary);border-color:var(--cat6-primary);}
a{--bs-link-color-rgb:var(--cat6-primary-rgb);}

