/* ==========================================================================
   META PLUS GLOBAL - PREMIUM DESKTOP RE-STYLED FRAMEWORK (style.css)
   ========================================================================== */

:root {
    --canvas-background-base: #f8fafc;
    --sidebar-slate-dark: #0b1329;
    --component-bg-white: #ffffff;
    --text-primary-slate: #0f172a;
    --text-muted-gray: #64748b;
    --accent-brand-blue: #1e40af;
    --border-soft-gray: #e2e8f0;
    
    /* Status Colors */
    --accent-green-success: #16a34a;
    --accent-orange-warn: #ea580c;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', -apple-system, sans-serif; 
}

body { 
    background: var(--canvas-background-base); 
    color: var(--text-primary-slate); 
    min-height: 100vh; 
    overflow-x: hidden; 
}

/* Base Dashboard Wrapper Locked for Desktop Split */
.dashboard-wrapper { 
    display: flex; 
    width: 100%; 
    min-height: 100vh; 
}

/* ==========================================================================
   1. FIXED DESKTOP SIDEBAR 
   ========================================================================== */
.app-sidebar { 
    width: 280px; 
    background: var(--sidebar-slate-dark); 
    color: #ffffff; 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.sidebar-identity { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 35px; 
}

/* Fallback Text Logo Style for Broken Imgur Image */
.brand-logo-fallback {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.brand-text-block h2 { 
    font-size: 18px; 
    letter-spacing: 1px; 
    font-weight: 700; 
}

.brand-text-block .sub-brand { 
    font-size: 12px; 
    color: #64748b; 
    letter-spacing: 2px; 
}

/* Role Context Switcher */
.role-switch-container { 
    display: flex; 
    background: #1e293b; 
    padding: 4px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
}

.switch-tab { 
    flex: 1; 
    padding: 8px; 
    border: none; 
    background: transparent; 
    color: #94a3b8; 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    border-radius: 6px; 
}

.switch-tab.active { 
    background: var(--accent-brand-blue); 
    color: #ffffff; 
}

/* Navigation Links */
.sidebar-navigation { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    flex-grow: 1; 
}

.nav-anchor { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    padding: 12px 15px; 
    color: #94a3b8; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 500; 
    border-radius: 8px; 
    transition: 0.2s ease; 
}

.nav-anchor i { 
    font-size: 16px; 
    width: 20px; 
}

.nav-anchor:hover, .nav-anchor.active { 
    background: rgba(255,255,255,0.06); 
    color: #ffffff; 
}

.nav-anchor.active { 
    border-left: 4px solid #3b82f6; 
    background: rgba(255,255,255,0.08); 
}

.nav-anchor.trigger-exit { 
    color: #f87171; 
    margin-top: auto; 
}

.sidebar-motto { 
    background: rgba(255,255,255,0.03); 
    padding: 15px; 
    border-radius: 10px; 
    border: 1px solid rgba(255,255,255,0.05); 
    margin-top: 20px; 
}

.sidebar-motto h3 { 
    font-size: 13px; 
    color: #3b82f6; 
    margin-bottom: 5px; 
}

.sidebar-motto p { 
    font-size: 11px; 
    color: #64748b; 
    line-height: 1.4; 
}

/* ==========================================================================
   2. DESKTOP INTERFACE HEADER PLATFORM
   ========================================================================== */
.app-interface { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    background: var(--canvas-background-base);
}

.interface-navbar { 
    background: var(--component-bg-white); 
    padding: 18px 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-soft-gray); 
}

.active-route-title { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--text-primary-slate); 
}

.navbar-right-context { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
}

.alert-icon-wrapper { 
    position: relative; 
    font-size: 20px; 
    color: var(--text-muted-gray); 
    cursor: pointer; 
}

.alert-badge-count { 
    position: absolute; 
    top: -5px; 
    right: -5px; 
    background: #ef4444; 
    color: white; 
    border-radius: 50%; 
    font-size: 10px; 
    padding: 2px 5px; 
}

.user-meta-capsule { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.user-meta-capsule img { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    border: 2px solid var(--border-soft-gray); 
    object-fit: cover; 
}

.meta-label { 
    display: flex; 
    flex-direction: column; 
}

.meta-label .salutation { 
    font-size: 11px; 
    color: var(--text-muted-gray); 
}

.meta-label .account-name { 
    font-size: 14px; 
    font-weight: 600; 
    white-space: nowrap; 
}

/* Canvas View Panel Scroller */
.scroll-canvas { 
    padding: 40px; 
    overflow-y: auto; 
    flex-grow: 1; 
    width: 100%; 
}

.scene-segment { 
    display: none; 
}

.scene-segment.active { 
    display: block; 
}

/* ==========================================================================
   3. MAIN CONTENT BLOCKS & GRID MATRIX 
   ========================================================================== */
.dashboard-greeting-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 35px; 
    gap: 30px; 
    width: 100%; 
}

