/* ============================================================
   CryptoTrade Pro - Main Stylesheet
   Dark trading platform theme (Binance/Binomo hybrid)
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --bg-primary: #0B0E11;
    --bg-secondary: #161A1E;
    --bg-tertiary: #1E2329;
    --bg-hover: #2B3139;
    --border-color: #2B3139;
    --text-primary: #EAECEF;
    --text-secondary: #848E9C;
    --text-muted: #5E6673;
    --gold: #F0B90B;
    --gold-dark: #d4a409;
    --green: #0ECB81;
    --green-dim: rgba(14,203,129,.15);
    --red: #F6465D;
    --red-dim: rgba(246,70,93,.15);
    --blue: #1890FF;
    --purple: #7B68EE;
    --cyan: #00D2FF;
    --tp-green: #00C896;
    --tp-red:   #FF4560;
    --font-mono: 'Roboto Mono', 'Consolas', monospace;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 4px 30px rgba(0,0,0,.45);
    --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
    --glow-gold: 0 0 20px rgba(240,185,11,.35);
    --glow-green: 0 0 20px rgba(14,203,129,.35);
    --transition: .2s ease;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--gold);
    color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #3D4452;
    }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}

    a:hover {
        color: var(--gold-dark);
    }

img {
    max-width: 100%;
    display: block;
}

code, .mono {
    font-family: var(--font-mono);
}

/* ---------- Typography ---------- */
.gradient-text {
    background: linear-gradient(135deg, var(--gold) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--gold) !important;
}

.text-green {
    color: var(--green) !important;
}

.text-red {
    color: var(--red) !important;
}

.text-mono {
    font-family: var(--font-mono);
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ---------- Buttons ---------- */
.btn-gold {
    background: var(--gold);
    color: #000;
    border: none;
    font-weight: 700;
    border-radius: var(--radius);
    padding: .55rem 1.5rem;
    transition: all var(--transition);
    cursor: pointer;
}

    .btn-gold:hover {
        background: var(--gold-dark);
        color: #000;
        box-shadow: var(--glow-gold);
        transform: translateY(-1px);
    }

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius);
    padding: .5rem 1.4rem;
    font-weight: 600;
    transition: all var(--transition);
}

    .btn-outline-gold:hover {
        background: var(--gold);
        color: #000;
        box-shadow: var(--glow-gold);
    }

.btn-green {
    background: var(--green);
    color: #000;
    border: none;
    font-weight: 700;
    border-radius: var(--radius);
    padding: .55rem 1.5rem;
    transition: all var(--transition);
}

    .btn-green:hover {
        background: #0ab86f;
        color: #000;
        box-shadow: var(--glow-green);
    }

.btn-red {
    background: var(--red);
    color: #fff;
    border: none;
    font-weight: 700;
    border-radius: var(--radius);
    padding: .55rem 1.5rem;
    transition: all var(--transition);
}

    .btn-red:hover {
        background: #dd3a52;
        color: #fff;
    }

/* ---------- Cards ---------- */
.card-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

    .card-dark:hover {
        border-color: #3D4452;
        box-shadow: var(--shadow-sm);
    }

.glass-card {
    background: rgba(22,26,30,.8);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg,var(--gold),var(--cyan));
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
    }

    .stat-card .stat-value {
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .stat-card .stat-label {
        color: var(--text-secondary);
        font-size: .82rem;
        margin-top: 4px;
    }

    .stat-card .stat-change {
        font-size: .8rem;
        font-weight: 600;
    }

/* ---------- Navbar / Top Bar ---------- */
.navbar-main {
    background: rgba(11,14,17,.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: .8rem 0;
    transition: background .3s;
    position: sticky;
    top: 0;
    z-index: 1000;
}

    .navbar-main .navbar-brand {
        font-size: 1.35rem;
        font-weight: 800;
    }

    .navbar-main .nav-link {
        color: var(--text-secondary) !important;
        font-size: .9rem;
        font-weight: 500;
        padding: .3rem .75rem !important;
        border-radius: 6px;
        transition: all var(--transition);
    }

        .navbar-main .nav-link:hover,
        .navbar-main .nav-link.active {
            color: var(--text-primary) !important;
            background: rgba(255,255,255,.05);
        }

/* Price ticker in navbar */
.price-ticker-strip {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-inner {
    display: inline-flex;
    gap: 40px;
    animation: tickerScroll 60s linear infinite;
}

    .ticker-inner:hover {
        animation-play-state: paused;
    }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
}

    .ticker-item .pair-name {
        color: var(--text-secondary);
    }

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ---------- Hero Section ---------- */
.hero-section {
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0 60px;
}

    .hero-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(240,185,11,.08) 0%, transparent 70%), radial-gradient(ellipse 50% 50% at 10% 80%, rgba(0,210,255,.06) 0%, transparent 60%);
        pointer-events: none;
    }

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(43,49,57,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(43,49,57,.4) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: .4;
    pointer-events: none;
}

