/* estilos.css — Estilos propios de Domus (sobre Bootstrap 5) */

:root {
    --domus-primario: #0d6efd;
    --domus-oscuro: #212529;
    --domus-sidebar-ancho: 240px;
}

html, body {
    min-height: 100vh;
}
body {
    display: flex;
    flex-direction: column;
    background-color: #f5f6fa;
}

/* ── Layout privado: sidebar + contenido ── */
.domus-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.domus-sidebar {
    width: var(--domus-sidebar-ancho);
    min-width: var(--domus-sidebar-ancho);
    min-height: calc(100vh - 56px);
}
.domus-sidebar .nav-link {
    border-radius: .375rem;
    margin-bottom: .15rem;
}
.domus-sidebar .nav-link:hover,
.domus-sidebar .nav-link.activo {
    background-color: rgba(255, 255, 255, .12);
}

.domus-contenido {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

.domus-footer {
    border-top: 1px solid #e3e6ea;
    background: #fff;
}

/* ── Kanban CRM ── */
.kanban-board {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    align-items: flex-start;
}
.kanban-col {
    flex: 0 0 260px;
    background: #eef0f4;
    border-radius: .5rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 230px);
}
.kanban-col-head {
    padding: .5rem .75rem;
    font-weight: 600;
    font-size: .85rem;
    text-transform: capitalize;
    position: sticky;
    top: 0;
}
.kanban-col-body {
    padding: .5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 60px;
}
.kanban-card {
    background: #fff;
    border-radius: .4rem;
    padding: .55rem .65rem;
    margin-bottom: .5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    cursor: grab;
    border-left: 3px solid var(--domus-primario);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card .titulo { font-weight: 600; font-size: .9rem; }
.kanban-card .meta { font-size: .75rem; color: #6c757d; }
.kanban-ghost { opacity: .4; }

/* Timeline de interacciones */
.timeline-crm { max-height: 340px; overflow-y: auto; }
.timeline-crm .item {
    border-left: 2px solid #dee2e6;
    padding: 0 0 .75rem .75rem;
    position: relative;
}
.timeline-crm .item::before {
    content: '';
    position: absolute;
    left: -5px; top: .25rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--domus-primario);
}

/* ── Responsivo: sidebar colapsable ── */
@media (max-width: 991.98px) {
    .domus-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        z-index: 1030;
        transform: translateX(-100%);
        transition: transform .2s ease-in-out;
    }
    .domus-sidebar.abierto {
        transform: translateX(0);
    }
}