.greeting-message h1 { 
    font-size: 28px; 
    font-weight: 700; 
    margin-bottom: 6px; 
    white-space: nowrap; 
}

.greeting-message p { 
    color: var(--text-muted-gray); 
    font-size: 15px; 
}

.referral-link-banner { 
    background: #0f172a; 
    color: white; 
    padding: 15px 20px; 
    border-radius: 12px; 
    width: 420px; 
    flex-shrink: 0; 
}

.referral-link-banner label { 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: #94a3b8; 
    display: block; 
    margin-bottom: 6px; 
}

.copy-input-group { 
    display: flex; 
    gap: 10px; 
}

.copy-input-group input { 
    background: rgba(255,255,255,0.08); 
    border: none; 
    color: white; 
    padding: 8px 12px; 
    font-size: 13px; 
    border-radius: 6px; 
    flex-grow: 1; 
}

.copy-btn { 
    background: #2563eb; 
    color: white; 
    border: none; 
    width: 40px; 
    border-radius: 6px; 
    cursor: pointer; 
}

/* Statistics Grid */
.metrics-dashboard-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px; 
    margin-bottom: 40px; 
}

.metric-card-block { 
    background: var(--component-bg-white); 
    border: 1px solid var(--border-soft-gray); 
    border-radius: 16px; 
    padding: 25px; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01); 
}

.icon-avatar { 
    width: 55px; 
    height: 55px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 22px; 
    flex-shrink: 0; 
}

.bg-light-purple { background: #f3e8ff; color: #a855f7; }
.bg-light-green { background: #dcfce7; color: #16a34a; }
.bg-light-blue { background: #dbeafe; color: #2563eb; }
.bg-light-orange { background: #ffedd5; color: #ea580c; }
.bg-light-pink { background: #fce7f3; color: #db2777; }
.bg-light-teal { background: #ccfbf1; color: #0d9488; }

.card-metric-info p { font-size: 13px; color: var(--text-muted-gray); font-weight: 500; margin-bottom: 4px; }
.card-metric-info h2 { font-size: 26px; font-weight: 700; color: var(--text-primary-slate); white-space: nowrap; }
.card-metric-info .metric-subtext { font-size: 11px; color: #94a3b8; margin-top: 2px; display: block; }

/* Quick Navigation Quick Actions Grid */
.section-block-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary-slate); }
.actions-navigation-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 45px; }
.action-trigger-node { background: var(--component-bg-white); border: 1px solid var(--border-soft-gray); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; transition: 0.2s ease; }
.action-trigger-node:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }
.icon-circle { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; margin: 0 auto 14px auto; font-size: 18px; }

.bg-purple-solid { background: #a855f7; }
.bg-green-solid { background: #22c55e; }
.bg-blue-solid { background: #3b82f6; }
.bg-orange-solid { background: #f97316; }
.bg-navy-solid { background: #1e3a8a; }

.action-trigger-node h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.action-trigger-node p { font-size: 12px; color: var(--text-muted-gray); }

/* Split Sections Row Setup */
.split-structure-row { 
    display: grid; 
    grid-template-columns: 11fr 9fr; 
    gap: 30px; 
    margin-bottom: 30px; 
}

/* ==========================================================================
   4. PREMIUM CONTENT CARDS & UN-STYLED FORM FIXES (1000060960.jpg Fix)
   ========================================================================== */
.ui-content-card { 
    background: var(--component-bg-white); 
    border: 1px solid var(--border-soft-gray); 
    border-radius: 16px; 
    padding: 35px; 
    width: 100%; /* FIX: Stretch to take full width of desktop container view */
    max-width: 100%; /* FIX: Break limits to avoid empty right space */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    margin-bottom: 25px;
}

/* Inner Forms Narrow Width Control Centered Content Frame */
.center-constrained-form {
    max-width: 700px; /* Keeps forms neat on desktop but fully proportional */
    margin: 10px 0;
}

.card-header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    border-bottom: 1px solid var(--border-soft-gray); 
    padding-bottom: 15px; 
}

.card-header-container h3 { 
    font-size: 18px; 
    font-weight: 700; 
}

/* Form Groups Layout Matrix */
.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
    width: 100%;
}

.form-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted-gray);
}

/* Premium Desktop Style Overhaul for Default Browser Elements */
.ui-content-card input[type="text"],
.ui-content-card input[type="email"],
.ui-content-card input[type="number"],
.ui-content-card select,
.ui-content-card textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary-slate);
    background-color: #f8fafc;
    border: 1px solid var(--border-soft-gray);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease-in-out;
}

/* Input Fields Focus State */
.ui-content-card input:focus,
.ui-content-card select:focus,
.ui-content-card textarea:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Custom Select Dropdown Wrappers */
.select-wrapper {
    position: relative;
    width: 100%;
}
.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
}
.select-wrapper::after {
    content: "\f0d7"; /* FontAwesome Arrow Code */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    color: var(--text-muted-gray);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Textarea height custom matrix */
.ui-content-card textarea {
    min-height: 140px;
    resize: vertical;
}

/* Withdrawal Balance Banner Frame */
.payout-balance-banner {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid #2563eb;
}
.payout-balance-banner span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted-gray);
    text-transform: uppercase;
}
.payout-balance-banner h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 4px;
}