.hero-heading {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.8;
}

/* ── Hero chart fixed wrapper — prevents Chart.js grow loop ── */
.hero-card-wrapper {
    position: relative;
    min-height: 420px;
    overflow: visible;
}

.hero-chart-wrap {
    position: relative;
    height: 115px;
    width: 100%;
}

.hero-float-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    animation: floatY 4s ease-in-out infinite;
}

    .hero-float-card:nth-child(2) {
        animation-delay: -2s;
    }

    .hero-float-card:nth-child(3) {
        animation-delay: -1s;
    }

    .hero-float-card .coin-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: .95rem;
        flex-shrink: 0;
    }

@keyframes floatY {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.badge-live {
    background: rgba(14,203,129,.15);
    color: var(--green);
    border: 1px solid rgba(14,203,129,.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .badge-live::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--green);
        animation: pulse 1.5s infinite;
    }

@keyframes pulse {
    0%,100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(1.5);
    }
}

/* ---------- Sections ---------- */
.section-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
}

.section-title {
    font-size: clamp(1.7rem,3vw,2.5rem);
    font-weight: 800;
}

.section-sub {
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.8;
}

section {
    padding: 80px 0;
}

/* ---------- Features ---------- */
.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    height: 100%;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

    .feature-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,var(--gold),var(--cyan));
        transform: scaleX(0);
        transition: transform .3s;
        transform-origin: left;
    }

    .feature-card:hover {
        border-color: #3D4452;
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

        .feature-card:hover::after {
            transform: scaleX(1);
        }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: rgba(240,185,11,.1);
    color: var(--gold);
}

/* ---------- Trading Pairs Table ---------- */
.pairs-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    /* padding inherited from section { padding: 80px 0 } and its responsive rules */
}

.pairs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .pairs-table thead th {
        background: var(--bg-tertiary);
        color: var(--text-secondary);
        font-size: .75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .pairs-table tbody tr {
        transition: background var(--transition);
        cursor: pointer;
    }

        .pairs-table tbody tr:hover td {
            background: var(--bg-hover);
        }

    .pairs-table td {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(43,49,57,.6);
        font-size: .9rem;
    }

.pair-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.pair-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-flash-up {
    animation: flashUp .5s ease;
}

.price-flash-down {
    animation: flashDown .5s ease;
}

@keyframes flashUp {
    0%,100% {
        background: transparent
    }

    50% {
        background: rgba(14,203,129,.15)
    }
}

@keyframes flashDown {
    0%,100% {
        background: transparent
    }

    50% {
        background: rgba(246,70,93,.15)
    }
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #151a20 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}

.stat-item {
    text-align: center;
}

    .stat-item .num {
        font-size: 2rem;
        font-weight: 800;
        color: var(--gold);
    }

    .stat-item .lbl {
        font-size: .8rem;
        color: var(--text-secondary);
        margin-top: 3px;
    }

/* ---------- Testimonials ---------- */
.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
}

.testimonial-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--gold),var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
    flex-shrink: 0;
}

.stars {
    color: var(--gold);
    font-size: .9rem;
    letter-spacing: 2px;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: .9rem;
}

    .footer-links a:hover {
        color: var(--gold);
    }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    transition: all var(--transition);
    font-size: .95rem;
}

    .social-links a:hover {
        background: var(--gold);
        color: #000;
    }

/* ---------- Modals ---------- */
.modal-dark .modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.modal-dark .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-dark .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
}

.modal-dark .modal-body {
    padding: 24px;
}

.modal-dark .btn-close {
    filter: invert(1) grayscale(1);
    opacity: .6;
}

    .modal-dark .btn-close:hover {
        opacity: 1;
    }

