/* ============================================
   CRYPTOXCHANGE - COMPLETE MOBILE-FIRST CSS
   ============================================ */

:root {
    --bg-primary: #0b0e13;
    --bg-secondary: #131722;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222838;
    --accent: #f0b90b;
    --accent-dark: #c99a09;
    --green: #0ecb81;
    --green-dark: #0a9e65;
    --red: #f6465d;
    --red-dark: #d63a4f;
    --blue: #1e80ff;
    --purple: #a855f7;
    --text-primary: #eaecef;
    --text-secondary: #848e9c;
    --text-muted: #5e6673;
    --border: #2b3139;
    --border-light: #363c47;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- APP CONTAINER ---- */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--bg-primary);
}

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

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

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.header-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.login-btn, .register-btn {
    width: auto;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.register-btn {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ---- MAIN CONTENT ---- */
.main-content {
    padding: 16px;
    padding-bottom: 90px;
}

/* ---- WALLET CARD ---- */
.wallet-card {
    background: linear-gradient(135deg, #1a2332, #0f1923, #162231);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 30%, rgba(240,185,11,0.05), transparent 50%);
    pointer-events: none;
}

.wallet-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-balance {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.wallet-balance .currency {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.wallet-sub {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.wallet-sub-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wallet-sub-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-sub-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
}

/* ---- ACTION BUTTONS (Buy, Sell, UPI, Corporate) ---- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.action-btn:hover, .action-btn:active {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(240,185,11,0.15);
}

.action-btn .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.action-btn.buy .icon-wrap { background: rgba(14,203,129,0.15); color: var(--green); }
.action-btn.sell .icon-wrap { background: rgba(246,70,93,0.15); color: var(--red); }
.action-btn.upi .icon-wrap { background: rgba(30,128,255,0.15); color: var(--blue); }
.action-btn.corporate .icon-wrap { background: rgba(168,85,247,0.15); color: var(--purple); }

.action-btn .btn-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---- TODAY STATS ---- */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.orders::after { background: linear-gradient(90deg, var(--blue), var(--purple)); }
.stat-card.profit::after { background: linear-gradient(90deg, var(--green), var(--accent)); }

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card.orders .stat-value { color: var(--blue); }
.stat-card.profit .stat-value { color: var(--green); }

/* ---- POSTER BUTTONS ---- */
.poster-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.poster-card {
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.poster-card:hover {
    transform: translateX(4px);
}

.poster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    pointer-events: none;
}

.poster-card.usdt-buy {
    background: linear-gradient(135deg, #0a2e1a, #0f3d23);
    border-color: rgba(14,203,129,0.3);
}

.poster-card.inr-buy {
    background: linear-gradient(135deg, #1a1a0a, #2d2d0f);
    border-color: rgba(240,185,11,0.3);
}

.poster-card.huge-amount {
    background: linear-gradient(135deg, #1a0a2e, #2d0f3d);
    border-color: rgba(168,85,247,0.3);
}

.poster-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poster-title {
    font-size: 1rem;
    font-weight: 700;
}

.poster-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.poster-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* ---- AD BANNERS ---- */
.ad-section {
    margin-bottom: 20px;
}

.ad-section .section-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.ad-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.ad-slider::-webkit-scrollbar {
    display: none;
}

.ad-card {
    min-width: 85%;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
    width: 375px;
    height: 120px;
}

.ad-card img {
    width: 100%;
    height: 120px;
    display: block;
    size: 3a;
}

/* ---- LIVE USERS SIDEBAR ---- */
.live-users-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.live-users-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-users-header span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 4px;
}

.live-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-avatars {
    display: flex;
    margin-top: 12px;
}

.user-avatars .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: -8px;
}

.user-avatars .avatar:first-child {
    margin-left: 0;
}

.user-avatars .avatar.more {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

/* ---- BOTTOM NAVIGATION ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    backdrop-filter: blur(20px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 12px;
    position: relative;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
}

.deposit-btn-nav i {
    font-size: 1.6rem;
    color: var(--accent);
}

/* ---- FORMS ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240,185,11,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(240,185,11,0.4);
    transform: translateY(-1px);
}

.btn-green {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
}

.btn-red {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
}

.btn-blue {
    background: linear-gradient(135deg, var(--blue), #1565cc);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    width: auto;
}

/* ---- CARDS ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
}

/* ---- PAGE TITLE ---- */
.page-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--accent);
}

/* ---- BADGES ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending { background: rgba(240,185,11,0.15); color: var(--accent); }
.badge-approved { background: rgba(14,203,129,0.15); color: var(--green); }
.badge-rejected { background: rgba(246,70,93,0.15); color: var(--red); }

/* ---- ORDER LIST ---- */
.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child {
    border-bottom: none;
}

.order-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.order-icon.buy { background: rgba(14,203,129,0.15); color: var(--green); }
.order-icon.sell { background: rgba(246,70,93,0.15); color: var(--red); }

.order-info .order-type {
    font-size: 0.9rem;
    font-weight: 600;
}

.order-info .order-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.order-right {
    text-align: right;
}

.order-amount {
    font-size: 0.9rem;
    font-weight: 600;
}

.order-amount.positive { color: var(--green); }
.order-amount.negative { color: var(--red); }

.order-coins {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ---- ALERT ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(14,203,129,0.15); color: var(--green); border: 1px solid rgba(14,203,129,0.3); }
.alert-error { background: rgba(246,70,93,0.15); color: var(--red); border: 1px solid rgba(246,70,93,0.3); }
.alert-info { background: rgba(30,128,255,0.15); color: var(--blue); border: 1px solid rgba(30,128,255,0.3); }
.alert-warning { background: rgba(240,185,11,0.15); color: var(--accent); border: 1px solid rgba(240,185,11,0.3); }

/* ---- PIN INPUT ---- */
.pin-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}

.pin-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.pin-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240,185,11,0.2);
}

/* ---- OTP INPUT ---- */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.otp-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.otp-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,128,255,0.2);
}

