:root {
    --bg-dark: #09090b;
    --bg-card: #121217;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-yellow: #ffb800;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #27272a;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

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

/* LOADING SCREEN */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.loading-bar-wrap {
    width: 200px;
    height: 4px;
    background: #1e1e24;
    border-radius: 10px;
    overflow: hidden;
}
.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-green);
    animation: load-anim 2s infinite ease-in-out;
}
@keyframes load-anim {
    0% { width: 0% }
    50% { width: 70% }
    100% { width: 100% }
}
/* AUTH */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.auth-bg-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    z-index: -1;
}
.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}
.auth-panel {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.auth-panel h2 { margin-bottom: 8px; font-weight: 700; }
.auth-panel p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrap i { position: absolute; left: 14px; width: 18px; color: var(--text-secondary); }
.input-wrap input, .select-input {
    width: 100%;
    background: #1e1e24;
    border: 1px solid #2d2d35;
    padding: 12px 12px 12px 42px;
    border-radius: 10px;
    color: #fff;
    outline: none;
    transition: 0.2s;
}
.select-input { padding: 12px; }
.input-wrap input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
.btn-primary {
    background: var(--accent-green);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-full { width: 100%; margin-top: 10px; }
.auth-toggle { text-align: center; margin-top: 24px !important; font-size: 0.85rem !important; }
.auth-toggle a { color: var(--accent-green); text-decoration: none; font-weight: 600; }
.auth-msg {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}
.auth-msg.error { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.auth-msg.success { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.logo { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
}
.nav-item i { width: 18px; }
.nav-item:hover { background: #1e1e24; color: #fff; }
.nav-item.active { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.sidebar-bottom { margin-top: auto; }
.girocoin-box {
    background: #1e1e24;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.gc-label { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 4px; font-weight: 600; }
.gc-value { font-size: 1.1rem; font-weight: 800; color: var(--accent-yellow); display: flex; align-items: center; gap: 6px; }
.gc-value i { width: 16px; }

.main-panel { flex: 1; display: flex; flex-direction: column; }
.topbar {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #121217;
    padding: 10px 16px;
    border-radius: 10px;
    width: 300px;
}
.search-bar input { background: none; border: none; outline: none; color: #fff; width: 100%; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.t-score-pill {
    background: #1e1e24;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.t-score-pill .dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; box-shadow: 0 0 10px var(--accent-green); }
.score-val { color: var(--accent-green); }
.notifications-icon { cursor: pointer; color: var(--text-secondary); }
.user-profile { display: flex; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.avatar { width: 36px; height: 36px; background: var(--accent-purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.85rem; font-weight: 600; }
.user-role { font-size: 0.7rem; color: var(--text-secondary); }
/* DASHBOARD */
.content-area { padding: 32px; flex: 1; }
.welcome-box { margin-bottom: 32px; }
.welcome-box h1 { font-size: 2rem; margin-bottom: 4px; }
.welcome-box p { color: var(--text-secondary); }
.top-cards { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; }
.card-title { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.amount-huge { font-size: 2.5rem; font-weight: 800; margin-bottom: 24px; }
.balances { display: flex; gap: 40px; }
.bal-item { display: flex; flex-direction: column; gap: 4px; }
.bal-label { font-size: 0.75rem; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.bal-label i { width: 14px; }
.bal-value { font-size: 1.1rem; font-weight: 700; }
.lock-val { color: #94a3b8; }

.tscore-card { display: flex; flex-direction: column; }
.score-huge { font-size: 2.5rem; font-weight: 800; color: var(--accent-green); }
.score-huge span { font-size: 1rem; color: #4b5563; }
.score-level { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.score-bar { height: 8px; background: #1e1e24; border-radius: 10px; margin-bottom: 20px; }
.score-fill { height: 100%; background: var(--accent-green); border-radius: 10px; transition: 1s; }
.gc-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 48px; height: 48px; background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); display: block; }
.stat-val { font-size: 1.25rem; font-weight: 700; }

.recent-activity { min-height: 200px; }
.ra-empty { text-align: center; color: var(--text-secondary); padding: 40px; font-size: 0.9rem; }
/* EXCHANGE */
.screen { display: none; width: 100%; animation: fade-in 0.3s ease-out; }
.screen.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.exchange-header { margin-bottom: 32px; }
.eh-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.eh-title h2 { font-size: 1.8rem; }
.icon-green { color: var(--accent-green); }
.filters { display: flex; gap: 10px; margin-top: 20px; }
.filter-btn { background: #1e1e24; border: 1px solid var(--border-color); color: var(--text-secondary); padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: 0.2s; }
.filter-btn.active { background: var(--accent-green); color: #000; border-color: var(--accent-green); }
.exchange-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.asset-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: 0.3s; cursor: pointer; position: relative; }
.asset-card:hover { transform: translateY(-5px); border-color: #3f3f46; }
.asset-img { width: 100%; height: 180px; object-fit: cover; }
.asset-body { padding: 16px; }
.asset-type { font-size: 0.7rem; color: #10b981; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.asset-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.asset-price { font-size: 1.25rem; font-weight: 800; }
.asset-gc { font-size: 0.8rem; color: var(--accent-yellow); font-weight: 600; display: flex; align-items: center; gap: 4px; margin-top: 8px; }
/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal-box { background: var(--bg-card); border: 1px solid var(--border-color); width: 100%; max-width: 500px; border-radius: 24px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; }
.modal-asset-info { display: flex; gap: 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.modal-asset-info img { width: 100px; height: 100px; border-radius: 12px; object-fit: cover; }
.modal-detail-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1rem; }
.modal-detail-row span { color: var(--text-secondary); }
.modal-info-box { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); padding: 12px; border-radius: 12px; color: #60a5fa; font-size: 0.85rem; display: flex; gap: 10px; margin: 20px 0; }
.modal-footer { display: flex; gap: 12px; margin-top: 24px; }
.btn-secondary { flex: 1; background: #1e1e24; border: 1px solid var(--border-color); color: #fff; padding: 12px; border-radius: 10px; font-weight: 600; cursor: pointer; }

/* TOAST */
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: #121217; border: 1px solid var(--accent-green); color: #fff; padding: 12px 24px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 3000; font-weight: 600; display: flex; align-items: center; gap: 10px; animation: toast-in 0.3s ease-out; }
@keyframes toast-in { from { bottom: 0; opacity: 0; } to { bottom: 40px; opacity: 1; } }

/* PROFILE DROPDOWN */
.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    display: none;
    z-index: 100;
}
.profile-dropdown.active { display: block; }
.dropdown-header { font-size: 0.7rem; font-weight: 700; color: var(--text-secondary); padding: 8px 12px; text-transform: uppercase; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 0.85rem; transition: 0.2s; }
.dropdown-item:hover { background: #1e1e24; }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 8px 0; }

.mobile-nav { display: none; }

@media (max-width: 1000px) {
    .sidebar { display: none; }
    .mobile-nav { display: flex; position: fixed; bottom: 0; width: 100%; height: 70px; background: var(--bg-card); border-top: 1px solid var(--border-color); align-items: center; justify-content: space-around; z-index: 1000; padding: 0 10px; }
    .top-cards { grid-template-columns: 1fr; }
    .main-panel { padding-bottom: 70px; }
}
