/* ========= VARIABLES ========= */
:root {
  --black: #0f0f0f;
  --green: #16a34a;
  --green-dark: #14532d;
  --gold: #d4af37;
  --white: #ffffff;
  --gray-bg: #f1f5f9;
  --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 0.75rem;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--gray-bg);
  color: var(--black);
  font-size: 16px;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========= LAYOUT STRUCTURE ========= */
.wrapper {
  display: flex;
  flex-direction: row;
}

/* ========= SIDEBAR ========= */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--black);
  color: var(--white);
  position: fixed;
  top: var(--header-height);
  left: 0;
  padding: 2rem 1.25rem;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 100;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.sidebar-header span {
  font-size: 0.8rem;
  color: #ccc;
}

.sidebar-menu {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-menu a {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  color: var(--white);
  transition: var(--transition);
}

.sidebar-menu a.active {
  background: var(--green);
  font-weight: 600;
}

.sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ========= HEADER ========= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--header-height);
  width: 100%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: var(--shadow-light);
  z-index: 200;
}

.header .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--green);
}

.header .user-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ========= HAMBURGER ========= */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--black);
  cursor: pointer;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .sidebar {
    left: -100%;
  }

  .sidebar.active {
    left: 0;
  }

  .wrapper {
    flex-direction: column;
  }
}

/* ========= MAIN CONTENT ========= */
.main-content {
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 1.5rem) 2rem 2rem;
  width: 100%;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
}

/* ========= WELCOME BOX ========= */
.welcome-box .card {
  background-color: #ecfdf5;
  border-left: 5px solid var(--green);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-light);
}

/* ========= DASHBOARD GRID ========= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ========= CARD ========= */
.card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-heavy);
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 1.4rem;
  font-weight: bold;
}

/* ========= THEME CARDS ========= */
.income {
  border-left: 4px solid var(--green);
}

.expense {
  border-left: 4px solid #dc2626;
}

.card.income h3::after {
  content: ' 💰';
}

.card.expense h3::after {
  content: ' 📉';
}

/* ========= BUTTONS ========= */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--green-dark);
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ========= GOLD ACCENTS ========= */
.gold {
  color: var(--gold);
  font-weight: 600;
}

/* ========= MEDIA FIXES ========= */
@media (max-width: 480px) {
  .main-content {
    padding: calc(var(--header-height) + 1rem) 1rem 2rem;
  }

  .btn-group {
    flex-direction: column;
  }
}
