/* public/css/main.css */

:root {
    /* Brand Colors - Blue & White Theme */
    --primary-blue: #0A58CA;
    --primary-light: #E0F0FF;
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-main: #212529;
    --text-muted: #6C757D;
    --border-color: #E9ECEF;

    /* Layout constraints */
    --app-max-width: 480px;
    --header-height: 60px;
    --nav-height: 65px;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff; /* Dark PC background to match login */
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    
    /* THESE 4 LINES KILL THE WHITE SPACE GLOBALLY */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- Mobile App Container --- */
/* --- Mobile App Container --- */
.app-container {
    width: 100%;
    max-width: var(--app-max-width);
    margin: 0; /* Removed 'auto' since body flex handles centering */
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    
    /* Flex column prevents margin collapse from child elements */
    display: flex;
    flex-direction: column;
    overflow-x: hidden; 
}
/* --- Top App Bar --- */
.app-header {
    height: var(--header-height);
    background-color: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-placeholder {
    width: 32px;
    height: 32px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* --- Main Content Area --- */
.app-content {
    flex: 1;
    padding: var(--spacing-md);
    padding-bottom: calc(var(--nav-height) + var(--spacing-md));
    /* Space for bottom nav */
    overflow-y: auto;
}

.welcome-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
}

/* --- Fixed Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: var(--nav-height);
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS Safe Area */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    padding: 8px 0;
}

.nav-item .material-icons-round {
    font-size: 24px;
}

.nav-item.active {
    color: var(--primary-blue);
}

/* --- State Utilities --- */
.hidden {
    display: none !important;
}



/* --- Wallet Card --- */
.wallet-card {
    background: linear-gradient(135deg, var(--primary-blue), #003a8c);
    border-radius: 16px;
    padding: var(--spacing-lg);
    color: white;
    box-shadow: 0 8px 16px rgba(10, 88, 202, 0.2);
    margin-bottom: var(--spacing-lg);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.wallet-balances {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-item {
    flex: 1;
}

.divider {
    width: 1px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 var(--spacing-md);
}

.balance-label {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    margin-bottom: 4px;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* --- Quick Actions --- */
.action-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.deposit-icon {
    background-color: #10B981;
}

.withdraw-icon {
    background-color: #F59E0B;
}

.invite-icon {
    background-color: #8B5CF6;
}

.about-icon {
    background-color: #3B82F6;
}

/* --- Announcement Banner --- */
.announcement-banner {
    display: flex;
    align-items: center;
    background-color: var(--primary-light);
    color: var(--primary-blue);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
    font-size: 13px;
    gap: 8px;
}

.announcement-text {
    flex: 1;
    font-weight: 500;
}

/* --- Typography & Utilities --- */
.section-header {
    margin-bottom: var(--spacing-md);
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 16px;
}

/* --- Plan Cards --- */
.plans-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.plan-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: var(--spacing-md);
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.plan-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 12px 0 12px;
    text-transform: uppercase;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.plan-name {
    font-size: 16px;
    font-weight: 700;
}

.plan-price {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 700;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.detail-row {
    display: flex;
    justify-content: space-between;
}

.highlight-text {
    color: #10B981;
    font-weight: 600;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:active {
    background-color: #084298;
}


/* --- Authentication UI --- */
.auth-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70vh;
}

.auth-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-card h2 {
    margin-bottom: 4px;
    font-size: 24px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
}

/* --- Forms --- */
.input-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background-color: #F9FAFB;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-blue);
    background-color: white;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auth-links {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.auth-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

#support-view {
    position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px); /* Adjust 70px to match your bottom nav height */
  overflow: hidden;
}

/* --- Loading State (Full Screen Overlay) --- */
.state-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color); /* Matches your app's background */
    z-index: 99999; /* Forces it perfectly over the bottom nav and headers */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}




/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    /* Slide up from bottom on mobile */
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--surface-color);
    width: 100%;
    max-width: var(--app-max-width);
    border-radius: 20px 20px 0 0;
    /* Rounded top corners */
    padding: var(--spacing-lg);
    transform: translateY(0);
    transition: transform 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.modal-header h3 {
    font-size: 20px;
}

.payment-instructions {
    background-color: var(--primary-light);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary-blue);
    text-align: center;
}

.fee-breakdown {
    background-color: #F9FAFB;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}




/* --- FULL PAGE VIEWS --- */
.full-page-view {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 2000;
    /* Covers bottom nav */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: opacity 0.3s;
}

.full-page-view.hidden {
    opacity: 0;
    pointer-events: none;
}

.recharge-step {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.recharge-header {
    background-color: #1a7b1a;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recharge-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.recharge-content {
    padding: 16px;
    padding-bottom: 90px;
}

/* Step 1: Wallet Card */
.recharge-wallet-card {
    background: linear-gradient(135deg, #249524, #125e12);
    border-radius: 12px;
    padding: 16px;
    color: white;
    margin-bottom: 24px;
}

.rw-label {
    font-size: 12px;
    opacity: 0.9;
}

.rw-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 8px;
}

.rw-balance {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.rw-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
    display: flex;
}

/* Sections */
.input-section {
    margin-bottom: 24px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1a7b1a;
    margin-bottom: 12px;
}

/* Amount Input */
.amount-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.currency-prefix {
    color: #1a7b1a;
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

.amount-input-wrapper input {
    border: none;
    background: transparent;
    font-size: 16px;
    width: 100%;
    outline: none;
}

/* Quick Amounts */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.qa-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 12px 0;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.qa-btn.active {
    background: #1a7b1a;
    color: white;
    border-color: #1a7b1a;
}

/* Channel Options */
.channel-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-card input {
    display: none;
}

.channel-content {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.channel-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.channel-logo.small {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.channel-content span {
    flex: 1;
    font-weight: 600;
}

.radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
}

.channel-card input:checked+.channel-content {
    border-color: #1a7b1a;
}

.channel-card input:checked+.channel-content .radio-circle {
    border-color: #1a7b1a;
    background: #1a7b1a;
    box-shadow: inset 0 0 0 4px white;
}

/* Explanation */
.explanation-card {
    background: #F0FDF4;
    border-left: 4px solid #F59E0B;
    padding: 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.explanation-card h4 {
    color: #1a7b1a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.explanation-card ol {
    padding-left: 16px;
    margin: 0;
    line-height: 1.6;
}

/* Fixed Bottom Button */
.fixed-bottom-btn {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.btn-green {
    background-color: #1a7b1a;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-blue {
    background-color: #3B82F6;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}



.step2-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 columns */
  gap: 10px;
  margin-bottom: 16px;
}

.s2-tab {
  display: flex;
  flex-direction: column; /* Stacks the logo above the text */
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.s2-tab.active {
  background: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
}

.s2-tab img.real-logo.small {
  width: 24px;
  height: 24px;
  margin-bottom: 6px; /* Adds space between logo and text */
}







.instruction-box {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.step-badge {
    color: #3B82F6;
    font-weight: 700;
    font-size: 12px;
}

.step-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 4px;
}

.copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}

.copy-label {
    color: var(--text-muted);
    font-size: 14px;
}

.copy-value {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.btn-copy {
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.warning-banner {
    background: #FEF2F2;
    color: #EF4444;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 16px 0;
}

.illustration-row {
    display: flex;
    justify-content: space-between;
    opacity: 0.5;
    text-align: center;
    font-size: 10px;
}

.ill-item.active {
    opacity: 1;
    color: #EF4444;
    font-weight: 700;
}

.ill-item .material-icons-round {
    font-size: 28px;
    margin-bottom: 4px;
}

.txnid-input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.txnid-input:focus {
    border-color: #3B82F6;
}

.bottom-note {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}



/* Update Header to Blue */
.recharge-header {
    background-color: var(--primary-blue);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Update Wallet Card to Blue Gradient */
.recharge-wallet-card {
    background: linear-gradient(135deg, var(--primary-blue), #003a8c);
    border-radius: 12px;
    padding: 16px;
    color: white;
    margin-bottom: 24px;
}

/* Update Section Labels to Blue */
.section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.currency-prefix {
    color: var(--primary-blue);
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

/* Update Active Quick Amount Button to Blue */
.qa-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Update Radio Button Selection to Blue */
.channel-card input:checked+.channel-content {
    border-color: var(--primary-blue);
}

.channel-card input:checked+.channel-content .radio-circle {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: inset 0 0 0 4px white;
}

/* Real Logo Styling */
.real-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 12px;
    border-radius: 4px;
}

.real-logo.small {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* Step 2 Tab Styling (Clickable) */
.s2-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding: 10px;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: white;
    opacity: 0.6;
    cursor: pointer;
    transition: 0.2s;
}

.s2-tab.active {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    opacity: 1;
    background: var(--primary-light);
}

.instruction-image-container {
    margin-top: 16px;
    text-align: center;
}



/* --- File Upload Input --- */
.file-input {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: #F9FAFB;
  cursor: pointer;
  color: var(--text-muted);
}

.file-input::file-selector-button {
  background: var(--primary-light);
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 12px;
  transition: 0.2s;
}

.file-input::file-selector-button:hover {
  background: var(--primary-blue);
  color: white;
}


.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(4, 120, 87, 0.15); /* Light green track */
  border-top-color: #047857; /* Dark vibrant green spinner */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}


/* --- Task View --- */
.task-section {
  padding-bottom: 24px;
}

.task-card {
  background: var(--surface-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-info {
  flex: 1;
}

.task-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary-blue);
}

.task-reward {
  font-size: 14px;
  font-weight: 600;
  color: #10B981;
}

.task-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-task {
  background-color: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-task:disabled {
  background-color: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}





/* --- Profile View --- */
.profile-section {
  background-color: #F9FAFB;
  min-height: 100vh;
}

.profile-header {
  background: var(--primary-blue);
  color: white;
  padding: 24px 20px 60px 20px; /* Extra bottom padding for overlap */
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-wallet-card {
  background: white;
  margin: -40px 16px 0 16px; /* Negative margin to pull it up over the blue header */
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  position: relative;
  z-index: 10;
}

.menu-list-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  padding: 0 16px;
  border: 1px solid #F3F4F6;
}

.menu-list-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #F3F4F6;
}

.ml-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.ml-icon .material-icons-round {
  font-size: 20px;
}

.ml-text {
  flex: 1;
}

.ml-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.ml-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.ml-arrow {
  color: #D1D5DB;
  font-size: 20px;
}



/* --- Profile Sub-Screens (Premium UI) --- */
/* --- Profile Sub-Screens (Mobile Constraint Fix) --- */
.profile-sub-screen {
  position: fixed;
  top: 0; 
  left: 50%; /* Center on screen */
  transform: translateX(-50%); /* Pull back by 50% of its own width */
  width: 100%;
  max-width: 480px; /* Lock to mobile dimensions on PC */
  height: 100vh;
  background: #F4F6F8;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--primary-blue); /* Deep blue theme */
  color: white;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sub-header h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }

/* Custom Back Button for Blue Header */
.icon-btn.btn-back-profile { 
  color: white; 
  background: rgba(255,255,255,0.2); 
  width: 36px; height: 36px; 
  border-radius: 50%; 
  display: flex; justify-content: center; align-items: center; 
  padding: 0; border: none; cursor: pointer;
}

.sub-content { padding: 16px; flex: 1; padding-bottom: 40px; }

/* Premium List Cards */
.app-list-card {
  background: white;
  border-radius: 16px;
  padding: 8px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border: 1px solid var(--border-color);
}

/* Detailed History Cards */
.history-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hc-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.hc-details { flex: 1; }
.hc-amount { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }



/* --- Investment Cards (VIP Plans Redesign) --- */
.invest-card {
  display: flex;
  background: white;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid #E5E7EB;
}

/* Left Sidebar (Blue) */
.invest-left {
  width: 100px;
  background: #2563EB; 
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  flex-shrink: 0;
}

.invest-left img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  background: white;
}

.invest-percent {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.invest-indicative {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Right Content Area */
.invest-right {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.inv-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #111827;
}

.inv-badge-open {
  color: #10B981;
  border: 1px solid #10B981;
  background: #D1FAE5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
}

.inv-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.inv-tag-featured {
  background: #EA580C;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 12px;
}

.inv-tag-standard {
  background: #F9FAFB;
  color: #4B5563;
  border: 1px solid #E5E7EB;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Data Grid */
.inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 12px;
  margin-bottom: 16px;
}

.inv-label {
  font-size: 9px;
  font-weight: 800;
  color: #9CA3AF;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.inv-value {
  font-size: 14px;
  font-weight: 900;
  color: #111827;
}

.inv-disclaimer {
  font-size: 9px;
  color: #9CA3AF;
  line-height: 1.4;
  margin-bottom: 16px;
}

.btn-invest {
  background: #1E3A8A;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 24px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(30, 58, 138, 0.2);
}



/* ========================================== */
/* PAGE TRANSITION EFFECTS                    */
/* ========================================== */

@keyframes smoothReveal {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply the animation to all main views and sub-screens when they are visible */
section:not(.hidden), 
.full-page-view:not(.hidden),
.profile-sub-screen:not(.hidden) {
  animation: smoothReveal 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}


.hidden { display: none !important; }


/* Base mobile sub-screen wrapper */
.profile-sub-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  position: absolute; /* or fixed, depending on your app layout */
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-color, #f9fafb);
  z-index: 10;
}

/* Keep header locked at the top */
.profile-sub-screen .sub-header {
  flex-shrink: 0;
}

/* Allow the body content to scroll smoothly inside the mobile view */
.profile-sub-screen .sub-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: 100px; /* Prevents bottom mobile navbars from hiding content */
}


.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}


@keyframes smoothScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.modern-marquee-container {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.modern-marquee-text {
  display: inline-block;
  animation: smoothScroll 12s linear infinite;
}





/* Apply the animation to all main views, sub-screens, and the referral view */
section:not(.hidden), 
.full-page-view:not(.hidden),
.profile-sub-screen:not(.hidden),
#referral-view:not(.hidden) {
  animation: smoothReveal 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}