/* ============================
   GLOBAL SCALE (ZOOM OUT)
   ============================ */
html {
  font-size: 85%; /* Adjust: 95%, 90%, or 85% */
}
/* ==========================================================================
Global and Theme Setup
========================================================================== */
:root {
  --primary: #388752;
  --primary-dark: #2e6b41;
  --background: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #606770;
  --shadow: rgba(0, 0, 0, 0.1);
  --progress-bg: #e5e7eb;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-blur: blur(12px);
  --gradient-bg: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bottom-nav-height: 64px;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

.dark-mode {
  --background: #0d1117;
  --card-bg: rgba(30, 41, 59, 0.15);
  --text: #e0e0e0;
  --text-muted: #b0b3b8;
  --shadow: rgba(255, 255, 255, 0.1);
  --progress-bg: rgba(45, 55, 72, 0.5);
  --glass-bg: rgba(30, 41, 59, 0.2);
}

body {
  background: var(--background);
  font-family: var(--font-body);
  transition: background 0.3s, color 0.3s;
  margin: 0;
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}
  h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700;}
  p, a{ font-family: var(--font-heading);}


.dashboard-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  margin-bottom: 200px;

}

.sidebar {
  width: 160px;
  background: var(--primary-dark);
  backdrop-filter: var(--glass-blur);
  padding: 12px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  box-shadow: inset -1px 0 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
  width: 72px;
  padding: 12px 0;
}

.sidebar.collapsed .sidebar-logo {
  text-align: center;
  margin-bottom: 12px;
}

.sidebar.collapsed .sidebar-logo img {
  width: 45px;
  height: 45px;
}

.sidebar.collapsed .sidebar-logo h5 {
  display: none !important;
}

.sidebar.collapsed .store-id-badge {
  display: none !important;
}

.sidebar.collapsed nav {
  gap: 2px;
  overflow-x: hidden;
  width: 100%;
}

.sidebar.collapsed .nav-link {
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  width: 54px !important;
  height: 54px !important;
  margin: 4px auto !important;
  border-radius: 14px !important;
  position: relative;
  overflow: visible !important;
  font-size: 0 !important;
  color: transparent !important;
  transition: all 0.2s ease !important;
}

.sidebar.collapsed .nav-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.sidebar.collapsed .nav-link i {
  font-size: 1.9rem !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.sidebar.collapsed .nav-link:hover i {
  color: rgba(255, 255, 255, 1) !important;
}

/* Tooltip for collapsed nav-links */
.sidebar.collapsed .nav-link::before {
  content: attr(data-label);
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar.collapsed .nav-link:hover::before {
  opacity: 1;
}

.sidebar.collapsed .menu-divider {
  margin: 10px 8px !important;
  height: 1px !important;
  overflow: hidden !important;
  width: auto !important;
}

.sidebar.collapsed .menu-heading {
  display: none !important;
  opacity: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Sidebar Brand - Logo + Toggle Container */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-brand .sidebar-logo {
  flex: 1;
  text-align: center;
}

.sidebar-brand .sidebar-logo img {
  width: 80px;
  height: 80px;
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  font-size: 0.95rem;
  padding: 0;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.05);
}

/* Collapsed Brand */
.sidebar.collapsed .sidebar-brand {
  flex-direction: column;
  gap: 8px;
  padding: 10px 6px;
}

.sidebar.collapsed .sidebar-logo {
  margin-bottom: 4px;
}

.sidebar.collapsed .sidebar-logo img {
  width: 45px;
  height: 45px;
}

.sidebar.collapsed .sidebar-toggle {
  width: 54px;
  height: 54px;
  font-size: 1.1rem;
  margin: 0;
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  border-radius: 0;
}

.main-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  /* max-width: 1200px; */
  margin: 0 auto;
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 200px;
    margin-top: 20px;
  }
  .sidebar-open {
    transform: translateX(0);
  }
  .main-content {
    margin: 0;
    padding: 20px;
  }
  .header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background);
    z-index: 1100;
  }
  .toggle-sidebar {
    display: flex;
    background: transparent;
    color: var(--text);
    border: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .toggle-sidebar i {
    font-size: 24px;
  }
  .header-icons {
    display: flex;
    gap: 15px;
  }
  .header-icons button {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
  }
  .welcome-section {
    margin-top: 60px;
  }
}

