/* ==========================================================================
   BA Funded — Global Theme
   Apply to ALL pages for consistent dark-trading-platform background.
   Include BEFORE any page-specific styles.
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --bg:      #03080a;
    --bg2:     #071012;
    --bg3:     #0a1518;
    --bg4:     #0f1d22;
    --green:   #00e5a0;
    --green2:  #00c887;
    --green-d: rgba(0,229,160,0.08);
    --green-b: rgba(0,229,160,0.18);
    --cyan:    #00d4ff;
    --gold:    #f5c842;
    --gold2:   #e6a800;
    --gold-d:  rgba(245,200,66,0.10);
    --gold-b:  rgba(245,200,66,0.35);
    --red:     #ff4d6d;
    --red-d:   rgba(255,77,109,0.08);
    --red-b:   rgba(255,77,109,0.2);
    --text:    #dff0ea;
    --muted:   #4d7a6b;
    --muted2:  #2a4a3e;
    --border:  rgba(0,229,160,0.08);
    --border2: rgba(0,229,160,0.04);
    --mono:    'JetBrains Mono', monospace;
    --body:    'Sora', sans-serif;
    --grotesk: 'Space Grotesk', sans-serif;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
}

/* ==========================================================================
   BACKGROUND EFFECT LAYERS (fixed, non-interactive)
   ========================================================================== */

/* Layer 1 — Noise texture (SVG feTurbulence) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: 0.15;
}

/* Layer 2 — Grid overlay (on a dedicated element, also works via body::after as fallback) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0,229,160,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,229,160,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
}

/* Allow .grid-bg class to take precedence if page already uses it (same values, just via class) */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0,229,160,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,229,160,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
}

/* Layer 3 — Central glow (radial gradient at top center) */
.hero-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at center,
        rgba(0,229,160,0.12) 0%,
        rgba(0,212,255,0.06) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

/* Layer 4 — Particle canvas (positioned by particles.js, base styles here) */
#site-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(3,8,10,0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(0,229,160,0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,229,160,0.3);
}
/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,229,160,0.15) rgba(3,8,10,0.5);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,160,0.6); }
    50%      { box-shadow: 0 0 0 6px rgba(0,229,160,0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Scroll-reveal helper */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   TYPOGRAPHY HELPERS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.15;
    letter-spacing: -0.3px;
}
a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--green2);
}
img {
    max-width: 100%;
    display: inline;;
}

/* ==========================================================================
   NAVIGATION / SIDEBAR — Glass Morphism
   ========================================================================== */

/* Top nav bar (used on landing page) */
nav.navbar,
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(3,8,10,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 4px;
    color: var(--green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 600;
    position: relative;
}
.nav-logo:hover { color: var(--green); }

/* ---------- SIDEBAR (dashboard pages) ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 500;
    background: rgba(3,8,10,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 4px;
    color: var(--green);
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sidebar-section-label {
    font-family: var(--mono);
    font-size: 0.55rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted2);
    padding: 0 1.5rem;
    margin: 1.25rem 0 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
    font-family: var(--body);
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
.sidebar-link:hover {
    color: var(--text);
    background: var(--green-d);
    border-left-color: var(--green-b);
}
.sidebar-link:hover i {
    color: var(--green);
}
/* Active state — HIGHLY visible */
.sidebar-link.active,
.sidebar-link[aria-current="page"] {
    color: var(--green);
    background: var(--green-d);
    border-left-color: var(--green);
}
.sidebar-link.active i,
.sidebar-link[aria-current="page"] i {
    color: var(--green);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 1.5rem;
}

/* ---------- MOBILE NAV TOGGLE ---------- */
.nav-mobile-toggle,
.sidebar-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    z-index: 600;
    position: relative;
    transition: border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.nav-mobile-toggle:hover,
.sidebar-mobile-toggle:hover {
    border-color: var(--green-b);
    color: var(--green);
}

/* Mobile menu overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 490;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.mobile-overlay.open {
    display: block;
}

/* ==========================================================================
   CARDS — Glass Morphism
   ========================================================================== */
.card {
    background: rgba(7,16,18,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0,229,160,0.08);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
/* Subtle top glow line */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0,229,160,0.15),
        transparent);
    pointer-events: none;
}
.card:hover {
    border-color: rgba(0,229,160,0.2);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,229,160,0.04);
}

