/* Root variables */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #f1f5f9;
  --accent-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --off-white: #f8fafc;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  /* Dashboard specific */
  --sidebar-width: 240px;
  --header-height: 70px;
  --card-radius: 12px;
  --notification-color: #f43f5e;
}

/* General styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 200px;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.inner-container {
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Logo styles */
.logo {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.logo-icon-wrapper {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-icon-wrapper::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.15) 50%, transparent 55%);
  top: 0;
  left: -100%;
  animation: shimmer 3s infinite;
}

.logo-icon {
  font-size: 2rem;
  color: var(--white);
  transform-origin: center;
  animation: pulse 3s infinite alternate;
}

.logo h2 {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.5px;
}

/* Heading styles */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Form styles */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: staggerFormItems 0.5s forwards;
}

/* Specific form animation delays */
#login-form .form-group:nth-child(1) {
  animation-delay: 0.1s;
}

#login-form .form-group:nth-child(2) {
  animation-delay: 0.2s;
}

#login-form .form-group:nth-child(3) {
  animation-delay: 0.3s;
}

#register-form .form-group:nth-child(1) {
  animation-delay: 0.1s;
}

#register-form .form-group:nth-child(2) {
  animation-delay: 0.2s;
}

#register-form .form-group:nth-child(3) {
  animation-delay: 0.3s;
}

#register-form .form-group:nth-child(4) {
  animation-delay: 0.4s;
}

#register-form .form-group:nth-child(5) {
  animation-delay: 0.5s;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: var(--transition);
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--secondary-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--off-white);
  color: var(--text-dark);
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background-color: var(--white);
}

/* Autofill style override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--off-white) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.input-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

/* Button styles */
.btn {
  display: block;
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-outline:active {
  transform: translateY(0);
}

.btn .btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.3);
}

/* Helper text and error handling */
.helper-text {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 0.8125rem;
  transition: var(--transition);
}

.helper-text.error {
  color: var(--danger-color);
  animation: shake 0.4s linear;
}

/* Forgot password links */
.forgot-links {
  margin: 1.5rem 0;
  text-align: center;
  font-size: 0.9375rem;
}

.forgot-links a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  margin: 0 0.5rem;
  position: relative;
  display: inline-block;
  padding: 2px;
}

.forgot-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transition: var(--transition);
  border-radius: 2px;
}

.forgot-links a:hover {
  color: var(--accent-color);
}

.forgot-links a:hover::after {
  width: 100%;
}

/* Divider styles */
.divider {
  display: flex;
  align-items: center;
  margin: 1.75rem 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--secondary-color), transparent);
}

.divider span {
  padding: 0 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--white);
}

@media only screen and (max-width: 768px) {
  .header-title {
    display: none;
  }
}

/* Security badge */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  color: var(--text-light);
  font-size: 0.875rem;
  transition: var(--transition);
  background-color: var(--off-white);
  padding: 0.75rem;
  border-radius: var(--radius);
}

.security-badge i {
  margin-right: 0.75rem;
  color: var(--success-color);
  font-size: 1.125rem;
}

.security-badge:hover {
  background-color: #f0fdf4;
  color: var(--text-dark);
}

/* Page styles */
.page {
  display: none;
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  z-index: 100; /* Ensure pages are above background */
  position: relative;
}

.page.active {
  display: block;
}

/* Account benefits */
.account-benefits {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  margin: 2rem -2.5rem -2.5rem;
  padding: 2rem 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.account-benefits h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
  font-weight: 600;
}

.benefit-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-item:hover {
  background-color: rgba(255, 255, 255, 0.7);
  transform: translateX(5px);
}

