/* --- [NEW] Theme Variables --- */
:root {
    /* Light Theme Defaults */
    --primary-green: #27ae60;
    --primary-green-light: #2ecc71;
    --primary-blue: #3498db;
    --dark-blue: #2980b9;
    /* Slightly darker primary blue for hover states */
    --sidebar-bg: #ffffff;
    --text-light: #ffffff;
    --text-dark: #34495e;
    --text-muted: #7f8c8d;
    --card-bg: #ffffff;
    --card-border: #e9ecef;
    /* New variable for card borders */
    --body-bg: #f8f9fa;
    --header-bg: #ffffff;
    --header-border: #eee;
    --header-shadow: rgba(0, 0, 0, 0.05);
    --menu-item-hover-bg: #f8f9fa;
    --menu-item-active-bg: #eef5ff;
    /* Lighter blue active state */
    --menu-item-active-border: #3498db;
    /* Primary blue for active border */
    --menu-item-text-color: #333;
    --menu-item-icon-color: #666;
    --button-bg-light: #f8f9fa;
    --button-border-light: #e9ecef;
    --button-text-light: #666;
    --section-bg: #ffffff;
    /* Consistent section background */
    --section-border: #e9ecef;
    --table-header-bg: #f8f9fa;
    --table-border: #e9ecef;
    --welcome-card-bg: #ffffff;
    --quick-action-card-bg: #fcfdff;
    /* Lighter than body for distinction */
    --quick-action-card-hover-bg: #eef1f4;
    --stat-card-bg-gradient-start: #fcfdff;
    --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: #fef2f2;
    /* Light red for unverified/banned */
    --banned-text: #ef4444;
    --banned-border: #fca5a5;
    --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: #fcfdff;
    --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;

    /* Status Colors (Light Theme) */
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color-alt: #27ae60;
    --pending-color: #f39c12;
    --pending-bg-light: #fffbeb;
    /* light yellow */
    --processing-color: #3498db;
    --processing-bg-light: #e0f2fe;
    /* light blue */
    --completed-color: #22c55e;
    --completed-bg-light: #f0fdf4;
    /* light green */
    --cancelled-color: #495057;
    --cancelled-bg-light: #e9ecef;
    /* light grey */
    --failed-color: #e74c3c;
    --failed-bg-light: #ffebee;
    /* light red */
    --warning-bg: #fffbeb;
    --warning-text: #78350f;
    --warning-border: #fde68a;

    /* Professional Shadows */
    --shadow-extra-small: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-small: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 12px 30px rgba(0, 0, 0, 0.15);

    /* Professional Border Radii */
    --border-radius-card: 16px;
    --border-radius-element: 10px;
    --border-radius-button: 8px;
    --border-radius-pill: 20px;
}

/* [UPDATED] Dark Theme Overrides - Made deeper */
[data-theme="dark"] {
    --primary-green: #2ecc71;
    --primary-green-light: #4ade80;
    /* Lighter green for accents */
    --primary-blue: #38bdf8;
    /* Lighter blue for better visibility */
    --dark-blue: #0ea5e9;
    /* Darker primary blue for hover states */
    --sidebar-bg: #161b22;
    --text-light: #ffffff;
    --text-dark: #e6edf3;
    --text-muted: #848d97;
    --card-bg: #21262d;
    --card-border: #30363d;
    --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: #2b3b4f;
    /* Darker blue active state */
    --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;
    --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: #410a0a;
    /* Darker red for unverified/banned */
    --banned-text: #fca5a5;
    --banned-border: #ef4444;
    --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;
    /* Dark text for contrast */
    --public-store-footer-text: #848d97;

    /* Status Colors (Dark Theme) */
    --danger-color: #e94560;
    /* Slightly different red */
    --warning-color: #f7b267;
    /* Lighter warning color */
    --success-color-alt: #4ade80;
    --pending-color: #f7b267;
    --pending-bg-light: #3e2600;
    /* Darker yellow */
    --processing-color: #38bdf8;
    --processing-bg-light: #072f4f;
    /* Darker blue */
    --completed-color: #4ade80;
    --completed-bg-light: #0f3d23;
    /* Darker green */
    --cancelled-color: #848d97;
    --cancelled-bg-light: #30363d;
    /* Darker grey */
    --failed-color: #e94560;
    --failed-bg-light: #410a0a;
    /* Darker red */
    --warning-bg: #422006;
    --warning-text: #fcd34d;
    --warning-border: #92400e;

    /* Professional Shadows */
    --shadow-extra-small: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-small: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.3);
    --shadow-large: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* [NEW] Force Light Theme for Public Merchant Store (ensures merchant branding is consistent) */
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;
    --card-border: #e9ecef;
    --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: #fcfdff;
    --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;

    /* Shadows for public store should also use light theme defaults */
    --shadow-extra-small: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-small: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* --- General Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Enforce Poppins globally */
}

body {
    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;
    /* Base font size */
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card-bg);
    min-height: 100vh;
    box-shadow: var(--shadow-medium);
    /* Use shadow variable */
    position: relative;
    animation: slideIn 0.8s ease-out;
    border: 1px solid var(--card-border);
    border-radius: 0;
    /* No explicit border-radius here, let content dictate */
}

/* CRITICAL: Desktop responsive fix - Make full width on large screens */
@media (min-width: 1024px) {
    .container {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
    }

    body {
        background: var(--background-color) !important;
    }
}

@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: var(--shadow-extra-small);
    /* Lighter shadow for header */
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--border-radius-element);
    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);
}

.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;
}

.header-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-btn,
.theme-toggle-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--border-radius-element);
    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);
}

.profile-btn svg,
.theme-toggle-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.theme-toggle-btn i {
    font-size: 16px;
    color: currentColor;
}

.profile-btn:hover,
.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-small);
}

/* --- Theme Switcher Dropdown --- */
.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--popup-bg);
    border: 1px solid var(--header-border);
    border-radius: var(--border-radius-element);
    box-shadow: var(--shadow-small);
    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(--body-bg);
    /* Page content uses body 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);
    }
}

/* --- NEW Professional Welcome Card with GIF --- */
.welcome-card-new {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

[data-theme="dark"] .welcome-card-new {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.welcome-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.welcome-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-gif-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.greeting-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-text-section {
    flex: 1;
    min-width: 0;
}

.greeting-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

[data-theme="dark"] .greeting-title {
    color: #f1f5f9;
}

.greeting-title span {
    color: #3b82f6;
    font-weight: 800;
}

.greeting-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px 0;
}

[data-theme="dark"] .greeting-subtitle {
    color: #94a3b8;
}

.mini-wallet-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
}

