/* Custom styles for Monthly Expense Tracker - Grand Dashboard */

/* Import Google Fonts for modern typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #96a4ed;
  margin: 0;
  padding: 0;
  color: #333;
  height: 100vh;
  overflow-x: hidden;
}

.dashboard-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e6e6e6;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
}

.sidebar-header {
  border-bottom: 1px solid #e6e6e6;
}

.user-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 3px solid #7b5fff;
  box-shadow: 0 0 10px rgba(123, 95, 255, 0.5);
}

.sidebar-nav {
  padding-left: 0;
  margin-top: 20px;
  flex-grow: 1;
}

.sidebar-nav .nav-link {
  color: #6c757d;
  font-weight: 600;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  font-size: 1rem;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.sidebar-nav .nav-link i {
  font-size: 1.2rem;
  margin-right: 12px;
  color: #b0a9f7;
  transition: color 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: #7b5fff;
  background: #f7f5ff;
  border-left-color: #7b5fff;
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
  color: #7b5fff;
}

.btn-gradient {
  background: linear-gradient(45deg, #7b5fff, #a17bff);
  color: white;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(123, 95, 255, 0.4);
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  background: linear-gradient(45deg, #a17bff, #7b5fff);
  box-shadow: 0 8px 20px rgba(123, 95, 255, 0.6);
}

.sidebar-footer {
  padding: 15px 25px;
  border-top: 1px solid #e6e6e6;
  font-size: 0.9rem;
  color: #b0a9f7;
  display: flex;
  gap: 10px;
}

.category {
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
  cursor: default;
  user-select: none;
}

.category.free {
  background: #f7f5ff;
  color: #7b5fff;
  border: 1px solid #7b5fff;
}

.category.pro {
  background: #7b5fff;
  color: white;
}

/* Header */
.header {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 5;
}

.search-bar {
  width: 300px;
  position: relative;
}

.search-bar i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #b0a9f7;
  font-size: 1rem;
}

.search-input {
  padding-left: 35px;
  border-radius: 30px;
  border: 1px solid #e6e6e6;
  height: 36px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #7b5fff;
  box-shadow: 0 0 8px rgba(123, 95, 255, 0.4);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #7b5fff;
  box-shadow: 0 0 8px rgba(123, 95, 255, 0.5);
  object-fit: cover;
}

.btn-icon {
  background: transparent;
  border: none;
  color: #7b5fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-icon:hover {
  color: #a17bff;
}

/* Content */
.main-content {
  flex-grow: 1;
  overflow-y: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  padding: 30px 40px;
  max-width: 1000px;
  margin: 0 auto 40px;
  flex-grow: 1;
}

/* Dashboard Section */
#dashboardSection {
  background-color: #f8f9fa;
  border-radius: 1rem;
  padding: 2rem;
  margin: 1rem 0;
}

/* Info cards */
.info-card {
  position: relative;
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(123, 95, 255, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(123, 95, 255, 0.5);
}

.info-card h6 {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.info-card h3 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

.info-card small {
  font-weight: 400;
  opacity: 0.8;
}

/* Gradient backgrounds */
.gradient-pink {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
}

.gradient-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Circular overlays */
.circle-overlay {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(40px);
  pointer-events: none;
}

.circle-overlay-1 {
  width: 150px;
  height: 150px;
  top: -40px;
  right: -40px;
  background: rgba(255, 255, 255, 0.4);
}

.circle-overlay-2 {
  width: 100px;
  height: 100px;
  bottom: -30px;
  left: -30px;
  background: rgba(255, 255, 255, 0.3);
}

/* Form styling */
.form-label {
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
}

.form-select,
.form-control {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: #95a5f6; /* changed from white to a light blue shade */
}

.form-select:focus,
.form-control:focus {
  border-color: #7b5fff;
  box-shadow: 0 0 0 0.2rem rgba(123, 95, 255, 0.25);
  background: rgba(255, 255, 255, 1);
}

.btn-primary {
  background: linear-gradient(45deg, #7b5fff, #a17bff);
  border: none;
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(123, 95, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 95, 255, 0.4);
  background: linear-gradient(45deg, #a17bff, #7b5fff);
}

/* Table styling */
.table {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(123, 95, 255, 0.1);
}

.table thead th {
  background: linear-gradient(45deg, #7b5fff, #a17bff);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(123, 95, 255, 0.05);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1rem;
  border: none;
  vertical-align: middle;
}

.table tfoot th {
  background: #f8f9fa;
  font-weight: 700;
  font-size: 1.2rem;
  border: none;
  padding: 1rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .dashboard-wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e6e6e6;
  }
  .main-content {
    height: auto;
  }
  .content {
    padding: 20px;
    max-width: 100%;
  }
  .search-bar {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .sidebar-nav .nav-link {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
  .btn-gradient {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #7b5fff, #a17bff);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #a17bff, #7b5fff);
}

/* Icon sizes */
.card-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  opacity: 0.15;
  font-size: 4rem;
  pointer-events: none;
}