/* Universal Action Buttons Setup */
.ui-content-card button,
.ui-content-card input[type="submit"],
.primary-action-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15);
}

.ui-content-card button:hover,
.primary-action-btn:hover {
    background: #1d4ed8;
}

.structural-full-width {
    width: 100% !important;
}

/* ==========================================================================
   5. DATA MATRIX TABLES & STRUCTURE COMPONENTS
   ========================================================================== */
.full-span-margin { margin-top: 30px; }
.responsive-table-scroller { width: 100%; }
.application-data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.application-data-table th { background: #f8fafc; padding: 14px 16px; color: var(--text-muted-gray); font-weight: 600; border-bottom: 2px solid var(--border-soft-gray); }
.application-data-table td { padding: 16px; border-bottom: 1px solid var(--border-soft-gray); color: var(--text-primary-slate); }
.day-countdown-badge { background: #f0fdf4; color: #166534; padding: 4px 8px; border-radius: 6px; font-weight: 600; font-size: 12px; border: 1px solid #bbf7d0; }
.text-status-active { color: var(--accent-green-success); font-weight: 700; }
.badge-status-pill { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.green-matrix-theme { background: #dcfce7; color: #15803d; }

/* Network tree nodes structural map */
.referral-tree-canvas { display: flex; flex-direction: column; align-items: center; margin: 15px 0; }
.tree-root-box { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; font-weight: 700; padding: 12px 24px; border-radius: 8px; font-size: 14px; }
.tree-connector-line { width: 2px; height: 20px; background: var(--border-soft-gray); }
.tree-children-row { display: flex; gap: 20px; width: 100%; justify-content: center; margin-bottom: 25px; }
.child-node-item { flex: 1; max-width: 140px; background: var(--canvas-background-base); border: 1px solid var(--border-soft-gray); padding: 15px 10px; border-radius: 10px; text-align: center; }
.child-node-item i { font-size: 20px; margin-bottom: 8px; display: block; }
.child-node-item.active-status i { color: var(--accent-green-success); }
.child-node-item strong { display: block; font-size: 13px; margin-bottom: 6px; }

.referral-progress-metric { width: 100%; margin-top: 10px; }
.progress-label-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.progress-bar-track { background: var(--border-soft-gray); height: 8px; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { background: var(--accent-green-success); height: 100%; border-radius: 4px; }

/* Activation Steps Matrix Links */
.horizontal-flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.activation-node-card { background: var(--canvas-background-base); border: 1px solid var(--border-soft-gray); padding: 25px 15px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.activation-node-card.yellow-accent-border { border-top: 4px solid #eab308; }
.activation-node-card.platform-admin-accent-border { border-top: 4px solid #2563eb; background: #eff6ff; }
.action-upload-proof-btn { background: white; border: 1px solid var(--border-soft-gray); padding: 8px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; font-weight: 600; color: var(--text-primary-slate); }

.wallet-address-strip { background: var(--canvas-background-base); padding: 14px; border-radius: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; font-size: 13px; border: 1px solid var(--border-soft-gray); }

/* Announcements Stack */
.announcements-vertical-stack { display: flex; flex-direction: column; gap: 20px; }
.announcement-row-item { display: flex; gap: 15px; align-items: flex-start; }
.announcement-row-item .ann-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ann-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.ann-body p { font-size: 12px; color: var(--text-muted-gray); line-height: 1.4; margin-bottom: 4px; }

/* ==========================================================================
   6. PREMIUM MODAL POPUPS WINDOW DESIGNS
   ========================================================================== */
.modal-dimmer-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(4px); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 999; 
}

.logout-prompt-box { 
    background: white; 
    padding: 35px; 
    border-radius: 16px; 
    text-align: center; 
    max-width: 420px; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); 
}

.dialogue-icon-brand { font-size: 44px; color: #ef4444; margin-bottom: 20px; }
.logout-action-row { display: flex; gap: 12px; justify-content: center; margin-top: 25px; }

.btn-secondary {
    background: #e2e8f0 !important;
    color: #475569 !important;
    box-shadow: none !important;
}

.confirm-exit-btn {
    background: #ef4444 !important;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2) !important;
}

.display-none { display: none !important; }
