/* ==========================================================
   Soy Emprendedor - Estilos
   ========================================================== */
:root {
    --marca: #4f46e5;
    --marca-oscuro: #3730a3;
    --fondo: #f4f5fb;
    --ancho-menu: 250px;
}

body {
    background: var(--fondo);
    font-size: .95rem;
}

.bg-marca { background: linear-gradient(180deg, var(--marca) 0%, var(--marca-oscuro) 100%) !important; }
.text-marca { color: var(--marca) !important; }
.btn-primary { --bs-btn-bg: var(--marca); --bs-btn-border-color: var(--marca); --bs-btn-hover-bg: var(--marca-oscuro); --bs-btn-hover-border-color: var(--marca-oscuro); --bs-btn-active-bg: var(--marca-oscuro); }
.btn-outline-primary { --bs-btn-color: var(--marca); --bs-btn-border-color: var(--marca); --bs-btn-hover-bg: var(--marca); --bs-btn-hover-border-color: var(--marca); --bs-btn-active-bg: var(--marca); --bs-btn-active-border-color: var(--marca); }
.nav-link { color: var(--marca); }
.nav-tabs .nav-link.active { color: #111827; }
a { color: var(--marca); }

/* ---------- Menú lateral ---------- */
.sidebar { width: var(--ancho-menu); }
@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex-shrink: 0;
        overflow-y: auto;
    }
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, .82);
    border-radius: .5rem;
    padding: .55rem .9rem;
    margin-bottom: 2px;
    display: flex;
    gap: .65rem;
    align-items: center;
}
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar .nav-link.active { background: #fff; color: var(--marca); font-weight: 600; }
.sidebar .nav-link.nav-sub { padding-left: 2.1rem; font-size: .88rem; }
.logo-circulo {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

.contenido { min-width: 0; padding-bottom: 80px; }
@media (min-width: 992px) { .contenido { padding-bottom: 0; } }

/* ---------- Navegación inferior móvil ---------- */
.nav-inferior {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
    display: flex; justify-content: space-around; align-items: center;
    background: #fff; border-top: 1px solid #e5e7eb;
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
}
.nav-inferior a {
    color: #6b7280; text-decoration: none; font-size: .7rem;
    display: flex; flex-direction: column; align-items: center; flex: 1;
}
.nav-inferior a i { font-size: 1.3rem; }
.nav-inferior a.active { color: var(--marca); }
.nav-inferior a.destacado {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
    background: var(--marca); color: #fff; justify-content: center;
    margin-top: -24px; box-shadow: 0 4px 12px rgba(79, 70, 229, .4);
}
.nav-inferior a.destacado i { font-size: 1.6rem; }

/* ---------- Tarjetas ---------- */
.card { border: 0; border-radius: .9rem; box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: transparent; border-bottom: 1px solid #eef0f4; font-weight: 600; }
.tarjeta-indicador .icono {
    width: 46px; height: 46px; border-radius: .75rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.tarjeta-indicador .valor { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }

.encabezado-pagina { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.encabezado-pagina h1 { font-size: 1.45rem; margin: 0; font-weight: 700; }

/* ---------- Tablas ---------- */
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; background: #fafbff; }
.table-hover tbody tr { cursor: default; }
.fila-enlace { cursor: pointer; }

/* Tablas que se transforman en tarjetas en móvil */
@media (max-width: 767.98px) {
    .tabla-responsiva thead { display: none; }
    .tabla-responsiva, .tabla-responsiva tbody, .tabla-responsiva tfoot, .tabla-responsiva tr, .tabla-responsiva td { display: block; width: 100%; }
    .tabla-responsiva tr { background: #fff; border-bottom: 1px solid #eef0f4; padding: .5rem .25rem; }
    .tabla-responsiva td { border: 0; padding: .2rem .75rem !important; text-align: left !important; }
    .tabla-responsiva td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600; color: #6b7280; font-size: .8rem;
    }
    .tabla-responsiva td.td-titulo { font-size: 1rem; font-weight: 600; }
    .tabla-responsiva td.td-acciones { padding-top: .5rem !important; }
    .tabla-responsiva td:empty { display: none; }
}

.punto-color { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- Formularios ---------- */
.form-label { font-weight: 500; font-size: .875rem; }
.linea-item { background: #fafbff; border: 1px solid #eef0f4; border-radius: .6rem; padding: .75rem; margin-bottom: .6rem; }
.resumen-total { font-size: 1.6rem; font-weight: 700; }
.sticky-resumen { position: sticky; top: 1rem; }
.lista-sugerencias { z-index: 30; max-height: 300px; overflow-y: auto; }
.tarjeta-editando { box-shadow: 0 0 0 2px var(--bs-warning); }
#tarjetaAnotar { scroll-margin-top: 4.5rem; } /* no quedar bajo la barra superior en el celular */

.bg-acceso { background: radial-gradient(circle at top left, #6366f1, #3730a3); }

.saldo-deuda { color: #dc2626; }
.saldo-favor { color: #16a34a; }

.texto-pequeno { font-size: .8rem; }
.min-w-0 { min-width: 0; }

@media print {
    .sidebar, .nav-inferior, .navbar, .no-imprimir { display: none !important; }
    .contenido { padding: 0 !important; }
    body { background: #fff; }
}

/* ---------- Repartos ---------- */
.numero-parada {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--marca); color: #fff; font-weight: 700;
}
.parada-entregada .accordion-button { background: #f0fdf4; }
.parada-entregada .accordion-button .fw-semibold { text-decoration: line-through; color: #6b7280; }
