/* ============================================
   ZARNO - Main Stylesheet
   ============================================ */

/* --- Base Styles --- */
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #020202;
    color: white;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
canvas{
   max-height: 50vh!important;
}
:root {
    --gold: #E9C15B;
}

/* --- Layout Grid --- */
.layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr 380px;
    min-height: 100vh;
    width: 100%;
    gap: 0;
}

/* Sidebar in layout-grid */
.layout-grid .sidebar {
    position: relative;
    height: auto;
    grid-column: 1;
}

/* Main content in layout-grid */
.layout-grid .main-content {
    grid-column: 2;
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
    min-height: 100vh;
    margin-right: 0;
    box-sizing: border-box;
}

/* Trade panel in layout-grid */
.layout-grid .trade-panel {
    position: relative;
    height: auto;
    grid-column: 3;
}

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 260px 1fr;
    }
    .layout-grid .trade-panel {
        display: none;
    }
    .layout-grid .main-content {
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .layout-grid .sidebar {
        position: fixed;
        width: 260px;
        height: 100vh;
        transform: translateX(100%);
        grid-column: 1;
    }
    .layout-grid .sidebar.open {
        transform: translateX(0);
    }
    .layout-grid .main-content {
        grid-column: 1;
        margin-right: 0;
        padding: 16px;
    }
    .layout-grid .trade-panel {
        display: none;
    }
}

/* --- Main Content (standalone) --- */
.main-content {
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
    min-height: 100vh;
    width: 100%;
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* --- Sidebar (standalone) --- */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    z-index: 1000;
    transition: transform 0.3s ease;
    background: #050505;
    border-left: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

/* Sidebar in layout-grid */
.layout-grid .sidebar {
    position: relative;
    height: auto;
    width: 260px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close {
        display: flex;
    }
    .mobile-menu-toggle {
        display: flex;
    }
}

/* --- Menu Items --- */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 4px;
    color: #9CA3AF;
    border-radius: 12px;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(233, 193, 91, 0.08);
    color: #E9C15B;
}

.menu-item.active {
    font-weight: bold;
    border-right: 3px solid #E9C15B;
}

/* --- Trade Panel (standalone) --- */
.trade-panel {
    background: #08080a;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    width: 380px;
    height: 100vh;
    overflow-y: auto;
}

/* Trade panel in layout-grid */
.layout-grid .trade-panel {
    position: relative;
    height: auto;
    width: 380px;
}

@media (max-width: 1024px) {
    .trade-panel:not(.layout-grid .trade-panel) {
        display: none;
    }
}

/* --- Glass Box --- */
.glass-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    transition: 0.3s;
}

.glass-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* --- Onboarding Card --- */
.onboarding-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #0F0C15 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(30, 27, 75, 0.5);
}

.progress-track {
    background: rgba(255,255,255,0.1);
    height: 6px;
    border-radius: 10px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    background: #E9C15B;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px #E9C15B;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    color: #6B7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 2px dashed rgba(255,255,255,0.05);
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
}

/* --- Ticker Strip --- */
.ticker-strip {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ticker-item {
    background: #15151a;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 11px;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: right;
    padding: 16px;
    color: #6B7280;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

td {
    padding: 16px;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* --- Responsive Grid --- */
@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    .grid-cols-12 {
        grid-template-columns: 1fr !important;
    }
    .col-span-5,
    .col-span-7 {
        grid-column: span 1 !important;
    }
    .onboarding-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Landing Page Specific --- */
.hero-section {
    padding: 80px 24px;
}

.hero-title {
    font-size: 3.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 16px !important;
    }
    .hero-title {
        font-size: 2rem !important;
    }
    .hero-subtitle {
        font-size: 1rem !important;
    }
}

/* --- Admin Layout --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: #050505;
    border-left: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.admin-content {
    flex: 1;
    margin-right: 260px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-content {
        margin-right: 0;
    }
}

/* --- Stat Cards --- */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    transition: 0.3s;
}

.stat-card:hover {
    border-color: rgba(233, 193, 91, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px -10px rgba(233, 193, 91, 0.2);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .stat-card {
        padding: 16px;
    }
}

/* --- Virtual Card --- */
.virtual-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #0F0C15 100%);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.3);
}

/* --- Bank Item --- */
.bank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    transition: 0.2s;
}

.bank-item:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

/* --- Wallet Table --- */
.wallet-table {
    font-size: 12px;
}

.wallet-table td {
    padding: 12px 8px;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}

.wallet-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .wallet-table {
        font-size: 11px;
    }
    .wallet-table td {
        padding: 8px 4px;
    }
}

/* --- Asset Tab --- */
.asset-tab {
    padding: 8px 16px;
    font-size: 11px;
    border-radius: 8px;
    background: transparent;
    color: #9CA3AF;
    transition: 0.2s;
}

.asset-tab.active {
    background: #E9C15B;
    color: black;
    font-weight: bold;
}

/* --- Bubble Bar --- */
.bubble-bar-bg {
    background: rgba(255,255,255,0.1);
    height: 8px;
    border-radius: 10px;
    position: relative;
}

.bubble-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
}

/* --- Trade Panel Col --- */
.trade-panel-col {
    background: #08080a;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* --- Settings Group --- */
.settings-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .settings-group {
        padding: 16px;
    }
}

/* --- User Card --- */
.user-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

/* --- Gateway Card --- */
.gateway-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}

.gateway-card.active {
    border-color: #10B981;
}

.gateway-card.inactive {
    border-color: #6B7280;
    opacity: 0.7;
}

/* --- Content Block Card --- */
.content-block-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

/* --- Glass Panel (Landing) --- */
.glass-panel {
    background: rgba(30, 30, 35, 0.4);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    transition: 0.3s;
}

.glass-panel:hover {
    border-color: rgba(233, 193, 91, 0.4);
    background: rgba(30, 30, 40, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.6);
}

/* --- Trade Widget --- */
.trade-widget {
    background: #0f0c15;
    border: 1px solid #E9C15B;
    border-radius: 32px;
    box-shadow: 0 0 60px rgba(217, 119, 6, 0.15);
    overflow: hidden;
}

/* --- Ticker Wrap --- */
.ticker-wrap {
    background: #08060a;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
    overflow: hidden;
}

.ticker-move {
    display: inline-block;
    animation: marquee 80s linear infinite;
}

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

/* --- Gold Bar CSS --- */
.gold-bar-css {
    width: 45px;
    height: 75px;
    background: linear-gradient(135deg, #FDE68A, #D97706);
    border: 1px solid #FEF3C7;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #451a03;
    font-weight: 900;
    font-family: serif;
}

/* --- Range Input --- */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #E9C15B;
    border: 3px solid #000;
    cursor: pointer;
    margin-top: -8px;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* --- Badge Box --- */
.badge-box {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-block;
}
