﻿:root {
  --bg-dark: #0b0f19;
  --bg-sidebar: #111827;
  --bg-card: #1f2937;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 35px; }
.brand .logo { font-size: 28px; }
.brand h2 { font-size: 20px; font-weight: 800; color: #fff; }
.brand .sub { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.nav-links { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 16px; }
.user-card { display: flex; align-items: center; gap: 10px; }
.user-card .avatar { font-size: 24px; background: rgba(255,255,255,0.05); padding: 6px; border-radius: 50%; }
.u-info { display: flex; flex-direction: column; font-size: 13px; }
.u-info span { font-size: 11px; color: var(--text-muted); }

/* MAIN CONTENT */
.main-content {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
}
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.top-header h1 { font-size: 26px; font-weight: 800; color: #fff; }
.sub-text { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-hover); }

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.m-icon { font-size: 26px; background: rgba(255, 255, 255, 0.05); padding: 10px; border-radius: 12px; }
.m-data { display: flex; flex-direction: column; }
.m-title { font-size: 12px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.m-data h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 4px 0; }
.m-trend { font-size: 12px; font-weight: 600; }
.m-trend.positive { color: var(--success); }
.m-sub { font-size: 12px; color: var(--text-muted); }

/* CONTENT GRID */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-size: 16px; font-weight: 700; color: #fff; }
.btn-text { background: transparent; border: none; color: var(--accent); font-weight: 600; cursor: pointer; }

/* GOALS LIST */
.goals-list { display: flex; flex-direction: column; gap: 16px; }
.goal-item { display: flex; flex-direction: column; gap: 6px; }
.goal-header { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.progress-bar-bg { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 10px; background: var(--accent); }

/* CATEGORY BARS */
.category-bars { display: flex; flex-direction: column; gap: 12px; }
.cat-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.cat-bar-bg { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 4px; margin: 0 15px; overflow: hidden; }
.cat-bar-fill { height: 100%; background: var(--warning); border-radius: 4px; }

/* DATA TABLE */
.data-table { width: 100%; border-collapse: collapse; text-align: left; margin-top: 10px; }
.data-table th { padding: 12px 14px; color: var(--text-muted); font-size: 12px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 14px; }
.data-table tr:hover { background: rgba(255, 255, 255, 0.02); }
.badge { background: rgba(59, 130, 246, 0.15); color: var(--accent); padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.amount.income { color: var(--success); font-weight: 700; }
.amount.expense { color: var(--danger); font-weight: 700; }

/* MODAL */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 200; justify-content: center; align-items: center; }
.modal.open { display: flex; }
.modal-content { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 14px; width: 440px; }
.modal-header { display: flex; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.close-btn { background: transparent; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.type-selector { display: flex; gap: 20px; }
.radio-label { font-size: 14px; cursor: pointer; }
.form-group input, .form-group select { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #fff; padding: 10px 12px; border-radius: 6px; outline: none; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: none; padding: 10px 16px; border-radius: 6px; cursor: pointer; }