/* Card title */
.card-title {
    font-family: var(--grotesk);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.5rem;
}
.card-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
input, textarea, select {
    font-family: var(--body);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg3);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--green-b);
    box-shadow: 0 0 0 3px rgba(0,229,160,0.06);
}
input::placeholder, textarea::placeholder {
    color: var(--muted2);
}
select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
    display: block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary {
    background: var(--green);
    color: #03080a;
}
.btn-primary:hover {
    background: var(--green2);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,229,160,0.3);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--muted);
}
.btn-outline:hover {
    border-color: var(--green-b);
    color: var(--green);
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #0a0700;
}
.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(245,200,66,0.35);
}
.btn-danger {
    background: var(--red);
    color: #fff;
}
.btn-danger:hover {
    background: #e6435e;
    transform: translateY(-1px);
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.62rem;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
}
.badge-green  { background: rgba(0,229,160,0.12); color: var(--green); border: 1px solid rgba(0,229,160,0.3); }
.badge-gold   { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.badge-red    { background: rgba(255,77,109,0.1); color: var(--red); border: 1px solid rgba(255,77,109,0.25); }
.badge-cyan   { background: rgba(0,212,255,0.08); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.badge-muted  { background: rgba(77,122,107,0.1); color: var(--muted); border: 1px solid var(--border); }

/* Notification dot */
.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}
th {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    background: var(--bg2);
}
td {
    color: var(--text);
}
tr:hover td {
    background: var(--green-d);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-gold  { color: var(--gold); }
.text-cyan  { color: var(--cyan); }
.text-muted { color: var(--muted); }
.font-mono  { font-family: var(--mono); }
.font-body  { font-family: var(--body); }
.font-grotesk { font-family: var(--grotesk); }

/* ==========================================================================
   CONTENT LAYER — ensures page content sits above background effects
   ========================================================================== */
section,
main,
.content-wrapper,
.dashboard-content,
.page-content {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   RESPONSIVE — Tablet (< 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
}

/* ==========================================================================
   RESPONSIVE — Mobile (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Reduce grid opacity on mobile */
    body::after {
        opacity: 0.6;
    }
    .grid-bg {
        opacity: 0.6;
    }

    /* Reduce glow intensity */
    .hero-glow {
        width: 600px;
        height: 400px;
        opacity: 0.7;
    }

    /* Sidebar becomes slide-in overlay */
    .sidebar {
        transform: translateX(-100%);
        width: min(280px, 85vw);
        z-index: 495;
        padding-top: 80px;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* Show mobile toggle */
    .nav-mobile-toggle,
    .sidebar-mobile-toggle {
        display: flex;
    }

    /* Cards slightly less transparent for readability */
    .card {
        background: rgba(7,16,18,0.92);
    }

    /* Tables scroll horizontally */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   RESPONSIVE — Small Mobile (< 480px)
   ========================================================================== */
@media (max-width: 480px) {
    /* Even less grid visibility */
    body::after {
        opacity: 0.35;
    }
    .grid-bg {
        opacity: 0.35;
    }

    /* Glow even smaller */
    .hero-glow {
        width: 360px;
        height: 280px;
        opacity: 0.5;
        filter: blur(30px);
    }

    /* Cards more opaque for readability */
    .card {
        background: rgba(7,16,18,0.96);
        border-radius: 12px;
        padding: 1.15rem;
    }

    /* Reduce particle canvas opacity further (JS also reduces count) */
    #site-particles {
        opacity: 0.4;
    }

    /* Ensure touch-friendly tap targets */
    .sidebar-link,
    .btn,
    .mm-link,
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    a.inline, .inline-link {
        min-height: auto;
        min-width: auto;
    }

    /* Prevent iOS tap highlight */
    a, button, input, textarea, select {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   iOS SAFARI / SAFARI-SPECIFIC FIXES
   ========================================================================== */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari: prevent bounce on fixed bg layers */
    body::before,
    body::after,
    .hero-glow,
    .grid-bg,
    #site-particles {
        position: fixed;
        -webkit-overflow-scrolling: auto;
    }
}

/* Safe area insets for notch devices */
@supports (padding: max(0px)) {
    .sidebar {
        padding-top: max(1.5rem, env(safe-area-inset-top));
        padding-bottom: max(0, env(safe-area-inset-bottom));
    }
    .dash-header {
        padding-top: max(0, env(safe-area-inset-top));
    }
}

/* ==========================================================================
   DASHBOARD TOP NAVIGATION (dash-nav.php)
   Replaces sidebar with professional top header tabs.
   PC: full-width tabs | Mobile: hamburger slide menu
   ========================================================================== */

.dash-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 54px;
    background: rgba(3,8,10,0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0,229,160,0.08);
    z-index: 500;
    transition: background 0.2s;
}

.dash-header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1.75rem;
}

/* --- Logo --- */
.dash-logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--green);
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0;
    transition: opacity 0.2s;
}
.dash-logo:hover { opacity: 0.85; color: var(--green); }
.dash-logo-dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    margin-left: 1px;
    animation: pulse 2.5s infinite;
    flex-shrink: 0;
}

