/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lato:wght@300;400;700&display=swap');

/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg: #EBEBEB; 
    --black: #333333;
    
    /* Luxury Gold Gradient */
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
    --gold-main: #C5A028; /* Solid Fallback */

    /* Shadows for Soft UI */
    --shadow-light: #ffffff;
    --shadow-dark: #bebebe;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Base Body (Locked by default for Splash/Login) */
body {
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--black);
    
    /* DEFAULT: No scrolling (Splash/Login) */
    overflow: hidden; 
    position: relative; 
}

/* NEW CLASS: Allow Scrolling (For Dashboard) */
body.allow-scroll {
    overflow-y: auto;       /* Enable Vertical Scroll */
    overflow-x: hidden;     /* STRICTLY Hide Horizontal Scroll */
    height: auto;           /* Let body grow with content */
    min-height: 88vh;
}

/* =========================================
   2. BRANDING / SPLASH / LOGIN
   ========================================= */

/* The Massive Gold H */
.brand-h-standalone {
    font-family: var(--font-heading);
    font-size: 110px; 
    font-weight: 700;
    line-height: 1;
    margin-bottom: 11px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0; 
    transform: scale(0.9) translateY(20px);
    animation: extrudeH 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes extrudeH {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); filter: drop-shadow(0px 0px 0px var(--shadow-dark)); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: drop-shadow(15px 15px 25px var(--shadow-dark)) drop-shadow(-10px -10px 20px var(--shadow-light)); }
}

.app-title {
    font-family: var(--font-body); font-size: 14px; letter-spacing: 6px; text-transform: uppercase;
    color: var(--black); opacity: 0; animation: fadeIn 2s ease-out 1s forwards;
}

.tap-hint {
    position: absolute; bottom: 55px; font-size: 11px; letter-spacing: 2px; color: #888;
    text-transform: uppercase; opacity: 0; animation: pulse 3s infinite 2s;
}