[data-theme="dark"] .mini-wallet-display {
    background: rgba(59, 130, 246, 0.2);
}

.mini-wallet-label {
    color: #64748b;
    font-weight: 500;
}

[data-theme="dark"] .mini-wallet-label {
    color: #94a3b8;
}

.mini-wallet-amount {
    color: #3b82f6;
    font-weight: 700;
    font-size: 14px;
}

/* --- IMPROVED Welcome Card with Premium Styling --- */
.welcome-card {
    background: linear-gradient(135deg, var(--welcome-card-bg) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 16px;
    padding: 20px;
    color: var(--text-dark);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
    border: 1px solid var(--section-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.18);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue), #2ecc71);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.welcome-title span {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.welcome-date {
    font-size: 11px;
    opacity: 0.75;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
    color: var(--text-muted);
}

.policy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
    border: 1.5px solid rgba(52, 152, 219, 0.3);
    padding: 7px 14px;
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.policy-link:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(46, 204, 113, 0.15));
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.policy-link svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary-blue);
    transition: transform 0.3s ease;
}

.policy-link:hover svg {
    transform: scale(1.1);
}

/* --- Customer Support Section --- */
.support-section {
    background: linear-gradient(135deg, var(--section-bg), rgba(46, 204, 113, 0.05));
    border-radius: var(--border-radius-element);
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--section-border);
    transition: all 0.3s ease;
}

.support-section:hover {
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.support-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dark);
}

.support-title svg {
    width: 16px;
    height: 16px;
    stroke: #2ecc71;
}

.support-number {
    background: linear-gradient(135deg, var(--card-bg), rgba(46, 204, 113, 0.05));
    border: 1.5px solid rgba(46, 204, 113, 0.2);
    padding: 6px 10px;
    border-radius: var(--border-radius-element);
    text-align: center;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-dark);
    cursor: pointer;
    letter-spacing: 0.2px;
}

.support-number:hover {
    border-color: #2ecc71;
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.15);
}

.support-hours {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.support-hours::before {
    content: '🕐';
    font-size: 12px;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #20bf5a);
    color: white;
    border: none;
    border-radius: var(--border-radius-element);
    padding: 8px 12px;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #20bf5a, #128c7e);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:active {
    transform: translateY(-1px);
}

/* --- [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: var(--border-radius-element);
    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 */
    box-shadow: var(--shadow-extra-small);
    /* Subtle shadow for action cards */
}

.action-card:hover {
    background: var(--quick-action-card-hover-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-small);
}

.action-icon {
    width: 32px;
    /* Smaller icon container */
    height: 32px;
    border-radius: var(--border-radius-element);
    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;
}

.sms-card .action-icon {
    background: #e0f7fa;
}

.sms-card .action-icon svg {
    stroke: #00acc1;
}

/* [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;
}

[data-theme="dark"] .sms-card .action-icon {
    background: rgba(0, 172, 193, 0.2);
}

[data-theme="dark"] .sms-card .action-icon svg {
    stroke: #26c6da;
}


.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);
    border: 1px solid var(--warning-border);
    border-radius: var(--border-radius-element);
    padding: 10px 15px;
    margin-bottom: 20px;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-extra-small);
}

.notice-icon {
    flex-shrink: 0;
    color: var(--warning-text);
    background-color: var(--pending-bg-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon svg {
    width: 18px;
    height: 18px;
}

.notice-content .notice-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--warning-text);
    margin: 0 0 2px 0;
}

.notice-content .notice-description {
    font-size: 0.75rem;
    color: var(--warning-text);
    line-height: 1.4;
    margin: 0;
}

/* --- NEW Professional Golden Ticket (Smaller & More Professional) --- */
.golden-ticket-new {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 6px 20px rgba(120, 53, 15, 0.3);
    overflow: hidden;
}

[data-theme="dark"] .golden-ticket-new {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
}

.golden-ticket-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.golden-ticket-popular-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 0 14px 0 14px;
    letter-spacing: 0.5px;
}

.golden-ticket-title-new {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    text-align: center;
    margin: 32px 0 16px 0;
}

.golden-ticket-price {
    text-align: center;
    margin-bottom: 12px;
}

.price-amount {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    display: block;
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.golden-ticket-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin: 0 0 20px 0;
}

.golden-ticket-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 10px;
}

.feature-item svg {
    width: 18px;
    height: 18px;
    stroke: #fbbf24;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.feature-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.golden-ticket-upgrade-btn {
    width: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.golden-ticket-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.5);
}

.golden-ticket-upgrade-btn:active {
    transform: translateY(0);
}

/* --- NEW Network Selection Dropdown Section --- */
.network-selection-section {
    margin-bottom: 20px;
}

.network-selection-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
}

[data-theme="dark"] .network-selection-title {
    color: #f1f5f9;
}

.network-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-theme="dark"] .network-item {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.network-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.network-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.network-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .network-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.network-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.network-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

[data-theme="dark"] .network-name {
    color: #f1f5f9;
}

.network-arrow {
    width: 20px;
    height: 20px;
    stroke: #64748b;
    transition: transform 0.3s ease;
}

.network-item.active .network-arrow {
    transform: rotate(180deg);
}

.network-dropdown {
    padding: 0 16px 16px 16px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.network-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.form-tab {
    flex: 1;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-tab.active {
    background: #3b82f6;
    color: #ffffff;
}

.form-tab:hover {
    background: #3b82f6;
    color: #ffffff;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

[data-theme="dark"] .form-group label {
    color: #f1f5f9;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.make-payment-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #78350f;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.make-payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.wallet-balance-display {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

[data-theme="dark"] .wallet-balance-display {
    color: #94a3b8;
}

.balance-amount {
    font-weight: 700;
    color: #3b82f6;
}

/* --- OLD Golden Ticket (Kept for backwards compatibility) --- */
.golden-ticket {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: var(--border-radius-card);
    padding: 18px;
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 1.0s both;
    margin-bottom: 24px;
    box-shadow: var(--shadow-medium);
    border: 1px solid #333;
}

[data-theme="dark"] .golden-ticket {
    background: linear-gradient(135deg, #0056b3 0%, #003366 100%);
    border: 1px solid #003366;
    box-shadow: var(--shadow-medium);
}

.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: var(--border-radius-pill);
    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: var(--border-radius-element);
    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: var(--border-radius-element);
    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;
}

/* --- NEW Professional Overview Section - No Card Boxes --- */
.overview-section-new {
    margin-bottom: 20px;
}

.overview-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .overview-section-title {
    color: #f1f5f9;
}

/* Top stat - Horizontal layout */
.stat-item-horizontal {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .stat-item-horizontal {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.stat-item-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

.stat-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.stat-item-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

/* Vertical stats - following items */
.stat-item-vertical {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease;
}

[data-theme="dark"] .stat-item-vertical {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item-vertical:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .stat-item-vertical:hover {
    background: rgba(255, 255, 255, 0.02);
}

.stat-item-vertical:last-child {
    border-bottom: none;
}

.stat-item-icon-small {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .stat-item-icon-small {
    background: rgba(59, 130, 246, 0.2);
}

.stat-item-icon-small svg {
    width: 20px;
    height: 20px;
    stroke: #3b82f6;
}

.stat-item-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item-label-small {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

[data-theme="dark"] .stat-item-label-small {
    color: #94a3b8;
}

.stat-item-value-small {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

[data-theme="dark"] .stat-item-value-small {
    color: #f1f5f9;
}

/* --- IMPROVED Overview Stats Section with Modern Animations --- */
.overview-section {
    background: var(--card-bg);
    border-radius: var(--border-radius-card);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-medium);
    animation: slideUpFade 0.6s ease-out 0.2s both;
    border: 1px solid var(--section-border);
    position: relative;
}

.overview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
}

.overview-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--header-border);
}

.overview-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-card {
    background: linear-gradient(135deg, var(--stat-card-bg-gradient-start) 0%, var(--stat-card-bg-gradient-end) 100%);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--stat-card-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-small);
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .stat-card::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-medium);
    border-color: var(--stat-card-hover-border);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-element);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 14px;
    height: 14px;
}

.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: 10px;
    color: var(--text-muted);
    margin-bottom: 3px;
    font-weight: 500;
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    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: var(--border-radius-card);
    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: var(--border-radius-pill);
    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: var(--border-radius-button);
    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);
    border-radius: var(--border-radius-element);
    margin: 0 10px;
    /* Aligned with menu items */
}

.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: var(--border-radius-element);
    box-shadow: var(--shadow-small);
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--card-border);
}

