/* ============================================
   ESTILOS GENERALES — Evaluación Training
   ============================================ */

/* ---- VARIABLES DE COLOR ---- */
:root {
    --sidebar-width: 240px;
    --color-primario: #667eea;
    --color-sidebar:  #1e293b;
}

/* ---- LOGIN ---- */
.bg-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.card {
    border-radius: 16px !important;
}

/* ---- NAVBAR ---- */
.navbar-brand {
    font-weight: 600;
    font-size: 1rem;
}

/* ---- SIDEBAR ---- */
.sidebar {
    min-height: 100vh;
    background: var(--color-sidebar);
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}

.sidebar-brand h6 {
    color: #fff;
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

/* Ícono cuadrado en la marca del sidebar */
.sidebar-icon-box {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    border-radius: 8px;
    margin: 2px 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar .nav-link i {
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}

/* Línea divisora dentro del sidebar */
.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 8px 12px;
}

/* Botón cerrar sesión pegado al fondo */
.sidebar-logout {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.text-danger-soft { color: #f87171 !important; }
.text-danger-soft:hover {
    color: #ef4444 !important;
    background: rgba(239,68,68,0.1) !important;
}

/* ---- CONTENIDO PRINCIPAL ---- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-content {
    padding: 24px;
    flex: 1;
}

/* ---- TARJETAS DE ESTADÍSTICAS ---- */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* ---- BADGES DE ESTADO ---- */
.badge-activo {
    background: #dcfce7;
    color: #166534;
    font-weight: 500;
}

.badge-retirado {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 500;
}

.badge-aprobar {
    background: #dcfce7;
    color: #166534;
}

.badge-noaprobar {
    background: #fee2e2;
    color: #991b1b;
}

.badge-supervisado{
    background:#2563eb;
    color:#fff;
}

/* ---- TABLA ---- */
.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ---- FOTO / INICIALES DEL AGENTE ---- */
.foto-agente {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.foto-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---- CAMPOS DE NOTA / CALIFICACIÓN ---- */
.nota-campo {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.nota-campo label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.nota-campo input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    background: #fff;
}

.nota-campo input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* ---- RESPONSIVE — MÓVIL ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    /* Clase que agrega JS al abrir el menú */
    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }
}

/* Fondo oscuro detrás del sidebar en móvil */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Badge En Mesa */
.badge-mesa {
    background: #ede9fe;
    color: #6d28d9;
    font-weight: 500;
}
/* ============================================
   SUBMENÚ DROPDOWN (Calificar)
   ============================================ */

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -2px;
    display: none;
    border-radius: 10px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a::after {
    content: "\F285";
    font-family: bootstrap-icons;
    float: right;
    font-size: 12px;
    margin-top: 3px;
    color: #6c757d;
}