.btn-light {
    --bs-btn-color: #000;
    --bs-btn-bg: #cad85d !;
    --bs-btn-bg: #cad85d !i;
    --bs-btn-bg: #cad85d !important;
    --bs-btn-hover-bg: #cad85d !;
    --bs-btn-hover-bg: #cad85d !i;
    --bs-btn-hover-bg: #cad85d !important;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #cad85d !;
    --bs-btn-active-bg: #cad85d !i;
    --bs-btn-active-bg: #cad85d !important;
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #cad85d !;
    --bs-btn-disabled-bg: #cad85d !important;
}



/* ── ENCABEZADO ── */
.prest-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    border-radius: var(--radius);
    padding: 22px 28px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(37,99,235,.25);
}
.prest-header .prest-numero {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.prest-header .prest-sub {
    font-size: .82rem;
    color: rgba(255,255,255,.65);
    margin-top: 2px;
}
.btn-volver {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff !important;
    border-radius: 8px;
    font-size: .82rem;
    padding: 6px 14px;
    transition: background .2s;
}
.btn-volver:hover { background: rgba(255,255,255,.28); }

/* ── BADGE ESTADO PRINCIPAL ── */
.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 30px;
    letter-spacing: .3px;
}
.badge-estado.prestado   { background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.badge-estado.devuelto   { background: #d1fae5; color: #065f46; border: 1.5px solid #6ee7b7; }
.badge-estado.comprado   { background: #f3f4f6; color: #111827; border: 1.5px solid #d1d5db; }
.badge-estado.cancelado  { background: #fee2e2; color: #991b1b; border: 1.5px solid #fca5a5; }
.badge-estado.vencido    { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; animation: pulse-warn 2s infinite; }

@keyframes pulse-warn {
    0%,100% { box-shadow: 0 0 0 0 rgba(217,119,6,.3); }
    50%      { box-shadow: 0 0 0 6px rgba(217,119,6,0); }
}

/* ── TARJETAS INFO ── */
.info-card {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
}
.info-card:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(0,0,0,.13); }
.info-card .card-body { padding: 20px 22px; }
.info-card-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.info-card-icon.azul    { background: #dbeafe; color: var(--clr-azul); }
.info-card-icon.verde   { background: #d1fae5; color: var(--clr-verde); }
.info-card-icon.naranja { background: #fef3c7; color: var(--clr-naranja); }
.info-card-icon.rojo    { background: #fee2e2; color: var(--clr-rojo); }
.info-card .label { font-size: .75rem; color: var(--clr-gris); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.info-card .valor { font-size: 1.05rem; font-weight: 700; color: var(--clr-oscuro); line-height: 1.2; }
.info-card .sub   { font-size: .78rem; color: var(--clr-gris); margin-top: 2px; }
.info-card .sub.rojo { color: var(--clr-rojo); font-weight: 600; }

/* ── OBSERVACIONES ── */
.obs-box {
    background: linear-gradient(90deg, #eff6ff, #fff);
    border-left: 4px solid var(--clr-azul);
    border-radius: 0 10px 10px 0;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: .88rem;
    color: #1e40af;
}

/* ── CARD SECCIÓN ── */
.seccion-card {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.seccion-header {
    background: #fff;
    border-bottom: 2px solid #f1f5f9;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.seccion-header h5 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--clr-oscuro);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.seccion-header h5 .icono-titulo {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.icono-titulo.azul  { background: #dbeafe; color: var(--clr-azul); }
.icono-titulo.ambar { background: #fef3c7; color: var(--clr-naranja); }

.badge-pill-custom {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.badge-pill-custom.azul  { background: #dbeafe; color: var(--clr-azul); }
.badge-pill-custom.ambar { background: #fef3c7; color: #92400e; }

/* ── TABLA ── */
.tabla-equipos thead th {
    background: #f8fafc;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--clr-gris);
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 14px;
}
.tabla-equipos tbody td { padding: 14px 14px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.tabla-equipos tbody tr:last-child td { border-bottom: none; }
.tabla-equipos tbody tr:hover { background: #f8fafc; }

.imei-chip {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: .78rem;
    font-weight: 700;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .5px;
}
.imei-chip.cambio { background: #fefce8; border-color: #fde047; color: #713f12; }
.imei-flecha { color: #94a3b8; font-size: .7rem; margin: 3px 0; display: block; }

.producto-nombre { font-weight: 700; font-size: .88rem; color: var(--clr-oscuro); }
.producto-sub    { font-size: .75rem; color: var(--clr-gris); margin-top: 1px; }
.badge-cambio-prod {
    font-size: .7rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde047;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

/* ── BADGES ESTADO TABLA ── */
.badge-tbl {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
}
.badge-tbl.prestado   { background: #dbeafe; color: #1d4ed8; }
.badge-tbl.devuelto   { background: #d1fae5; color: #065f46; }
.badge-tbl.comprado   { background: #f3f4f6; color: #111827; border: 1px solid #d1d5db; }
.badge-tbl.cambiado   { background: #fef3c7; color: #92400e; }
.badge-tbl.secondary  { background: #f3f4f6; color: #6b7280; }

/* ── BOTONES ACCIÓN ── */
.btn-accion {
    font-size: .72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 7px;
    border: none;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all .18s;
    cursor: pointer;
}
.btn-accion.devolver { background: #d1fae5; color: #065f46; }
.btn-accion.devolver:hover { background: #059669; color: #fff; }
.btn-accion.comprar  { background: #f3f4f6; color: #111827; border: 1px solid #d1d5db; }
.btn-accion.comprar:hover  { background: #111827; color: #fff; }
.btn-accion.cambiar  { background: #fef3c7; color: #92400e; }
.btn-accion.cambiar:hover  { background: #d97706; color: #fff; }

.procesado-tag {
    font-size: .75rem;
    color: #94a3b8;
    font-style: italic;
    display: flex; align-items: center; gap: 5px;
}

/* ── TIMELINE ── */
.timeline-wrap { padding: 8px 0; }
.tl-item {
    display: flex;
    gap: 18px;
    padding-bottom: 28px;
    position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px; top: 40px;
    width: 2px;
    bottom: 0;
    background: linear-gradient(to bottom, #e2e8f0, transparent);
}
.tl-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(217,119,6,.3);
    position: relative;
    z-index: 1;
}
.tl-body {
    background: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 14px 18px;
    flex: 1;
}
.tl-body:hover { border-color: #fde047; background: #fffbeb; }
.tl-productos {
    display: flex; align-items: center; gap: 8px;
    font-size: .88rem; font-weight: 700;
    color: var(--clr-oscuro); flex-wrap: wrap;
    margin-bottom: 6px;
}
.tl-productos .flecha { color: #d97706; font-size: .9rem; }
.tl-productos .nuevo  { color: var(--clr-azul); }
.tl-imeis {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px; flex-wrap: wrap;
}
.tl-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px; flex-wrap: wrap; gap: 6px;
}
.tl-motivo {
    font-size: .78rem; color: #64748b;
    background: #f1f5f9; border-radius: 6px;
    padding: 3px 10px; display: inline-flex; align-items: center; gap: 5px;
}
.tl-fecha { font-size: .75rem; color: #94a3b8; }
.tl-user  { font-size: .75rem; color: #94a3b8; }

/* ── AUTOCOMPLETE ── */
.autocomplete-wrap { position: relative; }
#listaProductos {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 9999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    list-style: none; margin: 4px 0 0; padding: 4px 0;
    max-height: 240px; overflow-y: auto; display: none;
}
.producto-item { padding: 10px 14px; cursor: pointer; transition: background .15s; }
.producto-item:hover { background: #f0f9ff; }
.p-nombre { font-size: .85rem; font-weight: 700; color: #1e293b; }
.p-info   { font-size: .75rem; color: #94a3b8; margin-top: 2px; }

/* ── VACÍO ── */
.empty-state { padding: 48px 20px; text-align: center; color: #94a3b8; }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 10px; }
    
        :root {
            --lime: #cad85b;
            --lime-dark: #afc04a;
            --dark: #0e0f0c;
            --dark2: #161712;
            --dark3: #1e2018;
            --card: #1a1c15;
            --border: rgba(202,216,91,0.15);
            --text-muted: #6b7060;
            --text-light: #c8ccb8;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body.login {
            font-family: 'DM Sans', sans-serif;
           
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            
            position: relative;
        }

        /* ── Fondo animado ── */
        body.login::before {
            content: '';
            position: fixed;
            inset: 0;
            background:
                radial-gradient(ellipse 60% 50% at 20% 80%, rgba(202,216,91,0.07) 0%, transparent 60%),
                radial-gradient(ellipse 40% 40% at 80% 20%, rgba(202,216,91,0.05) 0%, transparent 60%);
            pointer-events: none;
        }

        /* Grid decorativo */
        body.login::after {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(202,216,91,0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(202,216,91,0.04) 1px, transparent 1px);
            background-size: 60px 60px;
            pointer-events: none;
        }

        /* ── Flash error ── */
        .flash-error {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 999;
            background: #2a1515;
            border: 1px solid #ff4444;
            color: #ff8080;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            animation: slideDown .3s ease;
        }
        .flash-error .close-btn {
            background: none;
            border: none;
            color: #ff8080;
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
            to   { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        /* ── Wrapper ── */
        .login-wrapper {
            display: flex;
            width: 900px;
            max-width: 95vw;
            min-height: 540px;
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid var(--border);
            box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
            animation: fadeUp .6s ease both;
            position: relative;
            z-index: 1;
        }

        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(24px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* ── Panel izquierdo ── */
        .panel-left {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 48px 40px;
            position: relative;
            border-right: 1px solid var(--border);
        }

        .panel-left::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(202,216,91,0.08) 0%, transparent 70%);
        }

        .logo-wrap {
            position: relative;
            z-index: 1;
            text-align: center;
        }

        .logo-wrap img {
            max-width: 180px;
            max-height: 180px;
            object-fit: contain;
            border-radius: 16px;
            filter: drop-shadow(0 8px 24px rgba(202,216,91,0.2));
            animation: float 4s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50%       { transform: translateY(-8px); }
        }

        .logo-placeholder {
            width: 120px;
            height: 120px;
            border-radius: 24px;
            background: linear-gradient(135deg, var(--dark2), var(--dark3));
            border: 2px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
        }

        .logo-placeholder svg {
            width: 48px;
            height: 48px;
            color: var(--lime);
        }

        .business-name {
            font-family: 'Syne', sans-serif;
            font-size: 22px;
            font-weight: 700;
            color: #fff;
            margin-top: 24px;
            text-align: center;
            letter-spacing: -0.3px;
        }

        .business-tagline {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 8px;
            text-align: center;
            letter-spacing: 0.5px;
        }

        /* Decoración esquinas */
        .corner {
            position: absolute;
            width: 40px;
            height: 40px;
            opacity: 0.3;
        }
        .corner-tl { top: 20px; left: 20px; border-top: 2px solid var(--lime); border-left: 2px solid var(--lime); border-radius: 4px 0 0 0; }
        .corner-br { bottom: 20px; right: 20px; border-bottom: 2px solid var(--lime); border-right: 2px solid var(--lime); border-radius: 0 0 4px 0; }

        /* ── Panel derecho ── */
        .panel-right {
            width: 400px;
            background: var(--card);
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 52px 44px;
        }

        .login-header {
            margin-bottom: 36px;
        }

        .login-header .eyebrow {
            font-size: 11px;
            font-weight: 500;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: var(--lime);
            margin-bottom: 10px;
        }

        .login-header h1 {
            font-family: 'Syne', sans-serif;
            font-size: 28px;
            font-weight: 800;
            color: #fff;
            line-height: 1.1;
        }

        .login-header p {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 8px;
        }

        /* ── Formulario ── */
        .form-group {
            margin-bottom: 18px;
        }

        .form-group label {
            display: block;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-light);
            margin-bottom: 8px;
            letter-spacing: 0.3px;
        }

        .input-wrap {
            position: relative;
        }

        .input-wrap svg {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            color: var(--text-muted);
            transition: color .2s;
            pointer-events: none;
        }

        .input-wrap input {
            width: 100%;
            padding: 12px 14px 12px 42px;
            background: var(--dark3);
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 10px;
            color: #fff;
            font-size: 14px;
            font-family: 'DM Sans', sans-serif;
            transition: border-color .2s, box-shadow .2s;
            outline: none;
        }

        .input-wrap input::placeholder {
            color: var(--text-muted);
        }

        .input-wrap input:focus {
            border-color: var(--lime);
            box-shadow: 0 0 0 3px rgba(202,216,91,0.1);
        }

        .input-wrap input:focus + svg,
        .input-wrap:focus-within svg {
            color: var(--lime);
        }

        /* Toggle password */
        .toggle-pass {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            padding: 0;
            display: flex;
            align-items: center;
            transition: color .2s;
        }
        .toggle-pass:hover { color: var(--lime); }
        .toggle-pass svg { width: 16px; height: 16px; }

        /* ── Botón submit ── */
        .btn-login {
            width: 100%;
            padding: 13px;
            background: var(--lime);
            border: none;
            border-radius: 10px;
            color: #0e0f0c;
            font-family: 'Syne', sans-serif;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 8px;
            transition: background .2s, transform .15s, box-shadow .2s;
            letter-spacing: 0.3px;
            position: relative;
            overflow: hidden;
        }

        .btn-login::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
        }

        .btn-login:hover {
            background: var(--lime-dark);
            transform: translateY(-1px);
            box-shadow: 0 8px 24px rgba(202,216,91,0.3);
        }

        .btn-login:active {
            transform: translateY(0);
        }

        /* ── Forgot password ── */
        .forgot-link {
            display: block;
            text-align: center;
            margin-top: 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-decoration: none;
            transition: color .2s;
        }

        .forgot-link:hover {
            color: var(--lime);
            text-decoration: none;
        }

        /* ── Responsive ── */
        @media (max-width: 720px) {
            .panel-left { display: none; }
            .panel-right { width: 100%; padding: 40px 28px; }
            .login-wrapper { width: 100%; border-radius: 16px; }
        }