.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: var(--border-radius-button);
    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: var(--border-radius-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 90px;
    /* Increased min-width for consistency */
    justify-content: center;
    /* Center content in badge */
    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: var(--failed-bg-light);
    color: var(--failed-color);
    border-color: var(--failed-color);
}

.status-cancelled {
    background-color: var(--cancelled-bg-light);
    color: var(--cancelled-color);
    border-color: var(--cancelled-color);
}

.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: var(--border-radius-element);
    margin-top: 20px;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--card-border);
}

.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: var(--border-radius-element);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-small);
}

#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: var(--border-radius-element);
    margin-bottom: 20px;
    box-shadow: var(--shadow-extra-small);
    border: 1px solid var(--card-border);
}

#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: var(--border-radius-button);
    font-size: 13px;
    background: var(--form-control-bg);
    color: var(--text-dark);
}

/* --- [NEW] Shop Page Styles --- */
#shopPage .shop-header-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--card-border);
}

#shopPage .shop-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

#shopPage .shop-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-element);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2f1;
}

#shopPage .shop-icon img {
    width: 28px;
    height: 28px;
}

#shopPage .shop-title h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: var(--text-dark);
}

#shopPage .shop-title p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

#shopPage .shop-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius-button);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#shopPage .shop-cart-btn:hover {
    background: #2980b9;
}

#shopPage .shop-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--header-border);
    margin-bottom: 20px;
    overflow-x: auto;
    /* Allow tabs to scroll if too many */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
}

#shopPage .shop-tabs::-webkit-scrollbar {
    /* Hide scrollbar for Chrome/Safari */
    display: none;
}

#shopPage .shop-tab {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    /* Prevent tabs from shrinking */
}

#shopPage .shop-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

#shopPage .shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#shopPage .product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-element);
    overflow: hidden;
    box-shadow: var(--shadow-extra-small);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--card-border);
}

#shopPage .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-small);
}

#shopPage .product-image {
    width: 100%;
    height: 100px;
    background-color: var(--section-bg);
    background-size: cover;
    background-position: center;
    position: relative;
}

#shopPage .product-image .service-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 3px 8px;
    border-radius: var(--border-radius-element);
    font-size: 10px;
    font-weight: 500;
}

#shopPage .product-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#shopPage .product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}

#shopPage .product-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    flex-grow: 1;
}

#shopPage .product-price {
    margin-bottom: 10px;
}

#shopPage .product-price .current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
}

#shopPage .product-price .original-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 5px;
}

#shopPage .product-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#shopPage .btn-configure,
#shopPage .btn-details {
    padding: 8px;
    border-radius: var(--border-radius-button);
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}

#shopPage .btn-configure {
    background: var(--primary-blue);
    color: white;
}

#shopPage .btn-configure:hover {
    background: #2980b9;
}

#shopPage .btn-details {
    background: var(--button-bg-light);
    color: var(--text-dark);
    border: 1px solid var(--button-border-light);
}

#shopPage .btn-details:hover {
    background: var(--menu-item-hover-bg);
}

/* --- [NEW] Product Detail Popup --- */
.product-detail-popup .popup-header {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
}

.product-detail-popup .popup-header .popup-title,
.product-detail-popup .popup-header .popup-close {
    color: white;
    stroke: white;
}

.product-detail-popup .popup-header .popup-close {
    background: rgba(255, 255, 255, 0.2);
}

.product-detail-popup .popup-header .popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.product-detail-popup .popup-content .detail-image {
    width: 100%;
    height: 150px;
    border-radius: var(--border-radius-button);
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
}

.product-detail-popup .popup-content .detail-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-detail-popup .popup-content .detail-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

.product-detail-popup .popup-content .video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-button);
    background: black;
    /* Placeholder for video area */
}

.product-detail-popup .popup-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- [NEW] Merchant Page Styles (Dashboard with Cards) --- */
#merchantPage .page-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

#merchantPage .merchant-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Adjusted for better fit */
    gap: 20px;
    margin-bottom: 30px;
}

#merchantPage .merchant-action-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 15px;
    box-shadow: var(--shadow-small);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    /* For the <a> tags */
    border: 1px solid var(--card-border);
}

#merchantPage .merchant-action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

#merchantPage .merchant-action-card .action-icon-large {
    font-size: 30px;
    color: var(--primary-green);
    /* Default icon color */
    flex-shrink: 0;
}

#merchantPage .merchant-action-card .action-text h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--text-dark);
}

#merchantPage .merchant-action-card .action-text p {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-muted);
}

/* Specific colors for merchant action cards */
#merchantPage .merchant-action-card.view-store .action-icon-large {
    color: var(--primary-blue);
}

#merchantPage .merchant-action-card.add-product .action-icon-large {
    color: #f7b267;
}