@media (min-width: 993px) {
  .header-bar {
    display: none;
  }
  .sidebar {
    transform: translateX(0) !important;
  }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin-top: 4px;
  margin-bottom: 4px;
  margin-left: 0;
  width: 100%;
}

.sidebar-logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.sidebar-logo h5 {
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0;
  color: white;
  letter-spacing: 0.5px;
}


.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  margin: 6px 10px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(4px);
}

.nav-link:hover::after {
  transform: scaleY(1);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.12));
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
}

.nav-link.active::after {
  transform: scaleY(1);
  background: white;
}

.nav-link i {
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.nav-link:hover i {
  transform: scale(1.15);
}

/* Special styling for danger/logout links */
.nav-link.text-danger {
  color: rgba(239, 68, 68, 0.8);
  margin-top: auto;
}

.nav-link.text-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.nav-link.text-danger::after {
  background: rgba(239, 68, 68, 0.6);
}

/* Modern sidebar scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.dashboard-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: slideIn 0.6s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow);
}

.dashboard-card h6 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.welcome-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.welcome-section h4 {
  font-size: 1.75rem;
  font-weight: 800;
}

.profile-container {
  position: relative;
}

.profile-pic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  cursor: pointer;
}

.dropdown-menu {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--progress-bg);
  border-radius: 12px;
  min-width: 150px;
  margin-top: 8px;
}

.dropdown-item {
  color: var(--text);
  padding: 10px 15px;
  font-size: 1rem;
}

.dropdown-item:hover {
  background: var(--primary);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid var(--progress-bg);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.stat-card h6 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-card p {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.subscription-card .status {
  font-size: 1rem;
  color: var(--text-muted);
}

.subscription-card .plan {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 12px 0;
}

.action-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s, transform 0.2s;
}

.action-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--progress-bg);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item i {
  font-size: 1.5rem;
  color: var(--primary);
}

.activity-item p {
  margin: 0;
  font-size: 1rem;
}

.activity-time {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.main-content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 10px;
}

.main-content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: var(--progress-bg);
  border-radius: 12px;
}

.main-content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 12px;
}

@media (max-width: 576px) {
  .dashboard-card {
    padding: 16px;
    border-radius: 16px;
  }
  .welcome-section h4 {
    font-size: 1.4rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .profile-pic {
    width: 36px;
    height: 36px;
  }
  .action-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .sidebar {
    padding: 20px;
  }
  .nav-link {
    font-size: 1rem;
    padding: 12px 16px;
  }
  .nav-link i {
    font-size: 1.3rem;
  }
  .sidebar-logo h5 {
    font-size: 1.3rem;
  }
  .sidebar-logo img {
    width: 80px;
    height: 80px;
  }
}

.modal-content {
  border-radius: 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 12px 32px var(--shadow);
  border: none;
}

.form-control {
  border-radius: 12px;
  border: 1px solid var(--progress-bg);
  background: var(--card-bg);
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
}

.chart-container {
  margin-bottom: 24px;
  position: relative;
  height: 350px; /* Reduced height for compact chart */
}

.chart-container canvas {
  max-height: 200px !important; /* Restrict canvas height */
  width: 100%;
}

.date-range-picker {
  margin-bottom: 12px; /* Slightly reduced margin */
  display: flex;
  align-items: center;
  gap: 10px;
}