/* Login Page Layouts */
.login-container {
    height: 100vh; display: flex; flex-direction: column; justify-content: center;
    align-items: center; padding: 40px; max-width: 450px; margin: 0 auto; width: 100%;
}
.logo-area { text-align: center; margin-bottom: 50px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.subtitle {
    font-family: var(--font-body); font-size: 11px; color: #999; letter-spacing: 3px;
    text-transform: uppercase; margin-top: 5px; opacity: 0; animation: fadeIn 1s ease-out 1s forwards;
}
.buttons-wrapper { width: 100%; animation: slideUp 1s ease-out 0.5s backwards; }
.footer-area { margin-top: 40px; text-align: center; animation: fadeIn 1.5s ease-out 1s backwards; width: 100%; }

.security-badge {
    font-size: 12px; color: var(--black); opacity: 0.7; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.compliance-note {
    font-size: 10px; line-height: 1.6; color: #999; max-width: 300px;
    margin: 0 auto; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { opacity: 0; } 50% { opacity: 0.5; } 100% { opacity: 0; } }

/* =========================================
   3. DASHBOARD CORE UI
   ========================================= */

.dash-container {
    padding: 20px; padding-bottom: 120px; max-width: 100%; margin: 0 auto; overflow-x: hidden;
}

/* Neumorphic Buttons */
.btn-neu {
    background: var(--bg); border-radius: 50px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 18px; display: flex; align-items: center; justify-content: center; gap: 15px;
    color: var(--black); text-decoration: none; margin-bottom: 20px; font-weight: 700;
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease;
}
.btn-neu:active { box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light); transform: scale(0.99); }

/* Header & Profile */
.dash-header-complex { display: flex; align-items: center; justify-content: space-between; padding-bottom: 11px; }
.profile-square {
    width: 33px; height: 33px; border-radius: 12px; background: var(--bg);
    background-image: url('https://i.pravatar.cc/150?img=33'); background-size: cover; background-position: center;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    border: 2px solid rgba(240, 240, 240, 0.1);
}
.hamburger-btn {
    width: 33px; height: 33px; border-radius: 12px; background: var(--bg); margin-left: 15px;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.bar { width: 18px; height: 2px; background: var(--black); border-radius: 2px; }

/* Bottom Nav */
/* IMPROVED NAVIGATION DOCK */
.nav-bar {
    position: fixed;
    bottom: 25px; /* Lifted off the bottom */
    left: 20px;
    right: 20px;
    height: 70px;
    background: var(--bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 25px; /* Rounded pill shape */
    
    /* Neumorphic "Raised" effect */
    box-shadow: 10px 10px 20px var(--shadow-dark), 
                -10px -10px 20px var(--shadow-light);
    
    border: 1px solid rgba(255,255,255,0.5);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

/* The Active State "Pressed" effect */
.nav-item.active {
    color: var(--gold-main);
    background: var(--bg);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-item-center {
    position: relative;
    top: -20px; /* Makes it float above the bar */
    text-decoration: none;
}

.center-btn {
    width: 55px;
    height: 55px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 15px rgba(197, 160, 40, 0.4);
    border: 3px solid var(--bg); /* Creates a visual "cutout" effect */
    transition: transform 0.2s ease;
}

.center-btn:active {
    transform: scale(0.9);
}
/* =========================================
   4. WALLET CAROUSEL (DEPRESSED TRACK)
   ========================================= */

.wallet-carousel-container {
    position: relative; width: 100%; margin-bottom: 11px;
    overflow: visible;
    width: calc(100% + 20px); /* Extend slightly */
    padding: 11px 20px 5px 3px; /* Extra right padding for scroll hint */
}

.wallet-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 25px;
    
    /* THE DEPRESSED CHANNEL LOOK */
    
    border-radius: 11px;
     border-bottom-right-radius: 11px;
   
    padding-bottom: 7px;
    padding-right: 7px;
    scrollbar-width: none;
}
.wallet-track::-webkit-scrollbar { display: none; }
.card-snap-wrapper { flex: 0 0 100%; scroll-snap-align: center; }

/* Pulse Arrow */
.scroll-hint-arrow {
    position: absolute; top: 50%; right: 0px; transform: translateY(-50%);right: 15px;transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    color: var(--gold-main); font-size: 24px; z-index: 20; cursor: pointer;
    background: linear-gradient(to left, var(--bg) 20%, transparent 100%);
    animation: pulseRight 2s infinite;
}
.wallet-carousel-container.is-fiat .scroll-hint-arrow {
    right: auto;
    left: -5px;
}
@keyframes pulseRight {
    0% { transform: translateY(-50%) translateX(0); opacity: 0.6; }
    50% { transform: translateY(-50%) translateX(5px); opacity: 1; }
    100% { transform: translateY(-50%) translateX(0); opacity: 0.6; }
}

/* --- WALLET CARDS --- */
.bullion-card {
    width: 99%; 
    height: 182px; 
    border-radius: 11px;
    background: linear-gradient(145deg, #2b2b2b, #1a1a1a);
    
    /* UPDATED SHADOW: Only casting down and to the right */
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.55); 
    
    border: 1px solid rgba(255,255,255,0.05); 
    padding: 25px;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    color: #fff;
    position: relative; 
    overflow: hidden;
}

/* Fiat Card (Dark) */
/* Fiat Card (Dark) - Left Shadow Removed */
.fiat-card {
    width: 99%; 
    height: 182px; 
    border-radius: 11px;
    background: linear-gradient(145deg, #2b2b2b, #1a1a1a);
    
    /* UPDATED SHADOW: Only casting down and to the right */
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.55); 
    
    border: 1px solid rgba(255,255,255,0.05); 
    padding: 25px;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    color: #fff;
    position: relative; 
    overflow: hidden;
}

/* Keep the rest of the inner elements the same */
.fiat-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(197, 160, 40, 0.1) 0%, transparent 50%); 
    pointer-events: none;
}
.chip-icon {
    width: 40px; height: 30px; background: linear-gradient(135deg, #d4af37, #f7e7ce);
    border-radius: 6px; margin-bottom: 10px; position: relative;
}
.chip-icon::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(90deg, transparent 0, transparent 25%, rgba(0,0,0,0.2) 25%, rgba(0,0,0,0.2) 27%);
    border-radius: 6px;
}
.card-number { 
    font-family: 'Courier New', Courier, monospace; 
    font-size: 18px; /* Restored to a more readable size, adjust if needed */
    letter-spacing: 2px; 
    opacity: 0.8; 
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
    
    /* --- THE FIX --- */
    white-space: nowrap;       /* Prevents text from jumping to the next line */
    overflow: hidden;          /* Ensures it doesn't spill out of the card */
    display: block;            /* Ensures it takes up its own horizontal block */
    width: 100%;               /* Spans the full width of the card padding */
}
.card-number {
    transition: all 0.2s ease;
    user-select: none; /* Prevents awkward text highlighting on mobile tap */
}

.card-number:active {
    transform: scale(0.98);
    opacity: 1;
}
.card-label { font-size: 9px; text-transform: uppercase; color: #888; margin-bottom: 2px; }
.card-brand-h { font-family: var(--font-heading); font-weight: 700; font-size: 22px; color: var(--gold-main); }

/* --- CARD CONTENT (GRID/STATS) --- */
.balance-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 11px; }
.trend-pill {
    font-size: 10px; font-weight: 700; padding: 6px 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 3px; 
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}
.t-up { color: var(--gold-main); } .t-down { color: #888; } .t-flat { color: #6C7A89; }

.metal-breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px; }
.metal-stat-box { display: flex; flex-direction: column; gap: 4px; }
.metal-header { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }
.metal-weight { font-size: 11px; color: #555; }
.metal-value { font-size: 22px; font-weight: 700; color: var(--black); }
.metal-mini-trend { font-size: 10px; margin-left: 2px; }

/* =========================================
   5. LISTS & TABLES
   ========================================= */

/* Beneficiaries */
.beneficiary-list { display: flex; gap: 11px; overflow-x: auto; padding: 11px 5px 22px 5px; scrollbar-width: none; }
.beneficiary-list::-webkit-scrollbar { display: none; }
.ben-item { min-width: 33px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ben-photo {
    width: 33px; height: 33px; border-radius: 11px; background: #ddd;
    box-shadow: 5px 5px 11px var(--shadow-dark), -5px -5px 11px var(--shadow-light); background-size: cover;
}

/* Transactions */
.txn-container { padding-bottom: 11px; }
.txn-row {
    display: flex; justify-content: space-between; align-items: center; padding: 11px; margin-bottom: 11px;
    border-radius: 11px; background: var(--bg);
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

/* =========================================
   6. PANELS (SIDE & ZKE)
   ========================================= */

/* Side Panel */
/* IMPROVED SIDE PANEL */
/* Update these specific blocks in your style.css */

.side-panel {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 80%;
    height: 100vh; /* Full height */
    background: rgba(235, 235, 235, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -15px 0 30px rgba(0,0,0,0.1);
    z-index: 2000; /* Higher than everything else */
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 40px 25px;
    pointer-events: auto; /* Ensure it can be clicked */
}

/* This MUST come after .side-panel to work */
.side-panel.open {
    right: 0 !important; 
}

/* Ensure the overlay is behind the panel but above the dashboard */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1999; /* Just below the side-panel */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Header Section inside Panel */
.panel-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.panel-user-profile img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    box-shadow: 5px 5px 10px var(--shadow-dark);
}

/* Menu Items with Soft UI Hover */
.panel-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    border-radius: 15px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    border-bottom: none; /* Remove old border style */
}

.panel-menu-item i {
    width: 20px;
    color: var(--gold-main);
    font-size: 18px;
}

/* Neumorphic "Press" effect for menu items */
.panel-menu-item:active {
    background: var(--bg);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
    transform: scale(0.98);
}
/* REFINED PANEL FOOTER */
.panel-footer {
    margin-top: auto; /* Pushes footer to the very bottom */
    padding: 20px 0 10px 0;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05); /* Soft separation */
    font-size: 10px;
    color: #999;
    line-height: 1.6;
    letter-spacing: 0.5px;
}
/* CLOSE BUTTON STYLING */
.close-panel-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 4px 4px 8px var(--shadow-dark), 
                -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
    z-index: 2001; /* Above the panel content */
}

.close-panel-btn:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
    transform: scale(0.95);
    color: var(--gold-main); /* Changes color slightly when pressed */
}
/* Optional: Style the Vault ID specifically */
.vault-id-tag {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 5px;
    font-family: monospace;
    color: var(--black);
}


/* ZKE Panel */
.zke-panel {
    position: fixed; bottom: -100%; left: 0; width: 100%; height: auto;
    background: rgba(20, 20, 20, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top-left-radius: 30px; border-top-right-radius: 30px; padding: 40px 30px 60px 30px;
    box-shadow: 0 -11px 11px rgba(0,0,0,0.5); z-index: 1000; transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    color: #fff; text-align: center;
}
.zke-panel.active { bottom: 0; }
.panel-handle { width: 50px; height: 5px; background: rgba(255,255,255,0.2); border-radius: 10px; margin: 0 auto 30px auto; }
.zke-title { font-family: var(--font-heading); font-size: 22px; color: var(--gold-main); margin-bottom: 20px; }
.zke-desc { font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: #d0d0d0; margin-bottom: 30px; }
.btn-close-panel {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff;
    padding: 15px 40px; border-radius: 30px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
}
.top-alert {
    position: fixed;
    top: -100px; /* Start hidden above the screen */
    left: 0;
    right: 0;
    height: 60px;
    background: var(--black);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-bottom: 2px solid var(--gold-main);
}

.top-alert.show {
    transform: translateY(100px); /* Push it into view */
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.alert-content i {
    color: var(--gold-main);
}
/* Goal Card Styling */
.goal-card {
    background: var(--bg);
    padding: 18px;
    border-radius: 15px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    margin-bottom: 20px;
}

.progress-bg {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    box-shadow: inset 2px 2px 4px var(--shadow-dark);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 10px;
    /* Start at 0 for the animation */
    width: 0%; 
    /* This makes the movement smooth and premium */
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1); 
}

/* Insight Pill Styling */
.insight-pill {
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    border-left: 4px solid var(--gold-main);
}

.insight-icon {
    font-size: 20px;
    color: var(--gold-main);
    filter: drop-shadow(0 0 5px rgba(197, 160, 40, 0.4));
}

.insight-text {
    font-size: 11px;
    line-height: 1.5;
    color: #555;
}
.trade-drawer {
    position: fixed;
    bottom: -100%; /* Hidden */
    left: 0; right: 0;
    height: 75vh;
    background: var(--bg);
    border-top-left-radius: 30px; border-top-right-radius: 30px;
    z-index: 3000;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.trade-drawer.open { bottom: 0; }

.drawer-handle {
    width: 40px; height: 5px; background: #ccc;
    border-radius: 10px; margin: 0 auto 20px;
}

/* Segmented Control */
.segmented-control {
    display: flex; background: var(--shadow-dark);
    padding: 4px; border-radius: 12px; margin-bottom: 25px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}
.seg-item {
    flex: 1; text-align: center; padding: 12px; font-size: 12px;
    font-weight: 700; border-radius: 10px; cursor: pointer; transition: 0.3s;
}
.seg-item.active {
    background: var(--bg); color: var(--gold-main);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

/* Input Box */
.trade-input-container {
    background: var(--bg); padding: 20px; border-radius: 20px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    margin-bottom: 20px;
}
.input-wrapper { display: flex; align-items: center; border-bottom: 2px solid #ddd; padding-bottom: 5px; }
.input-wrapper input {
    background: transparent; border: none; outline: none;
    font-size: 24px; font-weight: 700; width: 100%;
}

/* Action Button */
.btn-buy-final {
    width: 100%; padding: 20px; border-radius: 15px; border: none;
    background: var(--gold-gradient); color: white; font-weight: 700;
    font-size: 16px; margin-top: 20px; cursor: pointer;
    box-shadow: 0 10px 20px rgba(197, 160, 40, 0.3);
}

.chip-container { display: flex; gap: 10px; justify-content: center; }
.q-chip {
    padding: 8px 15px; background: var(--bg); border-radius: 10px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

/* Close Button inside Drawer */
.close-trade-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

/* Live Rate Bar */
.live-rate-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
}
.rate-item { font-size: 11px; display: flex; align-items: center; gap: 6px; }

/* Breathing Dot Animation */
.dot {
    width: 6px; height: 6px; border-radius: 50%;
    animation: breathe 2s infinite;
}
.dot.gold { background: var(--gold-main); box-shadow: 0 0 5px var(--gold-main); }
.dot.silver { background: #757F9A; box-shadow: 0 0 5px #757F9A; }

@keyframes breathe {
    0% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.4; transform: scale(0.8); }
}
.success-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(235, 235, 235, 0.9);
    backdrop-filter: blur(15px);
    display: none; /* Hidden */
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 30px;
}

.receipt-card {
    background: var(--bg);
    width: 100%;
    max-width: 320px;
    padding: 30px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 20px 20px 60px var(--shadow-dark), -20px -20px 60px var(--shadow-light);
    border: 1px solid rgba(255,255,255,0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    font-size: 50px;
    color: #2ecc71;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.3));
}

.receipt-details {
    background: rgba(0,0,0,0.03);
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
}

.r-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.r-row:last-child { border-bottom: none; }

.status-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold;
}

.transfer-card {
    background: var(--bg);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

.weight-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--gold-main);
    font-size: 32px;
    font-weight: 700;
    width: 120px;
    outline: none;
    color: var(--black);
}

.ben-photo.add-btn {
    background: transparent;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    box-shadow: none;
}

.ben-item.selected .ben-photo {
    border: 3px solid var(--gold-main);
    transform: scale(1.1);
}

.compact-transfer-bar {
    background: var(--bg);
    padding: 15px;
    border-radius: 20px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    margin-bottom: 20px;
}

/* Tiny Metal Toggle */
.mini-metal-toggle {
    display: flex;
    background: #ddd;
    border-radius: 8px;
    padding: 2px;
}
.mini-metal-toggle span {
    font-size: 10px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.mini-metal-toggle span.active {
    background: var(--bg);
    color: var(--gold-main);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

/* Slim Weight Input */
.mini-weight-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    width: 60px;
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    outline: none;
}

/* Mini Avatars */
.mini-ben-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.mini-ben-item {
    flex: 0 0 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    transition: 0.2s;
}
.mini-ben-item img { width: 100%; height: 100%; object-fit: cover; }
.mini-ben-item.add {
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
}
.mini-ben-item.selected {
    border-color: var(--gold-main);
    transform: scale(1.1);
}

/* Compact Button */
.btn-send-compact {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: var(--gold-gradient);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(197, 160, 40, 0.2);
}
.mini-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.03);
    padding: 5px 12px;
    border-radius: 10px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark);
}

.unit-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--gold-main);
    text-transform: uppercase;
}