/* Amber */
#merchantPage .merchant-action-card.manage-products .action-icon-large {
    color: #e94560;
}

/* Red */
#merchantPage .merchant-action-card.view-payouts .action-icon-large {
    color: #34D399;
}

/* Green */


#merchantPage .merchant-card {
    /* Re-using existing merchant-card for ID display */
    background: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--card-border);
    margin-bottom: 30px;
    /* Space below ID card */
}

#merchantPage .merchant-card .icon {
    font-size: 32px;
    color: var(--primary-green);
    margin-bottom: 15px;
}

#merchantPage .merchant-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

#merchantPage .merchant-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

#merchantPage .merchant-id-display {
    background: var(--button-bg-light);
    border: 2px dashed var(--button-border-light);
    padding: 15px;
    border-radius: var(--border-radius-button);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-dark);
    cursor: copy;
    /* Changed to 'copy' to indicate it's copyable */
    word-break: break-all;
    /* Ensure long IDs wrap */
}

[data-theme="dark"] #merchantPage .merchant-id-display {
    border-color: var(--button-border-light);
    background: var(--form-control-bg);
    /* Use a darker background */
    color: var(--text-dark);
}

#merchantPage .merchant-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Smaller grid for more items */
    gap: 20px;
    margin-bottom: 30px;
}

#merchantPage .merchant-stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 20px;
    /* Reduced padding */
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    /* Reduced min-height */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

#merchantPage .merchant-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

#merchantPage .merchant-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-green));
    /* Default gradient */
    transition: all 0.3s ease;
}

/* Specific gradients for each stat card */
#merchantPage .merchant-stat-card:nth-child(1)::before {
    background: linear-gradient(to right, #3498db, #2980b9);
}

/* Blue */
#merchantPage .merchant-stat-card:nth-child(2)::before {
    background: linear-gradient(to right, #2ecc71, #27ae60);
}

/* Green */
#merchantPage .merchant-stat-card:nth-child(3)::before {
    background: linear-gradient(to right, #f1c40f, #f39c12);
}

/* Yellow */
#merchantPage .merchant-stat-card:nth-child(4)::before {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

/* Red */


#merchantPage .merchant-stat-card .stat-icon {
    font-size: 24px;
    /* Reduced icon size */
    color: var(--primary-blue);
    /* Default icon color */
    margin-bottom: 8px;
    /* Reduced margin */
    align-self: flex-start;
    /* Align icon to the start */
}

/* Specific icon colors for each stat card */
#merchantPage .merchant-stat-card:nth-child(1) .stat-icon {
    color: #3498db;
}

#merchantPage .merchant-stat-card:nth-child(2) .stat-icon {
    color: #2ecc71;
}

#merchantPage .merchant-stat-card:nth-child(3) .stat-icon {
    color: #f1c40f;
}

#merchantPage .merchant-stat-card:nth-child(4) .stat-icon {
    color: #e74c3c;
}


#merchantPage .merchant-stat-card .stat-label {
    font-size: 13px;
    /* Reduced font size */
    color: var(--text-muted);
    margin-bottom: 5px;
}

#merchantPage .merchant-stat-card .stat-value {
    font-size: 24px;
    /* Reduced font size */
    font-weight: 700;
    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: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--text-light);
    padding: 20px 18px 40px 18px;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -25px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

.profile-header-banner h2 {
    font-size: 17px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.profile-status {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.profile-details-card {
    background-color: var(--card-bg);
    margin: 0 16px 16px 16px;
    padding: 24px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--card-border);
}

.profile-details-card .form-group {
    margin-bottom: 16px;
}

.profile-details-card .form-group label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.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: 10px 14px;
    border: 1.5px solid var(--form-control-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--form-control-bg);
    min-height: 42px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.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: var(--border-radius-button);
    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: var(--border-radius-button);
    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: var(--border-radius-element);
    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: var(--shadow-small);
}

/* --- 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: var(--border-radius-element);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-extra-small);
    border: 1px solid var(--card-border);
}

#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: var(--border-radius-button);
    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: var(--border-radius-button);
    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: var(--border-radius-card);
    max-width: 360px;
    /* Reduced popup size */
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlide 0.3s ease-out;
    box-shadow: var(--shadow-medium);
    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: var(--border-radius-card) var(--border-radius-card) 0 0;
    flex-shrink: 0;
}

.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 {
    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;
    flex-grow: 1;
}

.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 var(--border-radius-card) var(--border-radius-card);
    flex-shrink: 0;
}

/* 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: var(--border-radius-button);
    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: var(--border-radius-button);
    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: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.popup-actions .send-btn::before,
.popup-actions .submit-btn::before,
.popup-actions .confirm-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.popup-actions .send-btn:hover::before,
.popup-actions .submit-btn:hover::before,
.popup-actions .confirm-btn:hover::before {
    width: 300px;
    height: 300px;
}

.popup-actions .send-btn:hover,
.popup-actions .submit-btn:hover,
.popup-actions .confirm-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Specific Track Order Button Enhancement */
#trackOrderBtn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

#trackOrderBtn:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

#trackOrderBtn:active {
    transform: translateY(-1px) scale(0.98);
}

/* --- [UPDATED & SMALLER] Golden Ticket Popup --- */
.golden-ticket-popup .popup {
    max-width: 380px;
}

.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;
}

.golden-ticket-popup .popup-content p {
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
}

.golden-ticket-popup .benefits-box,
.golden-ticket-popup .terms-box {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: var(--border-radius-element);
}

.golden-ticket-popup h4 {
    font-size: 13px;
    gap: 6px;
}

.golden-ticket-popup li {
    font-size: 12px;
    gap: 6px;
}

.golden-ticket-popup li svg {
    width: 14px;
    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: var(--border-radius-element) !important;
    box-shadow: var(--shadow-small) !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: var(--border-radius-element) var(--border-radius-element) 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);
}

/* --- Professional Loading Animation --- */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .loading {
    background: rgba(13, 17, 23, 0.95);
}

.loading.show {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 70px;
    height: 70px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern circular gradient loader */
.loader:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #3498db;
    border-right-color: #3498db;
    animation: modernSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader:after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-bottom-color: #2ecc71;
    border-left-color: #2ecc71;
    animation: modernSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

@keyframes modernSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loading text */
.loading::after {
    content: 'Loading...';
    color: var(--primary-blue);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .loading::after {
    color: #3498db;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Alternative loader dots for forms */
.loader-dots {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-blue);
    animation: loadingDots 1.4s infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- 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: var(--border-radius-element);
    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: var(--border-radius-button);
    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(--processing-bg-light);
    border: 1px solid var(--processing-color);
    color: var(--processing-color);
    padding: 10px;
    border-radius: var(--border-radius-element);
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-extra-small);
}

[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(--processing-color);
}

[data-theme="dark"] .deposit-funds-popup .info-box svg {
    stroke: #007bff;
}

.deposit-funds-popup .golden-ticket-promo {
    background: var(--pending-bg-light);
    border: 1px solid var(--pending-color);
    color: var(--pending-color);
    padding: 12px;
    border-radius: var(--border-radius-element);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    box-shadow: var(--shadow-extra-small);
}

[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: var(--border-radius-button);
    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;
    box-shadow: var(--shadow-small);
}

.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: var(--border-radius-card);
    padding: 25px;
    margin-bottom: 25px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow-small);
}