/* ---------- Forms ---------- */
.form-dark .form-label {
    color: var(--text-secondary);
    font-size: .88rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-dark .form-control,
.form-dark .form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: .6rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

    .form-dark .form-control:focus,
    .form-dark .form-select:focus {
        background: var(--bg-tertiary);
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(240,185,11,.15);
        color: var(--text-primary);
        outline: none;
    }

    .form-dark .form-control::placeholder {
        color: var(--text-muted);
    }

.form-dark .input-group-text {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ---------- Dashboard Layout ---------- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width .3s;
}

    .sidebar.collapsed {
        width: 70px;
    }

.sidebar-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Brand link inside sidebar header — force true horizontal alignment */
.sidebar-header > a,
.admin-sidebar-header > a {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    line-height: 1;
}

/* Icon badge — prevent any vertical drift */
.sidebar-header > a > span:first-child,
.admin-sidebar-header > a > span:first-child {
    flex-shrink: 0;
    align-self: center;
}

/* Gradient text — -webkit-text-fill-color:transparent shifts baseline on Windows;
   force a stable line-height to keep it perfectly centred next to the icon */
.sidebar-header .gradient-text,
.admin-sidebar-header .gradient-text {
    line-height: 1.2;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

    .sidebar-nav .nav-item {
        margin: 2px 10px;
    }

    .sidebar-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-secondary);
        border-radius: var(--radius);
        padding: 10px 14px;
        font-size: .9rem;
        font-weight: 500;
        transition: all var(--transition);
        white-space: nowrap;
    }

        .sidebar-nav .nav-link:hover {
            background: rgba(255,255,255,.05);
            color: var(--text-primary);
        }

        .sidebar-nav .nav-link.active {
            background: rgba(240,185,11,.12);
            color: var(--gold);
        }

        .sidebar-nav .nav-link svg, .sidebar-nav .nav-link i {
            flex-shrink: 0;
            font-size: 1.1rem;
            width: 20px;
            text-align: center;
        }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-content {
    flex: 1;
    padding: 24px;
}

/* balance overview card */
.balance-card {
    background: linear-gradient(135deg, #1a1f26 0%, #0f1317 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

    .balance-card::before {
        content: '';
        position: absolute;
        top: -40px;
        right: -40px;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(240,185,11,.12) 0%, transparent 70%);
    }

/* ---------- Tables ---------- */
.table-dark-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table-dark-custom th {
        background: var(--bg-tertiary);
        color: var(--text-secondary);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 12px 16px;
        font-weight: 600;
        border-bottom: 1px solid var(--border-color);
    }

    .table-dark-custom td {
        padding: 13px 16px;
        border-bottom: 1px solid rgba(43,49,57,.6);
        vertical-align: middle;
        font-size: .9rem;
    }

    .table-dark-custom tr:last-child td {
        border-bottom: none;
    }

    .table-dark-custom tbody tr:hover td {
        background: rgba(255,255,255,.02);
    }

/* ---------- Badges ---------- */
.badge-pending {
    background: rgba(240,185,11,.15);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-approved {
    background: rgba(14,203,129,.15);
    color: var(--green);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-rejected {
    background: rgba(246,70,93,.15);
    color: var(--red);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-open {
    background: rgba(24,144,255,.15);
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-won {
    background: rgba(14,203,129,.15);
    color: var(--green);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-lost {
    background: rgba(246,70,93,.15);
    color: var(--red);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(14,203,129,.15);
    color: var(--green);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-banned {
    background: rgba(246,70,93,.15);
    color: var(--red);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-admin {
    background: rgba(123,104,238,.15);
    color: var(--purple);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

.badge-cancelled {
    background: rgba(132,142,156,.15);
    color: #848E9C;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
}

/* Alert bar (settings page flash messages) */
.alert-bar {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-bar.alert-success {
    background: rgba(14,203,129,.1);
    border: 1px solid rgba(14,203,129,.3);
    color: var(--green);
}

.alert-bar.alert-danger {
    background: rgba(246,70,93,.1);
    border: 1px solid rgba(246,70,93,.3);
    color: var(--red);
}

/* ---------- Trading Page ---------- */

/* Action bar row wrappers — display:contents on desktop so they're invisible to flexbox */
.tab-amount-row,
.tab-action-row {
    display: contents;
}

.trading-layout {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.chart-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

.chart-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.chart-container {
    flex: 1;
    padding: 10px;
}

.trade-panel {
    width: 310px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow-y: auto;
}

.trade-panel-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

    .trade-panel-section h6 {
        color: var(--text-secondary);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 12px;
    }

.direction-btn {
    flex: 1;
    padding: 18px 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

    .direction-btn.up {
        color: var(--green);
    }

    .direction-btn.down {
        color: var(--red);
    }

    .direction-btn.up.selected, .direction-btn.up:hover {
        background: var(--green-dim);
        border-color: var(--green);
        box-shadow: 0 0 16px rgba(14,203,129,.2);
    }

    .direction-btn.down.selected, .direction-btn.down:hover {
        background: var(--red-dim);
        border-color: var(--red);
        box-shadow: 0 0 16px rgba(246,70,93,.2);
    }

    .direction-btn .arrow {
        font-size: 1.5rem;
        line-height: 1;
    }

.countdown-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pairs list in trade panel */
.pair-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

    .pair-item:hover {
        background: var(--bg-hover);
    }

    .pair-item.active {
        background: rgba(240,185,11,.1);
    }

/* ========== Trading Page — Redesigned Components ========== */

/* Design tokens scoped to the trading layout */
.trading-layout {
    --tp-green:       #00C896;
    --tp-red:         #FF4560;
    --tp-gold:        #F59E0B;
    --tp-gold-hover:  #D97706;
    --tp-bg-card:     #1F2937;
    --tp-border:      #374151;
    --tp-text:        #F9FAFB;
    --tp-text-muted:  #9CA3AF;
    --tp-text-dim:    #6B7280;
    --tp-radius-sm:   8px;
    --tp-radius:      12px;
    --tp-radius-pill: 999px;
    --tp-space:       16px;
}

/* ---- Pair Tabs ---- */
.tp-pair-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--tp-border);
    flex-shrink: 0;
    background: var(--bg-secondary);
}
.tp-pair-tabs::-webkit-scrollbar { display: none; }

.tp-pair-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 44px;
    white-space: nowrap;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--tp-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    flex-shrink: 0;
}
.tp-pair-tab:hover {
    color: var(--tp-text);
    background: rgba(255,255,255,.04);
}
.tp-pair-tab.active {
    color: var(--tp-gold);
    border-bottom-color: var(--tp-gold);
    background: rgba(245,158,11,.07);
    font-weight: 700;
}
.tp-sym {
    font-size: 15px;
    font-weight: 800;
}

/* ---- Control Bar ---- */
.tp-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--tp-space);
    border-bottom: 1px solid var(--tp-border);
    gap: 12px;
    flex-shrink: 0;
    min-height: 52px;
    background: var(--bg-primary);
}
.tp-live-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}
.tp-cur-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text-muted);
    white-space: nowrap;
}
.tp-price-big {
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-green);
}
.tp-change-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--tp-radius-pill);
    background: rgba(0,200,150,.15);
    color: var(--tp-green);
    white-space: nowrap;
}
.tp-change-pill.down {
    background: rgba(255,69,96,.15);
    color: var(--tp-red);
}

/* Timeframe buttons — all 5 must fit in one row */
.tp-tf-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.tp-tf-btn {
    height: 32px;
    min-width: 40px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: transparent;
    color: var(--tp-text-dim);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.tp-tf-btn:hover { color: var(--tp-text); border-color: var(--tp-text-muted); }
.tp-tf-btn.active {
    background: var(--tp-gold);
    border-color: var(--tp-gold);
    color: #000;
    font-weight: 700;
}

/* ---- Trade Panel Sections ---- */
.tp-sec {
    padding: var(--tp-space);
    border-bottom: 1px solid var(--tp-border);
}
.tp-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--tp-text-dim);
    margin-bottom: 6px;
    display: block;
}