/* Updated Mini Avatars with Labels */
.mini-ben-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 5px 15px 5px;
    scrollbar-width: none; /* Hide scrollbar for Clean UI */
}

.mini-ben-scroll::-webkit-scrollbar { display: none; }

.mini-ben-item {
    flex: 0 0 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
}

.mini-ben-item img {
    width: 42px;
    height: 42px;
    border-radius: 12px; /* Squircle look for premium feel */
    object-fit: cover;
    border: 2px solid transparent;
    box-shadow: 3px 3px 6px var(--shadow-dark);
    transition: 0.3s;
}

.mini-ben-item.selected img {
    border-color: var(--gold-main);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(197, 160, 40, 0.3);
}

.ben-name-label {
    font-size: 8px;
    font-weight: 700;
    color: #777;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.mini-ben-item.add {
    width: 42px;
    height: 42px;
    background: var(--bg);
    border-radius: 12px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    box-shadow: none;
}

/* Container for the FAB and Menu */
.lang-container {
    position: fixed;
    right: 20px;
    bottom: 110px; /* Sits above the nav bar */
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* The Floating Button */
.lang-fab {
    width: 50px;
    height: 50px;
    background: var(--bg);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-fab i {
    font-size: 16px;
    color: var(--gold-main);
}

.lang-fab span {
    font-size: 9px;
    font-weight: 800;
    margin-top: 2px;
}

/* The Popup Menu */
.lang-menu {
    background: var(--bg);
    border-radius: 15px;
    padding: 8px;
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 5px;
    animation: slideInUp 0.3s ease;
}

.lang-menu.show {
    display: flex;
}

.lang-option {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.lang-option:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    color: var(--gold-main);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.transfer-mode-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin: 0 5px 12px 5px;
}

.mode-toggle-pill {
    background: var(--bg);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    color: var(--gold-main);
    text-transform: uppercase;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    cursor: pointer;
    transition: 0.2s;
}

.mode-toggle-pill:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.btn-alert-cancel {
    background: var(--bg);
    color: #d9534f !important; /* Soft Alert Red */
    border: 1px solid rgba(217, 83, 79, 0.2) !important;
    font-weight: 700;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.btn-alert-cancel:active {
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transform: scale(0.98);
}
/* Header Language Trigger Styling */
/* Language Trigger Styling - Matching Hamburger Style */
.header-lang-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative; /* Anchor for the menu */
    width: 30px;
    height: 30px;
}

.header-lang-trigger i {
    font-size: 16px;
    color: var(--black);
    opacity: 0.8;
}

.header-lang-trigger span {
    font-size: 8px;
    font-weight: 800;
    margin-top: 1px;
    color: var(--black);
}

/* Floating Dropdown - Does not affect layout */
.header-menu-adjust {
    position: absolute !important;
    top: 40px !important; /* Positions it below the header icons */
    right: 0 !important;
    width: 120px !important;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 10px 10px 20px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    z-index: 9999 !important; /* Over the carousel */
    display: none; /* Controlled by .show class */
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.lang-menu.show {
    display: flex !important;
}

.lang-option {
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: 0.2s;
}

.lang-option:last-child { border-bottom: none; }
.lang-option:active { background: rgba(0,0,0,0.05); }

.status-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 15px;
    margin: 10px 5px 20px 5px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 1px 1px 3px var(--shadow-dark);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #e74c3c; /* Alert Red */
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-right {
    font-size: 10px;
    color: #888;
    font-weight: 600;
}

.pulse-icon {
    font-size: 8px;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
/* Add this to your <style> block */
.secure-session-tag {
    font-size: 8px;
    color: #2ecc71;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Market Drawer Info Grid */
.price-info-box {
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    /* Neumorphic Inset */
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    display: flex;
    flex-direction: column;
}

.p-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.p-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
}

/* Secondary Action Button (Back Button) */
/* Market Drawer Header Alignment */
.market-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertical centers the title and the price */
    margin-bottom: 25px;
}

.market-title-col, .market-price-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Price Detail Boxes */
.price-info-box {
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    display: flex;
    flex-direction: column;
}

.p-label {
    font-size: 8px;
    color: #888;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 4px;
}

.p-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

/* SYMMETRICAL BUTTONS: The Fix */
.market-action-row {
    display: flex;
    gap: 12px;
    align-items: stretch; /* Forces buttons to same height */
    margin-top: 10px;
}

/* Base button style to ensure identical dimensions */
.btn-neu, .btn-buy-final {
    flex: 1;            /* Equal width */
    height: 48px;       /* Identical height */
    margin: 0 !important; /* Removes any default top margins */
    padding: 0;         /* Centering handled by flex */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

/* Neumorphic Back Button */
.btn-neu {
    background: var(--bg);
    color: #777;
    font-weight: 700;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.btn-neu:active {
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transform: scale(0.97);
}

/* Primary Buy Button (Overrides to ensure no extra margin) */
.btn-buy-final {
    border: none;
    outline: none;
    cursor: pointer;
    background: var(--gold-main); /* Or your specific buy button color */
    color: white;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.btn-buy-final:active {
    transform: scale(0.98);
}
/* Chart Container Hover */
.chart-container div {
    transition: all 0.3s ease;
}
.chart-container div:hover {
    background: rgba(0,0,0,0.04);
}
/* Soft UI Close Button */
.close-btn-neu {
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* Matching your profile square's roundness */
    background: var(--bg);
    cursor: pointer;
    color: #888;
    font-size: 14px;
    /* Soft Neumorphic Shadows */
    box-shadow: 3px 3px 6px var(--shadow-dark), 
                -3px -3px 6px var(--shadow-light);
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.close-btn-neu:active {
    box-shadow: inset 2px 2px 5px var(--shadow-dark), 
                inset -2px -2px 5px var(--shadow-light);
    transform: scale(0.95);
    color: var(--black);
}

/* Ensure Price Info Box matches the theme */
.price-info-box {
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark), 
                inset -2px -2px 5px var(--shadow-light);
    display: flex;
    flex-direction: column;
}