[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: var(--border-radius-card);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--card-border);
}

#join-usPage .community-card .icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-element);
    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: var(--border-radius-button);
    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: var(--border-radius-element);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-extra-small);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--card-border);
}

.package-card .icon-container {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-element);
    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: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-small);
    cursor: pointer;
    z-index: 990;
    transition: transform 0.2s ease;
}

#floatingSupportBtn:hover {
    transform: scale(1.1);
}

#dashboardPage.active~#floatingSupportBtn {
    display: flex;
    /* Show only on dashboard */
}

/* --- [NEW] Admin Notification Banner --- */
.admin-notification-banner {
    display: none;
    /* Hidden by default, shown via JS */
    background-color: var(--card-bg);
    border-radius: var(--border-radius-card);
    margin-bottom: 24px;
    box-shadow: var(--shadow-small);
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.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: var(--border-radius-button);
    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: var(--border-radius-button);
    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;
    color: var(--text-dark);
}


/* --- [NEW] Professional Browser Loader --- */
#browser-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    z-index: 10000;
    overflow: hidden;
    display: none;
}

#browser-loader.show {
    display: block;
}

#browser-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8e44ad;
    animation: browser-loader-animation 2s linear infinite;
}

@keyframes browser-loader-animation {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* --- [NEW] Edit Store & Merchant Products Page Styles --- */
.store-editor-card,
.product-editor-card,
.user-product-list-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.6s ease-out;
}

.store-editor-card::before,
.product-editor-card::before,
.user-product-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    padding-bottom: 20px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    width: 33.33%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    position: relative;
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--button-bg-light);
    border: 3px solid var(--button-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--menu-item-icon-color);
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step.active .step-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.step.completed .step-icon {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-color: #27ae60;
    color: white;
    transform: scale(1);
}

.step.active span,
.step.completed span {
    color: var(--text-dark);
    font-weight: 700;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 12px;
}

.btn-form {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-form::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-form:hover::before {
    width: 300px;
    height: 300px;
}

.btn-form.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-form.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-form.secondary {
    background: var(--button-bg-light);
    color: var(--text-dark);
    border: 2px solid var(--button-border-light);
}

.btn-form.secondary:hover {
    background: var(--button-border-light);
    transform: translateY(-2px);
}

.btn-form:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-form:disabled:hover {
    transform: none;
}

.pricing-configuration-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 0 16px 16px 0;
    margin-top: 20px;
    color: var(--text-dark);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    border-right: 1px solid rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.pricing-configuration-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.user-product-list .network-group {
    margin-bottom: 20px;
}

.user-product-list .network-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--header-border);
    color: var(--text-dark);
}

.user-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-dark);
}

.user-product-item .name {
    flex: 2;
}

.user-product-item .price {
    flex: 1;
    text-align: right;
}

.user-product-item .price .base-price {
    color: var(--text-muted);
    font-size: 11px;
}

/* --- [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;
}

.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;
    }
}

/* =================================================================== */
/* [UPDATED] MAIN DASHBOARD - MERCHANT PAYOUT PAGE STYLING
/* =================================================================== */

/* Overall Page Layout */
#merchant-viewPayoutPage {
    padding: 20px;
    /* This page content will automatically inherit main dashboard theme variables */
}

/* Main Payout Card - Next Payout Balance (Styled like the Ktech screenshot) */
.main-payout-card {
    /* Background gradient from the screenshot */
    background: linear-gradient(135deg, #1A1A1A 0%, #333333 100%);
    color: var(--text-light);
    /* White text for contrast */
    border-radius: var(--border-radius-card);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-medium);
    /* More prominent shadow */
    overflow: hidden;
    position: relative;
    border: none;
    /* Remove default card border */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    /* Align content to the start */
    min-height: 180px;
    /* Give it a consistent height */
}

/* Decorative elements from the screenshot */
.main-payout-card::before {
    content: '';
    position: absolute;
    top: 20px;
    /* Adjusted position */
    right: 20px;
    /* Adjusted position */
    width: 30px;
    /* Smaller size */
    height: 30px;
    /* Smaller size */
    background: #FF0000;
    /* Red circle */
    border-radius: 50%;
    z-index: 1;
}

.main-payout-card::after {
    content: '';
    position: absolute;
    top: 20px;
    /* Aligned with the circle */
    right: 60px;
    /* Spaced from the circle */
    width: 30px;
    /* Smaller size */
    height: 30px;
    /* Smaller size */
    background: #FFA500;
    /* Orange square */
    border-radius: var(--border-radius-element);
    /* Rounded square */
    z-index: 1;
}


.main-payout-card .payout-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    /* Space between header and balance */
    position: relative;
    z-index: 2;
    /* Ensure text is above decorative elements */
    padding: 0;
    /* Remove header padding as it's part of card padding */
    border-bottom: none;
    /* No border for this specific card's header */
}

.main-payout-card .payout-card-header .icon {
    display: none;
    /* Hide the icon as per screenshot */
}

.main-payout-card .payout-card-header .title h3 {
    margin: 0;
    font-size: 1em;
    /* Smaller title "Pending Payouts" */
    font-weight: 500;
    /* Less bold */
    color: rgba(255, 255, 255, 0.8);
    /* Slightly muted white */
}

.main-payout-card .payout-card-header .title p {
    display: none;
    /* Hide description as per screenshot */
}

.main-payout-card-body {
    text-align: left;
    /* Align to left as per screenshot */
    margin-bottom: 20px;
    /* Space before withdrawal status */
    position: relative;
    z-index: 2;
    width: 100%;
    /* Take full width */
}

.main-payout-card-body h2 {
    font-size: 3.2em;
    /* Adjusted balance display to match screenshot */
    font-weight: 700;
    margin-bottom: 5px;
    /* Space between balance and status */
    color: var(--text-light);
    /* Pure white for balance */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
    /* Tighter letter spacing */
}

.main-payout-card-body p {
    font-size: 1em;
    /* "Awaiting withdrawal" status text */
    opacity: 0.8;
    color: var(--text-light);
    font-weight: 400;
}

