
/* --- [NEW] Theme Variables --- */
:root {
    /* Lemon Vanilla Green Theme Defaults */
    --lemon-vanilla-green-light: #f0fff0; /* Light green for backgrounds, like vanilla */
    --lemon-vanilla-green-dark: #6b8e23; /* Darker green for accents, like lemon */
    --lemon-vanilla-green-text: #36454F; /* Charcoal for main text */
    --lemon-vanilla-green-highlight: #9ACD32; /* Yellow-green for highlights */

    --primary-green: var(--lemon-vanilla-green-dark); /* Main accent green */
    --primary-green-light: var(--lemon-vanilla-green-highlight); /* Lighter version for highlights */
    --primary-blue: #3498db; /* Keeping blue for general actions/links */
    
    --sidebar-bg: #ffffff;
    --text-light: #ffffff;
    --text-dark: var(--lemon-vanilla-green-text);
    --text-muted: #7f8c8d;
    --card-bg: #ffffff;
    --body-bg: #f8f9fa; /* Default light body background */
    --header-bg: #ffffff;
    --header-border: #eee;
    --header-shadow: rgba(0,0,0,0.05);
    --menu-item-hover-bg: #f8f9fa;
    --menu-item-active-bg: #e0e0e0; /* Slightly darker grey for active */
    --menu-item-active-border: #667eea;
    --menu-item-text-color: #333;
    --menu-item-icon-color: #666;
    --button-bg-light: #f8f9fa;
    --button-border-light: #e9ecef;
    --button-text-light: #666;
    --section-bg: #f8f9fa;
    --section-border: #e9ecef;
    --table-header-bg: #f8f9fa;
    --table-border: #e9ecef;
    --welcome-card-bg: #ffffff; /* Reverted to white */
    --quick-action-card-bg: #f8f9fa;
    --quick-action-card-hover-bg: #eef1f4;
    --stat-card-bg-gradient-start: #f8f9fa;
    --stat-card-bg-gradient-end: #ffffff;
    --stat-card-border: #e9ecef;
    --stat-card-hover-border: #d0d0d0;
    --popup-bg: #ffffff;
    --popup-header-bg: #ffffff;
    --popup-header-border: #f0f0f0;
    --form-control-bg: #ffffff;
    --form-control-border: #e0e0e0;
    --form-control-focus-shadow: rgba(0, 123, 255, 0.2);
    --input-placeholder-color: #888;
    --dropdown-bg: #fdfdfd;
    --dropdown-hover-bg: #f0f0f0;
    --banned-bg: #1a1a1a;
    --banned-text: white;
    --gigsplan-header-bg: #1e1e1e;
    --gigsplan-text: #ffffff;
    --gigsplan-nav-bg: #ffffff;
    --gigsplan-nav-item-color: #555;
    --gigsplan-nav-item-active-color: #3498db;
    --gigsplan-nav-item-active-border: #3498db;
    --gigsplan-help-btn-bg: #333333;
    --gigsplan-help-btn-text: #ffffff;
    --greeting-card-bg-start: #00c6ff;
    --greeting-card-bg-end: #0072ff;
    --greeting-card-text: white;
    --network-card-bg: #fff;
    --network-card-shadow: rgba(0,0,0,0.07);
    --network-card-border: #e9ecef;
    --network-card-tag-bg: #f0f2f5;
    --network-card-tag-color: #555;
    --public-popup-total-price-bg: #f8f9fa;
    --public-popup-total-price-text: #333;
    --public-popup-total-price-label: #666;
    --public-popup-confirm-btn-bg: #1e2c40;
    --public-popup-confirm-btn-text: white;
    --public-store-footer-text: #888;
    
    --warning-bg: #fffbeb; /* Standard warning yellow */
    --warning-text: #78350f; /* Standard warning text */
    --warning-border: #fde68a; /* Standard warning border */
}

/* [UPDATED] Dark Theme Overrides - Made deeper */
[data-theme="dark"] {
    --lemon-vanilla-green-light: #2c3e50; /* Darker background for cards */
    --lemon-vanilla-green-dark: #9ACD32; /* Brighter green for accents in dark mode */
    --lemon-vanilla-green-text: #ecf0f1; /* Light text for dark mode */
    --lemon-vanilla-green-highlight: #bada55; /* Adjusted highlight for dark mode */

    --primary-green: var(--lemon-vanilla-green-dark);
    --primary-green-light: var(--lemon-vanilla-green-highlight);
    --primary-blue: #38bdf8; /* Lighter blue for better visibility */
    
    --sidebar-bg: #161b22;
    --text-light: #ffffff;
    --text-dark: #e6edf3;
    --text-muted: #848d97;
    --card-bg: #21262d;
    --body-bg: #0d1117; /* Very deep background */
    --header-bg: #161b22;
    --header-border: #30363d;
    --header-shadow: rgba(0,0,0,0.3);
    --menu-item-hover-bg: #30363d;
    --menu-item-active-bg: #30363d;
    --menu-item-active-border: var(--primary-blue);
    --menu-item-text-color: #e6edf3;
    --menu-item-icon-color: #848d97;
    --button-bg-light: #30363d;
    --button-border-light: #444c56;
    --button-text-light: #e6edf3;
    --section-bg: #161b22;
    --section-border: #30363d;
    --table-header-bg: #21262d;
    --table-border: #30363d;
    --welcome-card-bg: #21262d; /* Reverted to dark card bg */
    --quick-action-card-bg: #21262d;
    --quick-action-card-hover-bg: #30363d;
    --stat-card-bg-gradient-start: #21262d;
    --stat-card-bg-gradient-end: #161b22;
    --stat-card-border: #30363d;
    --stat-card-hover-border: var(--primary-blue);
    --popup-bg: #21262d;
    --popup-header-bg: #161b22;
    --popup-header-border: #30363d;
    --form-control-bg: #0d1117;
    --form-control-border: #30363d;
    --form-control-focus-shadow: rgba(56, 189, 248, 0.4);
    --input-placeholder-color: #848d97;
    --dropdown-bg: #30363d;
    --dropdown-hover-bg: #444c56;
    --banned-bg: #1a1a1a;
    --banned-text: white;
    --gigsplan-header-bg: #1e1e1e;
    --gigsplan-text: #ffffff;
    --gigsplan-nav-bg: #21262d;
    --gigsplan-nav-item-color: #848d97;
    --gigsplan-nav-item-active-color: var(--primary-blue);
    --gigsplan-nav-item-active-border: var(--primary-blue);
    --gigsplan-help-btn-bg: #30363d;
    --gigsplan-help-btn-text: #e6edf3;
    --greeting-card-bg-start: #075985; /* Deeper blue */
    --greeting-card-bg-end: #0c4a6e;
    --greeting-card-text: white;
    --network-card-bg: #21262d;
    --network-card-shadow: rgba(0,0,0,0.2);
    --network-card-border: #30363d;
    --network-card-tag-bg: #30363d;
    --network-card-tag-color: #e6edf3;
    --public-popup-total-price-bg: #161b22;
    --public-popup-total-price-text: #e6edf3;
    --public-popup-total-price-label: #848d97;
    --public-popup-confirm-btn-bg: var(--primary-blue);
    --public-popup-confirm-btn-text: #0d1117;
    --public-store-footer-text: #848d97;

    --warning-bg: #5a4f21;
    --warning-text: #f0c36d;
    --warning-border: #92400e;
}

