﻿
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
            background: #070b14;
            color: #e8edf5;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
        }
        .container {
            max-width: 1480px;
            width: 100%;
            background: #0f1729;
            border-radius: 28px;
            padding: 28px 32px 40px;
            box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
            border: 1px solid #1e2a3a;
        }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #1e2a3a;
            padding-bottom: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 12px;
        }
        .logo {
            font-size: 26px;
            font-weight: 700;
            background: linear-gradient(135deg, #60a5fa, #a78bfa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo span {
            font-weight: 300;
            color: #94a3b8;
            -webkit-text-fill-color: #94a3b8;
        }
        .subtitle {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 4px;
            letter-spacing: 0.3px;
        }
        .disclaimer {
            font-size: 11px;
            color: #64748b;
            margin-top: 3px;
        }
        .badge {
            background: #1a2332;
            border: 1px solid #2d3a4e;
            border-radius: 40px;
            padding: 5px 20px;
            font-size: 12px;
            color: #94a3b8;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .badge .live {
            display: inline-block;
            width: 8px;
            height: 8px;
            background: #22c55e;
            border-radius: 50%;
            animation: pulse-dot 1.8s ease-in-out infinite;
        }
        .badge .data-source {
            font-weight: 400;
            color: #64748b;
            font-size: 10px;
            padding-left: 4px;
            border-left: 1px solid #2d3a4e;
        }
        .badge .data-source .connected {
            color: #4ade80;
        }
        @keyframes pulse-dot {
            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.4;
                transform: scale(0.75);
            }
        }
        .btn {
            border: none;
            border-radius: 40px;
            padding: 10px 28px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .btn-primary {
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            color: #fff;
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
        }
        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(59, 130, 246, 0.45);
        }
        .btn-primary:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .btn-secondary {
            background: #1e293b;
            color: #cbd5e1;
            border: 1px solid #2d3a4e;
        }
        .btn-secondary:hover {
            background: #2d3a4e;
        }
        .btn-secondary.active {
            background: #2d3a4e;
            border-color: #60a5fa;
            color: #e8edf5;
        }
        .btn-success {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            color: #fff;
            box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
        }
        .btn-success:hover:not(:disabled) {
            transform: translateY(-2px);
        }
        .btn-success:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .btn-preview {
            background: linear-gradient(135deg, #f472b6, #ec4899);
            color: #fff;
            box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
        }
        .btn-preview:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(236, 72, 153, 0.45);
        }
        .btn-preview:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .btn-sm {
            padding: 6px 16px;
            font-size: 12px;
        }
        .btn-outline {
            background: transparent;
            border: 1px solid #2d3a4e;
            color: #94a3b8;
        }
        .btn-outline:hover {
            background: #1a2332;
            border-color: #3b82f6;
            color: #e8edf5;
        }

        /* SPINNER */
        .spinner {
            display: inline-block;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-top: 2px solid #60a5fa;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        /* SMOOTH SCORE UPDATE */
        .score-transition {
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .score-number {
            display: inline-block;
            transition: transform 0.3s ease, color 0.3s ease;
        }
        .score-number.pulse {
            transform: scale(1.2);
            color: #60a5fa;
        }

        .pov-nav {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            flex-wrap: wrap;
            border-bottom: 1px solid #1a2a3e;
            padding-bottom: 12px;
        }

        .pov-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }
        .pov-content.show {
            display: block;
        }
        @keyframes fadeIn {
            0% {
                opacity: 0;
                transform: translateY(10px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 20px;
        }
        .stat-card {
            background: #111b2b;
            border-radius: 14px;
            border: 1px solid #1a2a3e;
            padding: 16px 20px;
        }
        .stat-card .label {
            font-size: 11px;
            color: #64748b;
            text-transform: uppercase;
        }
        .stat-card .value {
            font-size: 26px;
            font-weight: 700;
            color: #e8edf5;
            margin-top: 4px;
            transition: color 0.4s ease;
        }
        .stat-card .value.green {
            color: #4ade80;
        }
        .stat-card .value.blue {
            color: #60a5fa;
        }
        .stat-card .value.gold {
            color: #facc15;
        }
        .stat-card .value.pulse-update {
            animation: pulse-value 0.5s ease;
        }
        @keyframes pulse-value {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.08);
                color: #60a5fa;
            }
            100% {
                transform: scale(1);
            }
        }

        .card {
            background: #111b2b;
            border-radius: 18px;
            border: 1px solid #1a2a3e;
            padding: 20px 22px 24px;
            margin-bottom: 16px;
        }
        .card-title {
            font-size: 14px;
            font-weight: 600;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .data-table {
            width: 100%;
            font-size: 12px;
            border-collapse: collapse;
        }
        .data-table th {
            text-align: left;
            color: #64748b;
            font-weight: 500;
            padding: 6px 6px 8px 0;
            border-bottom: 1px solid #1a2332;
            font-size: 10px;
            text-transform: uppercase;
        }
        .data-table td {
            padding: 5px 6px 5px 0;
            border-bottom: 1px solid #0f1729;
            color: #cbd5e1;
        }
        .data-table .good {
            color: #4ade80;
        }
        .data-table .bad {
            color: #f87171;
        }
        .scroll-table {
            max-height: 200px;
            overflow-y: auto;
        }
        .scroll-table::-webkit-scrollbar {
            width: 4px;
        }
        .scroll-table::-webkit-scrollbar-track {
            background: #0a111f;
        }
        .scroll-table::-webkit-scrollbar-thumb {
            background: #2d3a4e;
            border-radius: 10px;
        }

        .factor-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 4px 0;
            font-size: 12px;
        }
        .factor-row .name {
            width: 120px;
            color: #94a3b8;
            flex-shrink: 0;
            font-size: 11px;
            border-bottom: 1px dashed #3b82f6;
            cursor: help;
        }
        .factor-row .bar-track {
            flex: 1;
            height: 5px;
            background: #1a2332;
            border-radius: 10px;
            overflow: hidden;
        }
        .factor-row .bar-fill {
            height: 100%;
            border-radius: 10px;
            transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .factor-row .bar-fill.green {
            background: linear-gradient(90deg, #22c55e, #4ade80);
        }
        .factor-row .bar-fill.blue {
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        }
        .factor-row .bar-fill.yellow {
            background: linear-gradient(90deg, #facc15, #f59e0b);
        }
        .factor-row .val {
            width: 32px;
            text-align: right;
            font-weight: 600;
            color: #e8edf5;
            flex-shrink: 0;
            transition: color 0.3s ease;
        }
        .factor-row .val.pulse {
            color: #60a5fa;
        }

        .flex-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px 24px;
        }
        .flex-row .item {
            font-size: 13px;
        }
        .flex-row .item .lbl {
            color: #64748b;
        }
        .flex-row .item .val {
            font-weight: 600;
            color: #e8edf5;
        }

        .status-badge {
            padding: 4px 16px;
            border-radius: 40px;
            font-size: 13px;
            font-weight: 600;
            display: inline-block;
        }
        .status-badge.approved {
            background: #22c55e;
            color: #fff;
        }
        .status-badge.review {
            background: #facc15;
            color: #1a1a1a;
        }
        .status-badge.declined {
            background: #f87171;
            color: #fff;
        }
        .status-badge.funded {
            background: #22c55e;
            color: #fff;
        }

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal {
            background: #111b2b;
            border: 1px solid #1a2a3e;
            border-radius: 18px;
            max-width: 640px;
            width: 90%;
            max-height: 80vh;
            padding: 28px 32px;
            overflow-y: auto;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
        }
        .modal h2 {
            font-size: 20px;
            color: #e8edf5;
            margin-bottom: 12px;
            border-bottom: 1px solid #1a2a3e;
            padding-bottom: 10px;
        }
        .modal .close-btn {
            margin-top: 18px;
            background: #1e293b;
            color: #94a3b8;
            border: 1px solid #2d3a4e;
            padding: 8px 24px;
            border-radius: 40px;
            cursor: pointer;
            font-weight: 600;
        }
        .modal .close-btn:hover {
            background: #2d3a4e;
            color: #e8edf5;
        }

        .action-bar {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 16px;
            justify-content: flex-end;
        }

        .mt-2 {
            margin-top: 12px;
        }
        .mb-2 {
            margin-bottom: 12px;
        }

        .repayment-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px;
        }
        .repayment-grid .item {
            background: #0a111f;
            padding: 12px 16px;
            border-radius: 10px;
            border: 1px solid #1a2a3e;
            text-align: center;
        }
        .repayment-grid .item .amount {
            font-size: 18px;
            font-weight: 700;
            color: #facc15;
        }
        .repayment-grid .item .due {
            font-size: 12px;
            color: #94a3b8;
        }

        /* TOOLTIP */
        .tip {
            border-bottom: 1px dashed #3b82f6;
            cursor: help;
            position: relative;
            display: inline-block;
        }
        .tip .tooltip-text {
            visibility: hidden;
            width: 260px;
            background: #1a2332;
            color: #e8edf5;
            text-align: left;
            border: 1px solid #2d3a4e;
            border-radius: 8px;
            padding: 10px 14px;
            font-weight: 400;
            font-size: 12px;
            line-height: 1.5;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
            position: absolute;
            z-index: 100;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.2s ease, visibility 0.2s;
            pointer-events: none;
        }
        .tip .tooltip-text::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -6px;
            border-width: 6px;
            border-style: solid;
            border-color: #2d3a4e transparent transparent transparent;
        }
        .tip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

        /* LIVE CLOCK */
        .live-clock {
            font-size: 11px;
            color: #64748b;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.3px;
        }

        @media (max-width: 700px) {
            body {
                padding: 8px;
                overflow-x: hidden;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            .container {
                padding: 12px;
                max-width: 100%;
                border-radius: 16px;
            }
            .repayment-grid {
                grid-template-columns: 1fr;
            }
            .card-grid {
                grid-template-columns: 1fr 1fr;
            }
            .tip .tooltip-text {
                width: 180px;
                left: -20px;
                transform: none;
            }
            .tip .tooltip-text::after {
                left: 20px;
            }
        }
        @media (max-width: 500px) {
            body { padding: 0; }
            .container {
                padding: 12px 10px 20px;
                border-radius: 0;
                box-shadow: none;
                min-height: 100dvh;
            }
            .card-grid {
                grid-template-columns: 1fr;
            }
            .pov-nav .btn {
                font-size: 11px;
                padding: 6px 12px;
                min-height: 40px;
            }
        }

        .hidden {
            display: none !important;
        }

/* LFE shell — dark theme */
.lfe-advisory-banner { background: #1a2332; border-color: #2d3a4e; color: #fcd34d; }
.lfe-auth-bar { background: #111b2b; border-color: #1e2a3a; color: #e8edf5; }
.lfe-auth-bar .who span { color: #94a3b8; }
.lfe-step { background: #1a2332; color: #94a3b8; border-color: #2d3a4e; }
.lfe-step.active { background: #1e3a5f; color: #60a5fa; border-color: #3b82f6; }
.lfe-step.done { background: #14532d; color: #4ade80; border-color: #22c55e; }
.lfe-hub { background: #0a111f; border-color: #2d3a4e; }
.lfe-hub-card { background: #111b2b; border-color: #1e2a3a; color: #e8edf5; }
.lfe-hub-card .desc { color: #94a3b8; }
.lfe-app-footer { border-color: #1e2a3a; color: #64748b; }