.main-payout-card-footer {
    display: none;
    /* Hide footer as per screenshot */
}

/* Withdraw Button Container */
#withdrawBtnContainer {
    margin-top: -10px;
    margin-bottom: 25px;
    text-align: center;
}

#withdrawBtnContainer .btn-form.primary {
    background-color: var(--primary-green);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius-element);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
    transition: all 0.3s ease;
}

#withdrawBtnContainer .btn-form.primary:hover {
    background-color: var(--primary-green-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

/* Payout Summary Grid */
.payout-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.payout-summary-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payout-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.payout-summary-card .icon {
    font-size: 28px;
    margin-bottom: 12px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.payout-summary-card .icon-earned {
    background-color: #e8f5e9;
    color: var(--success-color-alt);
}

.payout-summary-card .icon-payouts {
    background-color: #e0f2fe;
    color: var(--primary-blue);
}

.payout-summary-card .icon-paid {
    background-color: #e0f7fa;
    color: #0097a7;
}

.payout-summary-card .icon-pending {
    background-color: #fff8e1;
    color: var(--warning-color);
}

[data-theme="dark"] .payout-summary-card .icon-earned {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--primary-green-light);
}

[data-theme="dark"] .payout-summary-card .icon-payouts {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--primary-blue);
}

[data-theme="dark"] .payout-summary-card .icon-paid {
    background-color: rgba(0, 151, 167, 0.2);
    color: #00bcd4;
}

[data-theme="dark"] .payout-summary-card .icon-pending {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}


.payout-summary-card .value {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.payout-summary-card .label {
    font-size: 0.9em;
    color: var(--text-muted);
}

.payout-summary-card .sub-label {
    font-size: 0.8em;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Commission Breakdown Card */
.payout-card .commission-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--body-bg);
    border-radius: var(--border-radius-element);
    margin-bottom: 10px;
    border: 1px solid var(--card-border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.payout-card .commission-item:last-child {
    margin-bottom: 0;
    /* Removed extra border-bottom here for cleaner look, as parent card handles it */
}

.payout-card .commission-item:first-child {
    margin-top: 15px;
}

.payout-card .commission-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.payout-card .commission-item .icon-profit {
    background: var(--success-color-alt);
}

.payout-card .commission-item .icon-commission {
    background: var(--danger-color);
}

.payout-card .commission-item .icon-net {
    background: var(--primary-blue);
}

[data-theme="dark"] .payout-card .commission-item .icon-profit {
    background: rgba(76, 175, 80, 0.3);
    color: var(--primary-green-light);
}

[data-theme="dark"] .payout-card .commission-item .icon-commission {
    background: rgba(231, 76, 60, 0.3);
    color: var(--danger-color);
}

[data-theme="dark"] .payout-card .commission-item .icon-net {
    background: rgba(52, 152, 219, 0.3);
    color: var(--primary-blue);
}


.payout-card .commission-item .details p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

.payout-card .commission-item .details h4 {
    margin: 0;
    font-size: 1.3em;
    color: var(--text-dark);
    font-weight: 600;
}

/* Specific colors for profit/commission/net in breakdown */
.payout-card .commission-item .icon-profit+.details h4 {
    color: var(--success-color-alt);
}

.payout-card .commission-item .icon-commission+.details h4 {
    color: var(--danger-color);
}

.payout-card .commission-item .icon-net+.details h4 {
    color: var(--primary-blue);
}

.how-it-works-box {
    background: var(--body-bg);
    border-left: 4px solid var(--primary-blue);
    padding: 15px;
    border-radius: 0 var(--border-radius-element) var(--border-radius-element) 0;
    margin-top: 25px;
    font-size: 0.9em;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    border-left-color: var(--primary-blue);
    box-shadow: var(--shadow-extra-small);
}

.how-it-works-box b {
    color: var(--text-dark);
}

/* Payout History Table */
#payoutHistoryTableContainer {
    margin-top: 25px;
}

#payoutHistoryTableBody {
    font-size: 13px;
}

#payoutHistoryTableBody td {
    padding: 12px 15px;
}

#payoutHistoryTableBody tr:last-child td {
    border-bottom: none;
}

/* Customer Orders History Section (within payout page) */
#customerOrdersTableBody {
    font-size: 13px;
}

#customerOrdersTableBody td {
    padding: 12px 15px;
}

#customerOrdersTableBody tr:last-child td {
    border-bottom: none;
}

/* No records view specific adjustments for payout page */
#payoutNoHistoryView,
#customerOrdersNoHistoryView {
    padding: 20px;
    margin-top: 20px;
}

/* --- Responsive Adjustments for Payout Page --- */
@media (max-width: 480px) {
    #merchant-viewPayoutPage {
        padding: 15px;
    }

    .main-payout-card {
        padding: 20px;
    }

    .main-payout-card-body h2 {
        font-size: 2.8em;
    }

    .payout-summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .payout-summary-card {
        padding: 15px;
    }

    .payout-summary-card .icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
        margin-bottom: 8px;
    }

    .payout-summary-card .value {
        font-size: 1.8em;
    }

    .payout-card .commission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .payout-card .commission-item .icon {
        margin-bottom: 5px;
    }

    .how-it-works-box {
        margin-top: 20px;
        padding: 12px;
    }

    #withdrawBtnContainer .btn-form.primary {
        font-size: 14px;
        padding: 10px 20px;
    }
}


/* --- [NEW] Maintenance Mode Overlay --- */
.maintenance-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
    /* Deep dark background */
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    font-family: 'Poppins', sans-serif;
}

.maintenance-mode-overlay.active {
    opacity: 1;
    visibility: visible;
}

.maintenance-mode-overlay .maintenance-icon {
    font-size: 80px;
    color: #f7b267;
    /* Accent color - soft orange */
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

.maintenance-mode-overlay h1 {
    font-size: 2.8em;
    /* Slightly smaller for better fit */
    margin-bottom: 15px;
    color: #e6edf3;
    /* Lighter text for main title */
}

.maintenance-mode-overlay p {
    font-size: 1.1em;
    /* Smaller body text */
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #a0a0a0;
    /* Muted text */
}

.maintenance-mode-overlay .contact-info {
    font-size: 0.9em;
    /* Smaller contact info */
    color: #848d97;
    /* Muted contact info */
}

.maintenance-mode-overlay .contact-info a {
    color: #f7b267;
    text-decoration: none;
}

.maintenance-mode-overlay .contact-info a:hover {
    text-decoration: underline;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* --- [NEW] Public Merchant Store Maintenance Overlay (distinct from dashboard) --- */
#publicStoreMaintenanceOverlay {
    position: absolute;
    /* Relative to publicStoreContainer */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* Light background for public store maintenance */
    color: #34495e;
    display: none;
    /* Hidden by default, shown by JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    z-index: 100;
    /* Above regular store content */
    padding: 20px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-medium);
}