/* Balance */
.tp-balance-sec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.tp-bal-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--tp-gold);
    line-height: 1.2;
    margin-top: 2px;
}
.tp-deposit-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: var(--tp-green);
    color: #fff;
    border-radius: var(--tp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
    flex-shrink: 0;
}
.tp-deposit-btn:hover { opacity: .85; color: #fff; }

/* Payout */
.tp-payout-sec {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tp-payout-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid var(--tp-gold);
    background: rgba(245,158,11,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tp-payout-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--tp-gold);
}
.tp-payout-desc {
    font-size: 12px;
    color: var(--tp-text-muted);
    margin-top: 4px;
}

/* Direction Tabs: BUY / SELL */
.tp-dir-tabs {
    display: flex;
    gap: 8px;
    padding: 12px var(--tp-space);
    border-bottom: 1px solid var(--tp-border);
}
.tp-dir-tab {
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    /* override direction-btn column layout */
    flex-direction: row !important;
    padding: 0 12px !important;
}
.tp-dir-tab.up { color: var(--tp-green); }
.tp-dir-tab.down { color: var(--tp-red); }
.tp-dir-tab.up.selected, .tp-dir-tab.up:hover {
    background: rgba(0,200,150,.18) !important;
    border-color: var(--tp-green) !important;
    box-shadow: 0 0 12px rgba(0,200,150,.15);
}
.tp-dir-tab.down.selected, .tp-dir-tab.down:hover {
    background: rgba(255,69,96,.18) !important;
    border-color: var(--tp-red) !important;
    box-shadow: 0 0 12px rgba(255,69,96,.15);
}

/* Amount Field */
.tp-amount-field {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg-card);
    overflow: hidden;
    transition: border-color .15s;
}
.tp-amount-field:focus-within { border-color: var(--tp-gold); }
.tp-amount-pre,
.tp-amount-suf {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 14px;
    color: var(--tp-text-dim);
    background: rgba(255,255,255,.03);
    white-space: nowrap;
    user-select: none;
}
.tp-amount-inp {
    flex: 1;
    height: 52px;
    background: transparent;
    border: none;
    color: var(--tp-text);
    font-size: 18px;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
    padding: 0 10px;
    outline: none;
    min-width: 0;
}
.tp-amount-inp::-webkit-outer-spin-button,
.tp-amount-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tp-amount-inp[type=number] { -moz-appearance: textfield; }