/* [NEW] Force Light Theme for Public Merchant Store */
body.public-store-active {
    --primary-green: #27ae60;
    --primary-blue: #3498db;
    --sidebar-bg: #ffffff;
    --text-light: #ffffff;
    --text-dark: #34495e;
    --text-muted: #7f8c8d;
    --card-bg: #ffffff;
    --body-bg: #f8f9fa;
    --header-bg: #ffffff;
    --header-border: #eee;
    --menu-item-text-color: #333;
    --menu-item-icon-color: #666;
    --table-header-bg: #f8f9fa;
    --table-border: #e9ecef;
    --popup-bg: #ffffff;
    --popup-header-bg: #ffffff;
    --popup-header-border: #f0f0f0;
    --form-control-bg: #ffffff;
    --form-control-border: #e0e0e0;
    --gigsplan-nav-bg: #ffffff;
    --gigsplan-nav-item-color: #555;
    --gigsplan-nav-item-active-color: #3498db;
    --gigsplan-nav-item-active-border: #3498db;
    --network-card-bg: #fff;
    --network-card-shadow: rgba(0,0,0,0.07);
    --network-card-border: #e9ecef;
    --network-card-tag-bg: #f0f2f5;
    --network-card-tag-color: #555;
    --public-popup-total-price-bg: #f8f9fa;
    --public-popup-total-price-text: #333;
    --public-popup-total-price-label: #666;
    --public-popup-confirm-btn-bg: #1e2c40;
    --public-popup-confirm-btn-text: white;
    --public-store-footer-text: #888;
}

/* --- [NEW] Banned Store Styles --- */
#bannedStoreContainer {
    display: none; /* This is the critical line */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--banned-bg);
    color: var(--banned-text);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    z-index: 10001;
}

/* --- [NEW] Public Storefront Styles --- */
#publicStoreContainer {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--body-bg);
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    display: none; /* Hidden by default */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* [UPDATED] Sticky Gigsplan Header */
.gigsplan-header {
    background: var(--gigsplan-header-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.gigsplan-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gigsplan-logo img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
}
.gigsplan-logo span {
    font-size: 22px;
    font-weight: 700;
    color: var(--gigsplan-text);
}
.gigsplan-help-btn {
    background-color: var(--gigsplan-help-btn-bg);
    color: var(--gigsplan-help-btn-text);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* New Gigsplan Nav */
.gigsplan-nav {
    background: var(--gigsplan-nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-bottom: 1px solid var(--header-border);
}
.gigsplan-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gigsplan-nav-item-color);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border-bottom: 3px solid transparent;
}
.gigsplan-nav-item.active {
    color: var(--gigsplan-nav-item-active-color);
    border-bottom-color: var(--gigsplan-nav-item-active-border);
}
.gigsplan-nav-item i {
    font-size: 16px;
}

/* New Greeting Card */
.greeting-hero-card {
    margin: 20px;
    padding: 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--greeting-card-bg-start), var(--greeting-card-bg-end));
    color: var(--greeting-card-text);
    animation: slideInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.greeting-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.greeting-header .sun-icon {
    font-size: 44px;
    animation: spin 10s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.greeting-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.greeting-hero-card p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.95;
}
.greeting-actions {
    display: flex;
    gap: 12px;
}
.greeting-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.greeting-btn.whatsapp {
    background-color: #25D366;
    color: white;
}
.greeting-btn.share {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    animation: pulse-animation 2s infinite;
}
.greeting-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* New Network Card Style */
.network-cards-container {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.network-card {
    background: var(--network-card-bg);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 15px var(--network-card-shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--network-card-border);
}
.network-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.network-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.network-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
}
.network-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.network-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}
.network-card-title span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}
.network-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.network-card-tag {
    background: var(--network-card-tag-bg);
    color: var(--network-card-tag-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* UPDATED Purchase Popup */
#publicPurchasePopup .popup {
    max-width: 400px;
}
#publicPurchasePopup .popup-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--popup-header-border);
}
#publicPurchasePopup .popup-header .network-logo-small {
    width: 40px;
    height: 40px;
}
#publicPurchasePopup .popup-header .popup-title {
    font-size: 18px;
    font-weight: 600;
}
#publicPurchasePopup .popup-content {
    padding: 25px;
}
#publicPurchasePopup .total-price-display {
    background: var(--public-popup-total-price-bg);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-top: 20px;
}
#publicPurchasePopup .total-price-display p {
    font-size: 13px;
    color: var(--public-popup-total-price-label);
    margin: 0;
    text-transform: uppercase;
}
#publicPurchasePopup .total-price-display h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--public-popup-total-price-text);
    margin: 5px 0 0 0;
}
#publicPurchasePopup .popup-actions {
    padding: 20px 25px;
    border-top: none;
    background: var(--popup-bg);
}
#publicPurchasePopup .confirm-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    background: var(--public-popup-confirm-btn-bg);
    color: var(--public-popup-confirm-btn-text);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#publicPurchasePopup .form-group label { font-weight: 500; font-size: 14px; color: var(--text-dark); } /* Changed label color for dark mode */

.public-store-footer {
    padding: 20px;
    text-align: center;
}
.public-store-powered-by {
    font-size: 12px;
    color: var(--public-store-footer-text);
    margin-top: 20px;
}
.public-store-powered-by a {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
}

/* --- [NEW] Order History for Public Store --- */
.order-history-container {
    padding: 20px;
}
.order-history-container h2 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-dark);
}
.order-history-container .page-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}
.tracking-form-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    margin-bottom: 20px;
}
.results-table-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow-x: auto;
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.results-table thead {
    background-color: var(--table-header-bg);
    color: var(--text-dark);
}
.results-table th, .results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--table-border);
    text-align: left;
    color: var(--text-dark);
}


:root {
    /* Profile Page Specific */
    --profile-header-bg: #2979ff;
    --profile-role-bg: #ede7f6;
    --profile-role-text: #5e35b1;
    --profile-button-bg: #f5f5f5;

    /* Common colors for light theme (retained if not explicitly overridden by dark mode) */
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color-alt: #27ae60;
    --pending-color: #f39c12;
    --pending-bg-light: #fffbeb;
    --processing-color: #3498db;
    --processing-bg-light: #e0f2fe;
    --completed-color: #22c55e;
    --completed-bg-light: #f0fdf4;
    --cream-bg: #FAF0E6;
}
[data-theme="dark"] {
    --profile-header-bg: #007bff;
    --profile-role-bg: #4a5568;
    --profile-role-text: #e2e8f0;
    --profile-button-bg: #4a5568;
}


/* --- General Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--body-bg);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 13px;
}
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    position: relative;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px var(--header-shadow);
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-item-icon-color); /* [FIX] Set color for SVG currentColor to work */
}

.menu-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.menu-btn:hover {
    background: var(--menu-item-hover-bg);
    transform: scale(1.05);
}