#publicStoreMaintenanceOverlay.active {
    display: flex;
}

#publicStoreMaintenanceOverlay .maintenance-icon {
    font-size: 60px;
    /* Slightly smaller icon */
    color: #f39c12;
    /* Warning/orange tone */
    margin-bottom: 20px;
}

#publicStoreMaintenanceOverlay h2 {
    font-size: 2em;
    /* Smaller title than main dashboard */
    margin-bottom: 10px;
    color: #34495e;
}

#publicStoreMaintenanceOverlay p {
    font-size: 1em;
    max-width: 400px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #666;
}

#publicStoreMaintenanceOverlay .contact-info {
    font-size: 0.9em;
    color: #7f8c8d;
}

#publicStoreMaintenanceOverlay .contact-info a {
    color: #3498db;
    text-decoration: none;
}

#publicStoreMaintenanceOverlay .contact-info a:hover {
    text-decoration: underline;
}


/* --- [NEW] Store Setup Guide Page --- */
.guide-header-card {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: var(--border-radius-card);
    padding: 25px;
    margin-bottom: 25px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow-small);
}

[data-theme="dark"] .guide-header-card {
    background: linear-gradient(135deg, #374151, #1f2937);
}

.guide-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%;
}

.guide-header-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.guide-header-card p {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0;
}

.guide-content-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-element);
    padding: 25px;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--card-border);
}

.guide-content-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.guide-content-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--primary-blue);
    border-left: 3px solid var(--primary-blue);
    padding-left: 10px;
}

.guide-content-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.guide-content-card ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.guide-content-card li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.guide-content-card li::before {
    content: '✓';
    color: var(--primary-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guide-content-card a {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-blue);
}

.professional-quote {
    margin: 25px 0;
    padding: 20px;
    border-left: 4px solid var(--header-border);
    background-color: var(--section-bg);
    font-style: italic;
    color: var(--text-muted);
    border-radius: 0 var(--border-radius-element) var(--border-radius-element) 0;
    box-shadow: var(--shadow-extra-small);
}

.professional-quote footer {
    margin-top: 10px;
    font-style: normal;
    font-weight: 500;
    color: var(--text-dark);
    text-align: right;
}

/* --- [NEW] Banned Store Styles (now also for unverified stores) --- */
#bannedStoreContainer {
    display: none;
    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;
    padding: 20px;
    border: 5px solid var(--banned-border);
    border-radius: var(--border-radius-card);
}

#bannedStoreContainer .emoji {
    font-size: 60px;
    margin-bottom: 20px;
}

#bannedStoreContainer h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: var(--banned-text);
}

#bannedStoreContainer p {
    font-size: 1.1em;
    max-width: 500px;
    line-height: 1.5;
    color: var(--banned-text);
}

/* --- [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;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    box-shadow: var(--shadow-medium);
    /* Add shadow for standalone public store */
}

/* [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: var(--shadow-extra-small);
    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: var(--border-radius-pill);
    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);
    position: sticky;
    top: 68px;
    z-index: 90;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-extra-small);
}

.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: var(--border-radius-button);
    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;
}

/* IMPROVED Professional Greeting Card */
.greeting-hero-card {
    margin: 20px;
    padding: 35px;
    border-radius: 20px;
    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;
    box-shadow: 0 12px 40px rgba(0, 123, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.greeting-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-20px, 20px);
    }
}

@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: var(--border-radius-card);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.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);
}

/* IMPROVED Professional Network Card Style */
.network-cards-container {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.network-card {
    background: var(--network-card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--network-card-border);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.5s ease-out backwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.network-card:nth-child(1) {
    animation-delay: 0.1s;
}

.network-card:nth-child(2) {
    animation-delay: 0.2s;
}

.network-card:nth-child(3) {
    animation-delay: 0.3s;
}

.network-card:nth-child(4) {
    animation-delay: 0.4s;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s;
}

.network-card:hover::before {
    left: 100%;
}

.network-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.network-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.network-card-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.network-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.network-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.network-card-title span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-top: 2px;
}

.network-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.network-card-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.network-card-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.1));
    transform: scale(1.05);
}

/* 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;
    border-radius: var(--border-radius-button);
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

#publicPurchasePopup .popup-header .network-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#publicPurchasePopup .popup-header .popup-title {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
}

#publicPurchasePopup .popup-content {
    padding: 25px;
}

#publicPurchasePopup .total-price-display {
    background: var(--public-popup-total-price-bg);
    border-radius: var(--border-radius-element);
    padding: 15px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid var(--header-border);
    box-shadow: var(--shadow-extra-small);
}

#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: var(--border-radius-element);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-small);
}

#publicPurchasePopup .form-group label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.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;
}

/* --- IMPROVED Professional Order History for Public Store --- */
.order-history-container {
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.order-history-container h2 {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-dark);
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.order-history-container .page-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.tracking-form-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tracking-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.tracking-form-card:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.results-table-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-element);
    box-shadow: var(--shadow-small);
    overflow-x: auto;
    border: 1px solid var(--card-border);
}

.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);
}


/* --- Mobile Responsiveness --- */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        box-shadow: none;
        border: none;
    }

    .main-content {
        padding: 16px;
    }

    .welcome-card {
        padding: 12px 14px;
        margin-bottom: 10px;
    }

    .overview-section {
        padding: 18px;
        margin-bottom: 20px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 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;
    }

    .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: var(--border-radius-card);
    }

    .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 --- */
@media (min-width: 768px) {

    .container {
        max-width: 100%;
        display: flex;
        box-shadow: none;
        background: var(--body-bg);
        border: none;
    }

    .sidebar {
        position: relative;
        left: 0;
        width: 250px;
        flex-shrink: 0;
        box-shadow: none;
        transition: none;
        border-right: 1px solid var(--header-border);
    }

    #mainContentArea {
        flex-grow: 1;
        min-height: 100vh;
        overflow-y: auto;
        background: var(--body-bg);
    }

    .header {
        width: calc(100% - 250px);
        left: 250px;
    }

    .menu-btn,
    .sidebar-overlay {
        display: none !important;
    }

    #publicStoreContainer {
        margin: 0 auto;
    }

    .page-content {
        padding: 30px;
    }
}

/* =================================================================== */
/* [NEW] STYLING FOR MERCHANT 'VIEW PRODUCTS' PAGE
/* =================================================================== */

.user-product-list-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-element);
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-small);
}