/* Quick Amount Pills */
.tp-pill-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tp-pill {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-pill);
    background: transparent;
    color: var(--tp-text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    white-space: nowrap;
}
.tp-pill:hover, .tp-pill.active {
    background: var(--tp-gold);
    border-color: var(--tp-gold);
    color: #000;
    font-weight: 600;
}
.tp-pill:active { transform: scale(.95); }
.tp-pill-max { border-color: var(--tp-text-dim); color: var(--tp-text-dim); }
.tp-min-max {
    font-size: 11px;
    color: var(--tp-text-dim);
    margin-top: 8px;
}

/* Returns */
.tp-return-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Place Trade Button */
.tp-place-btn {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-gold);
    color: #000;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    border: none;
    border-radius: var(--tp-radius);
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.tp-place-btn:hover { background: var(--tp-gold-hover); }
.tp-place-btn:active { transform: scale(.97); }
.tp-place-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Trade Tabs (Open / History) */
.tp-trade-tabs {
    display: flex;
    padding: 0 var(--tp-space);
    border-bottom: 1px solid var(--tp-border);
    gap: 0;
}
.tp-trade-tabs .nav-link {
    font-size: 13px;
    padding: 10px 14px;
    color: var(--tp-text-dim);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    border-radius: 0;
    transition: color .15s, border-color .15s;
}
.tp-trade-tabs .nav-link.active {
    color: var(--tp-gold);
    border-bottom-color: var(--tp-gold);
    background: transparent;
}
.tp-table-wrap {
    max-height: 200px;
    overflow-y: auto;
}
.tp-trade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.tp-trade-table thead tr { background: var(--tp-bg-card); }
.tp-trade-table th,
.tp-trade-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--tp-border);
    white-space: nowrap;
}
.tp-trade-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--tp-text-dim);
    letter-spacing: .5px;
}

/* Open count badge */
.tp-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--tp-gold);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--tp-radius-pill);
    margin-left: 4px;
    vertical-align: middle;
}

/* Pair icon in market list */
.pair-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* ---------- Admin Panel ---------- */
.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border-color);
}

.admin-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin: 2px 10px;
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
}

    .admin-nav .nav-link:hover {
        background: rgba(255,255,255,.05);
        color: var(--text-primary);
    }

    .admin-nav .nav-link.active {
        background: rgba(240,185,11,.12);
        color: var(--gold);
        border-left: 3px solid var(--gold);
        padding-left: 13px;
    }

.admin-nav .nav-section {
    color: var(--text-muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 14px 16px 4px;
}

.admin-topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-content {
    padding: 24px;
}

/* Action buttons in tables */
.btn-action {
    padding: 4px 12px;
    font-size: .78rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}

.btn-action-green {
    background: rgba(14,203,129,.15);
    color: var(--green);
}

    .btn-action-green:hover {
        background: var(--green);
        color: #000;
    }

.btn-action-red {
    background: rgba(246,70,93,.15);
    color: var(--red);
}

    .btn-action-red:hover {
        background: var(--red);
        color: #fff;
    }

.btn-action-blue {
    background: rgba(24,144,255,.15);
    color: var(--blue);
}

    .btn-action-blue:hover {
        background: var(--blue);
        color: #fff;
    }

.btn-action-gold {
    background: rgba(240,185,11,.15);
    color: var(--gold);
}

    .btn-action-gold:hover {
        background: var(--gold);
        color: #000;
    }

/* ---------- Pagination ---------- */
.pagination-dark .page-link {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
}

    .pagination-dark .page-link:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
        border-color: var(--border-color);
    }