.header .logo {
    flex-grow: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.logo-img {
    display: none;
}

.header-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-btn, .theme-toggle-btn { /* Removed notification-btn */
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--button-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--button-border-light);
    color: var(--button-text-light); /* Ensure icon color for buttons */
}

.profile-btn svg, .theme-toggle-btn svg { /* Removed notification-btn */
    width: 16px;
    height: 16px;
    stroke: currentColor; /* Use currentColor to inherit from parent button */
}
 .theme-toggle-btn i {
    font-size: 16px;
    color: currentColor;
 }

.profile-btn:hover, .theme-toggle-btn:hover { /* Removed notification-btn */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Theme Switcher Dropdown --- */
.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--popup-bg);
    border: 1px solid var(--header-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 120px;
    padding: 8px 0;
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.theme-dropdown.show {
    display: flex;
}
.theme-dropdown-item {
    padding: 8px 15px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-dropdown-item:hover {
    background: var(--menu-item-hover-bg);
}
.theme-dropdown-item.active {
    background: var(--menu-item-active-bg);
    color: var(--primary-blue);
    font-weight: 500;
}
.theme-dropdown-item i {
    font-size: 14px;
}


/* --- Main Content Area for SPA --- */
.page-content {
    padding: 20px;
    background: var(--section-bg);
    min-height: calc(100vh - 60px);
    max-width: 100%;
    display: none;
    opacity: 0;
}
.page-content.active {
    display: block;
    animation: fadeIn 0.6s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Welcome Card --- */
.welcome-card {
    background: var(--welcome-card-bg); /* Reverted to use theme variable */
    border-radius: 16px;
    padding: 20px;
    color: var(--text-dark);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--section-border);
    transition: none;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    text-align: center;
}

.welcome-date {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 12px;
    text-align: center;
}

.policy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--button-bg-light);
    border: 1px solid var(--button-border-light);
    padding: 6px 10px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 11px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.policy-link:hover {
    background: var(--menu-item-hover-bg);
    transform: translateY(-1px);
}

.policy-link svg {
    width: 12px;
    height: 12px;
    stroke: var(--text-muted);
}

/* --- Customer Support Section --- */
.support-section {
    background: var(--section-bg);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--section-border);
}

.support-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark);
}

.support-title svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
}

.support-number {
    background: var(--card-bg);
    border: 1px solid var(--section-border);
    padding: 6px 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-dark);
    cursor: pointer;
}

.support-number:hover {
    border-color: var(--text-muted);
    transform: scale(1.02);
}

.support-hours {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* --- [UPDATED & SMALLER] Quick Actions Grid --- */
.quick-actions-container {
    margin-bottom: 24px;
}

.quick-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quick-actions-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-actions-title svg {
    width: 20px;
    height: 20px;
    stroke: #ff9800;
}

.quick-actions-proceed {
    font-size: 11px;
    color: var(--text-muted);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Always 2 columns for a compact look */
    gap: 12px;
}

.action-card {
    background: var(--quick-action-card-bg);
    border-radius: 10px;
    padding: 12px 8px; /* Reduced padding */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--section-border);
    min-height: auto; /* Allow card to be smaller */
}

