        :root {
            --primary: #0f172a;
            --accent: #3b82f6;
            --bg-main: #f1f5f9;
            --bg-sidebar: #1e293b;
            --bg-card: #ffffff;
            --text-main: #334155;
            --border: #e2e8f0;      
            --success: #10b981;
            --danger: #ef4444;
            --text-muted: #64748b;
            --risk-high: #ef4444;
            --risk-med: #f59e0b;
        }
        /* 🟢 LEFT SIDEBAR (Dark) */
        .sidebar { width: 220px; background: var(--bg-sidebar); color: white; display: flex; flex-direction: column; padding: 1.5rem; flex-shrink: 0; }
        .logo { font-weight: 800; margin-bottom: 2rem; border-bottom: 1px solid #334155; padding-bottom: 1rem; line-height: 1.2; }
        .sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }
        .nav-link { padding: 0.7rem; color: #94a3b8; text-decoration: none; font-size: 0.85rem; border-radius: 6px; transition: 0.2s; }
        .nav-link:hover { background: rgba(255,255,255,0.05); color: white; }
        .nav-link.active { background: var(--accent); color: white; }

        /* 🔵 MAIN CONTENT AREA */
        .main-wrapper { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
        
        /* TOPBAR */
        .badge-count { background: #dcfce7; color: #166534; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; }

        /* TABLE VIEW */
        .content-container { padding: 2rem; overflow-y: auto; height: 100%; }
        .master-card { background: white; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        
        table { width: 100%; border-collapse: collapse; }
        th { background: #f8fafc; color: #64748b; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em; padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
        td { padding: 1rem; border-bottom: 1px solid var(--border); color: var(--text-main); font-size: 0.85rem; }
        tr:hover { background: #f1f5f9; }
        
        .status-pill { background: #e0f2fe; color: #0369a1; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }
  
        /* Prevent Selection & Dragging */
        img { -webkit-user-drag: none; user-drag: none; max-width: 100%; height: auto; }

        /* 🟢 LEFT SIDEBAR (Dark) */
        .logo-container { text-align: center; margin-bottom: 2rem; }
        .logo { font-weight: 500; font-size: 1.1rem; border-bottom: 1px solid #334155; padding-bottom: 1rem; margin-top: 10px; }
        .nav-link, .nav-btn { padding: 0.7rem; color: #94a3b8; text-decoration: none; font-size: 0.85rem; border-radius: 6px; border: none; background: transparent; text-align: left; cursor: pointer; transition: 0.2s; }
        .nav-link:hover, .nav-btn:hover { background: rgba(255,255,255,0.05); color: white; }
        .nav-link.active { background: var(--accent); color: white; }

        /* 🔵 MAIN LAYOUT */
        .layout { display: flex; flex-grow: 1; flex-direction: column; overflow: hidden; }

        /* TOP TITLE BAR */
        .topbar { background: white; height: 64px; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); flex-shrink: 0; }
        .topbar-title { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
        .status-pill { background: #e2e8f0; padding: 4px 12px; border-radius: 20px; font-weight: bold; }

        /* GAME CONTENT */
        .main-content { flex-grow: 1; padding: 1.5rem; overflow-y: auto; }
        
        /* ERP CONTROLS BAR */
/* 🔵 BLUE/WHITE ERP BUTTONS */
.controls { 
    background: #ffffff; 
    padding: 12px; 
    border-radius: 8px 8px 0 0; 
    border: 1px solid #d1d5db; 
    border-bottom: none; 
    display: flex; 
    gap: 12px; 
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.02);
}

.controls button { 
    padding: 10px 20px; 
    border-radius: 4px; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 0.85rem; 
    transition: all 0.2s ease;
    border: 1px solid #3b82f6; /* NetSuite Blue Border */
}
.btn-group { display: flex; gap: 0.5rem; }

button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    /*text-transform: uppercase;*/
}

.btn-blue { background: var(--accent); color: white; border: none; }
.btn-white { background: white; color: var(--text-main); }
.btn-white:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Primary Action - High Contrast */
.btn-match { 
    background-color: #3b82f6; 
    color: #ffffff; 
}
.btn-match:hover { 
    background-color: #2563eb; 
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2); 
}

/* Secondary Action - White with Blue Text */
.btn-rematch, .btn-dispute, .btn-writeoff { 
    background-color: #ffffff; 
    color: #3b82f6; 
}

.btn-rematch:hover, .btn-dispute:hover, .btn-writeoff:hover { 
    background-color: #eff6ff; 
    border-color: #1d4ed8;
    color: #1d4ed8;
}

/* Critical Action - Subtle Red Accent for Write-off */
.btn-writeoff {
    border-color: #94a3b8;
    color: #64748b;
}
.btn-writeoff:hover {
    border-color: #ef4444;
    color: #ef4444;
    background-color: #fef2f2;
}


        /* GAME GRID */
        .game-body.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
        .panel { background: white; border: 1px solid var(--border); padding: 1.5rem; border-radius: 0 0 8px 8px; min-height: 500px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .panel h3 { font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.5rem; border-bottom: 2px solid var(--bg-main); padding-bottom: 5px; }
        
        .doc-content { font-family: 'Courier New', monospace; background: #fcfcfc; padding: 15px; border: 1px dashed #cbd5e1; border-radius: 4px; line-height: 1.6; font-size: 0.9rem; }
        .invoice-img { margin-top: 15px; border: 1px solid var(--border); border-radius: 4px; width: 100%; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

        /* SCREEN OVERLAYS (Paywall & Results) */
#paywall-screen, #results-screen { display: none; padding: 0px 50px; text-align: center; }
        .cta-btn { background: var(--primary); color: white; padding: 15px 30px; font-size: 18px; text-decoration: none; border-radius: 8px; display: inline-block; margin-top: 20px; }
#results-screen { align-content: center; align-items: center;    justify-items: center;     display: none;  position: fixed;    top: 0;    left: 0;    width: 100%;    height: 100vh;    z-index: 100000000;    background: rgba(255, 255, 255, 0.95);    backdrop-filter: blur(12px);     -webkit-backdrop-filter: blur(12px);            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    color: #333;}

/* Enhancing the container to look like a premium modal */
.result-container {
   border: 2px solid #00bee7;    border-radius: 15px;    padding: 10px 40px;    max-width: 1500px;    height: 95%; width: 105%;    background: white;    text-align: center;}

#final-score {
    font-size: 34px;
    color: #00bee7;
    margin: 10px 0;
}

#performance-report {
    background: #f1faff; /* Light blue tint to match branding */
    border: 1px solid #c8eef7;
    margin-top: 5px; !important;
}
#paywall-screen {
    /* Layout & Positioning */
    display: none;    position: fixed;    top: 0;    left: 0;    width: 100%;    height: 100vh;    z-index: 100000000;
    /* Professional Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.95);    backdrop-filter: blur(12px);     -webkit-backdrop-filter: blur(12px);
    /* Center the "Card" */
    align-items: center;    justify-content: center;        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    color: #333;}
/* The Blue Rounded Border Box */
.paywall-container {    border: 2px solid #00bee7;    border-radius: 15px;    padding: 60px 40px;    max-width: 900px;    width: 90%;    background: white;    text-align: center;}
/* Typography matching the image */
.paywall-container h2 {    color: #00bee7;    font-size: 28px;    margin-bottom: 20px;}
.paywall-container p {    font-size: 18px;    line-height: 1.6;    margin-bottom: 20px;}
.paywall-container .highlight {    color: #00bee7;    font-weight: bold;}
/* The Bright Blue Button */
.paywall-btn {    background-color: #00bee7;    color: white;    border: none;    padding: 12px 30px;    font-size: 18px;    font-weight: bold;    border-radius: 5px;    cursor: pointer;    margin-top: 20px;}
.paywall-btn:hover {    background-color: #009dbf;}
/* Footer Link */
.paywall-footer {    margin-top: 15px;    font-size: 14px;}
.paywall-footer a {    color: blue;    text-decoration: underline;}

        /* Main Content Area */
        .main-wrapper { flex-grow: 1; display: flex; flex-direction: column; }
        .topbar { background: white; height: 64px; padding: 0 2rem; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
        
        .content { padding: 2rem; overflow-y: auto; }
        .report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

        /* Aging Table Styling */
        .aging-card { background: white; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        table { width: 100%; border-collapse: collapse; }
        th { background: #f8fafc; color: #64748b; font-size: 0.75rem; text-transform: uppercase; padding: 12px; text-align: left; border-bottom: 2px solid var(--bg-main); }
        td { padding: 12px; border-bottom: 1px solid var(--bg-main); font-size: 0.85rem; color: var(--text-main); }
        
        /* Aging Buckets */
        .bucket-overdue { color: var(--risk-high); font-weight: bold; }
        .bucket-grace { color: var(--risk-med); font-weight: bold; }
        .status-pill { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; border: 1px solid var(--accent); color: var(--accent); }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: 'Segoe UI', sans-serif; background: var(--bg-main); display: flex; height: 100vh; overflow: hidden; }

        /* Sidebar Styling */
        .sidebar { width: 220px; background: var(--primary); color: white; padding: 1.5rem; flex-shrink: 0; }
        .logo { font-weight: 800; margin-bottom: 2rem; border-bottom: 1px solid #334155; padding-bottom: 1rem; }
        .nav-link { display: block; padding: 0.7rem; color: #94a3b8; text-decoration: none; font-size: 0.85rem; border-radius: 6px; margin-bottom: 5px; }
        .nav-link.active { background: var(--accent); color: white; }

        /* Main Content */
        .main-wrapper { flex-grow: 1; display: flex; flex-direction: column; }
        .topbar { background: white; height: 64px; padding: 0 2rem; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
        
        .content { padding: 2rem; overflow-y: auto; }
        
        /* Summary Tiles */
        .summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
        .tile { background: white; padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
        .tile-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; font-weight: bold; }
        .tile-val { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

        /* Aging Table */
        .aging-card { background: white; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
        table { width: 100%; border-collapse: collapse; }
        th { background: #f8fafc; color: #64748b; font-size: 0.75rem; text-transform: uppercase; padding: 15px; text-align: left; border-bottom: 2px solid var(--bg-main); }
        td { padding: 15px; border-bottom: 1px solid var(--bg-main); font-size: 0.85rem; color: var(--text-main); }
        
        .bucket-overdue { color: var(--risk-high); font-weight: bold; }
        .bucket-grace { color: var(--risk-med); font-weight: bold; }
        .tag { padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; background: #eff6ff; color: var(--accent); border: 1px solid #dbeafe; }
 .clear-btn {    background-color: #ff4d4d;    color: white;    border: none;    padding: 10px;    cursor: pointer;    margin-top: 20px;    border-radius: 4px;    width: 100%;}
.clear-btn:hover {    background-color: red;}

