:root {
    --bg-color: #0b0e11;
    --sidebar-bg: #1e2329;
    --card-bg: #1e2329;
    --accent-primary: #fcd535; /* Binance yellow */
    --accent-secondary: #00d2ff;
    --text-main: #eaecef;
    --text-muted: #848e9c;
    --success: #0ecb81;
    --danger: #f6465d;
    --warning: #f0b90b;
    --glass-bg: rgba(30, 35, 41, 0.7);
    --transition: all 0.3s ease;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--accent-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--warning));
    border-radius: 8px;
    transform: rotate(45deg);
}

nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 12px;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(252, 213, 53, 0.1);
    color: var(--accent-primary);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1rem 0.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(252, 213, 53, 0.3);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 18px;
    height: 18px;
}

.stat-icon.profit { background: rgba(14, 203, 129, 0.1); color: var(--success); }
.stat-icon.volume { background: rgba(0, 210, 255, 0.1); color: var(--accent-secondary); }
.stat-icon.inventory { background: rgba(240, 185, 11, 0.1); color: var(--warning); }

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

.stat-info h2 {
    font-size: 1.1rem;
    margin-top: 0;
    white-space: nowrap;
}

.stat-info small {
    font-size: 0.65rem;
}

/* Dashboard Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 450px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart-container canvas {
    display: block;
}

.chart-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Tables */
.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-header {
    margin-bottom: 1.5rem;
}

.table-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

/* Forms */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    background: #12161c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #1e2329;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.btn-primary { background: var(--accent-primary); color: #000; }
.btn-primary:hover { background: #e2c02d; transform: scale(1.02); }

.btn-secondary { background: var(--accent-secondary); color: #000; }
.btn-secondary:hover { background: #00bce6; transform: scale(1.02); }

.btn-success { background: var(--success); color: #000; }
.btn-success:hover { background: #0fb975; transform: scale(1.02); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #e03a4e; transform: scale(1.02); }

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem;
    border-radius: 10px;
}

.activity-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.activity-badge.buy { background: var(--success); box-shadow: 0 0 5px var(--success); }
.activity-badge.sell { background: var(--accent-secondary); box-shadow: 0 0 5px var(--accent-secondary); }

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: 0.85rem;
}

.activity-content .time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 2rem 0.5rem; }
    .logo span, .nav-item span { display: none; }
    .content { margin-left: 80px; }
    .nav-item { justify-content: center; padding: 1rem; }
}