.action-card:hover {
    background: var(--quick-action-card-hover-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.action-icon {
    width: 32px; /* Smaller icon container */
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.action-icon svg {
    width: 18px; /* Smaller icon */
    height: 18px;
    stroke-width: 2;
}

/* Specific icon colors for quick actions */
.topup-card .action-icon { background: #e0ebff; }
.topup-card .action-icon svg { stroke: #007bff; }
.buydata-card .action-icon { background: #e6ffed; }
.buydata-card .action-icon svg { stroke: #28a745; }
.orders-card-quick .action-icon { background: #f0e6ff; }
.orders-card-quick .action-icon svg { stroke: #6f42c1; }
.payments-card-quick .action-icon { background: #fff3e6; }
.payments-card-quick .action-icon svg { stroke: #fd7e14; }

/* [FIX] Dark mode overrides for Quick Action icons */
[data-theme="dark"] .topup-card .action-icon { background: rgba(56, 189, 248, 0.2); }
[data-theme="dark"] .topup-card .action-icon svg { stroke: #38bdf8; }
[data-theme="dark"] .buydata-card .action-icon { background: rgba(34, 197, 94, 0.2); }
[data-theme="dark"] .buydata-card .action-icon svg { stroke: #4ade80; }
[data-theme="dark"] .orders-card-quick .action-icon { background: rgba(167, 139, 250, 0.2); }
[data-theme="dark"] .orders-card-quick .action-icon svg { stroke: #a78bfa; }
[data-theme="dark"] .payments-card-quick .action-icon { background: rgba(251, 146, 60, 0.2); }
[data-theme="dark"] .payments-card-quick .action-icon svg { stroke: #fb923c; }


.action-title {
    font-size: 0.8rem; /* Smaller title font */
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.action-subtitle {
    font-size: 0.7rem; /* Smaller subtitle font */
    color: var(--text-muted);
    line-height: 1.2;
}
/* --- [NEW & MINIMIZED] Weekend Notice --- */
.weekend-notice {
    display: none; /* Hidden by default, shown by script.js */
    background-color: var(--warning-bg); /* A light creamy yellow */
    border: 1px solid var(--warning-border); /* A soft yellow border */
    border-radius: 10px;      /* Slightly smaller border radius */
    padding: 10px 15px;       /* Reduced vertical padding */
    margin-bottom: 20px;      /* Reduced space below the notice */
    align-items: center;
    gap: 12px;                /* Reduced space between icon and text */
}
[data-theme="dark"] .weekend-notice {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
}

.notice-icon {
    flex-shrink: 0;
    color: #d97706; /* Amber color for the icon */
    background-color: #fef3c7;
    width: 32px;              /* Made the icon circle smaller */
    height: 32px;             /* Made the icon circle smaller */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .notice-icon {
    color: #fbbf24;
    background-color: #78350f;
}

.notice-icon svg {
    width: 18px;              /* Made the icon SVG smaller */
    height: 18px;
}

.notice-content .notice-title {
    font-size: 0.9rem;        /* Made the title text smaller */
    font-weight: 600;
    color: #92400e;
    margin: 0 0 2px 0;        /* Reduced space below the title */
}
[data-theme="dark"] .notice-content .notice-title {
    color: #fde68a;
}

.notice-content .notice-description {
    font-size: 0.75rem;       /* Made the description text smaller */
    color: #b45309;
    line-height: 1.4;
    margin: 0;
}
[data-theme="dark"] .notice-content .notice-description {
    color: #fcd34d;
}
/* --- Golden Ticket --- */
.golden-ticket {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 18px;
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 1.0s both;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border: 1px solid #333;
}

[data-theme="dark"] .golden-ticket {
    background: linear-gradient(135deg, #0056b3 0%, #003366 100%);
    border: 1px solid #003366;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.golden-ticket::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 25%,
        rgba(255,215,0,0.15) 50%,
        transparent 75%);
    animation: goldShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes goldShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.ticket-title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #f39c12 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="dark"] .golden-ticket .ticket-title {
    background: linear-gradient(135deg, #ffeb3b 0%, #fff176 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.ticket-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}
[data-theme="dark"] .golden-ticket .ticket-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ffa000 100%);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
}

.ticket-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 10px;
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crown-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    animation: rotate 6s linear infinite;
    box-shadow: 0 3px 12px rgba(243, 156, 18, 0.3);
}
[data-theme="dark"] .golden-ticket .crown-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ffa000 100%);
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.3);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.crown-icon::after {
    content: '✓';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #27ae60;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid #1a1a1a;
}
[data-theme="dark"] .golden-ticket .crown-icon::after {
    border: 1px solid var(--body-bg);
}

.ticket-text {
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .golden-ticket .ticket-text {
    color: rgba(255,255,255,0.9);
}


.ticket-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.info-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .golden-ticket .info-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
}

.info-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.activate-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}
[data-theme="dark"] .golden-ticket .activate-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ffa000 100%);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
}

.activate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(243, 156, 18, 0.4);
}
.golden-ticket.activated {
    background: linear-gradient(135deg, #f39c12 0%, #ffd700 100%);
    border-color: #ffd700;
}
.golden-ticket.activated .ticket-title {
    color: #1a1a1a;
    -webkit-text-fill-color: initial;
}
.golden-ticket.activated .ticket-text,
.golden-ticket.activated .info-btn {
    color: #1a1a1a;
}
.golden-ticket.activated .ticket-badge {
    background: #1a1a1a;
    color: #ffd700;
}

/* --- Overview Stats Section --- */
.overview-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    border: 1px solid var(--section-border);
}

.overview-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--header-border);
}

.overview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, var(--stat-card-bg-gradient-start) 0%, var(--stat-card-bg-gradient-end) 100%);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--stat-card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s;
}
[data-theme="dark"] .stat-card::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--stat-card-hover-border);
}

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

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 16px;
    height: 16px;
}

.wallet-card .stat-icon { background: #e3f2fd; }
.wallet-card .stat-icon svg { stroke: #4285f4; }
.orders-card .stat-icon { background: #f3e5f5; }
.orders-card .stat-icon svg { stroke: #9c27b0; }
.spent-card .stat-icon { background: #e8f5e8; }
.spent-card .stat-icon svg { stroke: #4caf50; }
.data-card .stat-icon { background: #fff3e0; }
.data-card .stat-icon svg { stroke: #ff9800; }

/* [FIX] Dark mode overrides for Overview icons */
[data-theme="dark"] .wallet-card .stat-icon { background: rgba(66, 133, 244, 0.2); }
[data-theme="dark"] .wallet-card .stat-icon svg { stroke: #8ab4f8; }
[data-theme="dark"] .orders-card .stat-icon { background: rgba(156, 39, 176, 0.2); }
[data-theme="dark"] .orders-card .stat-icon svg { stroke: #ce93d8; }
[data-theme="dark"] .spent-card .stat-icon { background: rgba(76, 175, 80, 0.2); }
[data-theme="dark"] .spent-card .stat-icon svg { stroke: #81c784; }
[data-theme="dark"] .data-card .stat-icon { background: rgba(255, 152, 0, 0.2); }
[data-theme="dark"] .data-card .stat-icon svg { stroke: #ffb74d; }

.stat-percentage {
    font-size: 12px;
    font-weight: 600;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
 .stat-percentage.negative {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}


.stat-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* --- Sidebar --- */
.sidebar {
    position: fixed; /* Keep sidebar fixed */
    top: 0;
    left: -250px; /* Hidden by default for mobile */
    width: 250px;
    height: 100vh;
    background: var(--sidebar-bg);
    box-shadow: 2px 0 15px rgba(0,0,0,0.08);
    transition: left 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--header-border);
}

.sidebar.open { left: 0; }
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: none; z-index: 999;
}
.sidebar-overlay.show { display: block; }

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--header-border);
    background: var(--sidebar-bg);
    color: var(--text-dark);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    width: 100%;
    justify-content: center;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-brand-text { display: none; }

.user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.user-badge, .user-id {
    background: var(--button-bg-light);
    border: 1px solid var(--button-border-light);
    color: var(--primary-blue);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.user-badge svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    stroke: var(--primary-blue);
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.menu-item, .menu-item-dropdown > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--menu-item-text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 2px 0;
    position: relative;
}

.menu-item:hover, .menu-item.active, .menu-item-dropdown > a:hover, .menu-item-dropdown > a.active {
    background: var(--menu-item-hover-bg);
    border-left-color: var(--menu-item-active-border);
    color: var(--menu-item-active-border);
}

.menu-item svg, .menu-item-dropdown > a svg {
    width: 18px;
    height: 18px;
    stroke: var(--menu-item-icon-color);
    flex-shrink: 0;
}

.menu-item:hover svg, .menu-item.active svg, .menu-item-dropdown > a:hover svg, .menu-item-dropdown > a.active svg {
    stroke: var(--menu-item-active-border);
}

/* New Merchant badge */
.soon-badge {
    background: var(--primary-blue);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: auto;
    animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

/* [FIXED] Dropdown menu styles */
.menu-item-dropdown {
    margin: 2px 0;
}
.menu-item-dropdown > a {
    width: 100%;
}
.menu-item-dropdown > a .arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
}
.menu-item-dropdown.open > a .arrow {
    transform: rotate(90deg);
}
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--dropdown-bg);
}
.menu-item-dropdown.open .dropdown-content {
    max-height: 500px; /* Arbitrary large value */
}
.dropdown-content a {
    display: block;
    padding: 8px 16px 8px 45px;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}
.dropdown-content a:hover, .dropdown-content a.active {
    background: var(--dropdown-hover-bg);
    color: var(--text-dark);
}
.dropdown-content .dropdown-header {
    padding: 10px 16px 5px 45px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--header-border);
    text-align: center;
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* --- Global Table Styles --- */
.professional-history-table-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow-x: auto;
    margin-top: 20px;
}
.professional-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}
.professional-history-table thead {
    background-color: var(--table-header-bg);
    color: var(--text-dark);
    font-weight: 600;
    text-align: left;
}
.professional-history-table th, .professional-history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--table-border);
    color: var(--text-dark);
}
.professional-history-table tbody tr:last-child td {
    border-bottom: none;
}
.professional-history-table tbody tr:hover {
    background-color: var(--menu-item-hover-bg);
}
.btn-cancel-order, .btn-download {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-cancel-order {
     background-color: var(--danger-color);
}
.btn-cancel-order:hover {
    background-color: #c0392b;
}
.btn-download:hover {
    background-color: #2980b9;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex; /* Use inline-flex */
    align-items: center; /* Center items vertically */
    gap: 6px; /* Space between icon and text */
    min-width: 80px;
    text-align: center;
    border: 1px solid transparent;
}
.status-badge .fa-spinner {
    animation: fa-spin 1.5s linear infinite;
}
.status-completed { background-color: var(--completed-bg-light); color: var(--completed-color); border-color: var(--completed-color); }
.status-pending { background-color: var(--pending-bg-light); color: var(--pending-color); border-color: var(--pending-color); }
.status-processing { background-color: var(--processing-bg-light); color: var(--processing-color); border-color: var(--processing-color); }
.status-failed { background-color: #ffebee; color: var(--danger-color); border-color: var(--danger-color); }
.status-cancelled { background-color: #e9ecef; color: #495057; border-color: #ced4da; }
.status-initiated { background-color: #fff8e1; color: #ff8f00; border-color: #ff8f00; } /* Amber */
.status-wip { background-color: #f3e5f5; color: #8e24aa; border-color: #8e24aa; } /* Purple */
.status-unknown { background-color: #f0f0f0; color: #666; border-color: #ceceda; }

/* No Records View */
.no-records-view {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.no-records-view i {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.no-records-view h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.no-records-view p {
    font-size: 13px;
    color: var(--text-muted);
}

/* History Page Specific Styles */
#historyPage .summary-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
#historyPage .summary-card {
    padding: 15px;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}
#historyPage .summary-card .icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    opacity: 0.7;
}
#historyPage .summary-card h3 {
    font-size: 24px;
    margin: 0 0 5px 0;
    font-weight: 700;
}
#historyPage .summary-card p {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
}
#historyPage .summary-card .amount {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.9;
}
#historyPage .total-orders-card { background: linear-gradient(135deg, #8e44ad, #9b59b6); }
#historyPage .completed-orders-card { background: linear-gradient(135deg, #27ae60, #2ecc71); }

#historyPage .filters-container {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
#historyPage .filter-group {
    margin-bottom: 10px;
}
#historyPage .filter-group:last-child { margin-bottom: 0; }
#historyPage .filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}
#historyPage .filter-group .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--form-control-bg);
    color: var(--text-dark);
}

/* --- Profile Page Styles --- */
#profilePage {
    padding: 0;
    animation: fadeIn 0.6s ease-out forwards;
    display: none;
}
#profilePage.active { display: block; }

.profile-header-banner {
    background: var(--profile-header-bg);
    color: var(--text-light);
    padding: 25px 18px 50px 18px;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.profile-header-banner h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
}
.profile-status {
    background-color: var(--primary-green-light);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.profile-details-card {
    background-color: var(--card-bg);
    margin: 0 18px 18px 18px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.profile-details-card .form-group {
    margin-bottom: 20px;
}
.profile-details-card .form-group label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 400;
}
.profile-details-card .form-value,
.profile-details-card .form-group input[type="text"],
.profile-details-card .form-group input[type="email"],
.profile-details-card .form-group input[type="tel"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dark);
    background-color: var(--form-control-bg);
    min-height: 38px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.profile-details-card .form-group input:focus {
    border-color: var(--primary-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}
.profile-details-card .form-group input[readonly] {
     background-color: var(--quick-action-card-bg); /* Use a subtle background for readonly */
     cursor: not-allowed;
}

.profile-role-display {
    display: inline-block;
    background-color: var(--profile-role-bg);
    color: var(--profile-role-text);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.profile-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}
.profile-buttons-container .action-button {
    width: 100%;
    max-width: 250px;
    background-color: var(--profile-button-bg);
    color: var(--text-dark);
    padding: 10px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.profile-buttons-container .action-button:hover {
    background-color: var(--menu-item-hover-bg);
}
.profile-buttons-container .action-button.cancel-edit-btn {
    background-color: #ffebee;
    color: var(--danger-color);
    border-color: var(--danger-color);
}
[data-theme="dark"] .profile-buttons-container .action-button.cancel-edit-btn {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
    border-color: rgba(231, 76, 60, 0.5);
}
.profile-buttons-container .action-button.cancel-edit-btn:hover {
    background-color: #fddede;
}
.profile-buttons-container #saveProfileBtn {
    background-color: var(--primary-green-light);
    color: white;
    border-color: var(--primary-green-light);
}
.profile-buttons-container #saveProfileBtn:hover {
    background-color: var(--primary-green);
}
.profile-buttons-container #logoutBtn {
     background-color: var(--danger-color);
     color: white;
     border-color: var(--danger-color);
}
.profile-buttons-container #logoutBtn:hover {
    background-color: #c0392b;
}

.security-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--header-border);
}

.security-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.change-password-button {
    background: var(--button-bg-light);
    border: 1px solid var(--button-border-light);
    color: var(--text-dark);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

.change-password-button svg {
    width: 18px;
    height: 18px;
    stroke: var(--menu-item-icon-color);
}

.change-password-button:hover {
    background: var(--menu-item-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* --- AFA Registration Page Styles --- */
#afa-registrationPage {
    padding: 20px;
    animation: fadeIn 0.6s ease-out forwards;
    display: none;
}
#afa-registrationPage.active { display: block; }

#afa-registrationPage .afa-filters-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
#afa-registrationPage .afa-filters-card .form-group {
    margin-bottom: 12px;
}
#afa-registrationPage .afa-filters-card .form-group:last-child {
    margin-bottom: 0;
}
#afa-registrationPage .afa-filters-card .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--form-control-bg);
    color: var(--text-dark);
}

#afa-registrationPage .btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-light);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
}
#afa-registrationPage .btn-primary:hover {
    background-color: #2980b9;
}

/* --- General Popup Modal Styling --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    padding: 10px;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: var(--popup-bg);
    border-radius: 16px;
    max-width: 360px; /* Reduced popup size */
    width: 100%;
    max-height: 90vh;
    overflow: hidden; /* Changed to hidden */
    animation: popupSlide 0.3s ease-out;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

@keyframes popupSlide {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--popup-header-border);
    border-radius: 16px 16px 0 0;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.popup-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
}