[data-theme="dark"] .user-product-list-card {
    box-shadow: var(--shadow-small);
}


.user-product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--body-bg);
    border: 1px solid var(--header-border);
    border-radius: var(--border-radius-element);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: var(--shadow-extra-small);
}

.user-product-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-small);
}

[data-theme="dark"] .user-product-item {
    background-color: var(--section-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .user-product-item:hover {
    box-shadow: var(--shadow-small);
}


.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-network-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border: 2px solid var(--card-border);
}

.product-network-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.product-details {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
}

.product-price {
    font-size: 0.9rem;
    color: var(--primary-blue);
}

.product-price small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 5px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-actions .action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius-button);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.action-button.edit-product-btn {
    background-color: #eef5ff;
    color: #3498db;
    border-color: #b4d7f5;
}

.action-button.edit-product-btn:hover {
    background-color: #dbeafc;
}

[data-theme="dark"] .action-button.edit-product-btn {
    background-color: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .action-button.edit-product-btn:hover {
    background-color: rgba(56, 189, 248, 0.3);
}

.action-button.delete-product-btn {
    background-color: #fff1f2;
    color: #e74c3c;
    border-color: #fecdd3;
}

.action-button.delete-product-btn:hover {
    background-color: #fee2e2;
}

[data-theme="dark"] .action-button.delete-product-btn {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e94560;
    border-color: rgba(231, 76, 60, 0.4);
}

[data-theme="dark"] .action-button.delete-product-btn:hover {
    background-color: rgba(231, 76, 60, 0.3);
}


@media (max-width: 600px) {
    .user-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .product-actions {
        justify-content: flex-end;
        align-self: flex-end;
    }

    .action-button {
        padding: 0.6rem 1.1rem;
    }

    .product-name {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   [NEW] Professional Top-Up Modal Styles
   ========================================================================== */

.topup-method-switcher {
    display: flex;
    background-color: var(--body-bg);
    border-radius: var(--border-radius-element);
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--header-border);
    box-shadow: var(--shadow-extra-small);
}

.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: var(--border-radius-button);
    transition: all 0.3s ease;
    text-align: center;
}

.method-switch-btn.active {
    background-color: var(--card-bg);
    color: var(--text-dark);
    box-shadow: var(--shadow-extra-small);
}

.topup-content-section {
    display: none;
}

.topup-content-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topup-description {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

.full-width {
    width: 100%;
}


/* ==========================================================================
   [NEW] Manual Payment Instructions Popup Styles
   ========================================================================== */

.payment-details-card {
    background-color: var(--body-bg);
    border: 1px solid var(--header-border);
    border-radius: var(--border-radius-element);
    padding: 20px;
    margin-top: 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .payment-details-card {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.05);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 12px 0;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid var(--header-border);
}

.detail-label {
    color: var(--text-muted);
    font-weight: 400;
}

.detail-value {
    color: var(--text-dark);
    font-weight: 600;
}

.reference-code-box {
    background-color: var(--processing-bg-light);
    color: var(--primary-blue);
    border: 1px dashed var(--primary-blue);
    border-radius: var(--border-radius-element);
    padding: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 10px auto;
    cursor: help;
    word-break: break-all;
}

[data-theme="dark"] .reference-code-box {
    background-color: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: #38bdf8;
}

.info-box.warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--border-radius-element);
    font-size: 12px;
    line-height: 1.5;
    box-shadow: var(--shadow-extra-small);
}

.info-box.warning svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* =============================================== */
/*              NEW: Top-Up Unavailable Popup      */
/* =============================================== */
#topupUnavailablePopup .popup {
    max-width: 400px;
}

#topupUnavailablePopup .popup-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

#topupUnavailablePopup .popup-header .popup-title {
    color: white;
}

#topupUnavailablePopup .popup-header .popup-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#topupUnavailablePopup .popup-header .popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#topupUnavailablePopup .popup-content {
    padding: 25px;
}

#topupUnavailablePopup .notice-box {
    display: flex;
    align-items: flex-start;
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--border-radius-element);
    padding: 15px;
    gap: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-extra-small);
}

#topupUnavailablePopup .notice-icon i {
    font-size: 24px;
    color: var(--warning-text);
    flex-shrink: 0;
}

#topupUnavailablePopup .notice-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--warning-text);
}

#topupUnavailablePopup .ussd-payment-guide {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-element);
    background-color: var(--body-bg);
    box-shadow: var(--shadow-extra-small);
}

#topupUnavailablePopup .ussd-payment-guide h4 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 16px;
}

#topupUnavailablePopup .ussd-payment-guide ol {
    padding-left: 20px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

#topupUnavailablePopup .ussd-payment-guide ol li {
    margin-bottom: 10px;
}

#topupUnavailablePopup .ussd-code-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--section-bg);
    border: 1px dashed var(--primary-blue);
    padding: 10px 15px;
    border-radius: var(--border-radius-element);
    margin: 10px 0;
}

#topupUnavailablePopup #ussdCode {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    word-break: break-all;
}

#topupUnavailablePopup #copyUssdCodeBtn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

#topupUnavailablePopup .whatsapp-btn-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-button);
    font-weight: 600;
    transition: background-color 0.3s ease;
    box-shadow: var(--shadow-small);
}

#topupUnavailablePopup .whatsapp-btn-popup:hover {
    background-color: #128C7E;
}

/* =========================================
   [NEW] TOAST NOTIFICATIONS (Professional)
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicking through container */
}

.toast {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    pointer-events: auto;
    /* Re-enable clicks on toasts */
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 20px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 15px;
    color: var(--text-dark);
}

.toast-message {
    font-size: 13px;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Toast Variants */
.toast.success {
    border-left-color: var(--success-color-alt);
}

.toast.success .toast-icon {
    color: var(--success-color-alt);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.info {
    border-left-color: var(--primary-blue);
}

.toast.info .toast-icon {
    color: var(--primary-blue);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

/* =========================================
   [NEW] RESPONSIVE DASHBOARD & SIDEBAR FIXES
   ========================================= */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0) !important;
        /* Always show sidebar on desktop */
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    }

    .main-content,
    #mainContentArea {
        margin-left: 260px !important;
        width: calc(100% - 260px) !important;
        padding: 30px;
    }

    .header {
        width: calc(100% - 260px);
        left: 260px;
        position: fixed;
        top: 0;
        z-index: 99;
    }

    .menu-btn {
        display: none !important;
        /* Hide hamburger on desktop */
    }

    .container {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

/* =========================================
   [NEW] PUBLIC STORE ENHANCEMENTS
   ========================================= */
.shop-tabs-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 25px;
    scrollbar-width: none;
}

.shop-tab {
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.shop-tab.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
