* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f6f8fb;
  color: #333;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #2c3e50;
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar .logo {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 30px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 12px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 8px;
}

.sidebar li:hover,
.sidebar .active {
  background: #34495e;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 30px;
  min-height: 100vh; /* ensures it fills full screen */
}


header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
}

.btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.btn:hover {
  background: #2ecc71;
}

/* Summary Cards */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card h3 {
  color: #777;
  margin-bottom: 8px;
}

.card p {
  font-size: 1.4rem;
  font-weight: 600;
}

.income p { color: #27ae60; }
.expense p { color: #e74c3c; }
.balance p { color: #2980b9; }

/* Transaction Table */
.transactions {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transactions h2 {
  margin-bottom: 15px;
}
.transactions{
  overflow: auto;
}
.transactions{
  width: 100%;
  min-width: 500px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.green { color: #27ae60; font-weight: 600; }
.red { color: #e74c3c; font-weight: 600; }

/* Footer */
footer {
  margin-top: auto; /* pushes footer to bottom */
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  padding: 12px 0;
}


/* Responsive */
@media (max-width: 600px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
  }
  .main-content {
    padding: 20px;
  }
  th, td{
    font-size: 0.9rem;
    white-space: nowrap;
  }
}