.popup-close {
    background: var(--button-bg-light);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: var(--menu-item-hover-bg);
}
.popup-close svg, .popup-close i { /* Added i for Font Awesome icons */
    width: 14px;
    height: 14px;
    stroke: var(--menu-item-icon-color);
    font-size: 20px;
    line-height: 30px;
    text-align: center;
}
.popup-content {
    padding: 20px;
    overflow-y: auto; /* Allow content to scroll */
    flex-grow: 1; /* Allow content to take available space */
}
.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--popup-header-border);
    background: var(--section-bg);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0; /* Prevent actions from shrinking */
}

/* Support Popup Specific styles */
.support-popup .popup-content textarea.form-control {
    min-height: 100px;
    resize: vertical;
}
.support-popup .popup-actions {
    justify-content: space-between;
}
.support-popup .popup-actions .cancel-btn {
    background-color: var(--button-bg-light);
    color: var(--text-dark);
}
.support-popup .popup-actions .submit-btn {
    background-color: #333;
}
.support-popup .popup-actions .submit-btn:hover {
    background-color: #000;
}
[data-theme="dark"] .support-popup .popup-actions .submit-btn {
    background-color: var(--primary-blue);
}
[data-theme="dark"] .support-popup .popup-actions .submit-btn:hover {
    background-color: #0056b3;
}


