/* ============================================================================
   ChatPlus · Estilos de los ABM (Usuarios, Perfiles, Tareas, Inicio)
   Unifica los estilos que en Nexa se repetían en cada vista.
   ============================================================================ */

.abm-container { max-width: 1400px; margin: 0 auto; }
.abm-container--narrow { max-width: 860px; margin: 0 auto; }

/* Encabezado con gradiente */
.header-card {
    background: var(--cp-hero-bg);
    color: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
}
.header-card--danger {
    background:
        radial-gradient(ellipse at 85% 0%, rgba(var(--bs-danger-rgb), .35), transparent 55%),
        linear-gradient(135deg, var(--cp-night) 0%, var(--cp-night-2) 100%);
}
.header-card h1 { margin: 0 0 .5rem 0; font-size: 1.75rem; font-weight: 600; }
.header-card .subtitle { opacity: .9; font-size: 1rem; }

/* Estadísticas */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    text-align: center;
}
.stat-card .stat-number { font-size: 2rem; font-weight: 600; color: #0a7c93; margin-bottom: .5rem; }
.stat-card .stat-label { color: #6c757d; font-size: .9rem; }

/* Barra de búsqueda */
.search-filter-bar {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}

/* Tarjetas de la grilla */
.abm-card {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.abm-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .1); transform: translateY(-2px); }
.abm-card .abm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}
.abm-card .abm-avatar {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: var(--cp-hero-bg);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.25rem; font-weight: 600;
    margin-right: 1rem; flex-shrink: 0;
}
.abm-card .abm-avatar--round { border-radius: 50%; }
.abm-card .abm-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 .25rem 0; word-break: break-word; }
.abm-card .abm-subtitle { color: #6c757d; font-size: .9rem; }
.abm-card .abm-card-body { flex: 1; }
.abm-card .info-row { display: flex; align-items: center; margin-bottom: .5rem; font-size: .9rem; }
.abm-card .info-row i { color: #0a7c93; width: 20px; margin-right: .5rem; }
.abm-card .actions {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f8f9fa;
}

.controller-badge {
    background: rgba(var(--cp-cyan-rgb), .12);
    color: var(--bs-primary);
    padding: .25rem .75rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
}
.task-code { color: #6c757d; font-family: var(--bs-font-monospace, monospace); font-size: .875rem; }

.empty-state { text-align: center; padding: 4rem 2rem; color: #6c757d; }
.empty-state i { font-size: 4rem; margin-bottom: 1rem; opacity: .3; }

/* Formularios Register */
.form-section {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}
.form-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #e9ecef;
}
.form-section h5 i { color: #0a7c93; margin-right: .5rem; }
.form-section .form-label { font-weight: 500; color: #495057; margin-bottom: .5rem; }
.form-label .required { color: #dc3545; margin-left: .25rem; }
.switch-container { background: #f8f9fa; padding: 1rem; border-radius: 8px; border: 1px solid #e9ecef; }
.switch-container .form-check-label { font-weight: 500; color: #495057; }
.form-check-input:checked { background-color: #0a7c93; border-color: #0a7c93; }
.action-buttons { display: flex; gap: 1rem; justify-content: flex-end; padding-top: 1rem; }
.action-buttons .btn { min-width: 130px; }
.info-text { font-size: .875rem; color: #6c757d; margin-top: .25rem; }

/* Tabla de asignación de tareas */
.tasks-table-container {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}
.tasks-table { margin-bottom: 0; }
.tasks-table thead th { border-bottom: 2px solid #dee2e6; color: #495057; font-weight: 600; padding: 1rem; }
.tasks-table tbody td { vertical-align: middle; padding: 1rem; }
.tasks-table .form-check-input { width: 1.5rem; height: 1.5rem; cursor: pointer; }

/* Tarjetas de acceso del Inicio */
.home-card {
    border: 1px solid var(--bs-border-color, #e5e7eb);
    border-radius: 12px;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    background: var(--bs-body-bg, #fff);
    padding: 1.5rem;
}
.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(10, 124, 147, .14);
    border-color: #0a7c93;
    color: inherit;
}
.home-card .home-icon {
    width: 50px; height: 50px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1rem;
    background: rgba(10, 124, 147, .1); color: #0a7c93;
}
.home-card h5 { font-weight: 600; margin-bottom: .5rem; }
.home-card p { color: #6b7280; font-size: .9rem; margin-bottom: 0; }