.pagination-dark .page-item.active .page-link {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

.pagination-dark .page-item.disabled .page-link {
    opacity: .4;
}

/* ---------- Alert / Notifications ---------- */
.alert-dark-custom {
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
}

.alert-success-custom {
    background: rgba(14,203,129,.1);
    border: 1px solid rgba(14,203,129,.3);
    color: var(--green);
}

.alert-danger-custom {
    background: rgba(246,70,93,.1);
    border: 1px solid rgba(246,70,93,.3);
    color: var(--red);
}

.alert-warning-custom {
    background: rgba(240,185,11,.1);
    border: 1px solid rgba(240,185,11,.3);
    color: var(--gold);
}

.alert-info-custom {
    background: rgba(24,144,255,.1);
    border: 1px solid rgba(24,144,255,.3);
    color: var(--blue);
}

/* ---------- Deposit/Withdraw Tabs ---------- */
.dep-tabs .nav-link {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 10px 24px;
    font-weight: 600;
}

    .dep-tabs .nav-link.active {
        background: var(--bg-secondary);
        color: var(--gold);
        border-bottom-color: var(--bg-secondary);
    }

/* Wallet address copy box */
.wallet-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: .85rem;
    word-break: break-all;
}

/* ---------- Profile Page ---------- */
.avatar-upload {
    position: relative;
    width: 90px;
    cursor: pointer;
}

    .avatar-upload img {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid var(--border-color);
    }

    .avatar-upload .overlay {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: rgba(0,0,0,.5);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity var(--transition);
        font-size: 1.3rem;
    }

    .avatar-upload:hover .overlay {
        opacity: 1;
    }

/* ---------- Charts ---------- */
.chart-wrapper {
    position: relative;
}

/* ============================================================
   ANIMATIONS & SCROLL-REVEAL
   ============================================================ */

/* Fade-in-up: applied by JS observer */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity .65s ease, transform .65s ease;
}

    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity .65s ease, transform .65s ease;
}

    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
/* Stagger delay helpers */
.reveal-d1 {
    transition-delay: .1s !important;
}

.reveal-d2 {
    transition-delay: .2s !important;
}

.reveal-d3 {
    transition-delay: .3s !important;
}

.reveal-d4 {
    transition-delay: .4s !important;
}

.reveal-d5 {
    transition-delay: .5s !important;
}

.reveal-d6 {
    transition-delay: .6s !important;
}

/* Shimmer glow on gold elements */
@keyframes shimmerGold {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--gold) 0%, var(--cyan) 40%, var(--gold) 60%, var(--cyan) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGold 4s linear infinite;
}

/* Hero glowing orb behind chart card */
.hero-card-wrapper::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240,185,11,.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: orbPulse 5s ease-in-out infinite;
}

@keyframes orbPulse {
    0%,100% {
        transform: translate(-50%,-50%) scale(1);
        opacity: .8;
    }

    50% {
        transform: translate(-50%,-50%) scale(1.15);
        opacity: 1;
    }
}

/* Mobile hero stats strip (visible only <992px) */
.hero-stats-strip {
    display: none;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 20px;
}

    .hero-stats-strip .hs-item {
        flex: 1;
        text-align: center;
        padding: 14px 10px;
        border-right: 1px solid var(--border-color);
        min-width: 0;
    }

        .hero-stats-strip .hs-item:last-child {
            border-right: none;
        }

    .hero-stats-strip .hs-val {
        font-size: .95rem;
        font-weight: 700;
        font-family: var(--font-mono);
        display: block;
    }

    .hero-stats-strip .hs-lbl {
        font-size: .68rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
        display: block;
        margin-top: 2px;
    }

/* Feature cards enter animation */
.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    height: 100%;
    transition: border-color var(--transition), transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}

    .feature-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,var(--gold),var(--cyan));
        transform: scaleX(0);
        transition: transform .35s;
        transform-origin: left;
    }

    .feature-card:hover {
        border-color: rgba(240,185,11,.3);
        transform: translateY(-6px);
        box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(240,185,11,.08);
    }

        .feature-card:hover::after {
            transform: scaleX(1);
        }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: rgba(240,185,11,.1);
    color: var(--gold);
    transition: transform .3s ease, box-shadow .3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-4deg);
    box-shadow: var(--glow-gold);
}

/* Testimonial card hover */
.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

    .testimonial-card:hover {
        transform: translateY(-4px);
        border-color: rgba(240,185,11,.2);
        box-shadow: 0 8px 32px rgba(0,0,0,.4);
    }

/* Stats bar number glow */
.stat-item .num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(240,185,11,.4);
}

/* Pairs table row hover glow */
.pairs-table tbody tr:hover td {
    background: var(--bg-hover);
}

.pairs-table tbody tr {
    transition: background var(--transition), box-shadow var(--transition);
}