/* Forms in Popups - General Styles */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--form-control-bg);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px var(--form-control-focus-shadow);
}
.input-icon {
    position: relative;
}
.input-icon svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    pointer-events: none;
}
/* [NEW] Helper link for image uploads */
.form-group .upload-helper {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}
.form-group .upload-helper a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.popup-actions .cancel-btn, .popup-actions .send-btn, .popup-actions .submit-btn, .popup-actions .confirm-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.popup-actions .cancel-btn {
    background: var(--button-bg-light);
    color: var(--text-dark);
    border: 1px solid var(--button-border-light);
}
.popup-actions .cancel-btn:hover {
    background: var(--menu-item-hover-bg);
}

.popup-actions .send-btn, .popup-actions .submit-btn, .popup-actions .confirm-btn {
    background: #007bff;
    color: white;
    border: none;
}
.popup-actions .send-btn:hover, .popup-actions .submit-btn:hover, .popup-actions .confirm-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* --- [UPDATED & SMALLER] Golden Ticket Popup --- */
.golden-ticket-popup .popup {
    max-width: 380px; /* Slightly wider for better text flow */
}
.golden-ticket-popup .popup-header {
    background: linear-gradient(135deg, #f59e0b 0%, #e65100 100%);
    color: white;
}
.golden-ticket-popup .popup-header .popup-title {
    color: white;
}
.golden-ticket-popup .popup-header .popup-close {
    background: rgba(255,255,255,0.2);
}
.golden-ticket-popup .popup-header .popup-close:hover {
    background: rgba(255,255,255,0.3);
}
.golden-ticket-popup .popup-content {
    padding: 15px; /* Reduced padding */
}
.golden-ticket-popup .popup-content p {
    font-size: 13px; /* Smaller text */
    text-align: center;
    margin-bottom: 15px;
}
.golden-ticket-popup .benefits-box, .golden-ticket-popup .terms-box {
    padding: 12px; /* Reduced padding */
    margin-bottom: 12px;
    border-radius: 8px;
}
.golden-ticket-popup h4 {
    font-size: 13px; /* Smaller headings */
    gap: 6px;
}
.golden-ticket-popup li {
    font-size: 12px; /* Smaller list item text */
    gap: 6px;
}
.golden-ticket-popup li svg {
    width: 14px; /* Smaller icons */
    height: 14px;
}
.golden-ticket-popup .checkbox-container {
    padding: 0 15px;
    margin: 10px 0;
}
.golden-ticket-popup .checkbox-container label {
    font-size: 13px;
}
.golden-ticket-popup .popup-actions {
    padding: 15px;
}
.golden-ticket-popup .popup-actions button {
    font-size: 13px;
    padding: 8px 16px;
}

/* --- [NEW & IMPROVED] SweetAlert2 Notification list custom styles --- */
.swal2-container.notification-container {
    top: 60px !important;
    right: 15px !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    overflow: visible !important;
    pointer-events: none;
    z-index: 3000 !important;
}
.swal2-popup.notification-popup {
    width: 320px !important;
    max-height: 400px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--header-border) !important;
    transform-origin: top right !important;
    animation: swal2-show .3s ease-out !important;
    pointer-events: auto;
    display: flex !important;
    flex-direction: column !important;
    background: var(--popup-bg) !important;
}
.notification-popup .swal2-header {
    padding: 12px 15px !important;
    border-bottom: 1px solid var(--popup-header-border) !important;
    background: var(--section-bg) !important;
    border-radius: 12px 12px 0 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-popup .swal2-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    text-align: left !important;
}
.notification-popup .swal2-close {
    position: static !important;
    font-size: 20px !important;
    color: var(--menu-item-icon-color) !important;
    margin: 0 !important;
}
.notification-popup .swal2-close:hover {
    color: var(--text-dark) !important;
}
.notification-popup .swal2-html-container {
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: auto;
}
.notification-list {
    list-style: none; padding: 0; margin: 0;
}
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid var(--popup-header-border);
    transition: background 0.2s ease;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background-color: var(--menu-item-hover-bg); }
.notification-icon {
    width: 32px; height: 32px; min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 14px;
}
.notification-content { flex-grow: 1; }
.notification-title { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 3px; }
.notification-text { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.notification-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* --- Loading Animation --- */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
[data-theme="dark"] .loading {
    background: rgba(0,0,0,0.7);
}

.loading.show {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    perspective: 800px;
    position: relative;
}

.loader:before, .loader:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    animation: spinPulse 2s infinite ease-in-out;
}

.loader:before {
    width: 100%;
    height: 100%;
    border: 3px solid #667eea;
    border-top-color: transparent;
}

.loader:after {
    width: 80%;
    height: 80%;
    border: 3px solid #4285f4;
    border-bottom-color: transparent;
    animation-delay: -1s;
    top: 10%;
    left: 10%;
}

@keyframes spinPulse {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1) rotate(180deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* --- Buy Data Popup Styles --- */
.data-order-popup .popup-header {
    background: linear-gradient(135deg, #6a0dad 0%, #8e24aa 100%);
    color: white;
    border-bottom: none;
    position: relative;
}

.data-order-popup .popup-header .popup-title {
    color: white;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.data-order-popup .popup-header .popup-title svg {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: none;
}
.data-order-popup .popup-header .popup-close {
    background: rgba(255,255,255,0.2);
    color: white;
}
.data-order-popup .popup-header .popup-close svg {
    stroke: white;
}
.data-order-popup .popup-header .popup-close:hover {
    background: rgba(255,255,255,0.3);
}
.data-order-popup .steps-indicator {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--header-border);
    padding-bottom: 10px;
    padding-top: 10px;
}

.data-order-popup .step-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
.data-order-popup .step-item.active {
    color: #6a0dad;
    font-weight: 600;
}
.data-order-popup .step-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
}
.data-order-popup .step-item.active svg {
    stroke: #6a0dad;
}
.data-order-popup .hint-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}
.data-order-popup .checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 18px;
}
.data-order-popup .checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #28a745;
    cursor: pointer;
}

.data-order-popup .checkbox-group label {
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
}
.data-order-popup .golden-ticket-promo {
    background: #fff3e6;
    border: 1px solid #ffe0b2;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    color: #e65100;
    margin-bottom: 20px;
}
[data-theme="dark"] .data-order-popup .golden-ticket-promo {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}