/* ---- CHAT ---- */
.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.chat-message {
    display: flex;
    margin-bottom: 10px;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.admin {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
}

.chat-message.user .chat-bubble {
    background: var(--accent);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-message.admin .chat-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

.chat-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
}

.chat-input-area .btn {
    width: auto;
    padding: 12px 20px;
}

/* ---- PROFILE ---- */
.profile-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--green));
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #000;
    font-weight: 800;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.profile-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.profile-menu-item:hover {
    border-color: var(--accent);
}

.profile-menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-menu-left i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
}

.profile-menu-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-menu-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--border);
}

.empty-state p {
    font-size: 0.9rem;
}

/* ---- AUTH PAGES ---- */
.auth-container {
    padding: 40px 20px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.auth-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

/* ---- DEPOSIT PAGE ---- */
.deposit-method {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.deposit-method .method-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.85rem;
}

.deposit-method .method-btn.active,
.deposit-method .method-btn:hover {
    border-color: var(--accent);
    background: rgba(240,185,11,0.1);
    color: var(--accent);
}

.qr-code-box {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    margin: 16px 0;
}

.qr-code-box img {
    width: 180px;
    height: 180px;
}

.copy-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 10px 0;
}

.copy-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: monospace;
}

.copy-box button {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

/* ---- WITHDRAWAL ---- */
.withdraw-info-card {
    background: linear-gradient(135deg, rgba(14,203,129,0.1), rgba(240,185,11,0.05));
    border: 1px solid rgba(14,203,129,0.2);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

/* ---- HELP PAGE ---- */
.help-item {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.help-item:hover {
    border-color: var(--accent);
}

.help-item .help-q {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.help-item .help-a {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: none;
    line-height: 1.5;
}

.help-item.open .help-a {
    display: block;
}

/* ---- TABLE (Admin) ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

/* ---- ADMIN ---- */
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    width: 240px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: var(--transition);
}

.admin-sidebar.open {
    transform: translateX(0);
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-sidebar-header h2 {
    font-size: 1rem;
    color: var(--accent);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: var(--bg-card);
    color: var(--accent);
    border-left-color: var(--accent);
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-main {
    padding: 20px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.admin-hamburger {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    display: none;
}

.admin-overlay.show {
    display: block;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.admin-stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.admin-stat-card .stat-num {
    font-size: 1.5rem;
    font-weight: 800;
}

.admin-stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ---- RESPONSIVE ---- */
@media (min-width: 481px) {
    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

/* ---- LOADING ---- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
    display: none;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

/* ---- MARQUEE ---- */
.marquee-bar {
    background: rgba(240,185,11,0.1);
    border: 1px solid rgba(240,185,11,0.2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 16px;
    overflow: hidden;
    font-size: 0.8rem;
    color: var(--accent);
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--green);
}

.toggle-switch input: checked + .toggle-slider::before {
    transform: translateX(20px);
}

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

/* Flex utils */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 0.8rem; }

/* =============================================
   BUY/SELL MARKETPLACE STYLES
   ============================================= */

/* Wallet Mini Card */
.wallet-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.wallet-mini-row {
    display: flex;
    justify-content: space-between;
}

.wallet-mini-item {
    text-align: center;
}

.wm-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.wm-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Market Tabs */
.market-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.market-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.market-tab.active {
    border-color: var(--accent);
    background: rgba(240,185,11,0.08);
    color: var(--accent);
}

.market-tab:hover {
    border-color: var(--accent);
}

/* Section Tabs (Small/Medium/Large) */
.section-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.section-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.section-tab .tab-range {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

.section-tab.active {
    border-color: var(--blue);
    background: rgba(30,128,255,0.08);
    color: var(--blue);
}

.section-tab:hover {
    border-color: var(--blue);
}

/* Refresh Info */
.refresh-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(30,128,255,0.08);
    border: 1px solid rgba(30,128,255,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.refresh-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

/* Trade Boxes Grid */
.trade-boxes-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 360px) {
    .trade-boxes-container {
        grid-template-columns: 1fr;
    }
}

/* Trade Box Card */
.trade-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.trade-box:hover {
    border-color: rgba(14,203,129,0.5);
    box-shadow: 0 4px 15px rgba(14,203,129,0.1);
    transform: translateY(-2px);
}

.trade-box.disabled {
    opacity: 0.55;
}

.trade-box.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.trade-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px;
}

.trade-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.trade-profit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(14,203,129,0.15);
    color: var(--green);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.trade-box-body {
    padding: 0 12px 8px;
    flex: 1;
}

.trade-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.75rem;
}

.trade-label {
    color: var(--text-muted);
}

.trade-value {
    font-weight: 600;
    color: var(--text-primary);
}

.trade-detail-row.highlight {
    background: rgba(240,185,11,0.05);
    margin: 4px -12px;
    padding: 6px 12px;
    border-radius: 6px;
}

.total-return {
    color: var(--accent) !important;
    font-size: 0.9rem;
    font-weight: 800;
}

.trade-box-footer {
    padding: 8px 12px 12px;
}

.btn-trade-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-trade-buy:hover {
    box-shadow: 0 4px 12px rgba(14,203,129,0.4);
    transform: scale(1.02);
}

.btn-trade-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: not-allowed;
}

/* Trade Summary Card (confirm page) */
.trade-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.trade-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, rgba(30,128,255,0.1), rgba(168,85,247,0.05));
    border-bottom: 1px solid var(--border);
}

.trade-summary-cat {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.trade-summary-body {
    padding: 16px;
}

.trade-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.trade-summary-row.total {
    padding: 12px 0;
}

.trade-summary-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Input with suffix */
.input-with-suffix {
    position: relative;
}

.input-with-suffix .form-control {
    padding-right: 60px;
}

.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-amt-btn {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.quick-amt-btn:hover,
.quick-amt-btn.selected {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(240,185,11,0.1);
}

/* USDT Conversion Preview */
.conversion-preview {
    margin: 16px 0;
}

.conv-arrow {
    text-align: center;
    padding: 8px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.conv-result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.conv-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}

.conv-label {
    color: var(--text-muted);
}

.conv-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* USDT Balance Display */
.usdt-balance-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: rgba(14,203,129,0.08);
    border: 1px solid rgba(14,203,129,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.usdt-bal-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.usdt-bal-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--green);
}

/* Sell Balance Card */
.sell-balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.sell-bal-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sell-bal-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sell-bal-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sell-bal-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.sell-total-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(240,185,11,0.08);
    border: 1px solid rgba(240,185,11,0.2);
    border-radius: var(--radius-sm);
}

.sell-tv-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sell-tv-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
}

/* Sell Preview */
.sell-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 12px;
}

.sell-prev-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sell-prev-row.total {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
    font-size: 1rem;
}

/* =============================================
   CHAT POPUP STYLES
   ============================================= */

.chat-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.chat-popup-overlay.active {
    display: flex;
}

.chat-popup {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-popup-dot {
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.chat-popup-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.chat-popup-close:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.chat-popup-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-msg {
    display: flex;
    max-width: 85%;
}

.chat-msg.user {
    align-self: flex-end;
}

.chat-msg.admin {
    align-self: flex-start;
}

.chat-msg.system {
    align-self: center;
    max-width: 90%;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.chat-msg.user .chat-msg-bubble {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-msg.admin .chat-msg-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-msg.system .chat-msg-bubble {
    background: rgba(30,128,255,0.1);
    color: var(--blue);
    border: 1px solid rgba(30,128,255,0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 12px;
}

.chat-msg-text {
    display: block;
}

.chat-msg-time {
    display: block;
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.chat-img-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 4px 0;
}

.chat-popup-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.chat-popup-input input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}

.chat-popup-input input[type="text"]:focus {
    border-color: var(--accent);
}

.chat-img-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-img-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-send-btn:hover {
    box-shadow: 0 2px 10px rgba(240,185,11,0.4);
    transform: scale(1.05);
}

/* =============================================
   PENDING TRADE ANIMATION STYLES
   ============================================= */

.pending-trade-status {
    text-align: center;
    padding: 30px 20px;
}

.pending-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pending-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spinRing 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px; height: 80px;
    border-top-color: var(--accent);
    animation-duration: 2s;
}

.spinner-ring:nth-child(2) {
    width: 60px; height: 60px;
    border-right-color: var(--blue);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px; height: 40px;
    border-bottom-color: var(--green);
    animation-duration: 1s;
}

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

.spinner-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: pulse 1.5s infinite;
    z-index: 1;
}

.pending-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.pending-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 280px;
}

.pending-dots {
    display: flex;
    gap: 6px;
}

.pending-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.pending-dots span:nth-child(1) { animation-delay: 0s; }
.pending-dots span:nth-child(2) { animation-delay: 0.16s; }
.pending-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.pending-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.success-check {
    font-size: 4rem;
    color: var(--green);
    animation: successPop 0.6s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.declined-x {
    font-size: 4rem;
    color: var(--red);
    animation: successPop 0.6s ease-out;
}

/* =============================================
   NOTIFICATION STYLES
   ============================================= */

.admin-notif-bell {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.admin-notif-bell:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--red);
    color: #fff;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Notification Panel */
.notif-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
    display: none;
}

.notif-panel-overlay.show {
    display: block;
}

.notif-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 300;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notif-panel.open {
    right: 0;
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notif-item:hover {
    background: var(--bg-card);
}

.notif-item.unread {
    background: rgba(240,185,11,0.04);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-msg {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Full page notification items */
.notif-item-full {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
    transition: var(--transition);
}

.notif-item-full:hover {
    border-color: var(--accent);
}

.notif-item-full.unread {
    border-left: 4px solid var(--accent);
    background: rgba(240,185,11,0.04);
}

.notif-icon-full {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notif-content-full {
    flex: 1;
}

.notif-title-full {
    font-size: 0.9rem;
    font-weight: 600;
}

.notif-msg-full {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notif-time-full {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}
/* =============================================
   CHAT POPUP (USER + ADMIN)
   ============================================= */

.chat-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.chat-popup-overlay.active {
    display: flex;
}

.chat-popup {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-popup-dot {
    width: 10px; height: 10px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.chat-popup-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem;
    transition: var(--transition);
}

.chat-popup-close:hover {
    background: var(--red); color: #fff; border-color: var(--red);
}

.chat-popup-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chat-msg {
    display: flex;
    max-width: 85%;
}

.chat-msg.user { align-self: flex-end; }
.chat-msg.admin { align-self: flex-start; }
.chat-msg.system { align-self: center; max-width: 90%; }

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg.user .chat-msg-bubble {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-msg.admin .chat-msg-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-msg.system .chat-msg-bubble {
    background: rgba(30,128,255,0.1);
    color: var(--blue);
    border: 1px solid rgba(30,128,255,0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 12px;
}

.chat-sender-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-sender-label.admin-label { color: var(--red); }
.chat-sender-label.user-label { color: var(--blue); }

.chat-msg-text { display: block; }

.chat-msg-time {
    display: block;
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.chat-img-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 4px 0;
}

.chat-popup-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.chat-popup-input input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}

.chat-popup-input input[type="text"]:focus {
    border-color: var(--accent);
}

.chat-img-btn, .chat-send-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition);
    border: none;
}

.chat-img-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.chat-img-btn:hover { color: var(--accent); border-color: var(--accent); }

.chat-send-btn {
    background: var(--accent);
    color: #000;
}

.chat-send-btn:hover {
    box-shadow: 0 2px 10px rgba(240,185,11,0.4);
    transform: scale(1.05);
}

/* =============================================
   PENDING TRADE ANIMATION
   ============================================= */

.pending-trade-status {
    text-align: center;
    padding: 30px 20px;
}

.pending-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pending-spinner {
    position: relative;
    width: 100px; height: 100px;
    display: flex; align-items: center; justify-content: center;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spinRing 2s linear infinite;
}

.spinner-ring:nth-child(1) { width:80px;height:80px;border-top-color:var(--accent);animation-duration:2s; }
.spinner-ring:nth-child(2) { width:60px;height:60px;border-right-color:var(--blue);animation-duration:1.5s;animation-direction:reverse; }
.spinner-ring:nth-child(3) { width:40px;height:40px;border-bottom-color:var(--green);animation-duration:1s; }

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

.spinner-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: pulse 1.5s infinite;
    z-index: 1;
}

.pending-title { font-size: 1.3rem; font-weight: 800; }
.pending-desc { font-size: 0.85rem; color: var(--text-secondary); max-width: 280px; }

.pending-dots { display: flex; gap: 6px; }
.pending-dots span {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}
.pending-dots span:nth-child(1) { animation-delay: 0s; }
.pending-dots span:nth-child(2) { animation-delay: 0.16s; }
.pending-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.pending-note {
    font-size: 0.8rem; color: var(--text-muted);
    background: var(--bg-card); padding: 8px 14px;
    border-radius: 8px; border: 1px solid var(--border);
}

.success-check { font-size: 4rem; color: var(--green); animation: successPop 0.6s ease-out; }
.declined-x { font-size: 4rem; color: var(--red); animation: successPop 0.6s ease-out; }

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* =============================================
   NOTIFICATION SYSTEM
   ============================================= */

.admin-notif-bell {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.admin-notif-bell:hover { color: var(--accent); border-color: var(--accent); }

.notif-count {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    background: var(--red);
    color: #fff;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notif-panel-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
    display: none;
}

.notif-panel-overlay.show { display: block; }

.notif-panel {
    position: fixed; top: 0;
    right: -340px;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 300;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notif-panel.open { right: 0; }

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notif-panel-body { flex: 1; overflow-y: auto; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { background: rgba(240,185,11,0.04); }

.notif-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--accent);
}

.notif-content { flex: 1; min-width: 0; }

.notif-title {
    font-size: 0.8rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.notif-msg {
    font-size: 0.7rem; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.notif-time { font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }

.notif-unread-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.notif-item-full {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.notif-item-full:hover { border-color: var(--accent); }
.notif-item-full.unread { border-left: 4px solid var(--accent); background: rgba(240,185,11,0.04); }

.notif-icon-full {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--accent);
}

.notif-content-full { flex: 1; }
.notif-title-full { font-size: 0.9rem; font-weight: 600; }
.notif-msg-full { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.notif-time-full { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* Withdrawal item wrapper */
.withdrawal-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.withdrawal-item:last-child {
    border-bottom: none;
}
/* ===== Trade Box - Needs Deposit Style ===== */
.trade-box.needs-deposit {
    opacity: 1;
    cursor: pointer;
}

.trade-box.needs-deposit:hover {
    border-color: rgba(240,185,11,0.5);
    box-shadow: 0 4px 15px rgba(240,185,11,0.1);
    transform: translateY(-2px);
}

.btn-trade-deposit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-trade-deposit:hover {
    box-shadow: 0 4px 12px rgba(240,185,11,0.4);
    transform: scale(1.02);
}