/* ============ A&B Electromuebles CRM — UI 2.0 ============ */
/* Fuente auto-alojada (variable 200-800) — sin dependencia de Google Fonts */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('fonts/jakarta.woff2') format('woff2');
}

:root {
    --verde: #14bc30;
    --verde-claro: #22d941;
    --verde-oscuro: #0e9124;
    --verde-suave: #e6f8e9;
    --amarillo: #f4d122;
    --amarillo-suave: #fdf7d8;
    --tinta: #101a13;
    --gris: #64748b;
    --borde: #e6ebe7;
    --fondo: #eef3ef;
    --blanco: #ffffff;
    --rojo: #e11d48;
    --rojo-suave: #ffe4e6;
    --azul: #0ea5e9;
    --azul-suave: #e0f2fe;
    --purpura: #7c3aed;
    --purpura-suave: #ede9fe;
    --sombra: 0 1px 2px rgba(16, 26, 19, .05), 0 4px 16px rgba(16, 26, 19, .06);
    --sombra-hover: 0 4px 8px rgba(16, 26, 19, .06), 0 12px 32px rgba(16, 26, 19, .12);
    --radio: 16px;
    --trans: all .22s cubic-bezier(.4, 0, .2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(900px 500px at 100% -10%, rgba(20, 188, 48, .06), transparent),
        radial-gradient(700px 400px at -10% 100%, rgba(244, 209, 34, .07), transparent),
        var(--fondo);
    color: var(--tinta);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--verde-oscuro); text-decoration: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4cfc7; border-radius: 99px; border: 2px solid var(--fondo); }
