/* --- Variables & Setup --- */
:root {
    --bg-dark: #0a0c10;
    --bg-glass: rgba(22, 27, 34, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.3);
    
    --green-emerald: #2ea043;
    --red-danger: #da3633;
    --blue-neon: #388bfd;
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Utilities --- */
.text-gold { color: var(--gold); }
.text-green { color: var(--green-emerald); }
.text-red { color: var(--red-danger); }
.text-blue { color: var(--blue-neon); }
.w-100 { width: 100%; }

/* Glassmorphism Effect */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    margin: 16px;
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
}
.logo span { color: var(--gold); }

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-menu a, .sidebar-footer a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 10px;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-menu a:hover, .nav-menu a.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 16px 32px 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.greeting h1 { font-size: 24px; font-weight: 600; }
.greeting p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.btn-success { background: var(--green-emerald); box-shadow: 0 4px 15px rgba(46, 160, 67, 0.2); }
.btn-success:hover { background: #3fb950; transform: translateY(-2px); }

.btn-danger { background: var(--red-danger); box-shadow: 0 4px 15px rgba(218, 54, 51, 0.2); }
.btn-danger:hover { background: #ff4441; transform: translateY(-2px); }

.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--bg-dark); }

.btn-icon {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.btn-icon:hover { color: var(--gold); }

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.premium-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(0,0,0,0) 100%), var(--bg-glass);
    border: 1px solid var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}
.premium-card .card-icon { color: var(--gold); background: rgba(255,215,0,0.1); }

.card-info h3 { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px;}
.card-info h2 { font-size: 24px; font-weight: 700; }

/* Grid Layout for Chart & History */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-container, .history-container {
    padding: 24px;
    min-height: 400px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Form Elements */
.search-input, .filter-select, .form-group input, .form-group select {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 8px;
    outline: none;
}
.search-input:focus, .form-group input:focus { border-color: var(--gold); }

/* Transaction List */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
}
.transaction-list::-webkit-scrollbar { width: 5px; }
.transaction-list::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 5px; }

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    border-left: 4px solid transparent;
}
.tx-item.tx-in { border-left-color: var(--green-emerald); }
.tx-item.tx-out { border-left-color: var(--red-danger); }

.tx-info h4 { font-size: 14px; }
.tx-info p { font-size: 12px; color: var(--text-muted); }
.tx-amount { font-weight: 600; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}
.modal-content {
    padding: 30px;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 20px; top: 20px;
    font-size: 24px; cursor: pointer; color: var(--text-muted);
}
.close:hover { color: var(--text-main); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.form-group input, .form-group select { width: 100%; }

/* Responsive */
@media (max-width: 992px) {
    .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar { width: auto; height: auto; position: static; margin-bottom: 0; }
    .nav-menu { flex-direction: row; flex-wrap: wrap; }
    .dashboard-cards { grid-template-columns: 1fr; }
}