/* --- Desktop Tabs --- */
.dash-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Override generic 'nav' rule — must use !important to beat 'nav {}' */
    position: static !important;
    background: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    top: auto !important; left: auto !important; right: auto !important;
    z-index: auto !important;
}
.dash-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
    font-family: var(--mono);
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    border: none;
    border-bottom: none;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.dash-tab i {
    font-size: 0.72rem;
    width: 16px;
    text-align: center;
    transition: color 0.2s;
}
.dash-tab:hover {
    color: var(--text);
    background: rgba(0,229,160,0.05);
}
.dash-tab:hover i { color: var(--green); }

.dash-tab.active {
    color: var(--green);
    background: rgba(0,229,160,0.1);
    box-shadow: 0 0 0 1px rgba(0,229,160,0.15), inset 0 0 12px rgba(0,229,160,0.04);
}
.dash-tab.active i { color: var(--green); }

/* Home icon tab (icon only, no label) */
.dash-tab.icon-only {
    padding: 0.45rem 0.5rem;
    max-width: 40px;
}
.dash-tab.icon-only i {
    font-size: 0.88rem;
    width: auto;
}

/* Tab separator removed — tabs are now full-width pill style */
.dash-tab-sep { display: none; }

/* --- Right side: Notification Bell + Profile Pic + More Dropdown --- */
.dash-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ═══ NOTIFICATION BELL ═══ */
.dash-notif-wrap {
    position: relative;
}
.dash-notif-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.dash-notif-btn:hover { color: var(--green); }
.dash-notif-badge {
    position: absolute;
    top: -1px; right: -3px;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 0.48rem;
    font-family: var(--mono);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ═══ NOTIFICATION DROPDOWN ═══ */
.dash-notif-dropdown {
    position: fixed;
    top: 56px;
    right: 524px;
    width: 380px;
    background: rgba(7,16,18,0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0,229,160,0.1);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,229,160,0.03);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 600;
    overflow: hidden;
    display: block; /* always block, controlled by opacity */
}
.dash-notif-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0%) translateY(0) scale(1);
}

.dash-notif-dd-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0,229,160,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-notif-dd-header > span:first-child {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.dash-notif-dd-unread {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.78rem;
    margin-left: 0.3rem;
}
.dash-notif-mark-read {
    font-size: 0.72rem;
    color: var(--green);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s;
}
.dash-notif-mark-read:hover { opacity: 0.7; }

.dash-notif-dd-list {
    max-height: 420px;
    overflow-y: auto;
}
.dash-notif-dd-list::-webkit-scrollbar { width: 4px; }
.dash-notif-dd-list::-webkit-scrollbar-track { background: transparent; }
.dash-notif-dd-list::-webkit-scrollbar-thumb { background: rgba(0,229,160,0.1); border-radius: 4px; }

/* Notification Item */
.dash-notif-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0,229,160,0.04);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.dash-notif-item:last-child { border-bottom: none; }
.dash-notif-item:hover { background: rgba(0,229,160,0.04); }
.dash-notif-item.unread {
    background: rgba(0,229,160,0.06);
    border-left: 3px solid var(--green);
}

