/* Doviz.org Premium - Desktop First + Mobile Menu */
:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-hover: #1a1a25;
    --border: #1e1e2d;
    --text: #f0f0f5;
    --text-secondary: #8888a0;
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.4);
    --success: #00d26a;
    --danger: #ff5252;
    --gold: #f5a623;
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
.nav {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-link { color: var(--text-secondary); text-decoration: none; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.nav-link:hover { color: var(--text); background: var(--bg-hover); }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
}

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #8b7cf7); color: #fff; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-hover); border-color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* HERO */
.hero { padding: 100px 0 80px; text-align: center; background: radial-gradient(ellipse at top, rgba(108, 92, 231, 0.1) 0%, transparent 60%); }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 24px; line-height: 1.15; }
.hero h1 span { background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 50%, var(--success) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-secondary); font-size: 1.25rem; max-width: 600px; margin: 0 auto 40px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; }

/* FEATURES */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 80px; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 30px; text-align: center; transition: all 0.3s; }
.feature:hover { border-color: var(--primary); transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
.feature-icon { width: 70px; height: 70px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.8rem; }
.feature-icon.gold { background: rgba(245, 166, 35, 0.15); color: var(--gold); }
.feature-icon.currency { background: rgba(0, 210, 106, 0.15); color: var(--success); }
.feature-icon.crypto { background: rgba(108, 92, 231, 0.15); color: var(--primary); }
.feature-icon.stock { background: rgba(0, 150, 255, 0.15); color: #0096ff; }
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { font-size: 0.9rem; color: var(--text-secondary); }

/* CARDS */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 1.2rem; font-weight: 600; }

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.form-control { width: 100%; padding: 14px 18px; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; transition: all 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary); }

/* AUTH */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 440px; }
.auth-title { text-align: center; margin-bottom: 32px; }
.auth-title h1 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-title p { color: var(--text-secondary); }
.auth-footer { text-align: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-secondary); }
.auth-footer a { color: var(--primary); text-decoration: none; }

/* DASHBOARD */
.dashboard { display: flex; min-height: calc(100vh - 61px); }

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-menu a:hover { color: var(--text); background: var(--bg-hover); }
.sidebar-menu a.active { color: var(--primary); background: rgba(108, 92, 231, 0.1); }
.sidebar-menu a i { width: 20px; text-align: center; }

.main { flex: 1; padding: 32px; overflow-x: hidden; }

/* STATS */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.stat-label { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }
.stat-value { font-size: 2rem; font-weight: 700; }
.stat-value.positive { color: var(--success); }

/* ASSET LIST */
.asset-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.asset-item { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--border); align-items: center; }
.asset-item:last-child { border-bottom: none; }
.asset-item:hover { background: var(--bg-hover); }
.asset-info { display: flex; align-items: center; gap: 16px; }
.asset-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.asset-icon.gold { background: rgba(245, 166, 35, 0.15); color: var(--gold); }
.asset-icon.currency { background: rgba(0, 210, 106, 0.15); color: var(--success); }
.asset-icon.crypto { background: rgba(108, 92, 231, 0.15); color: var(--primary); }
.asset-icon.stock { background: rgba(0, 150, 255, 0.15); color: #0096ff; }
.asset-name { font-weight: 600; }
.asset-symbol { font-size: 0.85rem; color: var(--text-secondary); }
.asset-value { text-align: right; font-weight: 700; color: var(--success); }
.asset-amount { text-align: right; color: var(--text-secondary); }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; }
tr:hover { background: var(--bg-hover); }
.positive { color: var(--success); }
.negative { color: var(--danger); }

/* TABS */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.tab { padding: 10px 20px; background: transparent; border: none; color: var(--text-secondary); font-size: 0.95rem; cursor: pointer; border-radius: var(--radius-sm); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active { color: var(--primary); background: rgba(108, 92, 231, 0.1); }

/* CURRENCY TABS */
.currency-tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.currency-tab { padding: 8px 16px; background: transparent; border: none; color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; cursor: pointer; border-radius: 6px; text-decoration: none; transition: all 0.2s; }
.currency-tab:hover { color: var(--text); }
.currency-tab.active { background: var(--primary); color: #fff; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.2s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.2s; }
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.3rem; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; }

/* ALERTS */
.alert { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.alert-success { background: rgba(0, 210, 106, 0.15); border: 1px solid var(--success); color: var(--success); }
.alert-error { background: rgba(255, 82, 82, 0.15); border: 1px solid var(--danger); color: var(--danger); }

/* BADGE */
.badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-right: 10px; }
.badge-gold { background: rgba(245, 166, 35, 0.15); color: var(--gold); }
.badge-currency { background: rgba(0, 210, 106, 0.15); color: var(--success); }
.badge-crypto { background: rgba(108, 92, 231, 0.15); color: var(--primary); }
.badge-stock { background: rgba(0, 150, 255, 0.15); color: #0096ff; }

/* EMPTY */
.empty { text-align: center; padding: 60px 20px; }
.empty i { font-size: 4rem; color: var(--border); margin-bottom: 20px; }
.empty h3 { margin-bottom: 10px; }
.empty p { color: var(--text-secondary); margin-bottom: 24px; }

/* PAGE HEADER */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; gap: 20px; }
.page-title { font-size: 1.6rem; font-weight: 700; }

/* LOADING */
.loading { text-align: center; padding: 60px; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* USER MENU */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; font-size: 0.95rem; }
.user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s; box-shadow: 0 10px 40px rgba(0,0,0,0.3); z-index: 50; }
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--text-secondary); text-decoration: none; }
.user-dropdown a:hover { background: var(--bg-hover); color: var(--text); }

/* LIVE PRICE */
.live-item { display: flex; align-items: center; gap: 12px; }
.live-item img { width: 32px; height: 32px; border-radius: 50%; }

/* FOOTER */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 32px 0; text-align: center; color: var(--text-secondary); }

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    
    /* Mobile menu toggle visible */
    .menu-toggle { display: block; }
    
    /* Sidebar - mobile overlay */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 260px;
        z-index: 200;
        transition: left 0.3s ease;
        padding-top: 70px;
    }
    .sidebar.active { left: 0; }
    
    /* Overlay when menu open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7);
        z-index: 150;
    }
    .sidebar-overlay.active { display: block; }
    
    .nav-link span { display: none; }
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2rem; }
    .hero-btns { flex-direction: column; }
    .features { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 50px; }
    .feature { padding: 24px 16px; }
    .feature-icon { width: 50px; height: 50px; font-size: 1.4rem; }
    
    .main { padding: 20px 16px; }
    .page-header { flex-direction: column; align-items: stretch; }
    .stats { grid-template-columns: 1fr; }
    
    .asset-item { grid-template-columns: 1fr auto; }
    .asset-amount { display: none; }
    
    th:nth-child(3), td:nth-child(3),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5) { display: none; }
    
    .user-btn span { display: none; }
    .auth-card { padding: 32px 24px; }
    
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tab { white-space: nowrap; }
}

@media (max-width: 480px) {
    .features { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature { padding: 20px 12px; }
    .feature-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .feature h3 { font-size: 0.9rem; }
    .feature p { font-size: 0.75rem; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::selection { background: var(--primary); color: #fff; }