/* CTA section shimmer border */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, rgba(240,185,11,.07) 0%, rgba(0,210,255,.04) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

    .cta-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(240,185,11,.06) 0%, transparent 70%);
        pointer-events: none;
        animation: orbPulse 6s ease-in-out infinite;
    }

/* Mobile nav hamburger (landing page only) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    border: none;
    background: transparent;
}

    .nav-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all .3s ease;
    }

    .nav-hamburger.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-hamburger.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .nav-hamburger.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* Mobile dropdown nav menu */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11,14,17,.97);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(12px);
}

    .mobile-nav-menu.open {
        display: flex;
    }

    .mobile-nav-menu .mnav-link {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--text-secondary);
        padding: 12px 32px;
        border-radius: var(--radius);
        transition: color .25s, background .25s;
        text-align: center;
    }

        .mobile-nav-menu .mnav-link:hover {
            color: var(--gold);
            background: rgba(240,185,11,.08);
        }

    .mobile-nav-menu .mnav-close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.8rem;
        color: var(--text-secondary);
        background: none;
        border: none;
        cursor: pointer;
        line-height: 1;
        transition: color .2s;
    }

        .mobile-nav-menu .mnav-close:hover {
            color: var(--gold);
        }

    .mobile-nav-menu .mnav-divider {
        width: 60px;
        height: 1px;
        background: var(--border-color);
        margin: 16px 0;
    }

    .mobile-nav-menu .mnav-btns {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 240px;
    }

