/* CSS COMPLETO PARA SISTEMA DE GESTIÓN DE CUENTAS FACEBOOK */
/* Incluye todos los estilos base + nuevos estilos de calidad */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* SECCIÓN DE LOGIN */
.login-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab:hover {
    color: #007bff;
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.btn.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* CONTENIDO PRINCIPAL */
.main-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.main-content.active {
    display: block;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ESTADÍSTICAS MEJORADAS CON CALIDAD */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #495057;
    font-weight: 700;
}

.stat-card p {
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos específicos para tarjetas de calidad */
.stat-card.quality-stats {
    border-left: 4px solid #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-card.quality-stats:nth-child(5) {
    border-left-color: #28a745; /* Verde para excelentes */
}

.stat-card.quality-stats:nth-child(6) {
    border-left-color: #ffc107; /* Amarillo para regulares */
}

.stat-card.quality-stats:nth-child(7) {
    border-left-color: #dc3545; /* Rojo para problemáticas */
}

.stat-card.quality-stats:nth-child(8) {
    border-left-color: #007bff; /* Azul para total usos */
}

/* FORMULARIOS */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    align-items: end;
}

/* USUARIOS */
.users-section {
    margin: 30px 0;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* TABLA DE CUENTAS MEJORADA */
.accounts-table {
    margin-top: 30px;
    overflow-x: auto;
}

.table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.accounts-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.accounts-table table th {
    background: #343a40;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.accounts-table table td {
    text-align: center;
    vertical-align: middle;
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
}

.accounts-table table td:first-child,
.accounts-table table td:nth-child(2) {
    text-align: left; /* Nombre y email alineados a la izquierda */
}

.accounts-table table tr:hover {
    background: #f8f9fa;
}

/* Columna de calidad */
.accounts-table table td:nth-child(7) {
    min-width: 100px;
    font-size: 13px;
}

/* PANEL DE USUARIO */
.user-card {
    position: relative;
}

.assigned-accounts {
    margin-top: 30px;
}

/* LOADING */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 18px;
    font-weight: 600;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .login-section,
    .main-content {
        padding: 20px;
    }
    
    .logout-btn {
        position: static;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card h3 {
        font-size: 1.8em;
    }
    
    .stat-card p {
        font-size: 11px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .accounts-table {
        font-size: 12px;
    }
    
    .accounts-table table th,
    .accounts-table table td {
        padding: 8px 4px;
    }
    
    /* Ocultar columna de calidad en móvil para ahorrar espacio */
    .accounts-table table th:nth-child(7),
    .accounts-table table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .btn {
        padding: 15px 20px;
        font-size: 18px;
    }
}

/* ANIMACIONES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content.active {
    animation: fadeIn 0.5s ease;
}

/* UTILIDADES */
.text-center {
    text-align: center;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

.text-info {
    color: #17a2b8;
}

.bg-success {
    background-color: #d4edda;
    color: #155724;
}

.bg-warning {
    background-color: #fff3cd;
    color: #856404;
}

.bg-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.bg-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ESTILOS PARA MODAL DE CALIFICACIÓN */
.calificacion-option:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.calificacion-option.selected {
    border-width: 4px !important;
    transform: scale(1.02);
}

/* INDICADORES DE CALIDAD */
.quality-indicator {
    display: inline-block;
    margin: 2px;
    font-size: 14px;
}

.quality-summary {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* MEJORAS PARA CUENTAS DE USUARIO */
.user-account-card {
    transition: all 0.3s ease;
}

.user-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* ESTILOS PARA BOTONES DE ACCIÓN */
.action-btn {
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    margin: 2px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.action-btn.btn-warning {
    background: #f39c12;
    color: white;
}

.action-btn.btn-danger {
    background: #e74c3c;
    color: white;
}

.action-btn.btn-info {
    background: #17a2b8;
    color: white;
}

/* ESTILOS ESPECÍFICOS PARA ESTADOS */
.estado-disponible {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
}

.estado-calentamiento {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
}

.estado-descanso {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
}

.estado-sin-usar {
    background: #e2e3e5;
    color: #383d41;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
}

/* MEJORAS PARA TARJETAS DE USUARIO */
.user-info-card {
    background: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.user-info-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.1);
}

/* ESTILOS PARA HISTORIAL DE CALIDAD */
.quality-history {
    background: #e3f2fd;
    color: #0c5460;
    padding: 8px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 12px;
    border-left: 4px solid #007bff;
}

.quality-history strong {
    display: block;
    margin-bottom: 4px;
}

/* SCROLL PERSONALIZADO */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* MEJORAS ADICIONALES */
.highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

/* EFECTOS VISUALES ADICIONALES */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 1rem;
}

/* ESTADOS HOVER MEJORADOS */
.btn:active {
    transform: translateY(0);
}

.stat-card:active {
    transform: translateY(0);
}

/* ESTILOS PARA MENSAJES DE ESTADO */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* ESTILOS ADICIONALES PARA INDICADOR DE HORA COLOMBIA */
#horaColombiaIndicador {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    text-align: center;
    min-width: 200px;
    transition: all 0.3s ease;
}

#horaColombiaIndicador:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Responsive para móvil */
@media (max-width: 768px) {
    #horaColombiaIndicador {
        position: relative;
        top: 0;
        right: 0;
        margin: 10px auto 20px auto;
        display: block;
        width: fit-content;
        min-width: 250px;
        font-size: 11px;
    }
}