/* ==========================================================================
   CRM — tema sobre Bootstrap 5.3
   Lenguaje visual compartido con el CRM de RBC Sur: texto en DM Sans,
   titulares en Space Grotesk, acento azul, barra lateral oscura, tarjetas
   de esquina generosa y sombras suaves.
   Las tipografías se sirven desde el propio dominio: nada de CDN.
   ========================================================================== */

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('../fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Acento */
    --lp-brand:       #4f7dff;
    --lp-brand-dark:  #3b68f0;
    --lp-brand-soft:  #eef3ff;
    --lp-brand-tint:  rgba(79, 125, 255, .12);
    --lp-brand-glow:  rgba(79, 125, 255, .32);

    /* Acento secundario: ocupa el lugar del dorado del tema anterior */
    --lp-gold:        #f59e0b;
    --lp-gold-dark:   #b45309;
    --lp-gold-soft:   #fff7e8;
    --lp-violet:      #a78bfa;

    /* Superficies oscuras */
    --lp-navy:        #0f1117;
    --lp-navy-2:      #161923;
    --lp-navy-3:      #1e2130;

    /* Neutros */
    --lp-ink:         #1a1d2e;
    --lp-ink-2:       #4b5167;
    --lp-muted:       #6b6f85;
    --lp-bg:          #f4f6fb;
    --lp-surface:     #ffffff;
    --lp-surface-2:   #f7f9fc;
    --lp-line:        #e9ecf3;
    --lp-line-strong: #dde1ec;

    /* Estados */
    --lp-success:     #16a34a;
    --lp-success-soft:#eafaf0;
    --lp-warning:     #b45309;
    --lp-warning-soft:#fff7e8;
    --lp-danger:      #e11d48;
    --lp-danger-soft: #fff1f3;
    --lp-info:        #4f7dff;
    --lp-info-soft:   #eef3ff;

    /* Medidas */
    --lp-sidebar-w:   260px;
    --lp-header-h:    62px;
    --lp-radius-sm:   8px;
    --lp-radius:      10px;
    --lp-radius-md:   12px;
    --lp-radius-lg:   16px;
    --lp-shadow:      0 1px 2px rgba(16, 24, 40, .04);
    --lp-shadow-md:   0 8px 30px rgba(0, 0, 0, .08);
    --lp-shadow-lg:   0 12px 40px rgba(16, 24, 40, .14);

    --lp-font:         'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --lp-font-display: 'Space Grotesk', 'DM Sans', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --bs-primary: #4f7dff;
    --bs-body-color: #1a1d2e;
    --bs-border-color: #e9ecf3;
    --bs-body-font-family: var(--lp-font);
    --bs-body-font-size: 1rem;
    --bs-link-color-rgb: 79, 125, 255;
}

/* --------------------------------------------------------------- base --- */

html { font-size: 93.75%; } /* 15px: todo el texto un punto más pequeño (los tamaños van en rem) */

body {
    font-family: var(--lp-font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--lp-ink);
    background: var(--lp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--lp-brand); text-decoration: none; }
a:hover { color: var(--lp-brand-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lp-font-display);
    color: var(--lp-ink); font-weight: 700; letter-spacing: -.02em;
}
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

hr { border-color: var(--lp-line); opacity: 1; }

.text-muted { color: var(--lp-muted) !important; }
.small, small { font-size: .8125rem; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .88em; }

::selection { background: var(--lp-brand-tint); }

*:focus-visible {
    outline: 2px solid var(--lp-brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Iconos SVG del set propio */
.ic { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ layout --- */

.lp-shell { min-height: 100vh; }

/* La barra superior cruza toda la pantalla y la lateral cuelga por debajo. */
.lp-header {
    height: var(--lp-header-h);
    background: #f0f2f5;
    border-bottom: 1px solid #d9dde5;
    display: flex; align-items: center; gap: 14px;
    padding: 0 18px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1050;
}

.lp-sidebar {
    width: var(--lp-sidebar-w);
    background: var(--lp-navy);
    border-right: 1px solid rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .6);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--lp-header-h); bottom: 0; left: 0;
    z-index: 1040;
    overflow: hidden;
    transition: transform .26s ease;
}

/* Marca: vive en la barra superior, a la izquierda del plegador del menú */
.lp-brand {
    display: flex; align-items: center; gap: 10px;
    flex: 0 0 auto; line-height: 1.15;
}
.lp-brand:hover { text-decoration: none; }
.lp-brand img { height: 30px; width: auto; }
.lp-brand span {
    font-family: var(--lp-font-display);
    color: var(--lp-ink); font-weight: 700; font-size: 1.1rem; letter-spacing: -.03em;
}
.lp-brand .tag {
    font-size: .68rem; color: var(--lp-brand); letter-spacing: .14em;
    text-transform: uppercase; font-weight: 700; display: block; line-height: 1.3;
}

.lp-nav {
    overflow-y: auto; flex: 1 1 auto; padding: 14px 10px 24px;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .1) transparent;
}
.lp-nav::-webkit-scrollbar { width: 4px; }
.lp-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 4px; }
.lp-nav::-webkit-scrollbar-track { background: transparent; }

.lp-nav__group {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
    color: rgba(255, 255, 255, .28); font-weight: 700; padding: 20px 10px 6px;
}

