/* LantAnalitic · estilos del panel (todas las vistas). Sobre Bootstrap 5.3. */

:root {
    --lt-sidebar-w: 240px;
    --lt-topbar-h: 60px;
    --lt-bg: #f4f6f9;
    --lt-sidebar-bg: #111827;
    --lt-sidebar-fg: #9ca3af;
    --lt-sidebar-active: #ffffff;
    --lt-accent: #4f46e5;
    --lt-border: #e5e7eb;
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
}

body { font-size: .925rem; }
.btn-primary { --bs-btn-bg: #4f46e5; --bs-btn-border-color: #4f46e5; --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca; --bs-btn-active-bg: #3730a3; }
.form-check-input:checked { background-color: var(--lt-accent); border-color: var(--lt-accent); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }

/* ---------- Estructura ---------- */
.lt-body { background: var(--lt-bg); min-height: 100vh; }
.lt-page { margin-left: var(--lt-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.lt-content { padding: 1.5rem; flex: 1; max-width: 1600px; width: 100%; }

.lt-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--lt-sidebar-w); z-index: 1040;
    background: var(--lt-sidebar-bg); color: var(--lt-sidebar-fg); overflow-y: auto;
    transition: transform .2s ease;
}
.lt-brand {
    display: flex; align-items: center; gap: .6rem; height: var(--lt-topbar-h); padding: 0 1.25rem;
    font-weight: 600; font-size: 1.05rem; color: #fff; text-decoration: none; letter-spacing: .01em;
}
.lt-brand:hover { color: #fff; }
.lt-logo {
    width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
    background: var(--lt-accent); color: #fff; font-size: 1rem;
}
.lt-nav { padding: .5rem .75rem 1.5rem; }
.lt-nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; padding: 1.25rem .75rem .5rem; }
.lt-nav-link {
    display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin-bottom: 2px;
    border-radius: 8px; color: var(--lt-sidebar-fg); text-decoration: none;
}
.lt-nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.lt-nav-link:hover { color: #e5e7eb; background: rgba(255, 255, 255, .05); }
.lt-nav-link.active { color: var(--lt-sidebar-active); background: rgba(79, 70, 229, .35); }

.lt-topbar {
    height: var(--lt-topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
    background: #fff; border-bottom: 1px solid var(--lt-border); position: sticky; top: 0; z-index: 1030;
}
.lt-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.lt-menu-btn { display: none; color: #374151; font-size: 1.5rem; padding: 0; }
.lt-avatar {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--lt-accent); color: #fff; font-size: .75rem; font-weight: 600;
}
.lt-backdrop { display: none; }

@media (max-width: 991.98px) {
    .lt-page { margin-left: 0; }
    .lt-sidebar { transform: translateX(-100%); }
    .lt-menu-btn { display: inline-block; }
    body.lt-sidebar-open .lt-sidebar { transform: none; }
    body.lt-sidebar-open .lt-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1035; }
    .lt-content { padding: 1rem; }
}

/* ---------- Componentes ---------- */
.lt-card { border: 1px solid var(--lt-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.lt-card > .card-header { background: #fff; border-bottom: 1px solid var(--lt-border); font-weight: 600; padding: .85rem 1.25rem; border-radius: 12px 12px 0 0; }
.lt-card > .card-body { padding: 1.25rem; }

.lt-page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

.lt-stat { display: flex; align-items: center; gap: 1rem; }
.lt-stat-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.lt-stat-value { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.lt-stat-label { color: #6b7280; font-size: .825rem; }

.lt-bar { height: 8px; border-radius: 4px; background: #eef2ff; overflow: hidden; }
.lt-bar > span { display: block; height: 100%; background: var(--lt-accent); border-radius: 4px; }

.lt-days { display: flex; align-items: flex-end; gap: .5rem; height: 260px; }
.lt-day { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .35rem; }
.lt-day-bar { width: 100%; max-width: 44px; background: #c7d2fe; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.lt-day:last-child .lt-day-bar { background: var(--lt-accent); }
.lt-day-label { font-size: .75rem; color: #6b7280; }
.lt-day-value { font-size: .75rem; font-weight: 600; }

.lt-form-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--lt-border); margin-top: .5rem; }

.lt-code { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: .85rem 1rem; font-size: .8rem; white-space: pre-wrap; word-break: break-all; margin: 0; }
.lt-key { font-family: var(--bs-font-monospace); font-size: .85rem; }

/* Etiquetas */
.badge { font-weight: 500; }
.badge-soft-primary { background: #eef2ff; color: #4338ca; }
.badge-soft-info { background: #ecfeff; color: #0e7490; }
.badge-soft-success { background: #ecfdf5; color: #047857; }
.badge-soft-secondary { background: #f3f4f6; color: #4b5563; }
.lt-channel { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; background: #f3f4f6; color: #374151; white-space: nowrap; }
.lt-channel-organic_search { background: #ecfdf5; color: #047857; }
.lt-channel-paid_search { background: #fef3c7; color: #92400e; }
.lt-channel-social, .lt-channel-paid_social { background: #fce7f3; color: #9d174d; }
.lt-channel-email { background: #e0f2fe; color: #075985; }
.lt-channel-ai { background: #ede9fe; color: #5b21b6; }
.lt-channel-referral { background: #ffedd5; color: #9a3412; }

/* ---------- Tablas ---------- */
.lt-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.lt-table td { white-space: nowrap; }
.lt-table td.lt-wrap { white-space: normal; }
.lt-table code { font-size: .8rem; }
div.dt-container div.dt-search input { min-width: 220px; }
div.dt-container .dt-paging .page-link { border-radius: 6px; margin: 0 2px; }
div.dt-container div.dt-processing { box-shadow: none; }

.lt-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.lt-filters .form-label { font-size: .75rem; color: #6b7280; margin-bottom: .25rem; }
.lt-filters > div { flex: 0 1 180px; min-width: 140px; }
.lt-filters .mb-3 { margin-bottom: 0 !important; }
@media (max-width: 575.98px) { .lt-filters > div { flex: 1 1 calc(50% - .75rem); } }
div.dt-container .pagination { --bs-pagination-active-bg: #4f46e5; --bs-pagination-active-border-color: #4f46e5; --bs-pagination-color: #4f46e5; }

/* ---------- Login ---------- */
.lt-auth { background: var(--lt-sidebar-bg); min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.lt-auth-box { width: 100%; max-width: 400px; }
.lt-brand-lg { justify-content: center; font-size: 1.35rem; height: auto; }
.lt-auth .card { border: 0; border-radius: 14px; }

/* ---------- Zonas y reglas ---------- */
.lt-tabs .nav-link { color: #4b5563; }
.lt-tabs .nav-link.active { color: #111827; font-weight: 600; }

.lt-zonemap { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 54px; gap: 8px; }
.lt-zone { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid rgba(17, 24, 39, .08); transition: transform .15s; }
.lt-zone:hover { transform: scale(1.01); z-index: 2; }
.lt-zone-empty { background: repeating-linear-gradient(45deg, #f9fafb, #f9fafb 8px, #f3f4f6 8px, #f3f4f6 16px); border-style: dashed; }
.lt-zone-label { position: absolute; left: 6px; top: 6px; z-index: 1; display: inline-flex; flex-wrap: wrap; gap: .1rem .4rem; align-items: center;
    max-width: calc(100% - 12px); padding: .1rem .45rem; border-radius: 6px; background: rgba(255, 255, 255, .82);
    font-size: .75rem; color: #111827; pointer-events: none; }
.lt-zone-label strong { font-weight: 600; }
.lt-zone-label span { color: rgba(17, 24, 39, .75); }
.lt-zone-empty .lt-zone-label { color: #9ca3af; }
.lt-zone-empty .lt-zone-label span { color: #9ca3af; }
.lt-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
    background: rgba(17, 24, 39, .45); box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); pointer-events: none; }
.lt-hide-clicks .lt-dot { display: none; }
.lt-heat-legend { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: #6b7280; margin-top: .9rem; }
.lt-heat-bar { flex: 0 0 180px; height: 8px; border-radius: 4px;
    background: linear-gradient(90deg, hsl(220, 85%, 94%), hsl(165, 85%, 85%), hsl(110, 85%, 77%), hsl(55, 85%, 69%), hsl(0, 85%, 60%)); }
.lt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.lt-row-off { opacity: .5; }
@media (max-width: 767.98px) { .lt-zonemap { grid-auto-rows: 40px; gap: 5px; } .lt-zone-label span { display: none; } }