/* Notification icon colors by type */
.dash-notif-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.82rem;
}
.dash-notif-icon.deposit     { background: rgba(59,130,246,.12);  color: #3b82f6; }
.dash-notif-icon.withdraw    { background: rgba(245,158,11,.12);  color: #f59e0b; }
.dash-notif-icon.funding     { background: rgba(139,92,246,.12);  color: #8b5cf6; }
.dash-notif-icon.autotrade   { background: rgba(0,229,160,.12);   color: var(--green); }
.dash-notif-icon.profile     { background: rgba(236,72,153,.12);  color: #ec4899; }
.dash-notif-icon.news        { background: rgba(16,185,129,.12);  color: #10b981; }
.dash-notif-icon.purchase    { background: rgba(251,191,36,.12);  color: #fbbf24; }
.dash-notif-icon.support     { background: rgba(99,102,241,.12);  color: #6366f1; }
.dash-notif-icon.certificate { background: rgba(251,191,36,.12);  color: #fbbf24; }
.dash-notif-icon.general     { background: rgba(77,122,107,.12);  color: var(--muted); }

.dash-notif-content { flex: 1; min-width: 0; }
.dash-notif-title { font-size: 0.82rem; font-weight: 500; color: var(--text); margin-bottom: 0.15rem; line-height: 1.35; }
.dash-notif-msg { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-notif-time { font-size: 0.65rem; color: rgba(77,122,107,0.7); }
.dash-notif-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    margin-top: 6px;
}

.dash-notif-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted2);
}
.dash-notif-empty i { font-size: 1.8rem; display: block; margin-bottom: 0.6rem; opacity: 0.3; }
.dash-notif-empty p { font-size: 0.75rem; }

/* ═══ NOTIFICATION SIDE PANEL ═══ */
.dash-nsp-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.dash-nsp-backdrop.show { display: block; }

.dash-nsp-panel {
    position: fixed;
    top: 64px; right: 400px;
    width: 360px;
    max-height: calc(100vh - 80px);
    background: rgba(7,16,18,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0,229,160,0.1);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    z-index: 1001;
    transform: translateX(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dash-nsp-panel.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}
.dash-nsp-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,229,160,0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.dash-nsp-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.dash-nsp-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    line-height: 1.4;
}
.dash-nsp-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.dash-nsp-close:hover { color: var(--text); }
.dash-nsp-body {
    padding: 1.25rem;
    font-size: 0.82rem;
    color: rgba(223,239,234,0.8);
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
.dash-nsp-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(0,229,160,0.04);
    font-size: 0.68rem;
    color: rgba(77,122,107,0.7);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Side panel responsive */
@media (max-width: 900px) {
    .dash-nsp-panel {
        top: 50%; right: auto; left: 50%;
        width: min(380px, calc(100vw - 32px));
        max-height: 55vh;
        transform: translate(-50%, -50%) scale(0.92);
        border-radius: 16px;
    }
    .dash-nsp-panel.show {
        transform: translate(-50%, -50%) scale(1);
    }
    .dash-nsp-backdrop { background: rgba(0,0,0,0.7); }
}

/* Notification dropdown mobile responsive */
@media (max-width: 768px) {
    .dash-notif-dropdown {
        width: calc(100vw - 24px);
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-8px) scale(0.96);
        position: fixed;
        top: 60px;
    }
    .dash-notif-dropdown.show {
        transform: translateX(0%) translateY(0) scale(1);
    }
}

@media (max-width: 400px) {
    .dash-nsp-panel { width: calc(100vw - 24px); max-height: 60vh; }
}

/* Small Profile Pic Button */
.dash-profile-pic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    border: 1.5px solid rgba(0,229,160,0.15);
    overflow: hidden;
}
.dash-profile-pic-btn:hover {
    border-color: rgba(0,229,160,0.35);
    box-shadow: 0 0 0 2px rgba(0,229,160,0.08);
}
.dash-avatar-sm {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.dash-avatar-sm-fb {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b894);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #03080a;
    font-size: 0.7rem;
    font-family: var(--body);
}

/* More Dropdown */
.dash-more-wrap {
    position: relative;
}
.dash-more-btn {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: none;
    border: 1px solid rgba(0,229,160,0.08);
    color: var(--muted);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.dash-more-btn:hover {
    border-color: rgba(0,229,160,0.2);
    color: var(--text);
    background: rgba(0,229,160,0.04);
}
.dash-more-btn[aria-expanded="true"] {
    color: var(--green);
    border-color: rgba(0,229,160,0.25);
}
.dash-more-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}
.dash-more-btn i {
    transition: transform 0.2s;
}

.dash-more-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: rgba(7,16,18,0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0,229,160,0.1);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,160,0.03);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 600;
    overflow: hidden;
}
.dash-more-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dash-more-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(0,229,160,0.06);
}
.dash-more-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.dash-more-avatar-fb {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b894);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #03080a;
    font-size: 0.85rem;
    font-family: var(--body);
    flex-shrink: 0;
}
.dash-more-user-info {
    min-width: 0;
}
.dash-more-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-more-email {
    font-size: 0.6rem;
    color: var(--muted);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.dash-more-divider {
    height: 1px;
    background: rgba(0,229,160,0.06);
}
.dash-more-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.dash-more-item i {
    width: 16px;
    text-align: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: color 0.15s;
}
.dash-more-item:hover {
    color: var(--text);
    background: rgba(0,229,160,0.05);
}
.dash-more-item:hover i { color: var(--green); }
.dash-more-item.active {
    color: var(--green);
    background: rgba(0,229,160,0.06);
}
.dash-more-item.active i { color: var(--green); }
.dash-more-item.danger {
    color: var(--red);
}
.dash-more-item.danger:hover {
    color: var(--red);
    background: rgba(255,77,109,0.06);
}
.dash-more-item.danger:hover i { color: var(--red); }

/* Keep old avatar classes for backward compat */
.dash-avatar-img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.dash-avatar-fallback {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b894);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #03080a;
    font-size: 0.78rem;
    flex-shrink: 0;
    font-family: var(--body);
}

/* --- Mobile Toggle Button --- */
.dash-mobile-toggle {
    display: none;
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(3,8,10,0.9);
    border: 1px solid rgba(0,229,160,0.1);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}
.dash-mobile-toggle:hover { border-color: rgba(0,229,160,0.25); }

/* --- Mobile Notification Bell (header) --- */
.dash-mobile-bell {
    display: none;
    position: relative;
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(3,8,10,0.9);
    border: 1px solid rgba(0,229,160,0.1);
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}
.dash-mobile-bell:hover { border-color: rgba(0,229,160,0.25); color: var(--green); }
.dash-mobile-bell-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
}