.flatpickr-input {
  background: var(--card-bg);
  border: 1px solid var(--progress-bg);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text);
  width: 180px; /* Slightly smaller input */
}

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


  /* Verification Notice Styles */
  .verification-notice {
    background: var(--gradient-bg);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 24px var(--shadow), 0 0 0 3px rgba(56, 135, 82, 0.3);
    animation: pulse 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

.verification-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.verification-notice i {
    font-size: 2.5rem;
    color: #ffffff;
    flex-shrink: 0;
}

.verification-notice .content {
    flex: 1;
}

.verification-notice h6 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.verification-notice p {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.verification-notice .action-btn {
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.verification-notice .action-btn:hover {
    background: #f0f0f0;
    color: var(--primary-dark);
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .verification-notice {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    .verification-notice i {
        font-size: 2rem;
    }
    .verification-notice h6 {
        font-size: 1.1rem;
    }
    .verification-notice p {
        font-size: 0.9rem;
    }
    .verification-notice .action-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}


  /* START: Post List Page Design Styles */

  .search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-left: auto; /* Align to the right without float */
    margin-bottom: 0; /* Managed by flex gap */
  }

  @media (max-width: 576px) {
    .search-bar {
      max-width: none;
      width: 100%;
      margin-left: 0; /* Center on mobile */
    }
  }

  .search-input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--progress-bg);
    background: var(--card-bg);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
  }

  .search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
    outline: none;
  }

  .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
  }

  .posts-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Consistent column widths */
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Define column widths for desktop */
  .posts-table th:nth-child(1),
  .posts-table td:nth-child(1) {
    /* Title */
    width: 30%;
  }
  .posts-table th:nth-child(2),
  .posts-table td:nth-child(2) {
    /* Post Type */
    width: 15%;
  }
  .posts-table th:nth-child(3),
  .posts-table td:nth-child(3) {
    /* Status */
    width: 15%;
  }
  .posts-table th:nth-child(4),
  .posts-table td:nth-child(4) {
    /* Created */
    width: 15%;
  }
  .posts-table th:nth-child(5),
  .posts-table td:nth-child(5) {
    /* Votes */
    width: 10%;
  }
  .posts-table th:nth-child(6),
  .posts-table td:nth-child(6) {
    /* Actions */
    width: 15%;
  }

  .posts-table th,
  .posts-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--progress-bg);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .posts-table th {
    font-weight: 600;
    color: var(--text-muted);
  }

  .posts-table td {
    font-size: 1rem;
  }

  .posts-table tr:hover {
    background: rgba(37, 211, 102, 0.1);
  }

  .action-btn {
    margin-right: 5px;
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .action-dropdown .dropdown-menu {
    min-width: 120px;
  }

  .action-dropdown .dropdown-item {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* Pagination Styles */
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
  }

  .pagination-btn {
    background: var(--card-bg);
    border: 1px solid var(--progress-bg);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
  }

  .pagination-btn:hover:not(.disabled) {
    background: var(--primary);
    color: white;
  }

  .pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .pagination-btn.disabled {
    background: var(--progress-bg);
    color: var(--text-muted);
    cursor: not-allowed;
  }

  /* Responsive Adjustments */
  @media (max-width: 768px) {
    .posts-table {
      min-width: 600px; /* Enable scrolling on medium screens */
    }
  }

  @media (max-width: 576px) {
    .posts-table {
      display: block; /* Stack layout for small screens */
      table-layout: auto;
    }
    .posts-table thead {
      display: none;
    }
    .posts-table tbody,
    .posts-table tr {
      display: block;
    }
    .posts-table td {
      display: block;
      text-align: left;
      padding: 8px;
      position: relative;
      border-bottom: none;
      overflow: visible;
      white-space: normal;
    }
    .posts-table td:before {
      content: attr(data-label);
      font-weight: 600;
      color: var(--text-muted);
      display: block;
      margin-bottom: 4px;
    }
    .posts-table td:not(:last-child) {
      border-bottom: 1px solid var(--progress-bg);
    }
    .posts-table th:nth-child(4), .posts-table td:nth-child(4), /* Created */
      .posts-table th:nth-child(5), .posts-table td:nth-child(5) {
      /* Votes */
      display: none;
    }
    .posts-table td .action-btn {
      display: inline-block;
      margin: 5px 2px;
      padding: 6px 10px;
      font-size: 0.8rem;
    }
    .action-dropdown .dropdown-menu {
      min-width: 80px;
    }
    .status-badge {
      padding: 3px 8px;
      font-size: 0.8rem;
    }
    .search-input {
      font-size: 0.9rem;
      padding: 8px 35px 8px 35px;
    }
    .search-icon {
      font-size: 1rem;
    }
    .pagination-btn {
      padding: 6px 10px;
      font-size: 0.8rem;
    }
  }

  /* START: Thresh Page section Styles */
  /* Earnings Header */
  .earnings-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
  }

  .card-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
  }

  .earnings-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary);
  }

  /* Threshold Info */
  .threshold-info {
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 16px;
  }

  /* Progress Bar */
  .threshold-progress-container {
    margin: 16px 0;
  }

  .threshold-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 8px;
  }

  .threshold-progress-bar {
    width: 80.4%;
    height: 40px;
    background: var(--progress-bg, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
  }

  .threshold-progress-fill {
    height: 100%;
    background: var(--primary, #388752);
    transition: width 0.3s ease-in-out;
  }

  /* Progress Labels */
  .threshold-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text, #212529);
    margin-top: 8px;
  }

  .threshold-progress-start,
  .threshold-progress-end {
    font-weight: 500;
  }

  /* Last Payment */
  .last-payment {
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
    margin-top: 16px;
  }

  .last-payment i {
    margin-right: 6px;
  }

  /* Responsive Adjustments */
  @media (max-width: 576px) {
    .earnings-amount {
      font-size: 1.25rem;
      color: var(--primary);
    }

    .threshold-info,
    .threshold-progress-text,
    .last-payment {
      font-size: 0.8125rem;
    }
  }

  /* Money Cards (Earnings Overview) */
  .money-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(56, 135, 82, 0.2); /* Subtle --primary accent */
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s, scale 0.3s;
    position: relative;
    overflow: hidden;
  }
  .money-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px var(--shadow);
  }
  .money-card .card-body {
    padding: 24px;
    text-align: center;
  }
  .money-card .card-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
  }
  .money-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .money-card .card-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
  }

  /* Total Earnings Card */
  .total-earnings-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
  }
  .total-earnings-card h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
  }
  .reward-withdraw-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
  }
  .reward-withdraw-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
  }
  /* Responsive Adjustments */
  @media (max-width: 576px) {
    .money-card .card-text {
      font-size: 1.4rem;
    }
    .money-card .card-icon {
      font-size: 1.2rem;
    }
    .money-card .card-title {
      font-size: 0.85rem;
    }
    .total-earnings-card {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
    .reward-withdraw-btn {
      padding: 6px 12px;
      font-size: 0.9rem;
    }
  }

  /* Wallet Balance Card */
  .wallet-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(56, 135, 82, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px var(--shadow);
  }
  .wallet-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      135deg,
      rgba(56, 135, 82, 0.1) 0%,
      rgba(255, 255, 255, 0) 50%
    );
    z-index: 0;
  }
  .wallet-info {
    flex: 1;
    z-index: 1;
  }
  .wallet-info .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }
  .wallet-info .card-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
  }
  .wallet-actions {
    display: flex;
    gap: 12px;
    z-index: 1;
  }

  /* Action Buttons (Deposit/Withdraw/Send) */
  .deposit-btn,
  .withdraw-btn,
  .send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
  }
  .deposit-btn:hover,
  .withdraw-btn:hover,
  .send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.15);
  }
  .withdraw-btn {
    background: var(--primary-dark);
  }
  .send-btn {
    background: #2e6b44; /* Slightly darker shade of --primary */
  }

  /* Transaction Status */

  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
  }

  .status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #e0a800;
  }

  .status-active {
    background: rgba(37, 211, 102, 0.2);
    color: var(--primary);
  }

  .status-danger {
    background: rgba(244, 20, 20, 0.2);
    color: rgb(241, 87, 87);
  }

  .status-draft {
    background: rgba(255, 193, 7, 0.2);
    color: #e0a800;
  }

  .status-closed {
    background: rgba(108, 117, 125, 0.2);
    color: var(--text-muted);
  }

  .status-success {
    background: rgba(37, 211, 102, 0.2);
    color: var(--primary);
  }

  /* Search Bar */
  .search-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 400px;
    position: relative;
  }
  .search-bar {
    position: relative;
  }
  .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
  }
  .search-input {
    width: 100%;
    padding: 8px 8px 8px 35px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
  }
  .search-input::placeholder {
    color: var(--text-muted);
  }

  /* Transaction Cards */
  .transaction-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(56, 135, 82, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s;
  }
  .transaction-card:hover {
    transform: translateY(-3px);
  }
  .transaction-info {
    flex: 1;
  }
  .transaction-info .type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .transaction-info .date {
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  .transaction-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 16px;
  }
  .transaction-status .status-badge {
    padding: 4px 8px;
  }

  /* Responsive Adjustments */
  @media (max-width: 576px) {
    .wallet-card {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
    }
    .wallet-info .card-text {
      font-size: 2rem;
    }
    .wallet-actions {
      justify-content: center;
      width: 100%;
    }
    .transaction-card {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
    .transaction-amount {
      margin: auto;
    }
  }

  /* WALLET BALANCE PAGE SECTION */
  /* Wallet Balance Card */
  .wallet-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(56, 135, 82, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px var(--shadow);
  }
  .wallet-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      135deg,
      rgba(56, 135, 82, 0.1) 0%,
      rgba(255, 255, 255, 0) 50%
    );
    z-index: 0;
  }
  .wallet-info {
    flex: 1;
    z-index: 1;
  }
  .wallet-info .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }
  .wallet-info .card-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
  }
  .wallet-actions {
    display: flex;
    gap: 12px;
    z-index: 1;
  }

  /* Wallet Address Styles */
  .wallet-address {
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text);
    word-break: break-all;
    margin-top: 20px;
  }

  .wallet-address-text {
    color: var(--text-muted);
    align-items: center;
  }

  .copy-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
  }

  .copy-btn:hover {
    color: var(--primary-dark);
  }

  /* Responsive Adjustments */
  @media (max-width: 768px) {
    .wallet-address {
      font-size: 0.85rem;
    }

    .copy-btn {
      font-size: 0.85rem;
    }
  }

  @media (max-width: 576px) {
    .wallet-address {
      font-size: 0.8rem;
    }

    .copy-btn {
      font-size: 0.8rem;
    }
  }

  /* Action Buttons (Deposit/Withdraw/Send) */
  .deposit-btn,
  .withdraw-btn,
  .send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
  }
  .deposit-btn:hover,
  .withdraw-btn:hover,
  .send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.15);
  }
  .withdraw-btn {
    background: var(--primary-dark);
  }
  .send-btn {
    background: #2e6b44;
  }

  