.lp-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: .6rem .85rem;
    margin-bottom: 2px;
    border-radius: var(--lp-radius);
    color: rgba(255, 255, 255, .6);
    font-size: .9375rem; font-weight: 500; line-height: 1.35;
    transition: background .18s, color .18s;
}
.lp-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.lp-nav a.active { background: var(--lp-brand-tint); color: #fff; font-weight: 600; }
.lp-nav a .ic { opacity: .75; }
.lp-nav a.active .ic { opacity: 1; color: var(--lp-brand); }
.lp-nav__badge {
    margin-left: auto; background: var(--lp-brand); color: #fff;
    font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 20px;
}
.lp-nav__sub { padding-left: 22px; }
.lp-nav__sub a { padding-top: .42rem; padding-bottom: .42rem; font-size: .875rem; font-weight: 400; }

.lp-main {
    margin-left: var(--lp-sidebar-w);
    padding-top: var(--lp-header-h);
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left .26s ease;
}

.lp-search { position: relative; flex: 1 1 auto; max-width: 440px; }
.lp-search input {
    width: 100%; height: 40px; padding: 0 14px 0 38px;
    border: 1px solid #d9dde5; border-radius: 22px;
    background: #fff; font-size: .9375rem; color: var(--lp-ink);
    font-family: var(--lp-font);
}
.lp-search input:focus {
    border-color: var(--lp-brand); outline: none;
    box-shadow: 0 0 0 3.5px var(--lp-brand-tint);
}
.lp-search input::placeholder { color: #aab0c4; }
.lp-search .ic { position: absolute; left: 13px; top: 12px; color: #9ca3af; }
.lp-search kbd {
    position: absolute; right: 12px; top: 10px; font-size: .72rem; color: var(--lp-muted);
    background: #f0f2f5; border: 1px solid #d9dde5; border-radius: 5px; padding: 2px 6px;
}

.lp-search__results {
    position: absolute; top: 48px; left: 0; right: 0; background: #fff;
    border: 1px solid var(--lp-line); border-radius: var(--lp-radius-lg);
    box-shadow: var(--lp-shadow-lg); max-height: 430px; overflow: hidden auto; z-index: 1060;
}
.lp-search__results .grp {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
    color: var(--lp-muted); font-weight: 700; padding: 10px 14px 5px;
    background: var(--lp-surface-2); border-bottom: 1px solid var(--lp-line);
}
.lp-search__results a { display: block; padding: 9px 14px; color: var(--lp-ink); font-size: .9rem; }
.lp-search__results a:hover { background: var(--lp-brand-tint); color: var(--lp-brand); text-decoration: none; }
.lp-search__results a small { color: var(--lp-muted); }

.lp-header__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.lp-iconbtn {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--lp-radius); color: #6b7280; background: transparent;
    border: 0; position: relative;
    transition: background .18s, color .18s;
}
.lp-iconbtn:hover { background: #e5e7eb; color: var(--lp-ink); }
.lp-iconbtn .dot {
    position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
    background: #ff5c6a; border: 2px solid #f0f2f5; border-radius: 50%;
}

.lp-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--lp-brand);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--lp-font-display);
    font-size: .8rem; font-weight: 700; flex: 0 0 auto;
}
.lp-avatar--lg { width: 48px; height: 48px; font-size: 1.05rem; }
.lp-avatar--sm { width: 26px; height: 26px; font-size: .7rem; }

.lp-content { padding: 1.75rem 2rem 3rem; flex: 1 1 auto; min-width: 0; }

/* Banner de suplantación de usuario */
.lp-impersonate {
    background: var(--lp-gold); color: #3b2400; font-size: .875rem; font-weight: 600;
    padding: 8px 2rem; display: flex; align-items: center; gap: 10px;
}
.lp-impersonate a { color: #3b2400; text-decoration: underline; }

/* ------------------------------------------------------- page header --- */

.lp-page-head {
    display: flex; align-items: flex-start; gap: 14px;
    flex-wrap: wrap; margin-bottom: 1.5rem;
}
.lp-page-head h1 {
    margin: 0; font-family: var(--lp-font-display);
    font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em;
}
.lp-page-head .sub { color: var(--lp-muted); font-size: .9375rem; margin-top: .15rem; }
.lp-page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.lp-breadcrumb { font-size: .8125rem; color: var(--lp-muted); margin-bottom: .3rem; }
.lp-breadcrumb a { color: var(--lp-muted); }
.lp-breadcrumb a:hover { color: var(--lp-brand); }
.lp-breadcrumb span + span::before { content: "/"; margin: 0 7px; opacity: .5; }

/* ------------------------------------------------------------- cards --- */

.lp-card {
    background: var(--lp-surface);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--lp-radius-lg);
    margin-bottom: 1.25rem;
    transition: box-shadow .2s;
}
.lp-card:hover { box-shadow: var(--lp-shadow-md); }
.lp-card__head {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--lp-line);
    display: flex; align-items: center; gap: 10px;
}
.lp-card__head h2, .lp-card__head h3 {
    margin: 0; font-family: var(--lp-font-display);
    font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em;
}
.lp-card__head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.lp-card__body { padding: 1.4rem; }
.lp-card__body--flush { padding: 0; }
.lp-card__foot {
    padding: .9rem 1.4rem; border-top: 1px solid var(--lp-line);
    background: var(--lp-surface-2); border-radius: 0 0 var(--lp-radius-lg) var(--lp-radius-lg);
    font-size: .9rem;
}

