/* ================================================================
   PRESTFAST DESIGN SYSTEM - ULTRA LUXURY & PREMIUM FINTECH THEME
   Inspired by Apple Wallet, Revolut 10, Stripe & Modern Fintechs
   High-end typography, glassmorphism, refined micro-elevations
   ================================================================ */

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/vendor/plus-jakarta-sans/PlusJakartaSans-variable.ttf') format('truetype');
}

:root {
    /* Brand Foundation */
    --pf-obsidian-darkest: #070d18;
    --pf-obsidian: #0b1320;
    --pf-obsidian-card: #111c30;
    --pf-slate-border: rgba(255, 255, 255, 0.08);
    
    /* Primary Accents */
    --pf-blue: #0284c7;
    --pf-blue-hover: #0369a1;
    --pf-cyan: #00b4d8;
    --pf-cyan-light: #38bdf8;
    
    /* Semantic Colors */
    --pf-emerald: #10b981;
    --pf-emerald-dark: #059669;
    --pf-amber: #f59e0b;
    --pf-amber-dark: #d97706;
    --pf-rose: #f43f5e;
    --pf-rose-dark: #dc2626;

    /* Neutrals & Surfaces */
    --pf-bg: #f1f5f9;
    --pf-surface: #ffffff;
    --pf-text-primary: #0f172a;
    --pf-text-secondary: #475569;
    --pf-text-muted: #94a3b8;
    --pf-border: #e2e8f0;
    --pf-border-subtle: #f1f5f9;

    /* Shadows & Elevations */
    --pf-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --pf-shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
    --pf-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    --pf-shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.04);

    /* Radii */
    --pf-radius-sm: 8px;
    --pf-radius-md: 12px;
    --pf-radius-lg: 16px;
    --pf-radius-xl: 20px;
    --pf-radius-pill: 9999px;

    /* Legacy / Easypres Aliases */
    --ep-navy: var(--pf-obsidian);
    --ep-blue: var(--pf-blue);
    --ep-muted: var(--pf-text-secondary);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--pf-bg);
    color: var(--pf-text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* ══════════════ 1. NAVBAR SUPERIOR (PREMIUM OBSIDIAN BAR) ══════════════ */
.main-header {
    background: linear-gradient(180deg, #0b1320 0%, #070d18 100%);
    color: #ffffff;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar-brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.04);
}

.nav-toggle-btn:active {
    transform: scale(0.95);
}

.header-logo {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* User Badge & Profile Pill */
.user-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 12px 4px 5px;
    border-radius: var(--pf-radius-pill);
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar-circle {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    border: 1.5px solid #0b1320;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.user-role {
    font-size: 0.65rem;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #f87171;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #ffffff;
    transform: scale(1.05);
}

.btn-logout:active {
    transform: scale(0.94);
}

/* ══════════════ 2. CONTENEDOR PRINCIPAL Y ENCABEZADOS ══════════════ */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 76px;
    background-color: var(--pf-bg);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.content-wrapper {
    flex: 1;
    padding: 14px 12px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (min-width: 641px) {
    .content-wrapper {
        padding: 18px 16px;
    }
}

.content-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.content-title {
    font-size: clamp(1.15rem, 4.5vw, 1.38rem);
    font-weight: 800;
    color: var(--pf-text-primary);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.content-subtitle {
    font-size: clamp(0.72rem, 3vw, 0.78rem);
    font-weight: 500;
    color: var(--pf-text-secondary);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* Status Chip "En Línea" con radar ping */
.status-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
    padding: 6px 14px;
    border-radius: var(--pf-radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.pulse-beacon {
    position: relative;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

.pulse-beacon::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.4);
    animation: beacon-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beacon-ping {
    0% { transform: scale(0.6); opacity: 1; }
    80%, 100% { transform: scale(1.9); opacity: 0; }
}

/* ══════════════ 3. TARJETAS FINANCIERAS DE ALTA GAMA (STAT CARDS) ══════════════ */
.title-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-right: 10px;
    border: 1px solid rgba(2, 132, 199, 0.2);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.1);
}

.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 680px) {
    .stat-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 22px;
    }
}

.stat-card-corp,
.stat-card-premium {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 16px 14px 16px;
    color: var(--pf-text-primary);
    overflow: hidden;
    cursor: default;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 480px) {
    .stat-card-corp,
    .stat-card-premium {
        padding: 18px 18px 16px 18px;
    }
}

.stat-card-corp:hover,
.stat-card-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

/* Hairline Top Accents & Ambient Corner Sheens */
.stat-card-corp.accent-emerald,
.stat-card-premium.card-emerald {
    border-top: 3.5px solid #10b981;
    background: radial-gradient(circle at 92% 10%, rgba(16, 185, 129, 0.06) 0%, transparent 55%), #ffffff !important;
}
.stat-card-corp.accent-emerald:hover {
    border-color: #cbd5e1;
    border-top-color: #059669;
}

.stat-card-corp.accent-amber,
.stat-card-premium.card-amber {
    border-top: 3.5px solid #f59e0b;
    background: radial-gradient(circle at 92% 10%, rgba(245, 158, 11, 0.06) 0%, transparent 55%), #ffffff !important;
}
.stat-card-corp.accent-amber:hover {
    border-color: #cbd5e1;
    border-top-color: #d97706;
}

.stat-card-corp.accent-blue,
.stat-card-premium.card-blue {
    border-top: 3.5px solid #0284c7;
    background: radial-gradient(circle at 92% 10%, rgba(2, 132, 199, 0.06) 0%, transparent 55%), #ffffff !important;
}
.stat-card-corp.accent-blue:hover {
    border-color: #cbd5e1;
    border-top-color: #0369a1;
}

.stat-card-corp.accent-rose,
.stat-card-premium.card-rose {
    border-top: 3.5px solid #f43f5e;
    background: radial-gradient(circle at 92% 10%, rgba(244, 63, 94, 0.06) 0%, transparent 55%), #ffffff !important;
}
.stat-card-corp.accent-rose:hover {
    border-color: #cbd5e1;
    border-top-color: #e11d48;
}

/* Clear any legacy pseudo-elements */
.stat-card-corp::before,
.stat-card-premium::before {
    display: none !important;
}

.stat-card-glow,
.stat-watermark {
    display: none !important;
}

/* Top Row: Label & Squircle Icon Badge */
.stat-card-top,
.stat-card-corp-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    gap: 8px;
}

.stat-label,
.stat-corp-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-icon-wrapper,
.stat-corp-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.stat-card-corp.accent-emerald .stat-corp-icon,
.stat-card-premium.card-emerald .stat-icon-wrapper {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.stat-card-corp.accent-amber .stat-corp-icon,
.stat-card-premium.card-amber .stat-icon-wrapper {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.stat-card-corp.accent-blue .stat-corp-icon,
.stat-card-premium.card-blue .stat-icon-wrapper {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.24);
}

.stat-card-corp.accent-rose .stat-corp-icon,
.stat-card-premium.card-rose .stat-icon-wrapper {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
    border: 1px solid rgba(244, 63, 94, 0.24);
}

.stat-card-corp:hover .stat-corp-icon,
.stat-card-premium:hover .stat-icon-wrapper {
    transform: scale(1.08);
}

/* Card Body & Amounts */
.stat-card-body,
.stat-card-corp-body {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.stat-amount,
.stat-corp-amount {
    font-size: clamp(1.22rem, 3.8vw, 1.48rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.stat-currency,
.stat-corp-currency {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 4px;
}

.stat-unit,
.stat-corp-unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

/* Footer Tag Pill */
.stat-corp-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.stat-tag,
.stat-tag-corp {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stat-card-corp.accent-emerald .stat-tag,
.stat-card-corp.accent-emerald .stat-tag-corp,
.stat-card-premium.card-emerald .stat-tag {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.stat-card-corp.accent-amber .stat-tag,
.stat-card-corp.accent-amber .stat-tag-corp,
.stat-card-premium.card-amber .stat-tag {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.stat-card-corp.accent-blue .stat-tag,
.stat-card-corp.accent-blue .stat-tag-corp,
.stat-card-premium.card-blue .stat-tag {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.stat-card-corp.accent-rose .stat-tag,
.stat-card-corp.accent-rose .stat-tag-corp,
.stat-card-premium.card-rose .stat-tag {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

/* Compatibilidad con clases Small-Box tradicionales */
.small-box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.small-box {
    border-radius: var(--pf-radius-xl);
    position: relative;
    display: block;
    box-shadow: var(--pf-shadow-md);
    color: #fff;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.small-box.bg-success { background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important; }
.small-box.bg-warning { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important; color: #fff !important; }
.small-box.bg-info    { background: linear-gradient(135deg, #0284c7 0%, #00b4d8 100%) !important; }
.small-box.bg-danger  { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important; }

.small-box .inner h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.small-box .inner p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.small-box .icon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 2.8rem;
    opacity: 0.15;
}

/* ══════════════ 4. ACCIONES OPERATIVAS (PREMIUM HERO + COMPANION TILES) ══════════════ */
.actions-card-premium {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    padding: 18px 16px;
    margin-bottom: 22px;
    box-sizing: border-box;
    width: 100%;
}

@media (min-width: 641px) {
    .actions-card-premium {
        padding: 22px;
        margin-bottom: 24px;
    }
}

.actions-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.actions-card-title {
    font-size: clamp(1rem, 3.5vw, 1.12rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
}

.actions-title-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.actions-card-desc {
    font-size: clamp(0.74rem, 2.5vw, 0.8rem);
    font-weight: 500;
    color: #64748b;
    margin-top: 3px;
}

.actions-quick-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Hero Button: Iniciar Ruta de Cobro */
.action-hero-btn {
    position: relative;
    background: linear-gradient(135deg, #0b1320 0%, #152238 50%, #070d18 100%);
    border-radius: 18px;
    padding: 18px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    box-shadow: 0 10px 28px -4px rgba(7, 13, 24, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.action-hero-btn::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 100%;
    background: radial-gradient(circle at 100% 50%, rgba(2, 132, 199, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.action-hero-btn:hover {
    background: linear-gradient(135deg, #111c30 0%, #1c2d4a 50%, #0b1320 100%);
    box-shadow: 0 16px 36px -4px rgba(7, 13, 24, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}

.action-hero-btn:active {
    transform: scale(0.985);
}

.action-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.action-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
    flex-shrink: 0;
}

.action-hero-text {
    flex: 1;
    min-width: 0;
}

.action-hero-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-hero-text h4 {
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.hero-chip-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-hero-text p {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.25;
}

.action-hero-chevron {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.88rem;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.action-hero-btn:hover .action-hero-chevron {
    transform: translateX(4px);
    background: rgba(2, 132, 199, 0.4);
    border-color: #38bdf8;
}

/* Secondary Companion Grid */
.action-subgrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 641px) {
    .action-subgrid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-top: 14px;
    }
}

.action-tile-btn {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.action-tile-btn:hover {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.action-tile-green:hover {
    border-color: #10b981;
}

.action-tile-blue:hover {
    border-color: #0284c7;
}

.action-tile-btn:active {
    transform: scale(0.98);
}

.action-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.action-tile-green .action-tile-icon {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.action-tile-blue .action-tile-icon {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.action-tile-btn:hover .action-tile-icon {
    transform: scale(1.08);
}

.action-tile-text {
    flex: 1;
    min-width: 0;
}

.action-tile-text h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.action-tile-text p {
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.action-tile-arrow {
    color: #cbd5e1;
    font-size: 0.85rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.action-tile-btn:hover .action-tile-arrow {
    transform: translateX(3px);
    color: #0f172a;
}

.action-tile-text {
    flex: 1;
    min-width: 0;
}

.action-tile-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.action-tile-text p {
    font-size: 0.72rem;
    color: var(--pf-text-secondary);
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.2;
}

.action-tile-arrow {
    font-size: 0.75rem;
    color: var(--pf-text-muted);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.action-tile-btn:hover .action-tile-arrow {
    transform: translateX(2px);
    color: var(--pf-text-primary);
}

/* ══════════════ 5. DOCK DE NAVEGACIÓN INFERIOR (FROSTED GLASS) ══════════════ */
.footer-movil {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 66px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1025;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
    padding: 0 6px;
}

.footer-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--pf-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.footer-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--pf-radius-pill);
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.footer-icon-wrapper i {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.footer-btn.active {
    color: var(--pf-blue);
    font-weight: 800;
}

.footer-btn.active .footer-icon-wrapper {
    background: rgba(2, 132, 199, 0.12);
    color: var(--pf-blue);
    transform: translateY(-2px);
}

.footer-btn.active i {
    transform: scale(1.08);
}

.footer-btn:active {
    transform: scale(0.94);
}

/* ══════════════ 6. SIDEBAR LATERAL (ADMINLTE DARK OBSIDIAN) ══════════════ */
.main-sidebar {
    position: fixed;
    top: 0;
    left: -275px;
    width: 275px;
    height: 100vh;
    background: linear-gradient(180deg, #070d18 0%, #0b1320 100%);
    color: #cbd5e1;
    z-index: 1040;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 22px 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
}

.main-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 13, 24, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1035;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 10px;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--pf-radius-md);
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.sidebar-item a:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-item.active a {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.25) 0%, rgba(2, 132, 199, 0.08) 100%);
    color: #38bdf8;
    font-weight: 700;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.sidebar-item a i {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

/* ══════════════ 7. COMPONENTES: BOTONES, INPUTS, TARJETAS Y TABLAS ══════════════ */
.btn-easypres {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-radius: var(--pf-radius-md);
    height: 48px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    width: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.btn-easypres:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

.btn-easypres:active {
    transform: scale(0.98);
}

.card-adminlte {
    background: #ffffff;
    border-radius: var(--pf-radius-xl);
    box-shadow: var(--pf-shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--pf-border);
    overflow: hidden;
}

.card-adminlte-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--pf-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.card-adminlte-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.02em;
}

.form-control {
    display: block;
    width: 100%;
    height: 46px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--pf-text-primary);
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--pf-radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--pf-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
    outline: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-easypres {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-easypres th {
    background: #f8fafc;
    color: var(--pf-text-secondary);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 16px;
    border-bottom: 2px solid var(--pf-border);
    text-align: left;
}

.table-easypres td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--pf-border-subtle);
    vertical-align: middle;
}

.table-easypres tbody tr:hover {
    background-color: #f8fafc;
}

@media (max-width: 640px) {
    .table-easypres {
        font-size: 0.78rem;
    }
    .table-easypres th {
        padding: 8px 6px;
        font-size: 0.68rem;
        letter-spacing: 0.02em;
    }
    .table-easypres td {
        padding: 9px 6px;
    }
}

/* ══════════════ VISTAS RESPONSIVAS MÓVILES (SIN SCROLL HORIZONTAL) ══════════════ */
.mobile-cards-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.desktop-table-view {
    display: none;
    width: 100%;
}

@media (min-width: 641px) {
    .mobile-cards-view {
        display: none !important;
    }
    .desktop-table-view {
        display: block !important;
    }
}

/* Card: Excusas y Visitas (Móvil) */
.excusa-card {
    background: #ffffff;
    border-radius: var(--pf-radius-lg);
    border: 1px solid var(--pf-border);
    border-left: 4px solid var(--pf-amber);
    padding: 13px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    width: 100%;
}

.excusa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.excusa-cliente-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    line-height: 1.25;
}

.excusa-nota-box {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: var(--pf-text-secondary);
    margin: 6px 0 8px 0;
}

.excusa-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.74rem;
    color: var(--pf-text-secondary);
}

.excusa-footer-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.excusa-footer-item strong {
    color: var(--pf-text-primary);
}

/* Card: Gastos de Ruta (Móvil) */
.gasto-card {
    background: #ffffff;
    border-radius: var(--pf-radius-lg);
    border: 1px solid var(--pf-border);
    border-left: 4px solid #ef4444;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.gasto-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.gasto-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.gasto-info-text {
    min-width: 0;
    flex: 1;
}

.gasto-concepto-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gasto-meta-text {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gasto-card-right {
    text-align: right;
    flex-shrink: 0;
}

.gasto-monto-tag {
    font-size: 0.98rem;
    font-weight: 800;
    color: #dc2626;
    letter-spacing: -0.02em;
    display: block;
}

.gasto-badge-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: var(--pf-radius-pill);
    display: inline-block;
    margin-top: 2px;
}

/* Card: Garantías (Móvil) */
.garantia-card {
    background: #ffffff;
    border-radius: var(--pf-radius-lg);
    border: 1px solid var(--pf-border);
    border-left: 4px solid var(--pf-blue);
    padding: 13px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    width: 100%;
}

.garantia-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.garantia-card-desc {
    font-size: 0.82rem;
    color: var(--pf-text-secondary);
    margin-bottom: 6px;
}

.garantia-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.76rem;
}

/* Formulario Responsivo de Gastos */
.form-grid-gastos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 600px) {
    .form-grid-gastos {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: var(--pf-radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-activo { 
    background: #ecfdf5; 
    color: #059669; 
    border: 1px solid #a7f3d0; 
}

.badge-atrasado { 
    background: #fef2f2; 
    color: #dc2626; 
    border: 1px solid #fecaca; 
}

.badge-saldado { 
    background: #f1f5f9; 
    color: #475569; 
    border: 1px solid #e2e8f0; 
}

/* ══════════════ 8. RUTA DE COBRO Y TARJETAS DE PRÉSTAMOS ══════════════ */
.ruta-card {
    background: #ffffff;
    border-radius: var(--pf-radius-lg);
    border: 1px solid var(--pf-border);
    border-left: 3px solid #cbd5e1;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.ruta-card.card-cobrado-hoy {
    border-left: 3px solid #10b981;
    background: #ffffff;
}

.ruta-card:hover {
    box-shadow: 0 4px 12px 0 rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.badge-cobrado-hoy {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pendiente-hoy {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-parcial-hoy {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ruta-filters-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (min-width: 480px) {
    .ruta-filters-bar {
        gap: 8px;
    }
}

.ruta-filter-pill {
    padding: 8px 4px;
    border-radius: var(--pf-radius-pill);
    font-size: clamp(0.70rem, 2.5vw, 0.82rem);
    font-weight: 700;
    border: 1px solid var(--pf-border);
    background: #ffffff;
    color: var(--pf-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ruta-filter-pill i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.ruta-filter-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.ruta-filter-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-quick-amount {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-quick-amount:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.btn-quick-amount:active {
    transform: scale(0.97);
}

.btn-cobrado-ver-recibo {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 8px 13px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-cobrado-ver-recibo:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-abono-extra {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-abono-extra:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.btn-call-whatsapp {
    background: #0f766e !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-call-whatsapp:hover {
    background: #0d635c !important;
}

.ruta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ruta-cliente-nombre {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    letter-spacing: -0.02em;
}

.ruta-cedula {
    font-size: 0.8rem;
    color: var(--pf-text-secondary);
    margin-top: 2px;
}

.ruta-detalles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: var(--pf-radius-md);
    border: 1px solid var(--pf-border-subtle);
    margin: 12px 0;
    font-size: 0.88rem;
}

.ruta-acciones {
    display: flex;
    gap: 9px;
    align-items: center;
}

.input-monto-cobro {
    height: 46px;
    padding: 8px 14px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    border: 1.5px solid #cbd5e1;
    border-radius: var(--pf-radius-md);
    width: 100%;
}

.input-monto-cobro:focus {
    border-color: var(--pf-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
    outline: none;
}

.select-forma-pago {
    height: 46px;
    padding: 8px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--pf-radius-md);
    font-weight: 700;
    color: var(--pf-text-primary);
    background-color: #ffffff;
}

/* Tarjetas de Préstamos Estructuradas de Alta Gama (Apple Wallet & Revolut 10 Style) */
.prestamo-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
    position: relative;
}

.prestamo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -6px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    border-color: #cbd5e1;
}

.prestamo-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
    gap: 12px;
}

/* Avatar Monograma de Cliente */
.prestamo-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.26);
    flex-shrink: 0;
}

.prestamo-id-badge {
    background: #f1f5f9;
    color: #0284c7;
    border: 1px solid #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
    font-size: 0.74rem;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.prestamo-cliente-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.prestamo-cliente-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.prestamo-cliente-meta span i {
    color: #94a3b8;
    margin-right: 3px;
    font-size: 0.78rem;
}

.prestamo-cliente-meta .meta-separator {
    color: #cbd5e1;
    font-weight: bold;
}

/* Pills de Estado Finos */
.badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-status-pill.badge-prestamo-activo {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

.badge-status-pill.badge-prestamo-activo i {
    color: #10b981;
}

.badge-status-pill.badge-prestamo-atrasado {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    box-shadow: 0 1px 2px rgba(244, 63, 94, 0.08);
}

.badge-status-pill.badge-prestamo-atrasado i {
    color: #f43f5e;
}

.badge-status-pill.badge-prestamo-saldado {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-status-pill.badge-prestamo-saldado i {
    color: #64748b;
}

/* Métricas del Préstamo */
.prestamo-grid-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 10px;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
}

.metric-item .metric-label {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.metric-item .metric-val {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.metric-item .metric-val.balance {
    color: #0284c7;
}

/* Acciones de la Tarjeta */
.prestamo-card-actions {
    display: flex;
    gap: 10px;
}

.btn-action-pagare {
    flex: 1;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #0f172a;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.15s ease;
}

.btn-action-pagare:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0284c7;
    transform: translateY(-1px);
}

.btn-action-pagare i {
    color: #0284c7;
}

.btn-action-reenganche {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.15s ease;
}

.btn-action-reenganche:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* Buscador Profesional con Ícono Vectorial FontAwesome */
.prestamo-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-input-wrapper .prestamo-search-input {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    padding: 0 95px 0 44px;
    font-size: 0.92rem;
    font-weight: 500;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.search-input-wrapper .prestamo-search-input::placeholder {
    color: #94a3b8;
}

.search-input-wrapper .prestamo-search-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
    outline: none;
}

.search-input-wrapper:focus-within .search-icon {
    color: #0284c7;
}

.search-kbd-hint {
    position: absolute;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Quick Action Buttons & Avatars */
.customer-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--pf-radius-md);
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--pf-blue);
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #7dd3fc;
    flex-shrink: 0;
}

.btn-call-whatsapp {
    background: #25d366;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: var(--pf-radius-pill);
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.28);
    transition: all 0.2s ease;
}

.btn-call-whatsapp:hover {
    background: #20ba59;
    transform: scale(1.03);
}

.btn-cobrar-quick {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--pf-radius-md);
    padding: 0 18px;
    height: 46px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.32);
    transition: all 0.2s ease;
}

.btn-cobrar-quick:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
}

.btn-excusa-quick {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    height: 46px;
    width: 46px;
    border-radius: var(--pf-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.15s ease;
}

.btn-excusa-quick:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
}

/* ══════════════ 9. MODALES Y DIÁLOGOS DE ALTA CALIDAD ══════════════ */
.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--pf-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 28px 24px;
}

.ticket-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px dashed #cbd5e1;
    border-bottom: 3px dashed #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 16px 14px;
    font-family: 'Courier New', 'Lucida Console', Monaco, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: pre-wrap;
    color: #1e293b;
    margin: 14px 0;
    max-height: 380px;
    overflow-y: auto;
    letter-spacing: -0.01em;
}

/* ══════════════ 10. PANTALLA DE LOGIN CON HUMO LATERAL ANIMADO ══════════════ */
.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    background: #050811;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Contenedor del Humo Ambiental (Hardware Accelerated) */
.smoke-ambient-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Capa Canvas para Partículas de Humo y Fluido Físico (60 FPS) */
.smoke-canvas-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    display: block;
}

/* Resplandor Ambiental Volumétrico en Laterales */
.smoke-lateral-aura {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.smoke-lateral-left {
    left: -12%;
    width: 48vw;
    background: radial-gradient(ellipse at 18% 50%, rgba(2, 132, 199, 0.32) 0%, rgba(56, 189, 248, 0.16) 40%, rgba(99, 102, 241, 0.08) 65%, transparent 80%);
    filter: blur(48px);
    animation: lateralAuraPulseLeft 10s ease-in-out infinite alternate;
}

.smoke-lateral-right {
    right: -12%;
    width: 48vw;
    background: radial-gradient(ellipse at 82% 50%, rgba(16, 185, 129, 0.28) 0%, rgba(20, 184, 166, 0.16) 40%, rgba(52, 211, 153, 0.08) 65%, transparent 80%);
    filter: blur(48px);
    animation: lateralAuraPulseRight 11s ease-in-out infinite alternate;
}

/* Viñeta para mantener profundidad y contraste impecable al centro */
.smoke-vignette-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(5, 8, 17, 0.35) 0%, rgba(5, 8, 17, 0.75) 75%, rgba(5, 8, 17, 0.96) 100%);
    pointer-events: none;
    z-index: 3;
}

@keyframes lateralAuraPulseLeft {
    0% {
        opacity: 0.65;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 0.95;
        transform: translate3d(20px, -15px, 0) scale(1.08);
    }
    100% {
        opacity: 0.7;
        transform: translate3d(-10px, 15px, 0) scale(0.95);
    }
}

@keyframes lateralAuraPulseRight {
    0% {
        opacity: 0.65;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 0.95;
        transform: translate3d(-20px, 20px, 0) scale(1.08);
    }
    100% {
        opacity: 0.7;
        transform: translate3d(10px, -15px, 0) scale(0.95);
    }
}

.login-box {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 10;
}

/* Tarjeta de Login Estilo Obsidiana Glassmorphism de Alta Gama */
.login-page .login-card {
    background: rgba(11, 19, 32, 0.88);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 34px 30px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.login-page .login-card:hover {
    box-shadow: 0 35px 85px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(56, 189, 248, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.25);
    border-color: rgba(56, 189, 248, 0.35);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    max-height: 68px;
    width: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.login-page .login-box-msg {
    text-align: center;
    color: #f1f5f9;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-page .input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 16px;
}

.login-page .input-group .form-control {
    height: 50px;
    border-radius: 12px 0 0 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    font-size: 0.96rem;
    padding: 0 16px;
    background: rgba(15, 23, 42, 0.75);
    color: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-page .input-group .form-control::placeholder {
    color: #64748b;
}

.login-page .input-group .form-control:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

.login-page .input-group-append {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
    border-radius: 0 12px 12px 0;
    padding: 0 18px;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.login-page .input-group:focus-within .input-group-append {
    border-color: #38bdf8;
    color: #38bdf8;
    background: rgba(15, 23, 42, 0.95);
}

.forgot-pass-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.forgot-pass-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.login-page #btn-login-submit {
    height: 50px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 6px 22px rgba(2, 132, 199, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    margin-top: 6px;
    color: #ffffff;
    border: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.login-page #btn-login-submit:hover {
    box-shadow: 0 8px 28px rgba(2, 132, 199, 0.6);
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.bio-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 22px 0 16px 0;
}

.login-page .bio-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.login-page .bio-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.login-page .bio-btn:active {
    transform: scale(0.92);
}

.login-page .bio-btn img {
    width: 34px;
    height: 34px;
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.login-page .help-links {
    text-align: center;
    margin-top: 18px;
    font-size: 0.85rem;
}

#view-subscription {
    overflow-y: auto;
}

#view-subscription .login-card {
    color: #e2e8f0;
}

#view-subscription .login-card h2 {
    color: #f8fafc;
}

#view-subscription .login-card a {
    color: #7dd3fc;
    margin: 0 5px;
}

.login-page .btn-whatsapp-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(37, 211, 102, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-page .btn-whatsapp-help:hover {
    background: rgba(37, 211, 102, 0.22);
    border-color: rgba(74, 222, 128, 0.55);
    color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

/* ══════════════ 11. REGLAS DE IMPRESIÓN TÉRMICA ESC/POS (58MM / 80MM) ══════════════ */
.print-only-container {
    display: none;
}

@media print {
    /* Ocultar absolutamente toda la UI de la app web (navbar, sidebar, cards, botones, inputs) */
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
    }
    
    body > *:not(#print-thermal-receipt) {
        display: none !important;
    }

    #print-thermal-receipt {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 58mm !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 2mm 3mm !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        white-space: pre-wrap !important;
        word-break: break-word !important;
    }

    @page {
        size: 58mm auto;
        margin: 0;
    }
}
