/* =============================================
   Modal
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    min-width: 300px;
}

.modal-small {
    width: 400px;
    max-width: 95vw;
}

.modal-large {
    width: 700px;
    max-width: 95vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0 0.25rem;
}

.btn-close:hover {
    color: #1e293b;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}

/* =============================================
   Botones de acción en tablas
   ============================================= */
.btn-accion {
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-accion-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-accion-primary:hover:not(:disabled) {
    background: #2563eb;
}

.btn-accion-danger {
    background: #dc2626;
    color: #fff;
}

.btn-accion-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-accion-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-accion-warning:hover:not(:disabled) {
    background: #d97706;
}

.btn-accion-success {
    background: #16a34a;
    color: #fff;
}

.btn-accion-success:hover:not(:disabled) {
    background: #15803d;
}

/* =============================================
   Tabla general
   ============================================= */
.tabla-gestor {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabla-gestor thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.tabla-gestor tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.tabla-gestor tbody tr:hover {
    background: #f8fafc;
}

/* =============================================
   Badges de estado
   ============================================= */
.badge-activo {
    background: #dcfce7;
    color: #16a34a;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

.badge-inactivo {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* =============================================
   Filtro / buscador
   ============================================= */
.buscador {
    max-width: 320px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
}

.buscador:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
