* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

/* ===== PAGE BACKGROUND ===== */
body {
  background:
    radial-gradient(circle at 15% 15%, #1e293b, transparent 45%),
    radial-gradient(circle at 85% 15%, #1e293b, transparent 45%),
    linear-gradient(180deg, #020617, #020617);
  min-height: 100vh;
  color: #e5e7eb;
}

/* ===== TOP BAR ===== */
.topbar {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  height: 64px;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #60a5fa;
}

.danger-btn {
  background: #7f1d1d;
  color: #fecaca;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  padding: 32px;
  text-align: center;
}

.hero h1 {
  color: #f8fafc;
}

.hero p {
  color: #94a3b8;
}

/* ===== DASHBOARD ===== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  padding: 24px 32px;
 
}

.card {
  background: #020617;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #1e293b;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.card p {
  color: #94a3b8;
}

.income h2 { color: #4ade80; }
.expense h2 { color: #f87171; }
.balance h2 { color: #60a5fa; }

/* ===== MAIN ===== */
.main {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  padding: 24px 32px;
}

.add-box,
.history-box {
  background: #020617;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #1e293b;
  transition: 0.3s;
}

.add-box:hover,
.history-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

/* ===== ADD TRANSACTION ===== */
.type-toggle {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.type-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #94a3b8;
  cursor: pointer;
}

.type-btn.active {
  background: #2563eb;
  color: white;
}

/* ===== INPUTS ===== */
input,
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid #1e293b;
  color: #e5e7eb;
}

input::placeholder {
  color: #64748b;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

/* ===== LIST ===== */
.list {
  margin-top: 12px;
}

/* ===== TRANSACTION ROWS (CLEAR SEPARATION) ===== */
.item {
  background: linear-gradient(
    135deg,
    #1e293be6,
    rgba(15, 23, 42, 0.9)
  );
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-left: 5px solid transparent;
  border: 1px solid rgba(148, 163, 184, 0.15);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Income & Expense indicator */
.item.income {
  border-left-color: #4ade80;
}

.item.expense {
  border-left-color: #f87171;
}

/* Hover effect */
.item:hover {
  transform: translateX(6px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.65);
}


/* ===== FOOTER ===== */
.footer {
  background: rgba(2, 6, 23, 0.95);
  padding: 32px;
  margin-top: 40px;
  border-top: 1px solid #1e293b;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-brand h4 {
  color: #f8fafc;
}

.footer-brand p {
  color: #94a3b8;
}

.links a {
  position: relative;
  margin-right: 14px;
  text-decoration: none;
  color: #cbd5f5;
}

.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #60a5fa;
  transition: width 0.25s;
}

.links a:hover::after {
  width: 100%;
}

.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #020617;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  transition: 0.25s;
  border: 1px solid #1e293b;
}

.social svg {
  width: 18px;
  height: 18px;
  fill: #60a5fa;
}

.social a:hover {
  background: #2563eb;
}

.social a:hover svg {
  fill: white;
}

.footer-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.copy {
  font-size: 14px;
  color: #94a3b8;
}

.item span {
  color: #e5e7eb;
}

.item strong {
  color: #f8fafc;
}

.item.expense:hover {
  box-shadow: 0 5px 10px rgba(245, 6, 6, 0.7);
}

.item.income:hover {
  box-shadow: 0 5px 10px rgba(10, 137, 61, 0.7);
}


/* ===== INCOME PAGE CHART ===== */
.chart-wrapper {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30,41,59,0.7);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
}

.legend-item span {
  color: #e5e7eb;
}

.legend-item strong {
  margin-left: auto;
  color: #f8fafc;
}

.legend-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}


/* ===== INCOME SOURCES LIST SIZE FIX ===== */
#incomeList {
  max-height: 260px;          /* limit height */
  overflow-y: auto;           /* scroll only if needed */
  padding-right: 6px;
}

/* Smooth scrollbar (modern look) */
#incomeList::-webkit-scrollbar {
  width: 6px;
}

#incomeList::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 6px;
}

#incomeList::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== REMOVE LINK STYLE FROM INCOME / EXPENSE TEXT ===== */


/* Ensure headings look clean */
.card p,
.card h2 {
  text-decoration: none;
}

/* ===== CLEAN LINK STYLING (CLICKABLE) ===== */
.menu a,
.menu a:visited {
  text-decoration: none;
  color: #cbd5f5;
}

.menu a:hover {
  color: #ffffff;
}

/* Prevent underline anywhere */
a {
  text-decoration: none;
}

/* ===== BALANCE LABEL COLOR FIX ===== */
.card.balance p {
  color: #411d8a; /* same neutral label color as others */
}

/* ===== CLEAN DELETE BUTTON ===== */
.delete-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* hover effect */
.delete-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

/* align amount + delete nicely */
.item .right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.delete-btn:hover {
  background: rgba(248, 113, 113, 0.18);
}