/* --- Mobile Overlay --- */
.dash-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 490;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.dash-mobile-overlay.open { display: block; pointer-events: auto; }

/* --- Mobile Slide Menu --- */
.dash-mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(300px, 85vw) !important;
    z-index: 600 !important;
    background: rgba(5,12,10,0.98) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: none !important;
    border-left: 1px solid rgba(0,229,160,0.08) !important;
    border-bottom: none !important;
    padding: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    pointer-events: auto;
}
.dash-mobile-menu.open {
    transform: translateX(0);
    pointer-events: auto;
}

.dash-mm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(0,229,160,0.06);
    position: sticky;
    top: 0;
    background: rgba(5,12,10,0.95);
    backdrop-filter: blur(12px);
    z-index: 1;
}
.dash-mm-logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--green);
    text-decoration: none;
    display: flex;
    align-items: center;
}
.dash-mm-logo:hover { color: var(--green); }
.dash-mm-close {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,229,160,0.08);
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.dash-mm-close:hover { color: var(--red); border-color: rgba(255,77,109,0.2); }

.dash-mm-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}
.dash-mm-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.dash-mm-avatar-fb {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b894);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #03080a;
    font-size: 0.95rem;
    flex-shrink: 0;
    font-family: var(--body);
}
.dash-mm-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.dash-mm-email {
    font-size: 0.65rem;
    color: var(--muted);
    font-family: var(--mono);
    margin-top: 1px;
}