.data-order-popup .golden-ticket-promo a {
    color: #fd7e14;
    font-weight: 600;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.data-order-popup .golden-ticket-promo a:hover {
    text-decoration: underline;
}
.data-order-popup .popup-actions button {
    flex: 1;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.data-order-popup .popup-actions .cancel-btn {
    background: var(--button-bg-light);
    color: var(--text-dark);
    border: none;
}
.data-order-popup .popup-actions .cancel-btn:hover {
    background: var(--menu-item-hover-bg);
}
.data-order-popup .popup-actions .send-btn {
    background: #6a0dad;
    color: white;
    border: none;
}
.data-order-popup .popup-actions .send-btn:hover {
    background: #4a0a7d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

/* --- Deposit Funds Popup Styles --- */
.deposit-funds-popup .popup-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-bottom: none;
    position: relative;
}

.deposit-funds-popup .popup-header .popup-title {
    color: white;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.deposit-funds-popup .popup-header .popup-title svg {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: none;
}
.deposit-funds-popup .popup-header .popup-close {
    background: rgba(255,255,255,0.2);
    color: white;
}
.deposit-funds-popup .popup-header .popup-close svg {
    stroke: white;
}
.deposit-funds-popup .popup-header .popup-close:hover {
    background: rgba(255,255,255,0.3);
}
.deposit-funds-popup .steps-indicator {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--header-border);
    padding-bottom: 10px;
    padding-top: 10px;
}
.deposit-funds-popup .step-item.active {
    color: #007bff;
    font-weight: 600;
}
.deposit-funds-popup .step-item.active svg {
    stroke: #007bff;
}
.deposit-funds-popup .info-box {
    background: var(--lemon-vanilla-green-light); /* Integrated lemon vanilla green */
    border: 1px solid var(--lemon-vanilla-green-highlight);
    color: var(--lemon-vanilla-green-dark);
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
[data-theme="dark"] .deposit-funds-popup .info-box {
    background: rgba(0, 123, 255, 0.2);
    border: 1px solid rgba(0, 123, 255, 0.4);
    color: #007bff;
}

.deposit-funds-popup .info-box svg {
    min-width: 16px;
    height: 16px;
    stroke: var(--lemon-vanilla-green-dark); /* Integrated lemon vanilla green */
}
[data-theme="dark"] .deposit-funds-popup .info-box svg {
    stroke: #007bff;
}

.deposit-funds-popup .golden-ticket-promo {
    background: #ffe0b2;
    border: 1px solid #ffcc80;
    color: #e65100;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}
[data-theme="dark"] .deposit-funds-popup .golden-ticket-promo {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}


.deposit-funds-popup .golden-ticket-promo:hover {
    background: #ffcc80;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 165, 0, 0.2);
}

.deposit-funds-popup .popup-actions button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.deposit-funds-popup .popup-actions button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* --- Join Us Page Styles (New Design) --- */
#join-usPage .community-header-card {
    background: linear-gradient(135deg, #2979ff, #0d47a1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    color: white;
    text-align: center;
}
[data-theme="dark"] #join-usPage .community-header-card {
    background: linear-gradient(135deg, #0056b3, #003366);
}


#join-usPage .community-header-card .icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: inline-block;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
}
#join-usPage .community-header-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
#join-usPage .community-header-card p {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0;
}

#join-usPage .community-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
#join-usPage .community-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: white;
}
#join-usPage .community-card.whatsapp .icon { background-color: #25D366; }
#join-usPage .community-card.telegram .icon { background-color: #0088CC; }

#join-usPage .community-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

#join-usPage .community-card .join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}
#join-usPage .community-card.whatsapp .join-btn {
    background: #25D366;
}
#join-usPage .community-card.telegram .join-btn {
    background: #0088CC;
}
#join-usPage .community-card .join-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --- Packages Page Styles --- */
#packagesPage h2 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-dark);
}
#packagesPage .page-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}
#packagesPage .package-category-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--header-border);
    padding-bottom: 8px;
    color: var(--text-dark);
}
.package-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 15px;
}
.package-card .icon-container {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 20px;
}
.package-card.mtn .icon-container { background: #ffc107; }
.package-card.telecel .icon-container { background: #e50914; }
.package-card.airteltigo .icon-container { background: linear-gradient(45deg, #0073b0, #e50914); }
.package-card.afa_mins .icon-container { background: #34495e; }
.package-card.mtn_expiry_48hrs .icon-container { background: #fecb00; }

.package-card .info {
    flex-grow: 1;
}
.package-card .name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.package-card .description {
    font-size: 12px;
    color: var(--text-muted);
}
.package-card .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-green);
}

/* Floating Support Button */
#floatingSupportBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex; /* Always flex, JS will toggle visibility based on page */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 990;
    transition: transform 0.2s ease;
}
#floatingSupportBtn:hover {
    transform: scale(1.1);
}

/* --- [NEW] Admin Notification Banner --- */
.admin-notification-banner {
    display: none; /* Hidden by default, shown via JS */
    background-color: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}
.admin-notification-banner .banner-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
}
.admin-notification-banner .banner-content {
    padding: 15px;
}
.admin-notification-banner .banner-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}
.admin-notification-banner .banner-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.admin-notification-banner .banner-button {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: background-color 0.2s;
}
.admin-notification-banner .banner-button:hover {
    background-color: #2980b9;
}

/* --- [NEW] Invite Friends Popup --- */
.invite-friends-popup .email-tags-container {
    position: relative;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    cursor: text;
    background: var(--form-control-bg);
}
.invite-friends-popup .email-tag {
    background-color: var(--menu-item-hover-bg);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    color: var(--text-dark);
}
.invite-friends-popup .email-tag .remove-tag {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}
.invite-friends-popup .email-input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: transparent; /* Ensure input background matches container */
    color: var(--text-dark);
}


/* --- [NEW] Professional Browser Loader --- */
#browser-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Thin line loader */
    background-color: transparent;
    z-index: 10000;
    overflow: hidden;
    display: none; /* Hidden by default */
}
#browser-loader.show {
    display: block;
}
#browser-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8e44ad; /* Violet color */
    animation: browser-loader-animation 2s linear infinite;
}