/* Container bar */
.search-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: var(--card-bg);
  padding: 12px 16px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Search */
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--progress-bg);
  padding: 8px 14px;
  border-radius: 40px;
}

.search-box i {
  margin-right: 8px;
  color: #28a745; /* ✅ success green */
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
}

/* Filter */
.filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-box input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--progress-bg);
  border-radius: 40px;
  font-size: 0.9rem;
  color: #28a745; /* ✅ green text */
  background: var(--card-bg);
  outline: none;
}

.filter-separator {
  font-size: 0.9rem;
  color: var(--text);
}

.filter-btn {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 40px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.filter-btn:hover {
  background: #218838;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .search-filter-bar {
    flex-direction: column;
    border-radius: 20px;
  }
  .filter-box {
    width: 100%;
    justify-content: space-between;
  }
  .filter-box input[type="date"] {
    flex: 1;
  }
}



















  /* Transaction Cards */
  .transaction-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(56, 135, 82, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition-duration: 0.3s;
  }
  .transaction-card:hover {
    transform: translateY(-3px);
  }
  .transaction-info {
    flex: 1;
  }
  .transaction-info .type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .transaction-info .date {
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  .transaction-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 16px;
  }
  .transaction-status .status-badge {
    padding: 4px 8px;
  }

  /* Responsive Adjustments */
  @media (max-width: 576px) {
    .wallet-card {
      flex-direction: column;
      align-items: center;
      gap: 20px;
      padding: 20px;
    }
    .wallet-info {
      text-align: center;
      width: 100%;
    }
    .wallet-info .card-text {
      font-size: 2rem;
    }
    .wallet-actions {
      justify-content: center;
      width: 100%;
      gap: 16px;
      margin-top: 12px;
    }
    .transaction-card {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
    .transaction-amount {
      margin: 8px 0;
    }
    .progress-bar {
      width: 80%;
    }
  }

  /* Progress Bar */
  .progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 242, 245, 0.9); /* --background with opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
  }
  .progress-overlay.hidden {
    opacity: 0;
    pointer-events: none;
  }
  .progress-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(56, 135, 82, 0.2);
  }
  .progress-fill {
    width: 0;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear;
  }

  /* Toast Notification */
  .toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 250px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10000; /* Above progress-overlay (9999) */
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    backdrop-filter: none !important; /* Override glass blur */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border */
  }

  .toast-notification.show {
    opacity: 1;
    transform: translateX(0);
  }

  .toast-success {
    background-color: #28a745 !important; /* Green for success */
  }

  .toast-error {
    background-color: #dc3545 !important; /* Red for error */
  }

  /* Toast Container */
  .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
  }

  /* Override Bootstrap toast to prevent conflicts */
  .toast {
    display: none; /* Hide Bootstrap toasts */
  }

  /* ==========================================================================
      Loading Spinner
      Purpose: Styles for the loading spinner during button submission.
    ========================================================================== */
  .loading-spinner {
    display: flex; /* Flex layout */
    flex-direction: column; /* Vertical stack */
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    height: 50vh; /* Half viewport height */
    color: var(--text-muted); /* Muted text */
  }

  .spinner {
    width: 48px; /* Spinner size */
    height: 48px; /* Square */
    border: 5px solid var(--primary); /* Brand border */
    border-top: 5px solid transparent; /* Transparent top */
    border-radius: 50%; /* Circular */
    animation: spin 1s linear infinite; /* Spin animation */
    margin-bottom: 16px; /* Space below */
  }

  .loading-spinner p {
    font-size: 1rem; /* Text size */
    font-weight: 500; /* Medium weight */
    color: var(--text); /* Theme text */
  }

  /* Animation Keyframes */
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }






.floating-notice {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 380px;
    max-width: 90vw;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 9999;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: var(--transition);
    color: var(--text);
    backdrop-filter: blur(8px); /* subtle glass effect if browser supports */
}

.floating-notice.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notice-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

.notice-content {
    padding: 20px 24px 20px 36px; /* extra left padding for accent bar */
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.notice-icon {
    font-size: 1.4em;
    line-height: 1;
}

.notice-header strong {
    color: var(--primary);
    font-size: 1.18em;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.notice-content p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-light);
    line-height: 1.5;
}

.notice-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    border: none;
    border-radius: 50%;
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(56,135,82,0.15);
}

.notice-close:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Smoother pop-in with slight overshoot */
@keyframes popIn {
    0%   { opacity: 0; transform: translateY(50px) scale(0.92); }
    60%  { opacity: 1; transform: translateY(-8px) scale(1.04); }
    80%  { transform: translateY(4px) scale(0.98); }
    100% { transform: translateY(0) scale(1); }
}

.floating-notice.show {
    animation: popIn 0.7s forwards;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .floating-notice {
        bottom: 20px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}
