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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%);
  min-height: 100vh;
  color: #2d2d3a;
}

.hidden { display: none !important; }

/* ===================== LOGIN ===================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-width: 380px;
  width: 100%;
}

.login-logo { font-size: 56px; margin-bottom: 8px; }

.login-card h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #f093fb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { color: #8a8aa3; margin: 8px 0 28px; font-size: 14px; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  border: 2px solid #eee;
  background: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-google:hover { border-color: #667eea; box-shadow: 0 4px 14px rgba(102,126,234,0.25); transform: translateY(-1px); }

.login-error { color: #e63e6d; font-size: 13px; margin-top: 16px; min-height: 18px; }

/* ===================== APP HEADER ===================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: #fff;
}

.brand { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }

.user-box { display: flex; align-items: center; gap: 12px; font-weight: 600; }

.user-photo { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; }

.btn-ghost {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.35); }

/* ===================== MAIN ===================== */
.app-main { padding: 24px 32px 60px; max-width: 1200px; margin: 0 auto; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.summary-card {
  border-radius: 18px;
  padding: 20px 22px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.summary-label { font-size: 13px; opacity: 0.9; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.summary-value { font-size: 28px; font-weight: 800; margin-top: 6px; }

.card-pink   { background: linear-gradient(135deg, #f6416c, #ff9a76); }
.card-purple { background: linear-gradient(135deg, #7f53ac, #647dee); }
.card-blue   { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.card-green  { background: linear-gradient(135deg, #11998e, #38ef7d); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.panel {
  background: #fff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: #3a3a55; }

/* ===================== FORM ===================== */
.add-panel form { display: flex; flex-direction: column; gap: 14px; }

.add-panel label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b85;
  gap: 6px;
}

.add-panel input, .add-panel select {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #eee;
  outline: none;
  transition: border-color 0.2s;
}
.add-panel input:focus, .add-panel select:focus { border-color: #764ba2; }

.btn-primary {
  margin-top: 6px;
  background: linear-gradient(135deg, #667eea, #f093fb);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102,126,234,0.4); }

/* ===================== CHART TABS ===================== */
.chart-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

.tabs { display: flex; gap: 6px; background: #f1f1f7; padding: 4px; border-radius: 12px; }

.tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: #6b6b85;
  cursor: pointer;
  transition: all 0.2s;
}
.tab.active { background: #fff; color: #667eea; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ===================== LIST ===================== */
.list-panel { grid-column: 1 / -1; }

.expense-list { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }

.empty-msg { text-align: center; color: #b0b0c3; padding: 30px 0; }

.expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f9f9fc;
  transition: background 0.2s;
}
.expense-row:hover { background: #f1f0fb; }

.expense-left { display: flex; align-items: center; gap: 14px; }

.category-badge {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
}

.expense-info .expense-desc { font-weight: 600; font-size: 14px; color: #2d2d3a; }
.expense-info .expense-meta { font-size: 12px; color: #9a9ab0; }

.expense-amount { font-weight: 800; font-size: 16px; color: #e6396c; }

.btn-delete {
  border: none;
  background: transparent;
  color: #c4c4d4;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-delete:hover { color: #fff; background: #f6416c; }

@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
  .app-header { padding: 14px 18px; }
  .app-main { padding: 18px; }
}