@keyframes browser-loader-animation {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* --- [NEW] Flower Splash Animation --- */
.flower-splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    display: none; /* Hidden by default */
}
.flower {
    position: absolute;
    font-size: 2rem;
    animation: fall 5s linear forwards;
    opacity: 0;
}
@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* --- [NEW] Payout Page Styles --- */
.payout-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}
.payout-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.payout-card-header .icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.payout-card-header .title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: var(--text-dark);
}
.payout-card-header .title p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.main-payout-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
[data-theme="dark"] .main-payout-card {
    background: linear-gradient(135deg, #007bff, #0056b3);
}
.main-payout-card .icon {
    background: rgba(255,255,255,0.15);
}
.main-payout-card-body h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 5px 0;
}
.main-payout-card-body p {
    font-size: 13px;
    opacity: 0.9;
}
.main-payout-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    background: rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
}
.payout-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.payout-summary-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.payout-summary-card .icon {
    font-size: 18px;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.payout-summary-card .icon-earned { background: #27ae60; }
.payout-summary-card .icon-payouts { background: #3498db; }
.payout-summary-card .icon-paid { background: #2ecc71; }
.payout-summary-card .icon-pending { background: #f39c12; }

.payout-summary-card .value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-dark);
}
.payout-summary-card .label {
    font-size: 12px;
    color: var(--text-muted);
}
.payout-summary-card .sub-label {
    font-size: 10px;
    color: var(--text-muted);
}
.commission-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--section-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}
.commission-item:last-child { margin-bottom: 0; }
.commission-item .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}
.commission-item .icon-profit { background: #27ae60; }
.commission-item .icon-commission { background: #e74c3c; }
.commission-item .icon-net { background: #3498db; }
.commission-item .details { flex: 1; }
.commission-item .details p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
 .commission-item .details h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}
.how-it-works-box {
    background: #e0f2fe;
    color: #0c5460;
    padding: 15px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 15px;
}
[data-theme="dark"] .how-it-works-box {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
}
.payout-history-legend {
    display: flex;
    gap: 15px;
    font-size: 12px;
    margin-bottom: 15px;
}
.payout-history-legend span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.payout-history-legend .legend-paid::before { background: #27ae60; }
.payout-history-legend .legend-pending::before { background: #f39c12; }

#payoutHistoryTableBody .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}


/* --- Mobile Responsiveness --- */
@media (max-width: 480px) {
    .container { max-width: 100%; box-shadow: none; }
    .main-content { padding: 16px; }
    .welcome-card { padding: 18px; margin-bottom: 20px; }
    .overview-section { padding: 18px; margin-bottom: 20px; }
    .quick-actions-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
    .action-card { padding: 12px; min-height: 90px; }
    .action-icon { width: 36px; height: 36px; margin-bottom: 8px; }
    .action-icon svg { width: 18px; height: 18px; }
    .action-title { font-size: 12px; }
    .action-subtitle { font-size: 9px; }
    .golden-ticket { padding: 16px; margin-bottom: 20px; }
    .ticket-title { font-size: 15px; }
    .ticket-badge { font-size: 9px; padding: 3px 8px; }
    .crown-icon { width: 36px; height: 36px; font-size: 16px; }
    .crown-icon::after { width: 14px; height: 14px; font-size: 8px; }
    .ticket-text { font-size: 11px; }
    .info-btn, .activate-btn { font-size: 9px; padding: 6px 10px; }
    .activate-btn { padding: 7px 12px; }
    .sidebar { width: 240px; left: -240px; }
    .stats-grid { gap: 12px; }
    .stat-card { padding: 16px; }

    #floatingSupportBtn {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    #floatingSupportDropdown {
        bottom: 70px; /* Adjust dropdown position for smaller button */
        right: 15px;
        width: 160px;
    }
    .dropdown-item-support {
        padding: 10px 12px;
        font-size: 13px;
    }
    .dropdown-item-support i {
        font-size: 14px;
    }
    .greeting-hero-card { padding: 20px; }
    .greeting-header h1 { font-size: 26px; }
    .greeting-actions { flex-direction: column; }


    /* --- [FIX] UPDATED POPUP STYLES FOR MOBILE --- */
    .popup-overlay:not(.swal2-container) {
        padding: 15px;
        align-items: center;
    }
    .popup:not(.swal2-popup) {
        width: 100%;
        max-width: 400px;
        height: auto;
        max-height: 85vh;
        border-radius: 16px; /* Restore rounded corners on mobile */
    }
    .popup-header { padding: 15px; }
    .popup-title { font-size: 17px; }
    .popup-title svg { width: 20px; height: 20px; }
    .popup-content { padding: 18px; }
    .popup-actions { padding: 15px 18px; }
}

/* --- SPA Specific Styles --- */
.page-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* Table specific styles for SPA pages */
.page-content .professional-history-table th, .page-content .professional-history-table td {
    padding: 10px 12px;
}
.page-content .professional-history-table th {
    font-size: 12px;
}
.page-content .professional-history-table td {
    font-size: 13px;
}

/* --- Desktop Responsiveness --- */
/* Add this entire block to the VERY END of your CSS file */
@media (min-width: 768px) {

    /* Allow the main layout to fill the screen */
    .container {
        max-width: 100%;
        display: flex; /* This creates the two-column layout */
        box-shadow: none;
        background: var(--body-bg); /* Use the body background for the whole page */
    }

    /* Make the sidebar permanently visible on the left */
    .sidebar {
        position: fixed; /* Keep it fixed on desktop */
        left: 0;
        top: 0; /* Ensure it starts at the top */
        height: 100vh; /* Make it full height */
        width: 250px;
        flex-shrink: 0; /* Prevent the sidebar from shrinking */
        box-shadow: 2px 0 15px rgba(0,0,0,0.08); /* Re-add shadow for definition */
        transition: none; /* No need for the slide-in animation on desktop */
    }

    /* The main content area should take the remaining space */
    #mainContentArea {
        margin-left: 250px; /* Push content to the right of the fixed sidebar */
        flex-grow: 1;
        min-height: 100vh;
        overflow-y: auto; /* Allow only the main content to scroll */
    }

    /* Adjust the header to fit correctly above the main content */
    .header {
        width: calc(100% - 250px); /* Full width minus the sidebar's width */
        left: 250px; /* Position it next to the sidebar */
        position: sticky; /* Keep header sticky on desktop too */
        top: 0;
    }

    /* Hide mobile-only elements on desktop */
    .menu-btn,
    .sidebar-overlay {
        display: none !important;
    }

    /* Ensure the public store view remains centered and mobile-like */
    #publicStoreContainer {
        margin: 0 auto;
    }
}
/* ==========================================================================
   [NEW] Professional Top-Up Modal Styles
   ========================================================================== */

/* Main switcher container */
.topup-method-switcher {
    display: flex;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--header-border);
}

/* Individual switcher buttons */
.method-switch-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}

/* Active state for the selected button */
.method-switch-btn.active {
    background-color: var(--body-bg);
    color: var(--text-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Container for the content of each payment method */
.topup-content-section {
    display: none; /* Hide by default */
}

/* Show the active content section */
.topup-content-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Simple fade-in animation for content switching */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* A short description text for each method */
.topup-description {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

/* Helper class for full-width buttons inside popups */
.full-width {
    width: 100%;
}


/* ==========================================================================
   [NEW] Manual Payment Instructions Popup Styles
   ========================================================================== */

/* Card to display payment details */
.payment-details-card {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--header-border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

/* Individual rows within the details card */
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 12px 0;
}

/* Add a separator line between items */
.detail-item:not(:last-child) {
    border-bottom: 1px solid var(--header-border);
}

/* Label for the detail (e.g., "Network:") */
.detail-label {
    color: var(--text-muted);
    font-weight: 400;
}

/* Value for the detail (e.g., "Vodafone") */
.detail-value {
    color: var(--text-dark);
    font-weight: 600;
}

/* Container for the unique reference code */
.reference-code-box {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    border: 1px dashed var(--primary-blue);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 10px auto;
    cursor: help; /* Indicates to the user they can hover */
}

/* Styling for the warning/info box at the bottom */
.info-box.warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
}

.info-box.warning svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* =============================================== */
/*              NEW: Online Course Badge Styling   */
/* =============================================== */

.sidebar-menu .menu-item .badge {
    background-color: #ef4444; /* A bright red color for attention */
    color: #ffffff; /* White text for contrast */
    padding: 3px 10px; /* Vertical and horizontal padding */
    font-size: 0.7rem; /* Small font size */
    font-weight: 700; /* Bold text */
    text-transform: uppercase; /* NEW text in all caps */
    letter-spacing: 0.5px; /* A bit of space between letters */
    border-radius: 50px; /* Makes it a pill shape */
    margin-left: auto; /* This is key: it pushes the badge to the far right */
    line-height: 1; /* Ensures text is centered vertically */
    
    /* Optional: Add a subtle animation */
    animation: pulse 1.5s infinite;
}

/* Keyframes for the pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* To make sure the menu item itself can align the badge */
.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
}
