/* -------------------------------------------------------------
   GLOBAL
------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: linear-gradient(135deg, #101726, #1c2030);
  color: #fff;
  min-height: 100vh;
}

/* -------------------------------------------------------------
   NAVBAR
------------------------------------------------------------- */
.nav {
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.nav-brand img {
  width: 34px;
  height: 34px;
}

.nav-links a,
.btn-link {
  margin-left: 16px;
  text-decoration: none;
  color: #d7dcff;
  font-size: 0.95rem;
  transition: .2s;
}

.nav-links a:hover {
  color: #fff;
}

.btn-link {
  background: none;
  border: none;
  cursor: pointer;
}

/* -------------------------------------------------------------
   CARD / GLASS PANEL
------------------------------------------------------------- */
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 16px 0;
  box-shadow: 0 0 25px rgba(0,0,0,0.25);
}

/* -------------------------------------------------------------
   BUTTONS
------------------------------------------------------------- */
.btn {
  width: 100%;
  padding: 12px 14px;
  background: #4169e1;
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  transition: .2s;
}

.btn:hover {
  background: #5b7dff;
}

.btn-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-light:hover {
  background: rgba(255,255,255,0.25);
}

/* -------------------------------------------------------------
   FORMS
------------------------------------------------------------- */
input, select, textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  margin: 10px 0;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #d2d4e6;
}

label {
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: block;
}

/* -------------------------------------------------------------
   LAYOUT
------------------------------------------------------------- */
.container {
  width: 92%;
  max-width: 900px;
  margin: 30px auto;
}

.grid {
  display: grid;
  gap: 16px;
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.page-center {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.auth-card {
  max-width: 360px;
  text-align: center;
}

/* -------------------------------------------------------------
   TEXT STYLES
------------------------------------------------------------- */
.muted {
  color: #aeb4d8;
}

.small {
  font-size: 0.85rem;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* -------------------------------------------------------------
   TOAST
------------------------------------------------------------- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 22px;
  background: #4169e1;
  color: #fff;
  border-radius: 10px;
  opacity: 0;
  transform: translateX(120%);
  transition: .4s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* -------------------------------------------------------------
   TRANSACTION LIST
------------------------------------------------------------- */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-item {
  background: rgba(255,255,255,0.07);
  padding: 14px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.15);
}

.tx-item.income {
  border-left: 4px solid #4ee18a;
}

.tx-item.expense {
  border-left: 4px solid #ff6b6b;
}

/* -------------------------------------------------------------
   AVATAR + PROFILE
------------------------------------------------------------- */
.avatar {
  width: 110px;
  height: 110px;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  margin: auto;
}

.avatar-sm {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------------------------------
   ILLUSTRATIONS
------------------------------------------------------------- */
.illustration {
  width: 160px;
  margin: auto;
  opacity: 0.9;
}

/* -------------------------------------------------------------
   BALANCE GLOW CARD
------------------------------------------------------------- */
.balance-glow {
  position: relative;
  overflow: hidden;
}

.balance-glow:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(64,118,255,0.32), transparent);
}

/* -------------------------------------------------------------
   ANIMATIONS
------------------------------------------------------------- */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card, .auth-card {
  animation: fadeSlide .4s ease;
}
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInLoad 0.8s ease forwards;
}

@keyframes fadeInLoad {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Footer
================================ */
.main-footer {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    background: #1e1e1e;
    color: #ffffff;
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid #333;
    position: relative;
    bottom: 0;
}

.main-footer p {
    margin: 0;
    opacity: 0.8;
}
/* -------------------- Page Backgrounds with Overlay -------------------- */
body.dashboard,
body.savings,
body.debt,
body.budget,
body.reports,
body.profile {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #101726, #1c2030); /* fallback gradient */
}

/* Overlay layer for all pages */
body.dashboard::before,
body.savings::before,
body.debt::before,
body.budget::before,
body.reports::before,
body.profile::before {
    content: "";
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25; /* adjust transparency for readability */
    z-index: -1;
}

/* Dashboard Background */
body.dashboard::before {
    background-image: url('../images/BACKGROUND.jpg');
}

/* Savings Background */
body.savings::before {
    background-image: url('../images/SAVING\ BG.webp');
}

/* Debt Background */
body.debt::before {
    background-image: url('../images/OIP.webp');
}

/* Budget Background */
body.budget::before {
    background-image: url('../images/BUDGET.webp');
}

/* Reports Background */
body.reports::before {
    background-image: url('../images/REPORTS.avif');
}

/* Profile Background */
body.profile::before {
    background-image: url('../images/LOGO.webp');
}
body.index::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('../images/BACKGROUND.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25; /* adjust for visibility of content */
    z-index: -1;
}
