body {
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
}

/* --- Contenido Principal --- */
main {
    margin-top: 71px;
    padding: 2rem;
    min-height: calc(100vh - 71px);
    transition: margin-left 0.3s ease-in-out;
    margin-left: 0;
}

main.active {
    margin-left: 230px;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--color-accent);
}

.dataTables_wrapper {
    --bs-table-striped-bg: rgba(17, 26, 44, 0.5);
    --bs-table-color: var(--text-light);
    --bs-table-border-color: var(--border-color);
}

/* Campo de prioridad deshabilitado en edición */
#editTaskPriority:disabled {
    background-color: var(--bs-secondary-bg);
    opacity: 0.6;
    cursor: not-allowed;
}

#editTaskPriority + .form-text {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Estilos para el drag and drop de la tabla tareas */
#tasksTable tbody tr.dt-rowReorder-moving {
    background: linear-gradient(90deg, var(--reorder-accent-bg), rgba(255, 209, 102, 0.12));
    outline: 2px solid var(--reorder-accent-ring);
    outline-offset: -2px;
    box-shadow: var(--reorder-shadow);
    opacity: 0.98;
}

#tasksTable tbody tr.dt-rowReorder-moving td {
    color: var(--text-light);
}

#tasksTable tbody tr.dt-rowReorder-moving-guideline {
    position: relative;
    background: transparent !important;
}

#tasksTable tbody td.reorder {
    color: var(--reorder-accent);
    cursor: grab;
    user-select: none;
    position: relative;
}

#tasksTable tbody td.reorder::before {
    content: "⋮⋮";
    font-weight: 700;
    opacity: 0.9;
    margin-right: .25rem;
}

#tasksTable tbody td.reorder:active {
    cursor: grabbing;
    color: var(--reorder-accent);
    text-shadow: 0 0 8px var(--reorder-accent);
}

#tasksTable tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* --- Estilo responsive --- */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        transform: translateX(-100%);
    }
}