/* KPI */
.lp-kpi {
    background: var(--lp-surface); border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--lp-radius-lg); padding: 1.25rem 1.4rem; position: relative;
    height: 100%; transition: box-shadow .2s;
}
.lp-kpi:hover { box-shadow: var(--lp-shadow-md); }
.lp-kpi::before {
    content: ""; position: absolute; top: 1.3rem; left: 0; width: 3px; height: 1.9rem;
    background: var(--lp-gold); border-radius: 0 3px 3px 0;
}
.lp-kpi--brand::before { background: var(--lp-brand); }
.lp-kpi--success::before { background: var(--lp-success); }
.lp-kpi--danger::before { background: var(--lp-danger); }
.lp-kpi__label { font-size: .78rem; color: var(--lp-muted); font-weight: 600; letter-spacing: .02em; }
.lp-kpi__value {
    font-family: var(--lp-font-display);
    font-size: 1.7rem; font-weight: 700; line-height: 1.1; margin-top: .3rem;
    font-variant-numeric: tabular-nums; color: var(--lp-ink); letter-spacing: -.02em;
}
.lp-kpi__value small { font-size: 1rem; font-weight: 500; color: var(--lp-muted); }
.lp-kpi__delta { font-size: .8125rem; margin-top: .2rem; font-weight: 600; }
.lp-kpi__delta.up { color: #22c55e; }
.lp-kpi__delta.down { color: #ef4444; }
.lp-kpi__foot { font-size: .8125rem; color: var(--lp-muted); margin-top: .3rem; }

/* ------------------------------------------------------------ tablas --- */

.lp-table-wrap { overflow-x: auto; }

.lp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lp-table thead th {
    background: var(--lp-surface-2);
    border-bottom: 2px solid var(--lp-line-strong);
    padding: .6rem .85rem;
    text-align: left;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--lp-muted);
    white-space: nowrap;
    position: sticky; top: 0; z-index: 2;
}
.lp-table thead th a { color: inherit; display: inline-flex; align-items: center; gap: 3px; }
.lp-table thead th a:hover { color: var(--lp-brand); text-decoration: none; }
.lp-table thead th .sort { opacity: .45; font-size: .72em; }
.lp-table thead th.is-sorted .sort { opacity: 1; color: var(--lp-brand); }

.lp-table tbody td { padding: .6rem .85rem; border-bottom: 1px solid var(--lp-line); vertical-align: middle; }
.lp-table tbody tr:hover { background: var(--lp-brand-soft); }
.lp-table tbody tr.is-selected { background: var(--lp-brand-tint); }
.lp-table tbody tr.is-muted td { color: var(--lp-muted); }
.lp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp-table .nowrap { white-space: nowrap; }
.lp-table .shrink { width: 1%; white-space: nowrap; }
.lp-table tfoot td {
    padding: .8rem 1rem; border-top: 2px solid var(--lp-line-strong);
    background: var(--lp-surface-2); font-weight: 700;
}
.lp-table--compact tbody td { padding: .45rem .8rem; font-size: .875rem; }
.lp-table--lines tbody td { border-bottom-color: #f1f4f9; }

.lp-table a.primary-link { color: var(--lp-ink); font-weight: 600; }
.lp-table a.primary-link:hover { color: var(--lp-brand); }

.lp-empty { text-align: center; padding: 3.5rem 1.25rem; color: var(--lp-muted); }
.lp-empty .ic { width: 38px; height: 38px; opacity: .28; margin-bottom: .75rem; }
.lp-empty h3 { font-size: 1.05rem; color: var(--lp-ink-2); margin-bottom: .35rem; }

/* --------------------------------------------------------- badges etc --- */

.lp-badge {
    display: inline-block; padding: .2rem .65rem; border-radius: 20px;
    font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
    border: 1px solid transparent;
}
.lp-badge--success   { background: var(--lp-success-soft); color: #15803d;            border-color: #c9f0d9; }
.lp-badge--danger    { background: var(--lp-danger-soft);  color: #be123c;            border-color: #fecdd3; }
.lp-badge--warning   { background: var(--lp-warning-soft); color: var(--lp-warning);  border-color: #fbe2b8; }
.lp-badge--info      { background: var(--lp-info-soft);    color: #2f5ad9;            border-color: #d3e0ff; }
.lp-badge--secondary { background: #eef1f6;                color: var(--lp-ink-2);    border-color: #e1e6ef; }
.lp-badge--light-dark{ background: #eef1f6;                color: var(--lp-ink-2);    border-color: #e1e6ef; }
.lp-badge--gold      { background: var(--lp-gold-soft);    color: var(--lp-gold-dark);border-color: #fbe2b8; }

.lp-tag {
    display: inline-block; padding: .15rem .55rem; border-radius: var(--lp-radius-sm);
    font-size: .75rem; background: #eef1f6; color: var(--lp-ink-2); border: 1px solid #e1e6ef;
}

.lp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Semáforo de antigüedad / retraso */
.lp-light { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; }
.lp-light i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lp-light--ok i { background: #22c55e; }
.lp-light--warn i { background: var(--lp-gold); }
.lp-light--late i { background: #ef4444; }

/* --------------------------------------------------------- botones ---- */

.btn {
    --bs-btn-border-radius: var(--lp-radius-md);
    font-family: var(--lp-font);
    font-size: .9375rem; font-weight: 600; padding: .5rem 1.1rem;
    transition: background .18s, box-shadow .18s, transform .1s;
}
.btn:active { transform: scale(.985); }
.btn-sm { font-size: .8125rem; padding: .3rem .75rem; --bs-btn-border-radius: var(--lp-radius); }
.btn-lg { font-size: 1rem; padding: .75rem 1.6rem; }

.btn-primary {
    --bs-btn-bg: var(--lp-brand); --bs-btn-border-color: var(--lp-brand);
    --bs-btn-hover-bg: var(--lp-brand-dark); --bs-btn-hover-border-color: var(--lp-brand-dark);
    --bs-btn-active-bg: var(--lp-brand-dark); --bs-btn-active-border-color: var(--lp-brand-dark);
    --bs-btn-disabled-bg: #adc0f5; --bs-btn-disabled-border-color: #adc0f5;
    box-shadow: 0 4px 14px var(--lp-brand-glow);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(79, 125, 255, .42); }
.btn-outline-primary {
    --bs-btn-color: var(--lp-brand); --bs-btn-border-color: #cdd9ff;
    --bs-btn-hover-bg: var(--lp-brand-tint); --bs-btn-hover-color: var(--lp-brand-dark);
    --bs-btn-hover-border-color: var(--lp-brand);
}
.btn-gold {
    background: var(--lp-gold); border: 1px solid var(--lp-gold); color: #3b2400; font-weight: 700;
    border-radius: var(--lp-radius-md);
}
.btn-gold:hover { background: #d98806; border-color: #d98806; color: #fff; }
.btn-light {
    --bs-btn-bg: #fff; --bs-btn-border-color: var(--lp-line-strong); --bs-btn-color: var(--lp-ink-2);
    --bs-btn-hover-bg: var(--lp-surface-2); --bs-btn-hover-border-color: var(--lp-line-strong);
}
.btn-danger {
    --bs-btn-bg: var(--lp-danger); --bs-btn-border-color: var(--lp-danger);
    --bs-btn-hover-bg: #be123c; --bs-btn-hover-border-color: #be123c;
}
.btn-success {
    --bs-btn-bg: var(--lp-success); --bs-btn-border-color: var(--lp-success);
    --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d;
}
.btn .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.btn-icon .ic { margin-right: 0; }

.lp-btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* En la columna de acciones de una tabla los botones van en línea */
.lp-table td.shrink .lp-btn-group { flex-wrap: nowrap; }

/* ------------------------------------------------------- formularios --- */

.form-label { font-size: .8125rem; font-weight: 600; color: var(--lp-ink); margin-bottom: .3rem; }
.form-label .req { color: var(--lp-danger); }
.form-control, .form-select {
    font-family: var(--lp-font);
    font-size: .9375rem; border: 1.5px solid #e2e6f0; border-radius: var(--lp-radius-md);
    padding: .55rem .85rem; color: var(--lp-ink); background: #fafbff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--lp-brand); background: #fff;
    box-shadow: 0 0 0 3.5px var(--lp-brand-tint);
}
.form-control::placeholder { color: #b9bed3; }
.form-control-sm, .form-select-sm { font-size: .875rem; padding: .32rem .65rem; border-radius: var(--lp-radius); }
.form-control[readonly] { background: #f1f3f8; }
textarea.form-control { min-height: 92px; }
.form-text { font-size: .8125rem; color: var(--lp-muted); }
.invalid-feedback, .lp-error { display: block; font-size: .8125rem; color: var(--lp-danger); margin-top: .25rem; }
.is-invalid { border-color: var(--lp-danger) !important; }
.form-check-input:checked { background-color: var(--lp-brand); border-color: var(--lp-brand); }
.form-check-label { font-size: .9375rem; }
.input-group-text {
    font-size: .875rem; background: var(--lp-surface-2); border-color: #e2e6f0;
    border-radius: var(--lp-radius-md);
}

.lp-fieldset { margin-bottom: 1.75rem; }
.lp-fieldset__legend {
    font-family: var(--lp-font-display);
    font-size: 1rem; font-weight: 700; letter-spacing: -.01em;
    color: var(--lp-ink); padding-bottom: .5rem; margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--lp-line); display: flex; align-items: center; gap: 8px;
}
.lp-fieldset__legend .ic { width: 17px; height: 17px; color: var(--lp-brand); }

/* Barra de filtros */
.lp-filters {
    background: var(--lp-surface); border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--lp-radius-lg); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem;
}
.lp-filters .row { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
.lp-filters label {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--lp-muted); font-weight: 700; margin-bottom: .25rem; display: block;
}
.lp-filters__more { border-top: 1px dashed var(--lp-line); margin-top: 1rem; padding-top: 1rem; }

.lp-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lp-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500;
    background: var(--lp-brand-tint); color: var(--lp-brand-dark);
    border: 1px solid #d3e0ff; border-radius: 20px; padding: .2rem .7rem;
}
.lp-chip a { color: inherit; opacity: .6; line-height: 1; }
.lp-chip a:hover { opacity: 1; }

/* ---------------------------------------------------------- pestañas --- */

.lp-tabs {
    display: flex; gap: 4px; border-bottom: 1px solid var(--lp-line);
    margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: thin;
}
.lp-tabs a {
    padding: .65rem 1rem; font-size: .9375rem; color: var(--lp-ink-2); white-space: nowrap;
    border-bottom: 2px solid transparent; font-weight: 500;
    border-radius: var(--lp-radius-sm) var(--lp-radius-sm) 0 0;
}
.lp-tabs a:hover { color: var(--lp-brand); text-decoration: none; background: var(--lp-brand-soft); }
.lp-tabs a.active { color: var(--lp-brand); border-bottom-color: var(--lp-brand); font-weight: 600; }
.lp-tabs a .count {
    background: #eef1f6; color: var(--lp-muted); font-size: .72rem; border-radius: 10px;
    padding: 0 .4rem; margin-left: .35rem; font-weight: 700;
}
.lp-tabs a.active .count { background: var(--lp-brand-tint); color: var(--lp-brand); }

/* Explicación de la sección, bajo el título (tonos cálidos) */
.lp-intro {
    display: flex; gap: .7rem; align-items: flex-start;
    background: linear-gradient(135deg, #fff7ec 0%, #fdeedd 100%);
    border: 1px solid #f3d6ae; border-left: 4px solid #e8903a; border-radius: var(--lp-radius-md, 10px);
    padding: .8rem 1rem; margin: -.4rem 0 1.4rem; color: #6a3b16;
}
.lp-intro .ic { color: #d9731f; margin-top: .15rem; }
.lp-intro p { margin: 0; font-size: .9rem; line-height: 1.5; }
.lp-langswitch .dropdown-item.active { background: var(--lp-brand-tint); color: var(--lp-brand); font-weight: 600; }

/* Submenú en columna a la izquierda y contenido a la derecha (p. ej. control horario) */
.lp-content--subnav { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.lp-subnav-main { min-width: 0; }
.lp-subnav {
    background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--lp-radius-lg);
    padding: .6rem .5rem; display: flex; flex-direction: column; gap: 2px;
}
.lp-subnav__title {
    padding: .45rem .75rem .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--lp-muted);
}
.lp-subnav a {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .5rem .75rem; font-size: .9rem; color: var(--lp-ink-2); border-radius: var(--lp-radius);
}
.lp-subnav a:hover { background: var(--lp-brand-soft); color: var(--lp-brand); text-decoration: none; }
.lp-subnav a.active { background: var(--lp-brand-tint); color: var(--lp-brand); font-weight: 600; }
.lp-subnav a .count {
    background: #eef1f6; color: var(--lp-muted); font-size: .72rem; border-radius: 10px;
    padding: 0 .45rem; font-weight: 700;
}
.lp-subnav a.active .count { background: #fff; color: var(--lp-brand); }
@media (max-width: 991.98px) {
    .lp-content--subnav { grid-template-columns: 1fr; }
    .lp-subnav { flex-direction: row; flex-wrap: wrap; }
    .lp-subnav__title { width: 100%; }
}

/* -------------------------------------------------------- paginación --- */

.lp-pager {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 1rem 1.25rem; font-size: .875rem; color: var(--lp-muted);
}
.lp-pager__nav { margin-left: auto; display: flex; gap: 4px; }
.lp-pager__nav a, .lp-pager__nav span {
    min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--lp-line-strong); border-radius: var(--lp-radius); color: var(--lp-ink-2);
    font-size: .875rem; font-weight: 500; padding: 0 .5rem; background: #fff;
}
.lp-pager__nav a:hover { border-color: var(--lp-brand); color: var(--lp-brand); text-decoration: none; }
.lp-pager__nav .active {
    background: var(--lp-brand); border-color: var(--lp-brand); color: #fff; font-weight: 700;
}
.lp-pager__nav .disabled { opacity: .4; pointer-events: none; }

/* ---------------------------------------------------------- timeline --- */

.lp-timeline { position: relative; padding-left: 28px; }
.lp-timeline::before {
    content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
    width: 2px; background: var(--lp-line);
}
.lp-timeline__item { position: relative; padding: 0 0 1.35rem; }
.lp-timeline__item::before {
    content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px;
    border-radius: 50%; background: #fff; border: 2px solid var(--lp-brand);
}
.lp-timeline__item.is-gold::before { border-color: var(--lp-gold); }
.lp-timeline__item.is-danger::before { border-color: var(--lp-danger); }
.lp-timeline__item.is-success::before { border-color: var(--lp-success); }
.lp-timeline__time { font-size: .78rem; color: var(--lp-muted); }
.lp-timeline__title { font-size: .9375rem; font-weight: 600; }
.lp-timeline__body { font-size: .9rem; color: var(--lp-ink-2); }

/* ------------------------------------------------------------ kanban --- */

.lp-kanban-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: .75rem; }
.lp-kanban-nav[hidden] { display: none; }
.lp-kanban-nav__hint { color: var(--lp-muted); font-size: .85rem; margin-right: auto; }
.lp-kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.lp-kanban__col {
    flex: 0 0 290px; background: #eef0f5; border-radius: var(--lp-radius-lg);
    display: flex; flex-direction: column; /* sin altura máxima: la columna crece con sus tarjetas */
}
.lp-kanban__head {
    padding: .8rem 1rem; border-bottom: 2px solid transparent;
    border-radius: var(--lp-radius-lg) var(--lp-radius-lg) 0 0;
    position: sticky; top: 0; background: #eef0f5; z-index: 2;
}
.lp-kanban__head .name {
    font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.lp-kanban__head .meta { font-size: .8rem; color: var(--lp-muted); display: flex; gap: 10px; margin-top: .15rem; }
.lp-kanban__list { padding: .6rem; flex: 1 1 auto; min-height: 60px; }
.lp-kanban__card {
    background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--lp-radius-md);
    padding: .75rem .9rem; margin-bottom: .6rem; cursor: grab;
    transition: box-shadow .2s, border-color .2s;
}
.lp-kanban__card:hover { box-shadow: var(--lp-shadow-md); border-color: var(--lp-brand); }
.lp-kanban__card .title { font-size: .9rem; font-weight: 600; line-height: 1.35; }
.lp-kanban__card .cust { font-size: .8125rem; color: var(--lp-muted); margin-top: .1rem; }
.lp-kanban__card .row-meta {
    display: flex; align-items: center; gap: 10px; margin-top: .55rem;
    font-size: .8rem; color: var(--lp-ink-2);
}
.lp-kanban__card .amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.sortable-ghost { opacity: .4; background: var(--lp-brand-tint); }

/* ------------------------------------------------------------ matriz --- */

.lp-matrix { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.lp-matrix th, .lp-matrix td { border: 1px solid var(--lp-line); padding: .35rem .6rem; }
.lp-matrix thead th {
    background: var(--lp-surface-2); position: sticky; top: 0; z-index: 3;
    font-size: .75rem; font-weight: 700; color: var(--lp-muted);
    text-transform: uppercase; letter-spacing: .04em;
}
.lp-matrix tbody th {
    position: sticky; left: 0; background: #fff; z-index: 2; text-align: left;
    font-weight: 500; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-matrix td { text-align: center; cursor: pointer; }
.lp-matrix td:hover { background: var(--lp-brand-tint); }
.lp-matrix td.on { background: var(--lp-success-soft); }
.lp-matrix td.sent { background: var(--lp-info-soft); }
.lp-matrix td.down { background: var(--lp-gold-soft); }
.lp-matrix td.old { background: var(--lp-danger-soft); }

/* -------------------------------------------------------- documentos --- */

.lp-doc {
    background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--lp-radius-lg);
    padding: 2.2rem 2.4rem; max-width: 940px; margin: 0 auto; box-shadow: var(--lp-shadow-md);
}
.lp-doc__head { display: flex; justify-content: space-between; gap: 1.75rem; margin-bottom: 1.75rem; }
.lp-doc__title {
    font-family: var(--lp-font-display);
    font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em;
}
.lp-doc__meta { font-size: .9rem; color: var(--lp-ink-2); }
.lp-doc table { width: 100%; font-size: .9rem; border-collapse: collapse; }
.lp-doc table th {
    text-align: left; border-bottom: 2px solid var(--lp-ink); padding: .5rem .6rem;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lp-muted);
}
.lp-doc table td { padding: .5rem .6rem; border-bottom: 1px solid var(--lp-line); }
.lp-doc__totals { margin-left: auto; width: 320px; font-size: .9375rem; }
.lp-doc__totals tr td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.lp-doc__totals .grand td {
    border-top: 2px solid var(--lp-ink); font-family: var(--lp-font-display);
    font-size: 1.15rem; font-weight: 700; padding-top: .6rem;
}

/* --------------------------------------------------- panel de agente --- */

.lp-agent { display: grid; grid-template-columns: 1fr 390px; gap: 1.25rem; align-items: start; }
.lp-agent__script {
    background: var(--lp-gold-soft); border: 1px solid #fbe2b8; border-radius: var(--lp-radius-lg);
    padding: 1.25rem 1.4rem; font-size: .9375rem; line-height: 1.7; max-height: 430px; overflow-y: auto;
}
.lp-agent__timer {
    font-family: var(--lp-font-display);
    font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums;
    letter-spacing: -.02em; color: var(--lp-ink);
}
.lp-outcome-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.lp-outcome {
    border: 1.5px solid #e2e6f0; background: #fff; border-radius: var(--lp-radius-md);
    padding: .65rem .85rem; font-size: .875rem; text-align: left; font-weight: 500; position: relative;
    transition: border-color .18s, background .18s;
}
.lp-outcome:hover { border-color: var(--lp-brand); background: var(--lp-brand-tint); }
.lp-outcome.is-active { border-color: var(--lp-brand); background: var(--lp-brand); color: #fff; }
.lp-outcome kbd {
    position: absolute; top: 4px; right: 6px; font-size: .7rem; opacity: .55;
    border: 1px solid currentColor; border-radius: 4px; padding: 0 4px;
}

/* ------------------------------------------------------------ ayuda --- */

/* Índice y contenido forman un solo bloque; el índice crece con la página (sin barra de desplazamiento propia) */
.lp-help {
    display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: stretch;
    background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--lp-radius-lg);
}
.lp-help__nav { border-right: 1px solid var(--lp-line); padding: 1rem .5rem; }
.lp-help > :last-child { padding: 1.5rem 1.75rem; min-width: 0; }
.lp-help .lp-article { border: 0; border-radius: 0; padding: 0; }
.lp-help__nav .sec > a {
    display: block; padding: .5rem .75rem; font-weight: 700; font-size: .9375rem; color: var(--lp-ink);
}
.lp-help__nav .art a {
    display: block; padding: .45rem .75rem .45rem 1.4rem; font-size: .875rem; color: var(--lp-ink-2);
    border-radius: var(--lp-radius);
}
.lp-help__nav .art a:hover { background: var(--lp-brand-soft); color: var(--lp-brand); text-decoration: none; }
.lp-help__nav .art a.active { background: var(--lp-brand-tint); color: var(--lp-brand); font-weight: 600; }

.lp-article {
    background: #fff; border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--lp-radius-lg); padding: 2rem 2.4rem;
}
.lp-article h1 { font-size: 1.6rem; margin-bottom: .5rem; }
.lp-article h2 {
    font-size: 1.2rem; margin: 2rem 0 .7rem; padding-bottom: .4rem;
    border-bottom: 1px solid var(--lp-line);
}
.lp-article h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.lp-article p, .lp-article li { font-size: .9375rem; line-height: 1.75; color: var(--lp-ink-2); }
.lp-article ul, .lp-article ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.lp-article li { margin-bottom: .3rem; }
.lp-article table { width: 100%; font-size: .9rem; margin: 1rem 0; border-collapse: collapse; }
.lp-article table th, .lp-article table td { border: 1px solid var(--lp-line); padding: .5rem .7rem; text-align: left; }
.lp-article table th { background: var(--lp-surface-2); font-weight: 700; }
.lp-article code {
    background: var(--lp-surface-2); padding: .1rem .4rem; border-radius: var(--lp-radius-sm);
    font-size: .88em; color: var(--lp-danger);
}

.lp-note {
    border-left: 3px solid var(--lp-brand); background: var(--lp-brand-soft);
    padding: 1rem 1.25rem; border-radius: 0 var(--lp-radius-md) var(--lp-radius-md) 0; margin: 1.25rem 0;
    font-size: .9375rem;
}
.lp-note--warn { border-left-color: var(--lp-gold); background: var(--lp-gold-soft); }
.lp-note--danger { border-left-color: var(--lp-danger); background: var(--lp-danger-soft); }
.lp-note--tip { border-left-color: var(--lp-success); background: var(--lp-success-soft); }
.lp-note strong:first-child { display: block; margin-bottom: .25rem; }

/* ------------------------------------------------------------- login --- */

.lp-login {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--lp-navy); padding: 1.5rem; position: relative; overflow: hidden;
}
.lp-login::before {
    content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 125, 255, .22) 0%, transparent 70%);
    top: -140px; left: -120px; pointer-events: none;
}
.lp-login::after {
    content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, .14) 0%, transparent 70%);
    bottom: -120px; right: -100px; pointer-events: none;
}
.lp-login__box {
    width: 100%; max-width: 430px; background: #fff; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .38); overflow: hidden;
    position: relative; z-index: 1;
}
.lp-login__head { padding: 2.4rem 2.4rem .5rem; text-align: center; }
.lp-login__head img { height: 46px; margin-bottom: 1rem; }
.lp-login__head h1 {
    font-family: var(--lp-font-display);
    font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; margin: 0;
}
.lp-login__head p { color: var(--lp-muted); font-size: .9375rem; margin: .3rem 0 0; }
.lp-login__body { padding: 1.5rem 2.4rem 2.2rem; }
.lp-login__body .btn-primary { padding: .78rem; font-size: 1rem; border-radius: var(--lp-radius-md); }
.lp-login__foot {
    padding: 1.1rem 2.4rem; background: var(--lp-surface-2); border-top: 1px solid var(--lp-line);
    font-size: .8125rem; color: var(--lp-muted); text-align: center;
}
.lp-login__strip {
    height: 4px;
    background: linear-gradient(90deg, var(--lp-brand) 0%, var(--lp-violet) 100%);
}

/* ------------------------------------------------------------ varios --- */

.lp-alert {
    border-radius: var(--lp-radius-md); padding: .85rem 1.1rem; font-size: .9375rem;
    border: 1px solid; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 1.25rem;
}
.lp-alert .ic { flex: 0 0 auto; margin-top: 2px; }
.lp-alert--success { background: var(--lp-success-soft); border-color: #c9f0d9; color: #15803d; }
.lp-alert--danger  { background: var(--lp-danger-soft);  border-color: #fecdd3; color: #be123c; }
.lp-alert--warning { background: var(--lp-warning-soft); border-color: #fbe2b8; color: var(--lp-warning); }
.lp-alert--info    { background: var(--lp-info-soft);    border-color: #d3e0ff; color: #2f5ad9; }

.lp-toasts {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1080; display: flex;
    flex-direction: column; gap: .6rem; max-width: 380px;
}
.lp-toast {
    background: #fff; border: 1px solid var(--lp-line); border-left: 3px solid var(--lp-brand);
    border-radius: var(--lp-radius-md); padding: .85rem 1.1rem; box-shadow: var(--lp-shadow-lg);
    font-size: .9rem; animation: lp-slide .22s ease;
}
.lp-toast--success { border-left-color: var(--lp-success); }
.lp-toast--danger  { border-left-color: var(--lp-danger); }
.lp-toast--warning { border-left-color: var(--lp-gold); }
@keyframes lp-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.lp-progress { height: 8px; background: #e6eaf2; border-radius: 4px; overflow: hidden; }
.lp-progress span { display: block; height: 100%; background: var(--lp-brand); border-radius: 4px; }
.lp-progress--gold span { background: var(--lp-gold); }
.lp-progress--success span { background: var(--lp-success); }

.lp-stat-row { display: flex; gap: 1.75rem; flex-wrap: wrap; font-size: .875rem; }
.lp-stat-row b {
    display: block; font-family: var(--lp-font-display);
    font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

.dropdown-menu {
    font-size: .9rem; border: 1px solid rgba(0, 0, 0, .1); box-shadow: var(--lp-shadow-lg);
    border-radius: 14px; padding: .4rem; min-width: 210px; overflow: hidden;
}
.dropdown-item { border-radius: var(--lp-radius-sm); padding: .5rem .8rem; }
.dropdown-item:hover { background: var(--lp-brand-tint); color: var(--lp-brand); }
.dropdown-item:active { background: var(--lp-brand); color: #fff; }
.dropdown-item.text-danger:hover { background: rgba(255, 92, 106, .08); }
.dropdown-item .ic { width: 16px; height: 16px; margin-right: 8px; opacity: .7; }
.dropdown-header {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--lp-muted); font-weight: 700;
}

.modal-content { border: 0; border-radius: var(--lp-radius-lg); box-shadow: var(--lp-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--lp-line); padding: 1.1rem 1.5rem; }
.modal-title { font-family: var(--lp-font-display); font-size: 1.1rem; font-weight: 700; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--lp-line); padding: 1rem 1.5rem; background: var(--lp-surface-2); }

.offcanvas { border-left: 1px solid var(--lp-line); }
.offcanvas-header { border-bottom: 1px solid var(--lp-line); padding: 1.1rem 1.5rem; }
.offcanvas-title { font-family: var(--lp-font-display); font-size: 1.05rem; font-weight: 700; }

/* Editor de texto enriquecido propio */
.lp-editor { border: 1.5px solid #e2e6f0; border-radius: var(--lp-radius-md); background: #fff; }
.lp-editor__bar {
    display: flex; gap: 2px; flex-wrap: wrap; padding: .4rem; border-bottom: 1px solid var(--lp-line);
    background: var(--lp-surface-2); border-radius: var(--lp-radius-md) var(--lp-radius-md) 0 0;
}
.lp-editor__bar button {
    border: 0; background: transparent; padding: .25rem .6rem; border-radius: var(--lp-radius-sm);
    font-size: .875rem; color: var(--lp-ink-2); min-width: 30px;
}
.lp-editor__bar button:hover { background: #e6ebf2; }
.lp-editor__area { min-height: 200px; padding: .9rem 1.1rem; font-size: .9375rem; line-height: 1.7; outline: none; }
.lp-editor__area:focus { box-shadow: inset 0 0 0 2px var(--lp-brand-tint); }
.lp-editor__vars {
    padding: .4rem .7rem; border-top: 1px solid var(--lp-line); background: var(--lp-surface-2);
    font-size: .8rem; color: var(--lp-muted);
}
.lp-editor__vars code { cursor: pointer; margin-right: .35rem; }

/* Selector con búsqueda propio */
.lp-picker { position: relative; }
.lp-picker__menu {
    position: absolute; z-index: 1060; top: 100%; left: 0; right: 0; background: #fff;
    border: 1px solid var(--lp-line); border-radius: var(--lp-radius-md);
    box-shadow: var(--lp-shadow-lg); max-height: 270px; overflow-y: auto; display: none;
}
.lp-picker__menu.show { display: block; }
.lp-picker__menu div {
    padding: .5rem .85rem; font-size: .9rem; cursor: pointer; border-bottom: 1px solid #f2f4f8;
}
.lp-picker__menu div:hover, .lp-picker__menu div.hl { background: var(--lp-brand-tint); }
.lp-picker__menu div small { display: block; color: var(--lp-muted); font-size: .8rem; }

/* Líneas de documento editables */
.lp-lines th { font-size: .72rem; }
.lp-lines td { padding: .2rem .3rem !important; }
.lp-lines input, .lp-lines select, .lp-lines textarea {
    border: 1.5px solid transparent; background: transparent; width: 100%;
    font-family: var(--lp-font);
    font-size: .875rem; padding: .3rem .5rem; border-radius: var(--lp-radius-sm);
}
.lp-lines input:focus, .lp-lines select:focus, .lp-lines textarea:focus {
    border-color: var(--lp-brand); background: #fff; outline: none;
}
.lp-lines input.num { text-align: right; font-variant-numeric: tabular-nums; }
.lp-lines tr.is-section { background: var(--lp-surface-2); font-weight: 700; }
.lp-lines .handle { cursor: grab; color: var(--lp-muted); }

/* -------------------------------------------------------- responsive --- */

.lp-sidebar-toggle { display: inline-flex; }

@media (max-width: 1200px) {
    .lp-agent { grid-template-columns: 1fr; }
    .lp-help { grid-template-columns: 1fr; }
    .lp-help__nav { border-right: 0; border-bottom: 1px solid var(--lp-line); }
    .lp-help > :last-child { padding: 1.25rem 1rem; }
}

@media (max-width: 1399.98px) {
    :root { --lp-sidebar-w: 240px; }
}

/* Barra lateral plegable: el botón de la cabecera la oculta en cualquier ancho */
body.lp-sidebar-off .lp-sidebar { transform: translateX(-100%); }
body.lp-sidebar-off .lp-main { margin-left: 0; }

@media (max-width: 991.98px) {
    .lp-sidebar { transform: translateX(-100%); }
    .lp-sidebar.is-open { transform: none; box-shadow: var(--lp-shadow-lg); }
    .lp-main { margin-left: 0; }
    .lp-backdrop {
        position: fixed; inset: var(--lp-header-h) 0 0; background: rgba(10, 14, 24, .5);
        z-index: 1035; display: none;
    }
    .lp-backdrop.is-open { display: block; }
    .lp-content { padding: 1.25rem 1rem 2.5rem; }
    .lp-search { max-width: none; }
    .lp-impersonate { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 767.98px) {
    .lp-search kbd { display: none; }
    .lp-page-head h1 { font-size: 1.3rem; }
    .lp-login__head, .lp-login__body, .lp-login__foot { padding-left: 1.5rem; padding-right: 1.5rem; }

    /* Las tablas de listado se convierten en tarjetas */
    .lp-table--cards thead { display: none; }
    .lp-table--cards tbody tr {
        display: block; border: 1px solid var(--lp-line); border-radius: var(--lp-radius-md);
        margin-bottom: .7rem; padding: .75rem .9rem; background: #fff;
    }
    .lp-table--cards tbody td {
        display: flex; justify-content: space-between; gap: 14px;
        border: 0; padding: .2rem 0; text-align: right;
    }
    .lp-table--cards tbody td::before {
        content: attr(data-label); font-size: .75rem; text-transform: uppercase;
        letter-spacing: .05em; color: var(--lp-muted); font-weight: 700;
        text-align: left; flex: 0 0 auto;
    }
    .lp-table--cards tbody td.no-label::before { content: ""; }
    .lp-doc { padding: 1.4rem; }
    .lp-kanban__col { flex-basis: 84vw; }
}

/* ----------------------------------------------------------- imprimir --- */

@media print {
    .lp-sidebar, .lp-header, .lp-page-head__actions, .lp-filters, .lp-pager,
    .lp-tabs, .lp-subnav, .lp-intro, .lp-kanban-nav, .no-print, .lp-toasts, .lp-backdrop { display: none !important; }
    .lp-main { margin-left: 0; padding-top: 0; }
    .lp-content { padding: 0; }
    .lp-content--subnav { display: block; }
    body { background: #fff; font-size: 12px; }
    .lp-card, .lp-doc { border: 0; box-shadow: none; page-break-inside: avoid; }
    .lp-card:hover, .lp-kpi:hover { box-shadow: none; }
    .lp-table thead th { position: static; background: #fff; border-bottom: 1.5px solid #000; }
    a { color: #000; text-decoration: none; }
    @page { margin: 14mm; }
}

/* Aviso de traducción automática junto a los selectores de idioma */
.lp-lang-notice { display: flex; gap: .4rem; align-items: flex-start; margin-top: .4rem; font-size: .78rem; line-height: 1.4; color: #8a5a22; }
.lp-lang-notice .ic { flex: 0 0 auto; color: #d9731f; margin-top: .05rem; }
.dropdown-menu .lp-lang-notice { max-width: 240px; padding: .25rem 1rem .4rem; margin: 0; }