.dash-mm-divider {
    height: 1px;
    background: rgba(0,229,160,0.06);
    margin: 0.35rem 1.25rem;
}

.dash-mm-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.dash-mm-link i {
    width: 18px;
    text-align: center;
    font-size: 0.82rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
.dash-mm-link:hover {
    color: var(--text);
    background: rgba(0,229,160,0.04);
    border-left-color: rgba(0,229,160,0.15);
}
.dash-mm-link:hover i { color: var(--green); }
.dash-mm-link.active {
    color: var(--green);
    background: rgba(0,229,160,0.06);
    border-left-color: var(--green);
}
.dash-mm-link.active i { color: var(--green); }

.dash-mm-badge {
    min-width: 20px; height: 20px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-family: var(--mono);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}

.dash-mm-logout-link { color: var(--red); }
.dash-mm-logout-link:hover { color: var(--red); background: rgba(255,77,109,0.06); border-left-color: rgba(255,77,109,0.2); }

/* --- Dash Content Wrapper (replaces .main margin-left) --- */
.dash-content {
    padding-top: 54px; /* header height */
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   SIDEBAR NEUTRALIZER — when dash-nav.php is used on pages that still
   have old sidebar HTML, force-hide the sidebar & remove margin-left.
   This ensures clean transition without editing every page file.
   ========================================================================== */
/* Hide old sidebar element */
.dash-header ~ .sidebar,
.dash-content ~ .sidebar,
body > .sidebar:has(~ .dash-header),
body > .sidebar:has(~ .dash-content) {
    display: none !important;
}
/* Fallback: hide sidebar on any page that has dash-header */
body:has(.dash-header) > .sidebar,
body:has(.dash-content) > .sidebar {
    display: none !important;
}
/* Hide old sidebar-overlay */
body:has(.dash-header) > .sidebar-overlay,
body:has(.dash-content) > .sidebar-overlay {
    display: none !important;
}
/* Hide old page .header (sticky sub-header) if dash-nav is present */
body:has(.dash-header) .main-content > .header,
body:has(.dash-content) .main-content > .header,
body:has(.dash-header) main > .header {
    display: none !important;
}
/* Remove sidebar margin-left from .main-content when dash-nav is loaded */
body:has(.dash-header) .main-content,
body:has(.dash-content) .main-content,
body:has(.dash-header) main.main-content {
    margin-left: 0 !important;
    padding-top: 54px !important;
}
/* Also ensure .dash-content wrapper pushes content below header */
.dash-content {
    padding-top: 54px !important;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   DASH NAV RESPONSIVE — Mobile (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .dash-tabs { display: none; }
    .dash-right { display: none; }
    .dash-mobile-toggle { display: flex; margin-left: 0; }
    .dash-mobile-bell { display: flex; margin-left: auto; margin-right: 0.5rem; }

    .dash-content { padding-top: 54px; }

    /* Notification dropdown: full-width on mobile */
    .dash-notif-dropdown {
        top: 50px;
        left: 8px;
        right: 8px;
        width: auto;
        border-radius: 12px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}
@media print {
    .dash-header, .dash-mobile-overlay, .dash-mobile-menu { display: none !important; }
    .dash-content { padding-top: 0 !important; }
}
.back-btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  border-radius: 50px;
  background: linear-gradient(270deg, #FFD700, #FFC300, #FFB300);
  background-size: 400% 400%;
  transition: all 0.3s ease;
  animation: gradientMove 5s ease infinite;
  box-shadow: 0 4px 15px rgba(255, 200, 0, 0.4);

  position: relative;
  top: 140px; /* 👈 এইটা change করো */

  position: fixed;
  
  left: 8500px;   /* 👉 বাম পাশে */

}

.back-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 200, 0, 0.6);
}

.back-btn:active {
  transform: scale(0.95);
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}a:hover {
  opacity: 0.8;
}