.benefit-item i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: var(--white);
  font-size: 1.125rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.benefit-item:nth-child(2) i {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.benefit-item:nth-child(3) i {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.benefit-item span {
  font-weight: 500;
  font-size: 0.9375rem;
}

/* Success animation */
.success-animation {
  text-align: center;
  margin: 2.5rem 0;
}

.success-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--success-color), #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
  position: relative;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon::before {
  content: '';
  position: absolute;
  width: 110%;
  height: 110%;
  border-radius: 50%;
  border: 2px solid var(--success-color);
  opacity: 0;
  animation: rippleSuccess 1.5s infinite;
}

.success-icon i {
  animation: checkmark 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
  transform: scale(0);
}

/* Password strength meter */
.password-strength {
  height: 6px;
  background-color: #e5e7eb;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
}

.password-strength-meter {
  height: 100%;
  width: 0;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  position: relative;
}

.password-strength-meter.weak {
  background: linear-gradient(to right, var(--danger-color), #f87171);
  width: 25%;
}

.password-strength-meter.medium {
  background: linear-gradient(to right, var(--warning-color), #fbbf24);
  width: 50%;
}

.password-strength-meter.strong {
  background: linear-gradient(to right, #34d399, var(--success-color));
  width: 100%;
  animation: pulse-horizontal 2s infinite;
}

/* Back button */
.back-btn {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
  transition: var(--transition);
  z-index: 10;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--primary-color);
  transform: translateX(-3px);
}

.back-btn i {
  margin-right: 0.375rem;
  transition: var(--transition);
}

.back-btn:hover i {
  transform: translateX(-3px);
}

/* Floating Labels */
.form-floating {
  position: relative;
}

.form-floating input {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.form-floating label {
  position: absolute;
  top: 0;
  left: 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  transform-origin: 0 0;
  transition: var(--transition);
  color: var(--text-muted);
  pointer-events: none;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
  transform: translateY(-0.65rem) scale(0.85);
  color: var(--primary-color);
}

/* Card Design Animation */
.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-bg-shape {
  position: absolute;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
  opacity: 0.05;
  border-radius: 50%;
}

.card-bg-shape:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -200px;
  right: -150px;
  animation: float 8s infinite alternate;
}

.card-bg-shape:nth-child(2) {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -150px;
  animation: float 10s infinite alternate-reverse;
}

/* Loading animation */
.loading-dots {
  display: none;
}

/* Screen transitions */
.slide-left {
  animation: slideLeft 0.3s forwards;
}

.slide-right {
  animation: slideRight 0.3s forwards;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes loadingDots {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes staggerFormItems {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-horizontal {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes rippleSuccess {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(30px) rotate(10deg);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Dashboard Styles */
/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--off-white);
  width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto; /* Enable vertical scrolling */
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Hide horizontal scrolling */
}

/* Style the scrollbar track */
.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05); /* Optional:  A very light background color */
    border-radius: 10px; /* Optional: Rounded corners for the track */
}

/* Style the scrollbar thumb (the draggable part) */
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /*  A light color for the thumb */
    border-radius: 10px; /* Rounded corners for the thumb */
    border: 3px solid transparent;  /* added border */
    background-clip: padding-box; /* keep padding on the sides */
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar::-webkit-scrollbar {
    width: 8px; /*  Make the scrollbar thin */
}

.sidebar-collapsed {
  width: 70px;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 1.5rem 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-collapsed .sidebar-logo-text {
  display: none;
}

.sidebar-toggle {
  position: absolute;
     right: -5px;
    top: 73px;
    background: var(--white);
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0.1);
    transition: all 0.3sease;
    z-index: 10;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

.sidebar-menu {
  padding: 1.5rem 0.75rem;
  flex: 1;
}

.menu-section {
  margin-bottom: 1.5rem;
}

.menu-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.sidebar-collapsed .menu-section-title {
  display: none;
}

.menu-items {
  list-style: none;
}

.menu-item {
  margin-bottom: 0.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.2);
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  position: relative;
}

.menu-icon {
  width: 20px;
  display: flex;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 1.125rem;
}

.sidebar-collapsed .menu-icon {
  margin-right: 0;
}

.menu-text {
  font-weight: 500;
  font-size: 0.9375rem;
}

.sidebar-collapsed .menu-text {
  display: none;
}

.menu-notification {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--notification-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(244, 63, 94, 0.4);
}

.sidebar-collapsed .menu-notification {
  right: 50%;
  transform: translate(10px, -5px);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-collapsed .sidebar-footer {
  padding: 1rem 0;
  display: flex;
  justify-content: center;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-collapsed .user-details {
  display: none;
}

.user-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 13px;
}

.user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin 0.3s ease;
}

.sidebar-collapsed + .main-content {
  margin-left: 70px;
}

/* Header */
.dashboard-header {
  height: var(--header-height);
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-title h1 {
  font-size: 1.5rem;
  margin: 0;
}

.header-title h1::after {
  display: none;
}

.header-title p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-action {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  background-color: var(--off-white);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-action:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.header-action-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--notification-color);
  color: white;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(244, 63, 94, 0.4);
}

/* Dashboard Content */
.dashboard-content {
  padding: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: 1.5rem;
}

/* Quick Actions */
.quick-actions {
  grid-column: span 12;
  margin-bottom: 1.5rem;
}

.action-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1rem;
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.07);
  border-color: var(--primary-light);
}

.action-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.action-icon-transfer {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.action-icon-pay {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-color);
}

.action-icon-deposit {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.action-icon-investments {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.action-text h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.25rem;
}

.action-text p {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
}

/* Account Cards */
.accounts-section {
  grid-column: span 12 !important; /* Force full width */
  order: 2;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.section-action {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
}

.section-action:hover {
  color: var(--primary-dark);
  transform: translateX(3px);
}

.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem 0.25rem;
  margin-bottom: 1.5rem;
  overflow-x: visible;
}

.account-card {
  flex: none;
  width: auto;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 16px;
  padding: 1.5rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(37, 99, 235, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.account-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 20px 30px rgba(37, 99, 235, 0.25);
}

.account-card.savings {
  background: linear-gradient(135deg, var(--accent-color), #6d28d9);
}

.account-card.credit {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.account-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0.1;
}

.account-card-bg span {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.account-card-bg span:nth-child(1) {
  width: 200px;
  height: 200px;
  top: -80px;
  right: -80px;
}

.account-card-bg span:nth-child(2) {
  width: 150px;
  height: 150px;
  bottom: -60px;
  left: -60px;
}

.account-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.account-balance {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.account-number {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.account-actions {
  display: flex;
  justify-content: space-between;
}

.account-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.account-action:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.account-action-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-action-text {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Transactions */
.transactions-section {
  grid-column: span 8 !important;
  order: 3;
}

.transaction-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--card-radius);
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  gap: 1rem;
}

.filter-options {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-option {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.filter-option:hover {
  background-color: var(--secondary-color);
}

.filter-option.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.filter-search {
  position: relative;
  width: 250px;
}

.filter-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 30px;
  border: 1px solid var(--secondary-color);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.transactions-list {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--secondary-color);
  transition: all 0.2s ease;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  background-color: rgba(59, 130, 246, 0.03);
}

.transaction-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.transaction-icon {
  width: 50px;
  height: 50px;
  border-radius: 25%;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.transaction-icon.income {
  background: #f0fdf4;
  color: var(--success-color);
}

.transaction-icon.expense {
  background: #fff1f2;
  color: var(--danger-color);
}

.transaction-icon.transfer {
  background: #eff6ff;
  color: var(--primary-color);
}

.transaction-details h4 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--text-dark);
}

.transaction-meta {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 0.875rem;
  gap: 0.75rem;
}

.transaction-category {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.transaction-category i {
  font-size: 0.75rem;
}

.transaction-amount {
  text-align: right;
}

.amount {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.amount.income {
  color: var(--success-color);
}

.amount.expense {
  color: var(--danger-color);
}

.amount.transfer {
  color: var(--primary-color);
}

.transaction-date {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* Activity Summary */
.activity-section {
  grid-column: span 4;
  order: 4;
}

.activity-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.spending-chart {
  text-align: center;
  padding: 1.5rem 0;
  position: relative;
}

.spending-chart-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spending-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.spending-donut::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  height: 65%;
  background-color: white;
  border-radius: 50%;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.spending-total {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.spending-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.spending-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.spending-categories {
  margin-top: 1.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.category-item:hover {
  background-color: var(--secondary-color);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Category color definitions */
.category-color.shopping {
  background-color: var(--danger-color);
}

.category-color.bills {
  background-color: var(--success-color);
}

.category-color.food {
  background-color: var(--warning-color);
}

.category-color.entertainment {
  background-color: var(--primary-color);
}

.category-name {
  font-size: 0.9375rem;
  font-weight: 500;
}

.category-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-value {
  font-size: 0.9375rem;
  font-weight: 600;
}

.category-percent {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Header user profile styles */
.header-user-info {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 50px;
  transition: all 0.2s ease;
  margin-right: 10px;
  background-color: rgba(255, 255, 255, 0.1);
}

.header-user-info:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.header-user-info .user-avatar {
     margin-right: 8px;
    width: 36px;
    height: 36px;
    color: #FFF;
    padding-bottom: 4px;
}

/* User dropdown menu */
.user-dropdown {
  position: fixed;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  display: none;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-dropdown.show {
  display: block;
  animation: fadeInDown 0.3s forwards;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-dropdown-item:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

.user-dropdown-item i {
  margin-right: 12px;
  width: 16px;
  text-align: center;
  color: var(--primary-color);
}

/* Shared dropdown styles */
.notifications-dropdown,
.messages-dropdown {
  width: 360px;
  max-width: 90vw;
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 1000;
  transform-origin: top right;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.notifications-dropdown.show,
.messages-dropdown.show {
  transform: scale(1);
  opacity: 1;
}

.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

.mark-all-read-btn {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
}

.mark-all-read-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.dropdown-content {
  overflow-y: auto;
  max-height: calc(70vh - 110px);
  padding: 0.5rem 0;
  flex: 1;
}

.dropdown-content::-webkit-scrollbar {
  width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-content::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--secondary-color);
  text-align: center;
}

.view-all {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.view-all:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--text-light);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9375rem;
}

/* Notification specific styles */
.notification-item {
  display: flex;
  padding: 1rem;
  transition: background-color 0.2s;
  position: relative;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background-color: rgba(0, 0, 0, 0.025);
}

.notification-item.unread {
  background-color: rgba(59, 130, 246, 0.05);
  border-left-color: var(--primary-color);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.875rem;
  flex-shrink: 0;
  color: var(--primary-color);
}

.notification-icon.high {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.notification-icon.medium {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.notification-icon.low {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.notification-message {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  line-height:1.4;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.unread-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Message specific styles */
.message-item {
  display: flex;
  padding: 1rem;
  transition: background-color 0.2s;
  position: relative;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.message-item:hover {
  background-color: rgba(0, 0, 0, 0.025);
}

.message-item.unread {
  background-color: rgba(59, 130, 246, 0.05);
  border-left-color: var(--primary-color);
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.875rem;
  flex-shrink: 0;
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
}

.message-content {
  flex: 1;
  min-width: 0; /* Ensures text truncation works */
}

.message-sender {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.message-subject {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.message-preview {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-actions {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  position: relative;
}

.message-actions i {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
}

/* Responsive styles */
@media (max-width: 1200px) {
  .transactions-section,
  .accounts-section {
    grid-column: span 12 !important;
  }

  .activity-section {
    grid-column: span 12 !important;
  }

  .account-cards {
    flex-wrap: nowrap;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-collapsed {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-collapsed + .main-content {
    margin-left: 0;
  }

  .dashboard-content {
    padding: 1.5rem 1rem;
  }

  .action-cards {
    flex-direction: column;
  }

  .action-card {
    min-width: auto;
  }

  .account-cards {
    flex-direction: column;
  }

  .account-card {
    flex: 1;
    width: 100%;
  }

  .transaction-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-options {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .filter-search {
    width: 100%;
  }

  .dashboard-header {
    padding: 0 1rem;
  }

  .header-actions {
    gap: 0.75rem;
  }

  .header-user-info .user-details {
    display: none;
  }

  .header-user-info {
    margin-right: 0.5rem;
  }

  .user-dropdown {
    right: 0.5rem;
    width: 200px;
  }

  /* Mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 576px) {
  .notifications-dropdown,
  .messages-dropdown {
    width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem !important;
  }

  .notification-message,
  .message-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .transaction-amount {
    text-align: left;
    width: 100%;
  }

  .container {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  body {
    padding: 0;
  }

  .back-btn {
    top: 1rem;
    left: 1rem;
  }
}



.submenu {
    margin-left: 2.5rem;
    margin-top: 0.25rem;
    display: none;
    transition: all 0.3s ease;
  }

  .submenu li {
    margin-bottom: 0.5rem;
  }

  .submenu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    display: block;
    transition: all 0.2s ease;
  }

  .submenu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
  }

  .menu-arrow i {
    transition: transform 0.3s ease;
  }

  .sidebar-collapsed .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--primary-dark);
    padding: 0.5rem;
    border-radius: 0 4px 4px 0;
    min-width: 180px;
    margin-left: 0;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .sidebar-collapsed .menu-item:hover .submenu {
    display: block;
  }


  .menu-item {
  position: relative;
}

.sidebar-collapsed .menu-item:hover .menu-text {
  display: block;
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--primary-dark);
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  min-width: 150px;
  white-space: nowrap;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-collapsed .menu-notification {
  display: none;
}

.sidebar-collapsed .menu-item:hover .menu-notification {
  display: block;
  position: absolute;
  left: calc(100% + 120px);
  top: 50%;
  transform: translateY(-50%);
}

.menu-link {
  position: relative;
  transition: all 0.2s ease;
}

.menu-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.sidebar-collapsed .menu-arrow {
  display: none;
}



.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff; /* Solid white background */
  z-index: 9999; /* Ensure it's on top of everything */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease; /* Fade-out effect */
}

.loading-screen .spinner {  /* Optional: if you want a spinner */
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}


.account-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.5rem;
    }
    
    .account-currency {
      font-size: 0.75rem;
      opacity: 0.8;
      background: rgba(255, 255, 255, 0.2);
      padding: 0.25rem 0.5rem;
      border-radius: 12px;
    }
    
    /* Local balance display */
    .account-local-balance {
      font-size: 0.875rem;
      opacity: 0.8;
      margin-top: -0.5rem;
      margin-bottom: 1rem;
    }
    
    /* Transaction local amount */
    .transaction-local-amount {
      font-size: 0.75rem;
      color: var(--text-light);
      margin-bottom: 0.25rem;
    }
    
    .transaction-currency {
      background: rgba(59, 130, 246, 0.1);
      color: var(--primary-color);
      padding: 0.125rem 0.375rem;
      border-radius: 12px;
      font-size: 0.75rem;
      margin-left: 0.5rem;
    }
    
    /* Loan account style */
    .account-card.loan {
      background: linear-gradient(135deg, var(--warning-color), #d97706);
    }
    
    /* Checking account style */
    .account-card.checking {
      background: linear-gradient(135deg, var(--primary-color), #2563eb);
    }


    /* Account Card Animation Styles */

/* Make account cards clickable and add subtle hover effect */
.account-card {
  cursor: pointer;
  will-change: transform, box-shadow;
}

.account-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(37, 99, 235, 0.25);
}

/* Overlay for the full screen effect */
.account-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Expanded card styles */
.expanded-account-card {
  position: fixed;
  background: #4287f5; /* Solid blue color matching the screenshot */
  box-shadow: var(--shadow-lg);
  color: white;
  z-index: 1001;
  overflow: hidden;
}

.expanded-account-card.savings {
  background: #8b5cf6; /* Solid purple for savings */
}

.expanded-account-card.checking {
  background: #4287f5; /* Solid blue for checking */
}

.expanded-account-card.credit {
  background: #ef4444; /* Solid red for credit */
}

.expanded-account-card.loan {
  background: #f59e0b; /* Solid orange for loan */
}

/* Close button styles */
.expanded-card-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  z-index: 1002;
}

.expanded-card-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Expanded card content */
.expanded-card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow-y: auto;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 12%,
    rgba(255, 255, 255, 0.9) 25%,
    rgba(255, 255, 255, 1) 35%);
  transition: opacity 0.3s ease;
}

/* Loading indicator */
.expanded-card-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.expanded-card-loading .spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.expanded-card-loading p {
  font-size: 1rem;
  color: var(--text-dark);
}

/* Detail header */
.detail-header {
  padding: 6rem 1.5rem 1rem;
  text-align: center;
}

.detail-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
  font-weight: 600;
}

.detail-header p {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Tabs */
.account-detail-tabs {
  display: flex;
  background: transparent;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
}

.tab {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin: 0 0.25rem;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tab.active {
  background: white;
  color: var(--primary-color);
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Detail sections */
.detail-section {
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.detail-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.detail-card-row {
  display: flex;
  gap: 1.5rem;
}

.detail-card.half {
  flex: 1;
}

.detail-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-card-header h3 {
  font-size: 1.125rem;
  margin: 0;
  color: var(--text-dark);
  font-weight: 600;
}

.detail-card-actions {
  display: flex;
  gap: 0.75rem;
}

.detail-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.detail-btn:hover {
  background: rgba(59, 130, 246, 0.05);
}

.detail-card-content {
  padding: 1.5rem;
}

/* Detail info grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.375rem;
}

.detail-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Detail actions grid */
.detail-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.detail-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  background: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-action-btn:hover {
  background: var(--secondary-color);
}

.detail-action-btn i {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
}

.detail-action-btn span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
}

/* Transaction list in detail view */
.transaction-list.full {
  border-radius: var(--radius);
  overflow: hidden;
}

.transaction-header {
  display: flex;
  font-weight: 500;
  color: var(--text-light);
  font-size: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--secondary-color);
}

.transaction-column {
  padding: 0.75rem 1rem;
  flex: 1;
}

.transaction-column.date {
  flex: 0 0 120px;
}

.transaction-column.description {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.transaction-column.category {
  flex: 1;
}

.transaction-column.reference {
  flex: 1;
}

.transaction-column.amount {
  flex: 1;
  text-align: right;
}

.transaction-column.amount.income {
  color: var(--success-color);
}

.transaction-column.amount.expense {
  color: var(--danger-color);
}

.transaction-column.balance {
  flex: 1;
  text-align: right;
}

.transaction-item.detailed {
  display: flex;
  border-bottom: 1px solid var(--secondary-color);
  transition: background-color 0.2s ease;
}

.transaction-item.detailed:last-child {
  border-bottom: none;
}

.transaction-item.detailed:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-color);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover {
  background: var(--secondary-color);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Transaction filters */
.transaction-filters-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.filter-select,
.date-input,
.amount-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: white;
}

.date-range-picker,
.amount-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.date-separator,
.amount-separator {
  font-size: 0.875rem;
  color: var(--text-light);
}

.search-input {
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.search-btn {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

.filter-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: flex-end;
  flex: 1;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.primary {
  background: var(--primary-color);
  color: white;
  border: none;
}

.filter-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.filter-btn.secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--secondary-color);
}

.filter-btn.secondary:hover {
  background: var(--secondary-color);
}

/* Statements grid */
.statements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.statement-card {
  display: flex;
  flex-direction: column;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.statement-card:hover {
  background: white;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.statement-icon {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.statement-info h4 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.statement-info p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0 0 1rem;
}

.statement-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.statement-btn {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.statement-btn:first-child {
  background: var(--primary-color);
  color: white;
  border: none;
}

.statement-btn:first-child:hover {
  background: var(--primary-dark);
}

.statement-btn:last-child {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--secondary-color);
}

.statement-btn:last-child:hover {
  background: var(--secondary-color);
}

/* Preferences container */
.preferences-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preference-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.preference-info {
  flex: 1;
  min-width: 200px;
}

.preference-info h4 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.preference-info p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

.preference-control {
  flex: 2;
  min-width: 300px;
}

.radio-container {
  display: block;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.radio-label {
  font-size: 0.9375rem;
  margin-left: 0.5rem;
}

.preference-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.preference-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: white;
}

.preference-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.preference-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preference-btn.primary {
  background: var(--primary-color);
  color: white;
  border: none;
}

.preference-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.preference-btn.secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--secondary-color);
}

.preference-btn.secondary:hover {
  background: var(--secondary-color);
}

/* Chart placeholders */
.chart-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-placeholder {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--off-white);
}

.placeholder-chart {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-label {
  font-size: 0.875rem;
  color: var(--text-dark);
}

/* Insights container */
.insights-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--off-white);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.insight-card:hover {
  background: white;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.insight-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.insight-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.insight-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.insight-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.insight-content h4 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.insight-content p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* Animation keyframes */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive styles */
@media (max-width: 992px) {
  .detail-card-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .transaction-column.reference {
    display: none;
  }
  
  .statement-card {
    flex-direction: row;
    align-items: center;
  }
  
  .statement-icon {
    margin-bottom: 0;
    margin-right: 1rem;
  }
  
  .statement-actions {
    margin-left: auto;
  }
  
  .insights-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .detail-header {
    padding: 4rem 1rem 1.5rem;
  }
  
  .detail-header h2 {
    font-size: 1.5rem;
  }
  
  .account-detail-tabs {
    overflow-x: auto;
    padding: 0.5rem;
    justify-content: flex-start;
  }
  
  .tab {
    padding: 0.5rem 1rem;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  
  .transaction-item.detailed {
    flex-wrap: wrap;
  }
  
  .transaction-column.date,
  .transaction-column.category,
  .transaction-column.balance {
    flex: 1 0 50%;
  }
  
  .transaction-column.description {
    flex: 1 0 100%;
    order: -1;
    padding-bottom: 0.25rem;
  }
  
  .transaction-column.amount {
    flex: 1 0 50%;
    text-align: right;
  }
  
  .preference-item {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .preference-control {
    flex: 1;
    min-width: auto;
  }
}

@media (max-width: 576px) {
  .expanded-card-content {
    padding: 1rem;
  }
  
  .detail-section {
    margin-bottom: 1rem;
  }
  
  .detail-card-header,
  .detail-card-content {
    padding: 1rem;
  }
  
  .account-detail-tabs {
    margin-bottom: 1rem;
  }
  
  .filter-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .transaction-column {
    padding: 0.5rem;
  }
}


/* Hide original card elements when expanded */
.expanded-account-card .account-balance,
.expanded-account-card .account-number,
.expanded-account-card .account-actions,
.expanded-account-card .account-header,
.expanded-account-card .account-type,
.expanded-account-card .account-card-bg,
.expanded-account-card .account-local-balance {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

/* Ensure the card itself remains visible */
.expanded-account-card {
  position: fixed;
  overflow: auto;
}

/* Adjust the expanded header position to avoid floating tabs */
.expanded-account-card .account-detail-tabs {
  margin-top: 60px; /* Push tabs down to clear card header */
}

/* Ensure the close button stays visible and properly positioned */
.expanded-card-close {
  position: fixed; /* Change to fixed to keep it visible when scrolling */
  top: 1rem;
  right: 1rem;
  z-index: 1100; /* Increase z-index to stay above all content */
}








body:has(.account-detail-overlay) {
  overflow: hidden !important;
}

 