::-webkit-scrollbar-thumb:hover { background: #9fb0a4; }

/* ============ Animaciones ============ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes growY    { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spinIn   { from { transform: rotate(-90deg) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(20, 188, 48, .5); } 55% { box-shadow: 0 0 0 6px rgba(20, 188, 48, 0); } }
@keyframes float    { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, -30px) scale(1.15); } }
@keyframes popIn    { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer  { from { background-position: -400px 0; } to { background-position: 400px 0; } }

.content > * { animation: fadeUp .55s cubic-bezier(.22, .9, .3, 1) both; }
.content > *:nth-child(1) { animation-delay: .02s; }
.content > *:nth-child(2) { animation-delay: .09s; }
.content > *:nth-child(3) { animation-delay: .16s; }
.content > *:nth-child(4) { animation-delay: .23s; }
.content > *:nth-child(5) { animation-delay: .30s; }
.content > *:nth-child(6) { animation-delay: .37s; }
.grid > * { animation: fadeUp .5s cubic-bezier(.22, .9, .3, 1) both; }
.grid > *:nth-child(1) { animation-delay: .05s; }
.grid > *:nth-child(2) { animation-delay: .11s; }
.grid > *:nth-child(3) { animation-delay: .17s; }
.grid > *:nth-child(4) { animation-delay: .23s; }
.grid > *:nth-child(5) { animation-delay: .29s; }
.grid > *:nth-child(6) { animation-delay: .35s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ Sidebar ============ */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 250px;
    background:
        radial-gradient(400px 300px at 100% 0%, rgba(20, 188, 48, .14), transparent),
        radial-gradient(300px 400px at 0% 100%, rgba(244, 209, 34, .06), transparent),
        linear-gradient(180deg, #0d1f13, #0a1810);
    display: flex; flex-direction: column;
    z-index: 30;
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.brand { padding: 20px 16px 16px; }
.brand-logo {
    background: #fff; border-radius: 14px; padding: 10px 12px;
    display: flex; justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .08);
    animation: popIn .6s cubic-bezier(.22, .9, .3, 1) both;
}
.brand-logo img { height: 42px; width: auto; }
.brand-sub {
    color: var(--amarillo); font-size: 10.5px; letter-spacing: 1.6px;
    text-transform: uppercase; text-align: center; margin-top: 10px; font-weight: 700;
    opacity: .95;
}
.sidebar nav { flex: 1; padding: 4px 10px 10px; overflow-y: auto; }
.sidebar nav::-webkit-scrollbar-thumb { border-color: #0a1810; background: rgba(255,255,255,.14); }
.nav-sec {
    color: #5c7a66; font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
    text-transform: uppercase; padding: 14px 12px 5px;
}
.sidebar nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; margin: 2px 0; border-radius: 10px;
    color: #a9bfb0; font-weight: 600; font-size: 13px;
    transition: var(--trans);
    position: relative;
}
.sidebar nav a svg { transition: var(--trans); flex-shrink: 0; opacity: .85; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(3px); }
.sidebar nav a:hover svg { transform: scale(1.12); opacity: 1; }
.sidebar nav a.active {
    background: linear-gradient(95deg, var(--verde), #0da726);
    color: #fff;
    box-shadow: 0 6px 18px rgba(20, 188, 48, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sidebar nav a.active svg { opacity: 1; }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.userbox { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amarillo), #dcb90e);
    color: #10231a; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center; font-weight: 800;
    flex-shrink: 0;
}
.avatar-img {
    border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block;
    box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(16, 26, 19, .18);
}
.uname { color: #fff; font-weight: 700; font-size: 13px; }
.urol { color: #7d9886; font-size: 11.5px; }
.logout {
    display: block; text-align: center; color: #7d9886; font-size: 12px; padding: 7px;
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; transition: var(--trans);
}
.logout:hover { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06); }

/* ============ Main / Topbar ============ */
.main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid rgba(16, 26, 19, .06);
    padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-search {
    display: flex; align-items: center; gap: 8px;
    background: rgba(16, 26, 19, .05); border: 1px solid transparent;
    border-radius: 99px; padding: 7px 16px; min-width: 230px;
    color: var(--gris); font-size: 13px; cursor: pointer; transition: var(--trans);
}
.topbar-search:hover { background: #fff; border-color: var(--borde); box-shadow: var(--sombra); }
.bell {
    position: relative; background: rgba(16, 26, 19, .05); border: none; cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--tinta); transition: var(--trans);
}
.bell:hover { background: #fff; box-shadow: var(--sombra); transform: translateY(-1px); }
.bell::after {
    content: ''; position: absolute; top: 7px; right: 8px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--verde); animation: pulseDot 2.2s infinite;
}
.fecha-hoy { color: var(--gris); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.content { padding: 26px 28px; flex: 1; }
.footer { padding: 14px 28px; color: #97a69b; font-size: 12px; border-top: 1px solid var(--borde); }

/* ============ Cards / grid ============ */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } }
.card {
    background: var(--blanco); border: 1px solid var(--borde);
    border-radius: var(--radio); box-shadow: var(--sombra);
    transition: var(--trans);
}
.card-body { padding: 20px; }
.card-head {
    padding: 16px 20px; border-bottom: 1px solid var(--borde);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.card-head .sub { color: var(--gris); font-size: 12.5px; margin-top: 2px; }

/* KPI */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--kpi-c1, var(--azul)), var(--kpi-c2, #7dd3fc));
}
.kpi::after {
    content: ''; position: absolute; top: -46px; right: -46px; width: 120px; height: 120px;
    border-radius: 50%; background: var(--kpi-c1, var(--azul)); opacity: .07;
    transition: var(--trans);
}
.kpi:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.kpi:hover::after { transform: scale(1.35); opacity: .1; }
.kpi .kpi-label { color: var(--gris); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.kpi .kpi-value { font-size: 25px; font-weight: 800; margin-top: 7px; letter-spacing: -.6px; }
.kpi .kpi-foot { font-size: 12px; color: var(--gris); margin-top: 5px; }
.kpi.acento { --kpi-c1: var(--verde); --kpi-c2: #86efac; }
.kpi.alerta { --kpi-c1: var(--rojo); --kpi-c2: #fda4af; }
.kpi.aviso  { --kpi-c1: var(--amarillo); --kpi-c2: #fde68a; }
.kpi.info   { --kpi-c1: var(--azul); --kpi-c2: #7dd3fc; }
.up { color: var(--verde-oscuro); font-weight: 700; }
.down { color: var(--rojo); font-weight: 700; }

/* ============ Tablas ============ */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th {
    text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
    color: var(--gris); padding: 11px 16px; border-bottom: 1px solid var(--borde);
    background: #fafcfa; white-space: nowrap; font-weight: 700;
    position: sticky; top: 0; z-index: 2;
}
.tabla td { padding: 12px 16px; border-bottom: 1px solid #f0f4f0; vertical-align: middle; transition: background .15s; }
.tabla tr:last-child td { border-bottom: none; }
.tabla tbody tr, .tabla tr { transition: background .15s; }
.tabla tr:hover td { background: #f4faf5; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla th.num { text-align: right; }
.t-strong { font-weight: 700; }
.t-sub { color: var(--gris); font-size: 12px; }
.tabla-wrap { overflow-x: auto; border-radius: 0 0 var(--radio) var(--radio); }
.cel-persona { display: flex; align-items: center; gap: 11px; }

/* ============ Badges / chips ============ */
.badge {
    display: inline-block; padding: 3.5px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge-ok     { background: var(--verde-suave); color: var(--verde-oscuro); }
.badge-danger { background: var(--rojo-suave); color: var(--rojo); }
.badge-warn   { background: var(--amarillo-suave); color: #a16207; }
.badge-muted  { background: #eef1ef; color: var(--gris); }
.badge-info   { background: var(--azul-suave); color: #0369a1; }
.badge-purple { background: var(--purpura-suave); color: var(--purpura); }
.chip {
    display: inline-block; padding: 3.5px 11px; border-radius: 8px;
    font-size: 11.5px; font-weight: 700; color: #fff; background: var(--chip, #64748b);
    white-space: nowrap; box-shadow: 0 2px 6px rgba(16, 26, 19, .12);
}

/* ============ Botones / forms ============ */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, var(--verde-claro), var(--verde-oscuro));
    color: #fff; border: none; cursor: pointer;
    padding: 9px 17px; border-radius: 11px; font-weight: 700; font-size: 13px;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(20, 188, 48, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: var(--trans);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 188, 48, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-sec {
    background: #fff; color: var(--tinta); border: 1px solid var(--borde);
    box-shadow: var(--sombra);
}
.btn-sec:hover { background: #f6faf7; box-shadow: var(--sombra-hover); }
.btn-warn {
    background: linear-gradient(135deg, #ffe14d, #e3bd0b); color: #533f03;
    box-shadow: 0 4px 14px rgba(244, 209, 34, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-warn:hover { box-shadow: 0 8px 22px rgba(244, 209, 34, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-danger { background: linear-gradient(135deg, #fb7185, #dc2626); box-shadow: 0 4px 14px rgba(225, 29, 72, .3); }
.btn-sm { padding: 5.5px 12px; font-size: 12px; border-radius: 9px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
input, select, textarea {
    font: inherit; padding: 9.5px 13px; border: 1.5px solid var(--borde); border-radius: 11px;
    background: #fff; color: var(--tinta); width: 100%; transition: var(--trans);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--verde);
    box-shadow: 0 0 0 4px rgba(20, 188, 48, .13);
}
input:hover, select:hover { border-color: #cfdad2; }
label { display: block; font-size: 12px; font-weight: 700; color: var(--gris); margin: 0 0 6px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros input, .filtros select { width: auto; min-width: 170px; }

/* ============ Gráficos CSS ============ */
.barras { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 12px 8px 0; }
.barra { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.barra .col {
    width: 100%; max-width: 48px;
    background: linear-gradient(180deg, var(--verde-claro), #0c8a21);
    border-radius: 9px 9px 4px 4px; min-height: 5px;
    transform-origin: bottom; animation: growY .9s cubic-bezier(.22, .9, .3, 1) both;
    box-shadow: 0 4px 12px rgba(20, 188, 48, .25);
    transition: var(--trans);
}
.barra:hover .col { filter: brightness(1.12); transform: scaleY(1.02); }
.barra:nth-child(1) .col { animation-delay: .10s; }
.barra:nth-child(2) .col { animation-delay: .20s; }
.barra:nth-child(3) .col { animation-delay: .30s; }
.barra:nth-child(4) .col { animation-delay: .40s; }
.barra:nth-child(5) .col { animation-delay: .50s; }
.barra:nth-child(6) .col { animation-delay: .60s; }
.barra.actual .col { background: linear-gradient(180deg, #ffe14d, #d4b312); box-shadow: 0 4px 12px rgba(244, 209, 34, .35); }
.barra .val { font-size: 11px; color: var(--gris); font-weight: 700; white-space: nowrap; }
.barra .eje { font-size: 11.5px; color: var(--gris); font-weight: 600; }
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.donut {
    width: 158px; height: 158px; border-radius: 50%; position: relative; flex-shrink: 0;
    animation: spinIn .9s cubic-bezier(.22, .9, .3, 1) both .15s;
    box-shadow: 0 8px 24px rgba(16, 26, 19, .12);
}
.donut::after {
    content: ''; position: absolute; inset: 21%; background: #fff; border-radius: 50%;
    box-shadow: inset 0 2px 8px rgba(16, 26, 19, .08);
}
.leyenda { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.leyenda .dot { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 8px; }

/* ============ Kanban ============ */
.kanban { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; align-items: start; }
@media (max-width: 1200px) { .kanban { grid-template-columns: repeat(3, 1fr); } }
.kanban > * { animation: fadeUp .5s both; }
.kanban > *:nth-child(1) { animation-delay: .05s; }
.kanban > *:nth-child(2) { animation-delay: .11s; }
.kanban > *:nth-child(3) { animation-delay: .17s; }
.kanban > *:nth-child(4) { animation-delay: .23s; }
.kanban > *:nth-child(5) { animation-delay: .29s; }
.kanban > *:nth-child(6) { animation-delay: .35s; }
.kcol { background: rgba(16, 26, 19, .045); border-radius: var(--radio); padding: 11px; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 11px; }
.kcol-head h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--gris); font-weight: 800; }
.kcol-head .cnt { background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; box-shadow: var(--sombra); }
.kcol.c-nuevo      { border-top: 3px solid var(--azul); }
.kcol.c-contactado { border-top: 3px solid var(--purpura); }
.kcol.c-evaluacion { border-top: 3px solid var(--amarillo); }
.kcol.c-aprobado   { border-top: 3px solid #14b8a6; }
.kcol.c-cerrado    { border-top: 3px solid var(--verde); }
.kcol.c-perdido    { border-top: 3px solid #9ca3af; }
.kcard {
    background: #fff; border-radius: 12px; padding: 12px 13px; margin-bottom: 9px;
    box-shadow: var(--sombra); font-size: 13px; cursor: grab;
    transition: var(--trans); border: 1px solid transparent;
}
.kcard:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--sombra-hover); border-color: var(--borde); }
.kcard .kn { font-weight: 700; }
.kcard .km { color: var(--verde-oscuro); font-weight: 800; margin-top: 3px; }
.kcard .kf { color: var(--gris); font-size: 11.5px; margin-top: 6px; display: flex; justify-content: space-between; }
.kcol-total { text-align: center; font-size: 12px; color: var(--gris); font-weight: 700; padding-top: 5px; }

/* ============ Buckets mora ============ */
.bucket {
    border-radius: var(--radio); padding: 17px 18px; color: #fff;
    position: relative; overflow: hidden; transition: var(--trans);
}
.bucket::after {
    content: ''; position: absolute; top: -30px; right: -30px; width: 100px; height: 100px;
    border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.bucket:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--sombra-hover); }
.bucket .b-dias { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; opacity: .92; }
.bucket .b-monto { font-size: 20px; font-weight: 800; margin-top: 6px; letter-spacing: -.4px; }
.bucket .b-cli { font-size: 12px; margin-top: 3px; opacity: .92; }
.b1 { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 8px 20px rgba(217, 119, 6, .3); }
.b2 { background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 8px 20px rgba(234, 88, 12, .3); }
.b3 { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 20px rgba(220, 38, 38, .3); }
.b4 { background: linear-gradient(135deg, #dc2626, #991b1b); box-shadow: 0 8px 20px rgba(153, 27, 27, .3); }
.b5 { background: linear-gradient(135deg, #7e22ce, #581c87); box-shadow: 0 8px 20px rgba(88, 28, 135, .3); }

/* ============ Timeline ============ */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--borde); margin-left: 8px; }
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before {
    content: ''; position: absolute; left: -8px; top: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--verde); border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(20, 188, 48, .25);
}
.timeline .tl-fecha { font-size: 11.5px; color: var(--gris); font-weight: 600; }
.timeline .tl-txt { margin-top: 3px; line-height: 1.6; }

/* ============ Login ============ */
.login-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #0a1810, #0f2417 55%, #0a1810);
    position: relative; overflow: hidden;
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.blob-1 { width: 480px; height: 480px; background: rgba(20, 188, 48, .35); top: -140px; right: -100px; animation: float 9s ease-in-out infinite alternate; }
.blob-2 { width: 420px; height: 420px; background: rgba(244, 209, 34, .22); bottom: -160px; left: -120px; animation: float 11s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 260px; height: 260px; background: rgba(14, 165, 233, .18); top: 40%; left: 55%; animation: float 13s ease-in-out infinite alternate; }
.login-card {
    width: 410px; max-width: 92vw;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(20px);
    border-radius: 22px; padding: 36px 34px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12);
    animation: fadeUp .7s cubic-bezier(.22, .9, .3, 1) both;
    position: relative; z-index: 2;
}
.login-card .lg { display: flex; justify-content: center; margin-bottom: 8px; }
.login-card .lg img { height: 64px; animation: popIn .8s cubic-bezier(.22, .9, .3, 1) both .15s; }
.login-card h1 { text-align: center; font-size: 17px; margin: 10px 0 2px; font-weight: 800; letter-spacing: -.3px; }
.login-card .sub { text-align: center; color: var(--gris); font-size: 13px; margin-bottom: 24px; }
.login-card .campo { margin-bottom: 15px; }
.login-err {
    background: var(--rojo-suave); color: var(--rojo); border-radius: 11px;
    padding: 11px 13px; font-size: 13px; margin-bottom: 15px; text-align: center;
    animation: fadeUp .3s both;
}
.login-demo {
    margin-top: 18px; text-align: center; font-size: 12px; color: var(--gris);
    background: linear-gradient(135deg, #f4faf5, #eef7f0);
    border: 1px dashed #bcd9c2; border-radius: 11px; padding: 11px;
}

/* ============ Toast ============ */
.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(24px) scale(.95);
    background: rgba(13, 26, 17, .95); backdrop-filter: blur(10px);
    color: #fff; padding: 14px 24px; border-radius: 14px;
    font-size: 13.5px; opacity: 0; pointer-events: none;
    transition: all .32s cubic-bezier(.22, .9, .3, 1);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .4); z-index: 100; max-width: 80vw;
    border-left: 4px solid var(--verde);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ============ Click-to-call ============ */
.tel-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: inherit; font-weight: 600; white-space: nowrap;
    border-bottom: 1px dashed #b7c9bc; padding-bottom: 1px;
    transition: var(--trans);
}
.tel-link svg { color: var(--verde-oscuro); opacity: .75; transition: var(--trans); }
.tel-link:hover { color: var(--verde-oscuro); border-bottom-color: var(--verde); }
.tel-link:hover svg { transform: rotate(-12deg) scale(1.2); opacity: 1; }

/* ============ Utilidades ============ */
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--gris); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.progress { background: #e8efe9; border-radius: 999px; height: 8px; overflow: hidden; min-width: 90px; }
.progress > span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--verde-claro), var(--verde-oscuro));
    border-radius: 999px; transform-origin: left;
    animation: growX .9s cubic-bezier(.22, .9, .3, 1) both .3s;
}
.score-pill { font-weight: 800; font-variant-numeric: tabular-nums; }
.sec-title { font-size: 15px; font-weight: 800; margin: 22px 0 12px; }

/* ============ Modales ============ */
.modal-bg {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(16, 26, 19, .45); backdrop-filter: blur(3px);
    display: none; align-items: flex-start; justify-content: center;
    padding: 40px 16px; overflow-y: auto;
}
.modal-bg.show { display: flex; animation: fadeIn .18s both; }
.modal {
    background: #fff; border-radius: 18px; width: 640px; max-width: 100%;
    box-shadow: 0 30px 70px rgba(0,0,0,.35); animation: fadeUp .28s cubic-bezier(.22,.9,.3,1) both;
    margin: auto 0;
}
.modal.wide { width: 860px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--borde); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 17px; font-weight: 800; }
.modal-x { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--gris); line-height: 1; width: auto; padding: 0 4px; box-shadow: none; }
.modal-x:hover { color: var(--tinta); transform: none; }
.modal-body { padding: 20px 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--borde); display: flex; justify-content: flex-end; gap: 10px; }
.crow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.crow > input { flex: 1; }
.crow > select { width: auto; min-width: 110px; }
.row-add { background: none; border: 1px dashed var(--borde); color: var(--verde-oscuro); box-shadow: none; font-weight: 700; }
.row-add:hover { background: var(--verde-suave); transform: none; box-shadow: none; }
.row-del { background: #fff; color: var(--rojo); border: 1px solid var(--borde); box-shadow: none; padding: 8px 11px; }
.row-del:hover { background: var(--rojo-suave); transform: none; box-shadow: none; }
