/* ======================================================
   SMART EXPENSE TRACKER – GLOBAL THEME
   Futuristic | Glassmorphism | Neon Motion UI
====================================================== */

/* ===============================
   DESIGN TOKENS
================================ */
:root {
    /* 🎨 GRADIENT BACKGROUND */
    --bg-main: radial-gradient(
        circle at top left,
        #0f172a 0%,
        #020617 45%,
        #000000 100%
    );

    /* 🧊 GLASS SURFACES */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* 🧠 TEXT */
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;

    /* 🚀 NEON ACCENTS */
    --primary: #6366f1;
    --secondary: #22d3ee;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #facc15;

    /* 📐 SHAPE */
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    /* ✨ EFFECTS */
    --blur: blur(16px);
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-neon: 0 0 25px rgba(99, 102, 241, 0.45);

    /* ⏱️ MOTION */
    --fast: 0.25s;
    --normal: 0.4s;
    --slow: 0.8s;
}

/* ===============================
   RESET & BASE
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===============================
   TYPOGRAPHY
================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: 1.6rem;
}

p {
    color: var(--text-muted);
}

/* ===============================
   GLASS CARD
================================ */
.card {
    position: relative;
    background: linear-gradient(
        145deg,
        rgba(255,255,255,0.12),
        rgba(255,255,255,0.02)
    );
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition:
        transform var(--normal) ease,
        box-shadow var(--normal) ease,
        border var(--normal) ease;
    overflow: hidden;
}

/* GLOW BORDER ANIMATION */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(99,102,241,0.6),
        rgba(34,211,238,0.6),
        transparent
    );
    opacity: 0;
    transition: opacity var(--normal);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8),
                var(--shadow-neon);
}

/* ===============================
   BUTTONS
================================ */
.btn {
    position: relative;
    padding: 14px 26px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );
    overflow: hidden;
    transition:
        transform var(--fast) ease,
        box-shadow var(--fast) ease;
}

/* RIPPLE LIGHT */
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at top left,
        rgba(255,255,255,0.35),
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 40px rgba(99,102,241,0.6),
        0 0 25px rgba(34,211,238,0.5);
}

/* ===============================
   INPUTS & SELECTS
================================ */
input,
select {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    outline: none;
    transition:
        border var(--fast),
        box-shadow var(--fast),
        background var(--fast);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

/* ===============================
   BADGES
================================ */
.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
}

.badge.success { color: var(--success); }
.badge.danger  { color: var(--danger); }
.badge.warning { color: var(--warning); }

/* ===============================
   FLOATING ANIMATION
================================ */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-14px); }
    100% { transform: translateY(0); }
}

/* ===============================
   FADE / SLIDE ANIMATIONS
================================ */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   SCROLLBAR (DESKTOP)
================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--primary),
        var(--secondary)
    );
    border-radius: 10px;
}
.user-name {
  color: #e5e7eb;
  font-weight: 500;
  margin-right: 12px;
}
.logout-btn {
  margin: 20px;
  padding: 12px;
  width: calc(100% - 40px);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #020617;
  background: linear-gradient(
    270deg,
    #ff0080,
    #ff8c00,
    #faff00,
    #00ff85,
    #00c3ff,
    #7c7cff,
    #ff0080
  );
  background-size: 600% 600%;
  animation: rainbowFlow 6s ease infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logout-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.35);
}

.logout-btn:active {
  transform: scale(0.96);
}
@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* ===== MOBILE RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #0f0f0f;
  color: #fff;
}
.container {
  width: 100%;
  padding: 1rem;
}
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 0.6rem;
  }

  nav a {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
  }
}
.transaction-item {
  display: flex;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .transaction-item {
    flex-direction: column;
    gap: 0.3rem;
  }
}
input,
select,
button {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
}
canvas {
  max-width: 100%;
  height: auto !important;
}
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #111;
    justify-content: space-around;
    padding: 0.6rem 0;
  }

  body {
    padding-bottom: 60px;
  }
}
/* ===============================
   MOBILE SIDEBAR FIX
================================ */

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}
.mobile-nav {
  display: none;
}

/* MOBILE ONLY */
@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #0d0d0d;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid #222;
  }

  .mobile-nav a {
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
  }

  body {
    padding-bottom: 70px;
  }
}

/* ===============================
   RESPONSIVE FOUNDATION OVERRIDES
================================ */

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
}

img,
svg,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

@media (max-width: 900px) {
  .card {
    padding: 18px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  input,
  select,
  button {
    min-height: 46px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .card {
    border-radius: 16px;
    padding: 16px;
  }
}
