* { 
  font-family: 'Inter', sans-serif; 
  -webkit-tap-highlight-color: transparent; 
  transition: background-color 0.3s, color 0.3s; 
}

body { 
  background-color: #f0f4f8; 
  overflow: hidden; 
}

/* Dark Theme Variables */
.dark-mode { 
  --bg-color: #0f172a; 
  --card-bg: #1e293b; 
  --text-main: #f8fafc; 
  --text-dim: #94a3b8; 
}
.dark-mode body { background-color: var(--bg-color); }
.dark-mode .app-shell { background: var(--bg-color); }
.dark-mode .bg-white { background-color: var(--card-bg) !important; }
.dark-mode .text-slate-800, .dark-mode .text-gray-800 { color: var(--text-main) !important; }
.dark-mode .text-slate-600, .dark-mode .text-gray-600 { color: var(--text-dim) !important; }
.dark-mode border, .dark-mode .border { border-color: #334155 !important; }

/* Micro-Animations */
@keyframes bubblePop {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.page { display: none; animation: bubblePop 0.3s ease-out; will-change: transform, opacity; }
.active-page { display: block; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Structural Application Shell Container */
.app-shell { 
  max-width: 100%; 
  margin: 0 auto; 
  background: #ffffff; 
  height: 100vh; 
  position: relative; 
  overflow: hidden; 
}
@media (min-width: 768px) {
  .app-shell { 
    max-width: 850px; 
    margin: 2vh auto; 
    height: 96vh; 
    border-radius: 3rem; 
    box-shadow: 0 40px 80px -15px rgba(0,0,0,0.15); 
  }
}

/* Authentication Context View Elements */
.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: linear-gradient(-45deg, #0f172a, #1e3a8a, #312e81, #1e40af);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
}
.auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 1;
}
.auth-content-box {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 35px 35px 0 0;
  padding: 40px 30px;
  margin-top: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.auth-input {
  border-radius: 1.2rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 18px 22px;
  font-size: 1rem;
  transition: all 0.2s;
}
.auth-input:focus {
  border-color: #1e3a8a;
  background: white;
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
  outline: none;
}

.toggle-btn-active { color: #1e3a8a !important; }
.toggle-btn-inactive { color: white !important; }
#toggle-bg { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.cat-item.active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }

/* Control Drawers */
#side-drawer { position: fixed; inset: 0; z-index: 500; display: none; background: rgba(0,0,0,0.5); }
#drawer-content {
  width: 280px; 
  height: 100%; 
  background: white; 
  position: relative; 
  transform: translateX(-100%); 
  transition: transform 0.3s ease; 
}
#side-drawer.open { display: block; }
#side-drawer.open #drawer-content { transform: translateX(0); }
#scroll-area { scroll-behavior: smooth; }