/* ---------- Loading Spinner ---------- */
.spinner-gold {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(240,185,11,.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* ---------- Skeleton Loader ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton .9s infinite;
    border-radius: 4px;
}

@keyframes skeleton {
    from {
        background-position: 200% 0
    }

    to {
        background-position: -200% 0
    }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---- ≤1199px (large tablet / small laptop) ---- */
@media (max-width:1199.98px) {
    .hero-float-card {
        font-size: .85rem;
        padding: 12px 14px;
    }

        .hero-float-card .coin-icon {
            width: 32px;
            height: 32px;
            font-size: .85rem;
        }
}

/* ---- ≤991px (tablet portrait / phablet) ---- */
@media (max-width:991.98px) {
    /* Sidebar app pages */
    .sidebar {
        width: 70px;
    }

        .sidebar .nav-label, .sidebar .sidebar-text {
            display: none;
        }

    .admin-sidebar {
        width: 70px;
    }

        .admin-sidebar .nav-label {
            display: none;
        }

    /* Hero */
    .hero-section {
        padding: 56px 0 36px;
        text-align: center;
    }

    .hero-sub {
        margin: 0 auto;
    }

    .hero-float-card {
        display: none !important;
    }

    .hero-card-wrapper {
        min-height: 0 !important;
        padding-bottom: 12px;
    }

        .hero-card-wrapper::before {
            display: none;
        }
        /* hide orb — no cards */
        .hero-card-wrapper .glass-card {
            max-width: 100% !important;
            margin-top: 0 !important;
        }
    /* Show the mobile stats strip */
    .hero-stats-strip {
        display: flex;
    }

    /* Nav — show hamburger, hide desktop links */
    .nav-hamburger {
        display: flex;
    }

    .navbar-main .d-none.d-lg-flex {
        display: none !important;
    }

    /* Trading */
    .trading-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .chart-panel {
        width: 100%;
        border-right: none;
    }

    .chart-container {
        height: 45vh;
        min-height: 220px;
        flex: none;
    }

    .trade-panel {
        width: 100%;
        overflow-y: visible;
    }

    /* Control bar: wrap price + timeframe on narrow screens */
    .tp-control-bar {
        flex-wrap: wrap;
        gap: 8px;
        min-height: auto;
        padding: 8px 12px;
    }

    /* Make all 5 timeframe buttons equal width */
    .tp-tf-group {
        width: 100%;
        justify-content: stretch;
    }
    .tp-tf-btn { flex: 1; min-width: 0; padding: 0 4px; }

    /* Bigger tap targets on tablet */
    .tp-dir-tab  { height: 52px; font-size: 16px; }
    .tp-place-btn { height: 60px; font-size: 17px; }
    .tp-amount-inp { height: 56px; font-size: 20px; }
    .tp-pill { height: 40px; font-size: 14px; }

    /* Section spacing */
    section {
        padding: 56px 0;
    }

    .stats-bar {
        padding: 36px 0;
    }

    .stat-item .num {
        font-size: 1.8rem;
    }
}

/* ---- ≤767px (large mobile) ---- */
@media (max-width:767.98px) {
    /* App pages */
    .page-content {
        padding: 14px;
    }

    .admin-content {
        padding: 14px;
    }

    .stat-card {
        padding: 14px 16px;
    }

        .stat-card .stat-value {
            font-size: 1.25rem;
        }

    /* Hero */
    .hero-section {
        padding: 44px 0 28px;
    }

    .hero-heading {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-chart-wrap {
        height: 90px;
    }

    .hero-stats-strip .hs-val {
        font-size: .85rem;
    }

    /* Features — 2 cols */
    .feature-icon {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }

    .feature-card {
        padding: 22px 18px;
    }

    /* Landing buttons */
    .btn-gold.btn-lg, .btn-outline-gold.btn-lg {
        font-size: .95rem;
        padding: .6rem 1.4rem;
    }

    /* Stats bar */
    .stats-bar {
        padding: 28px 0;
    }

    .stat-item .num {
        font-size: 1.55rem;
    }

    .stat-item .lbl {
        font-size: .78rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 20px 18px;
    }

    /* Footer */
    footer.site-footer {
        padding: 40px 0 24px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Sections */
    section {
        padding: 44px 0;
    }

    .section-title {
        font-size: clamp(1.5rem,6vw,2rem);
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
    }

    .pairs-table thead th:nth-child(5),
    .pairs-table tbody td:nth-child(5) {
        display: none;
    }
    /* hide volume col */

    /* Trading page — smaller chart on phones */
    .chart-container {
        height: 42vh;
        min-height: 200px;
    }

    .tp-control-bar {
        padding: 7px 10px;
    }

    .tp-pair-tab {
        height: 40px;
        font-size: 12px;
        padding: 0 10px;
    }
}

/* ---- ≤575px (mobile portrait) ---- */
@media (max-width:575.98px) {
    /* App sidebars slide in as drawer */
    .sidebar, .admin-sidebar {
        position: fixed;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform .3s;
    }

        .sidebar.open, .admin-sidebar.open {
            transform: translateX(0);
            box-shadow: var(--shadow);
        }

    .main-content {
        width: 100%;
    }

    /* Hero */
    .hero-section {
        padding: 36px 0 24px;
    }

    .hero-heading {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .hero-stats-strip {
        margin-top: 14px;
    }

        .hero-stats-strip .hs-item {
            padding: 10px 6px;
        }

        .hero-stats-strip .hs-val {
            font-size: .78rem;
        }

        .hero-stats-strip .hs-lbl {
            font-size: .6rem;
        }

    /* Glass card in hero */
    .hero-card-wrapper .glass-card {
        padding: 16px !important;
    }

    .hero-chart-wrap {
        height: 80px;
    }

    /* Stat bar – 2×2 grid */
    .stats-bar {
        padding: 22px 0;
    }

    .stats-bar .row .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .stat-item .num {
        font-size: 1.4rem;
    }

    /* Features — 1 col */
    .feature-card {
        padding: 20px 16px;
    }

    /* Pairs table – hide change & action cols on tiny screens */
    .pairs-table thead th:nth-child(4),
    .pairs-table tbody td:nth-child(4),
    .pairs-table thead th:nth-child(6),
    .pairs-table tbody td:nth-child(6) {
        display: none;
    }

    /* CTA buttons stack */
    .d-flex.justify-content-center.gap-3.flex-wrap {
        gap: 10px !important;
    }

        .d-flex.justify-content-center.gap-3.flex-wrap .btn {
            width: 100%;
            max-width: 280px;
        }

    /* Modal */
    .modal-dark .modal-body {
        padding: 18px 16px;
    }

    /* Ticker */
    .ticker-item {
        font-size: .75rem;
    }

    .ticker-inner {
        gap: 28px;
    }

    /* Footer */
    .footer-brand {
        font-size: 1.25rem;
    }

    /* Trading — small phones */
    .chart-container { height: 38vh; min-height: 180px; }
    .tp-price-big   { font-size: 15px; }
    .tp-dir-tab     { height: 56px; font-size: 17px; }
    .tp-amount-inp  { height: 58px; font-size: 22px; }
    .tp-place-btn   { height: 64px; font-size: 18px; }
    .tp-pill        { height: 44px; font-size: 15px; }
    .tp-bal-val     { font-size: 18px; }
}

/* ---------- Custom SweetAlert2 Theme ---------- */
.swal-dark {
    background: var(--bg-secondary) !important;
}

.swal2-popup.custom-swal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-content {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: var(--gold) !important;
    color: #000 !important;
    font-weight: 700 !important;
}

.swal2-cancel {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}
