* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.hidden {
  display: none !important;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  display: flex;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  height: 100vh; overflow: hidden;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    display: block;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.hidden {
  display: none !important;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  display: flex;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  height: 100vh; overflow: hidden;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    display: block;
  }
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
  padding: 30px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 2px solid rgba(59, 130, 246, 0.2);
  z-index: 100;
}

.sidebar h2 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  font-size: 24px;
  text-shadow: none;
}

.dropdown-nav {
  padding: 15px 30px;
  margin-bottom: 10px;
}

.nav-dropdown {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

.nav-dropdown:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.nav-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nav-dropdown option {
  padding: 12px;
  font-weight: 600;
  background: white;
  color: #1e293b;
  font-size: 15px;
  line-height: 2;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  padding: 12px 20px 12px 26px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  margin: 2px 12px 2px 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.sidebar a:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-left-color: #93c5fd;
  color: #2563eb;
  transform: translateX(4px);
}

.sidebar a.active-link {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.06) 100%);
  border-left-color: #667eea;
  color: #667eea;
  font-weight: 700;
}

.sidebar a.active-link:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #764ba2;
  transform: translateX(4px);
}

.sidebar a.nav-link-divider {
      /* margin-top: 16px !important; */
      border-top: 1px solid #e2e8f0 !important;
      padding-top: 16px !important;
    }

.sidebar a.nav-link-logout {
  color: #ef4444;
  display: none;
}

.sidebar a.nav-link-logout:hover {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
  border-left-color: #ef4444;
  color: #dc2626;
}

.main {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  height: 100vh; overflow-y: auto;
}

.main h1 {
  color: #1e293b;
  margin-bottom: 30px;
  font-size: 32px;
  text-shadow: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
  }

  .card {
    padding: 15px;
    margin: 0 10px;
    border-radius: 12px;
    min-height: 80px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-left: none;
    border-top: 3px solid #3b82f6;
    gap: 15px;
  }

  .card:nth-child(2) {
    border-top-color: #10b981;
  }

  .card:nth-child(3) {
    border-top-color: #f59e0b;
  }

  .card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-size: 20px;
    margin-right: 15px;
    flex-shrink: 0;
  }

  .card:nth-child(2) .card-icon {
    background: #10b981;
  }

  .card:nth-child(3) .card-icon {
    background: #f59e0b;
  }

  .card-content {
    flex: 1;
  }

  .card h3 {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .card p {
    font-size: 24px;
    margin: 0;
  }
}

.card-icon {
  display: none;
}

@media (max-width: 768px) {
  .card-icon {
    display: flex;
  }
}

.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  border-left: 5px solid #3b82f6;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
}

.card:nth-child(2) {
  border-left-color: #10b981;
}

.card:nth-child(2)::before {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

.card:nth-child(3) {
  border-left-color: #f59e0b;
}

.card:nth-child(3)::before {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card {
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
}

table {
  width: 100%;
  background: #ffffff;
  border-radius: 15px;
  overflow: hidden;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

}

th {
  color: white;
  padding: 18px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  border-right: 1px solid #30363d !important;
  letter-spacing: 0.5px;
}

td {
  padding: 15px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  /* background: #efefef; */
  border-right: 2px solid #e8e2e2;
}

tbody tr:hover {
  background: #f8fafc;
}

button {
  padding: 8px 16px;
  margin: 0 3px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 13px;
}

button:first-child {
  /* background: linear-gradient(135deg, #10b981 0%, #059669 100%); */
  /* color: white; */
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

button:first-child:hover {
  /* background: linear-gradient(135deg, #059669 0%, #047857 100%); */
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

button:nth-child(2) {
  /* background: #8479CC; */
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

button:nth-child(2):hover {
  /* background: #8479CC; */
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

button:last-child {
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

button:last-child:hover {
  /* background: linear-gradient(135deg, #4e62bf 0%, #6b3c99 100%); */
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.active {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.badge.blocked {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.analytics-section {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  margin-top: 30px;
}

.analytics-section h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.analytics-section h2 .analytics-h2-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.analytics-section p {
  margin-bottom: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-item {
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.15);
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  color: #3b82f6;
  font-size: 24px;
  font-weight: 700;
}

.settings-container {
  display: grid;
  gap: 25px;
}

.settings-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3b82f6;
}

.settings-card h3 {
  color: #3b82f6;
  margin-bottom: 20px;
  font-size: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span {
  color: #64748b;
}

.info-row strong {
  color: #1e293b;
  font-weight: 600;
}

.status-active {
  color: #10b981 !important;
  font-weight: 700 !important;
}

.action-btn {
  width: 100%;
  margin: 10px 0;
  background: #3b82f6;
  color: white;
  padding: 12px;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.action-btn:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.card h3 {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.card p {
  font-size: 32px;
  font-weight: 700;
  color: #3b82f6;
}


.resource-dropdown-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
  margin-bottom: 30px;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-dropdown-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.resource-dropdown-container:hover {
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5);
  transform: translateY(-3px);
}

.dropdown-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.resource-dropdown {
  width: 100%;
  padding: 18px 28px;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  background: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 24px center;
  background-size: 28px;
  padding-right: 70px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.resource-dropdown:hover {
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.resource-dropdown:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 12px 35px rgba(102, 126, 234, 0.3);
}

.resource-dropdown option {
  padding: 18px;
  font-weight: 600;
  background: white;
  color: #1e293b;
  font-size: 17px;
  line-height: 1.8;
}

.resource-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #3b82f6;
  color: #3b82f6;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  min-width: 80px;
}

.tab-btn span:first-child {
  font-size: 24px;
}

.tab-btn span:last-child {
  font-size: 12px;
}

.tab-btn.active {
  background: #3b82f6;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.resource-header h2 {
  color: #1e293b;
  font-size: 24px;
}

.add-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.resource-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3b82f6;
}

.resource-card h3 {
  color: #3b82f6;
  margin-bottom: 10px;
}

.resource-card p {
  color: #64748b;
  margin-bottom: 15px;
}

.resource-price {
  font-size: 24px;
  color: #10b981;
  font-weight: 700;
  margin-bottom: 15px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #64748b;
}

.close:hover {
  color: #2563EB;
}

#resourceForm input,
#resourceForm textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

#resourceForm textarea {
  min-height: 100px;
  resize: vertical;
}

#resourceForm button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}


.sidebar-user { margin-top: auto; padding: 20px; border-top: 2px solid #e2e8f0; background: #f8fafc; }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {`r`n  color: #1e293b;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-link {
  display: block;
  color: white;
  padding: 12px 15px;
  text-align: center;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  text-decoration: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {`r`n  color: #1e293b;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-link {
  display: block;
  color: white;
  padding: 12px 15px;
  text-align: center;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  text-decoration: none;
}

.logout-link:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.auth-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.auth-modal-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 15px;
  width: 90%;
  max-width: 450px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-modal-content h2 {
  color: #3b82f6;
  margin-bottom: 10px;
  text-align: center;
}

.auth-modal-content p {
  color: #64748b;
  text-align: center;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #475569;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.toggle-form {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
}

.toggle-form a {
  color: #3b82f6;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.toggle-form a:hover {
  text-decoration: underline;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: none;
  border-left: 4px solid #ef4444;
}

.success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: none;
  border-left: 4px solid #10b981;
}

.user-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {`r`n  color: #1e293b;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-link {
  display: block;
  padding: 12px 15px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  border-left: none;
}

.logout-link:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.download-btn {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 3px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
}

.download-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: scale(1.05);
}

#uploadProgress {
  color: #10b981;
  font-weight: 600;
  margin: 10px 0;
}

.resource-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.resource-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s;
}

.resource-actions button:first-child {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.resource-actions button:first-child:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.resource-actions button:nth-child(2) {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.resource-actions button:nth-child(2):hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.resource-actions button:last-child {
  /* background: linear-gradient(135deg, #1D4ED8 0%, #7c3aed 100%); */
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.resource-actions button:last-child:hover {
  /* background: linear-gradient(135deg, #1D4ED8 0%, #7c3aed 100%); */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* View Modal Styles */
#viewModal .modal-content {
  max-width: 600px;
}

#viewModal h2 {
  color: #2563EB;
  margin-bottom: 25px;
  font-size: 28px;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
}

#viewContent {
  padding: 20px 0;
}

#viewContent p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
  margin: 0;
}

#viewContent p:last-child {
  border-bottom: none;
}

#viewContent strong {
  color: #475569;
  font-weight: 600;
  min-width: 100px;
}

#viewContent span {
  color: #1e293b;
  font-weight: 500;
  text-align: right;
  flex: 1;
}

#viewPrice {
  color: #10b981 !important;
  font-weight: 700 !important;
  font-size: 18px;
}

#viewType {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563EB !important;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Edit Modal Styles */
#editModal .modal-content {
  max-width: 500px;
}

#editModal h2 {
  color: #2563EB;
  margin-bottom: 25px;
  font-size: 28px;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
}

#editForm input,
#editForm textarea {
  width: 100%;
  padding: 14px;
  margin: 12px 0;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s;
  background: #f8fafc;
}

#editForm input:focus,
#editForm textarea:focus {
  outline: none;
  border-color: #2563EB;
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

#editForm textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

#editForm button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-top: 20px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

#editForm button:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Modal Animation */
.modal {
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.edit-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.edit-header {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

#codeEditor {
  width: 100%;
  height: 500px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
  resize: vertical;
  background: #f8fafc;
}

#codeEditor:focus {
  outline: none;
  border-color: #2563EB;
  background: white;
}

.status-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
}

.status-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.resource-type-badge {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: inline-block;
}

.current-file-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.current-file-info label {
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 5px;
}

.current-file-info span {
  color: #1e293b;
  font-family: monospace;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

.last-file-info {
  margin: 10px 0;
  padding: 8px;
  background: #f1f5f9;
  border-radius: 6px;
  text-align: center;
}

.last-file-info small {
  color: #475569;
  font-weight: 500;
}

.last-file-info span {
  color: #2563EB;
  font-weight: 600;
}

.premium-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.premium-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.premium-header h2 {
  color: #2563EB;
  margin-bottom: 10px;
}

.premium-header p {
  color: #64748b;
}

.site-preview {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.preview-navbar {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-logo {
  color: #fbbf24;
  font-size: 20px;
  font-weight: 700;
}

.preview-nav {
  display: flex;
  gap: 20px;
}

.preview-nav span {
  color: white;
  font-weight: 500;
  cursor: pointer;
}

.preview-hero {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.preview-hero h1 {
  font-size: 36px;
  margin-bottom: 15px;
}

.preview-hero p {
  font-size: 18px;
  opacity: 0.9;
}

.preview-resources {
  padding: 40px 20px;
}

.preview-resources h2 {
  text-align: center;
  color: #2563EB;
  margin-bottom: 30px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.preview-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #e2e8f0;
}

.preview-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.preview-card h3 {
  color: #2563EB;
  margin-bottom: 8px;
  font-size: 16px;
}

.preview-card p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 12px;
}

.preview-price {
  color: #10b981;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.preview-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

.premium-preview {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.premium-preview h2 {
  color: #2563EB;
  margin-bottom: 10px;
  text-align: center;
}

.premium-preview p {
  color: #64748b;
  text-align: center;
  margin-bottom: 30px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.preview-card {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.preview-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.preview-card p {
  margin-bottom: 15px;
  opacity: 0.9;
  color: white;
}

.preview-price {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
}

.preview-btn {
  background: white;
  color: #f59e0b;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* Premium Users Page Styling */
.premium-main {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  min-height: 100vh;
  padding: 40px;
}

.premium-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.premium-title {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.premium-subtitle {
  color: #64748b;
  font-size: 18px;
  font-weight: 500;
  opacity: 0.8;
}

.premium-table-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  box-shadow: none;
}

.premium-table thead {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.premium-table th {
  color: white;
  padding: 20px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  position: relative;
}

.premium-table th:first-child {
  border-top-left-radius: 15px;
}

.premium-table th:last-child {
  border-top-right-radius: 15px;
}

.premium-table td {
  padding: 20px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
  color: #1e293b;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.5);
}

.premium-table tbody tr:hover td {
  background: rgba(251, 191, 36, 0.1);
  transform: scale(1.01);
  transition: all 0.3s ease;
}

.premium-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}

.premium-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

.premium-empty-state {
  text-align: center;
  padding: 60px 20px;
  display: none;
}

.premium-empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.premium-empty-state h3 {
  color: #2563EB;
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 700;
}

.premium-empty-state p {
  color: #64748b;
  font-size: 16px;
  opacity: 0.8;
}

/* Premium button styling for actions */
.premium-table button {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  margin: 0 2px;
}

.premium-table button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.premium-table button:nth-child(2) {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.premium-table button:nth-child(2):hover {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.premium-table button:last-child {
  background: linear-gradient(135deg, #1D4ED8 0%, #7c3aed 100%);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.premium-table button:last-child:hover {
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 20px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th {
  background: #f8f9fa;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.users-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #dee2e6;
}

.users-table tr:hover {
  background: #f8f9fa;
}

.table-container {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  overflow: hidden;
  margin-top: 20px;
  padding: 2px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.users-table th {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  border: none;
}

.users-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
}

.users-table tr:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  width: 140px;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.quick-btn.export {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.quick-btn.export:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Sidebar Auth Buttons */
.sidebar-auth {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 2px solid #e2e8f0;
  padding-top: 20px;
}

/* Sidebar User Profile */
.sidebar-user { margin-top: auto; padding: 20px; border-top: 2px solid #e2e8f0; background: #f8fafc; }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  color: black !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: none !important;
  margin-top: 10px;
}

.auth-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-align: center;
  transition: all 0.3s !important;
  border: none !important;
  margin: 0 !important;
}

.login-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.login-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  transform: translateY(-2px) translateX(0) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.signup-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.signup-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-2px) translateX(0) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Auth Modal */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.auth-modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
  position: relative;
}

.auth-modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #64748b;
}

.auth-modal .close:hover {
  color: #3b82f6;
}

.auth-modal h2 {
  color: #3b82f6;
  text-align: center;
  margin-bottom: 10px;
}

.auth-modal p {
  color: #64748b;
  text-align: center;
  margin-bottom: 30px;
  font-size: 14px;
}

.auth-modal .form-group {
  margin-bottom: 20px;
}

.auth-modal .form-group label {
  display: block;
  color: #475569;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.auth-modal .form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
}

.auth-modal .form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Settings Page Form Styles */
.settings-card .form-group {
  margin-bottom: 15px;
}

.settings-card .form-group label {
  display: block;
  color: #475569;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.settings-card .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  box-sizing: border-box;
}

.settings-card .form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-modal .btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.auth-modal .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.auth-modal .toggle-form {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
  font-size: 14px;
}

.auth-modal .toggle-form a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-modal .toggle-form a:hover {
  text-decoration: underline;
}

.auth-modal .error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.auth-modal .success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

/* Theme Toggle Button */
.theme-toggle {
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.theme-toggle:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

/* Light Mode Styles */
body:not(.dark-mode) {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

body:not(.dark-mode) .sidebar {
  background: white;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .sidebar h2 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body:not(.dark-mode) .sidebar a {
  color: #64748b;
}

body:not(.dark-mode) .sidebar a:hover {
  background: #f1f5f9;
  border-left-color: #3b82f6;
  color: #3b82f6;
}

body:not(.dark-mode) .main h1 {
  color: white;
}

body:not(.dark-mode) .card {
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

body:not(.dark-mode) .card h3 {
  color: #64748b;
}

body:not(.dark-mode) .card p {
  color: #3b82f6;
}

body:not(.dark-mode) table {
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) thead {
  background: #3b82f6;
}

body:not(.dark-mode) td {
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

body:not(.dark-mode) tbody tr:hover {
  background: #f8fafc;
}

body:not(.dark-mode) .analytics-section {
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .analytics-section h2 .analytics-h2-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-mode .stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.light-mode .stat-label {
  color: #64748b;
}

body.light-mode .stat-value {
  color: #3b82f6;
}

body.light-mode .settings-card {
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3b82f6;
}

body.light-mode .settings-card h3 {
  color: #3b82f6;
}

body.light-mode .info-row {
  border-bottom: 1px solid #e2e8f0;
}

body.light-mode .info-row span {
  color: #64748b;
}

body.light-mode .info-row strong {
  color: #1e293b;
}

body.light-mode .tab-btn {
  background: white;
  border: 2px solid #3b82f6;
  color: #3b82f6;
}

body.light-mode .resource-header h2 {
  color: #1e293b;
}

body.light-mode .resource-card {
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .resource-card h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-mode .resource-card p {
  color: #64748b;
}

body.light-mode .modal-content {
  background: white;
}

body.light-mode .close {
  color: #64748b;
}

body.light-mode .close:hover {
  color: #3b82f6;
}

body.light-mode .table-container {
  background: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-mode .users-table {
  background: white;
}

body.light-mode .users-table th {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

body.light-mode .users-table td {
  color: #334155;
}

body.light-mode .users-table tr:hover {
  background: #f8fafc;
}

body.light-mode #resourceForm input,
body.light-mode #resourceForm textarea,
body.light-mode #editForm input,
body.light-mode #editForm textarea {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  color: #0f172a;
}

body.light-mode #viewModal h2,
body.light-mode #editModal h2 {
  color: #3b82f6;
  border-bottom: 2px solid #e2e8f0;
}

body.light-mode #viewContent p {
  border-bottom: 1px solid #e2e8f0;
}

body.light-mode #viewContent strong {
  color: #475569;
}

body.light-mode #viewContent span {
  color: #0f172a;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.empty-state:hover {
  transform: translateY(-3px);
}

.empty-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 48px;
}

.empty-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  margin-top: 0;
}

.empty-state p {
  color: #64748b;
  font-size: 15px;
  margin: 0;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pagination-info {
  color: #64748b;
  font-weight: 500;
  font-size: 14px;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-buttons button {
  padding: 8px 16px;
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 14px;
}

.pagination-buttons button:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.pagination-buttons button.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  /* border-color: #3b82f6; */
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.pagination-buttons button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-buttons span {
  color: #94a3b8;
  padding: 0 4px;
}


/* Statistics Page Styles */
.stats-container {
  width: 100%;
  max-width: 100%;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 3px solid rgba(59, 130, 246, 0.2);
}

.page-header h1 {
  font-size: 36px;
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.subtitle {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

/* [removed duplicate stat/shimmer block] */


/* Mobile Menu Styles */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  flex-direction: column;
  gap: 5px;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle .hamburger {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
}

body.sidebar-open {
  overflow: hidden;
}






/* Mobile Dropdown for Add Resource */
.mobile-add-dropdown {
  display: none;
  position: relative;
}

.mobile-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s;
}

.mobile-dropdown-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.dropdown-menu.show {
  max-height: 400px;
  opacity: 1;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: white;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  text-align: left;
  transition: all 0.3s;
}

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

.pdf-item {
  color: #ef4444;
}

.pdf-item:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
}

.excel-item {
  color: #10b981;
}

.excel-item:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
}

.exam-item {
  color: #f59e0b;
}

.exam-item:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
}

.freelance-item {
  color: #8b5cf6;
}

.freelance-item:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}









/* [removed duplicate stat/shimmer block] */
.stat-content h3 {
  font-size: 14px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Global Box Shadow Refinement - All Pages, All Views */

/* Eye button override — must come after global button rules */
.eye-btn,
.eye-btn:first-child,
.eye-btn:nth-child(2),
.eye-btn:last-child {
  background: white !important;
  color: transparent !important;
  box-shadow: none !important;
}

.eye-btn:hover,
.eye-btn:first-child:hover,
.eye-btn:nth-child(2):hover,
.eye-btn:last-child:hover {
  background: white !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.25) !important;
  transform: scale(1.05);
}

/* Refined Global Box Shadows */
.card,
.stat-card,
.settings-card,
.resource-card,
.analytics-section,
.table-container,
.modal-content,
.auth-modal-content,
.premium-container,
.resource-dropdown-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Subtle Hover Effects */
.card:hover,
.stat-card:hover,
.settings-card:hover,
.resource-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Button Shadows - Very Subtle */
button,
.btn,
.action-btn,
.add-btn,
.quick-btn {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

button:hover,
.btn:hover,
.action-btn:hover,
.add-btn:hover,
.quick-btn:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Table Shadows */
table,
.users-table,
.modern-table,
.premium-table {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

/* Sidebar Shadow */
.sidebar {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
}

/* Form Elements */
input,
textarea,
select,
.nav-dropdown,
.resource-dropdown {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

input:focus,
textarea:focus,
select:focus,
.nav-dropdown:focus,
.resource-dropdown:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}





/* Icon Shadows */
.stat-icon,
.user-avatar {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Modal Shadows */
.modal,
.auth-modal {
  background: rgba(0, 0, 0, 0.3) !important;
}

/* Badge Shadows */
.badge,
.resource-type-badge,
.resource-count {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Navigation Elements */
.tab-btn,
.nav-dropdown {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.tab-btn:hover,
.nav-dropdown:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Mobile Specific Refinements */
@media (max-width: 768px) {

  .card,
  .stat-card,
  .settings-card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
  }

  .card:hover,
  .stat-card:hover,
  .settings-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }

  button,
  .btn,
  .action-btn {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  }

  button:hover,
  .btn:hover,
  .action-btn:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  }
}

/* Ultra Subtle for Small Screens */
@media (max-width: 480px) {

  .card,
  .stat-card,
  .settings-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  .card:hover,
  .stat-card:hover,
  .settings-card:hover {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07) !important;
  }

  button,
  .btn,
  .action-btn {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }
}


/* â”€â”€ STATISTICS DARK MODE OVERRIDES â”€â”€ */
body.dark-mode,
html.dark-mode body {
  background: #0d1117 !important;
  color: #e6edf3 !important;
}
body.dark-mode .main,
html.dark-mode body .main {
  background: #0d1117 !important;
}
body.dark-mode .sidebar,
html.dark-mode body .sidebar {
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%) !important;
  border-right-color: #30363d !important;
}
body.dark-mode .sidebar h2,
html.dark-mode body .sidebar h2 {
  -webkit-text-fill-color: #a78bfa !important;
}
body.dark-mode .sidebar a,
html.dark-mode body .sidebar a {
  color: #8b949e !important;
}
body.dark-mode .sidebar a:hover,
html.dark-mode body .sidebar a:hover {
  background: rgba(124,106,247,0.08) !important;
  color: #a78bfa !important;
}
body.dark-mode .sidebar a.active-link,
html.dark-mode body .sidebar a.active-link {
  background: rgba(124,106,247,0.12) !important;
  color: #a78bfa !important;
}
body.dark-mode .sidebar-user,
html.dark-mode body .sidebar-user {
  background: #161b22 !important;
  border-top-color: #30363d !important;
}
body.dark-mode .user-info,
html.dark-mode body .user-info {
  border-bottom-color: #30363d !important;
}
body.dark-mode .user-name,
html.dark-mode body .user-name {
  color: #e6edf3 !important;
}
body.dark-mode .user-email,
html.dark-mode body .user-email {
  color: #8b949e !important;
}
body.dark-mode .logout-link,
html.dark-mode body .logout-link {
  background: #161b22 !important;
  color: #f87171 !important;
  border-color: #f87171 !important;
}
body.dark-mode .stat-card,
html.dark-mode body .stat-card,
html.dark-mode .stat-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .stat-card:hover,
html.dark-mode body .stat-card:hover {
  background: #1c2333 !important;
}
body.dark-mode .stat-content h3,
html.dark-mode body .stat-content h3 {
  color: #8b949e !important;
}
body.dark-mode .stat-number,
html.dark-mode body .stat-number {
  background: linear-gradient(135deg,#e6edf3,#c9d1d9) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.dark-mode .stat-icon,
html.dark-mode body .stat-icon {
  background: #1c2333 !important;
  border-color: #30363d !important;
}
body.dark-mode .analytics-section,
html.dark-mode body .analytics-section {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .analytics-section p,
html.dark-mode body .analytics-section p {
  color: #8b949e !important;
}
body.dark-mode .section-header h2,
html.dark-mode body .section-header h2 {
  color: #e6edf3 !important;
}
body.dark-mode .section-header p,
html.dark-mode body .section-header p {
  color: #8b949e !important;
}
body.dark-mode .table-wrapper,
html.dark-mode body .table-wrapper {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .modern-table,
html.dark-mode body .modern-table {
  background: #161b22 !important;
}
body.dark-mode .modern-table tbody tr,
html.dark-mode body .modern-table tbody tr {
  border-bottom-color: #21293d !important;
}
body.dark-mode .modern-table tbody tr:hover,
html.dark-mode body .modern-table tbody tr:hover {
  background: #1c2333 !important;
}
body.dark-mode .modern-table td,
html.dark-mode body .modern-table td {
  color: #8b949e !important;
  border-bottom-color: #21293d !important;
      border-right: 2px solid #7c7676;
}
body.dark-mode .modern-table td:first-child,
html.dark-mode body .modern-table td:first-child {
  color: #e6edf3 !important;
}
body.dark-mode .modern-table td:nth-child(2),
html.dark-mode body .modern-table td:nth-child(2) {
  color: #a78bfa !important;
}
body.dark-mode .modern-table td:nth-child(3),
html.dark-mode body .modern-table td:nth-child(3) {
  color: #3fb950 !important;
}
body.dark-mode .shimmer-stat-card,
html.dark-mode body .shimmer-stat-card,
html.dark-mode .shimmer-stat-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .shimmer-stat-icon,
body.dark-mode .shimmer-stat-title,
body.dark-mode .shimmer-stat-number,
body.dark-mode .shimmer-stat-label,
body.dark-mode .shimmer-table-cell,
html.dark-mode body .shimmer-stat-icon,
html.dark-mode body .shimmer-stat-title,
html.dark-mode body .shimmer-stat-number,
html.dark-mode body .shimmer-stat-label,
html.dark-mode body .shimmer-table-cell,
html.dark-mode .shimmer-stat-icon,
html.dark-mode .shimmer-stat-title,
html.dark-mode .shimmer-stat-number,
html.dark-mode .shimmer-stat-label,
html.dark-mode .shimmer-table-cell {
  background: linear-gradient(90deg,#1c2333 25%,#21293d 50%,#1c2333 75%) !important;
  background-size: 400px 100% !important;
}
/* shimmer thead/tbody dark rules handled by scoped inline styles in index.html */
body.dark-mode .modal-content,
html.dark-mode body .modal-content {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .close,
html.dark-mode body .close {
  color: #8b949e !important;
}
body.dark-mode .form-group label,
html.dark-mode body .form-group label {
  color: #8b949e !important;
}
body.dark-mode .form-group input,
body.dark-mode .form-group select,
html.dark-mode body .form-group input,
html.dark-mode body .form-group select {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
body.dark-mode .date-input,
html.dark-mode body .date-input {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
body.dark-mode .btn-cancel,
html.dark-mode body .btn-cancel {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
body.dark-mode .detail-sheet,
html.dark-mode body .detail-sheet {
  background: #161b22 !important;
}
body.dark-mode .detail-row,
html.dark-mode body .detail-row {
  border-bottom-color: #30363d !important;
}
body.dark-mode .detail-label,
html.dark-mode body .detail-label {
  color: #484f58 !important;
}
body.dark-mode .detail-value,
html.dark-mode body .detail-value {
  color: #e6edf3 !important;
}
body.dark-mode .resource-tag,
html.dark-mode body .resource-tag {
  background: #1c2333 !important;
  color: #a78bfa !important;
}
body.dark-mode .filter-dropdown-menu,
html.dark-mode body .filter-dropdown-menu {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .filter-dropdown-item,
html.dark-mode body .filter-dropdown-item {
  color: #8b949e !important;
  border-bottom-color: #30363d !important;
}
body.dark-mode .filter-dropdown-item:hover,
html.dark-mode body .filter-dropdown-item:hover {
  background: #1c2333 !important;
  color: #a78bfa !important;
}
body.dark-mode .filter-dropdown-item.active,
html.dark-mode body .filter-dropdown-item.active {
  background: linear-gradient(135deg,#7c6af7,#5b4fcf) !important;
  color: #fff !important;
}
body.dark-mode .eye-btn,
html.dark-mode body .eye-btn {
  background: #1c2333 !important;
  border-color: #7c6af7 !important;
}
body.dark-mode .profile-stat-card,
html.dark-mode body .profile-stat-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
body.dark-mode .shimmer-profile-card,
html.dark-mode body .shimmer-profile-card,
html.dark-mode .shimmer-profile-card {
  background: #161b22 !important;
}
body.dark-mode .empty-state,
html.dark-mode body .empty-state {
  background: transparent !important;
  border-color: #30363d !important;
}
body.dark-mode .empty-state h3,
html.dark-mode body .empty-state h3 {
  color: #e6edf3 !important;
}
body.dark-mode .empty-state p,
html.dark-mode body .empty-state p {
  color: #8b949e !important;
}
body.dark-mode .empty-icon,
html.dark-mode body .empty-icon {
  background: linear-gradient(135deg, #1e2a3a 0%, #2d3a4a 100%) !important;
  box-shadow: 0 0 0 2px rgba(124, 106, 247, 0.2) !important;
}
body.dark-mode .empty-icon img,
html.dark-mode body .empty-icon img {
  filter: invert(1) brightness(2) !important;
  border-radius: 0 !important;
}
body.dark-mode .auth-modal-content,
html.dark-mode body .auth-modal-content {
  background: #161b22 !important;
}
body.dark-mode .auth-modal-content h2,
html.dark-mode body .auth-modal-content h2 {
  color: #a78bfa !important;
}
body.dark-mode .toggle-form,
html.dark-mode body .toggle-form {
  color: #8b949e !important;
}
body.dark-mode .toggle-form a,
html.dark-mode body .toggle-form a {
  color: #a78bfa !important;
}
body.dark-mode .error-message,
html.dark-mode body .error-message {
  background: rgba(239,68,68,0.1) !important;
  color: #fca5a5 !important;
}
body.dark-mode .success-message,
html.dark-mode body .success-message {
  background: rgba(16,185,129,0.1) !important;
  color: #86efac !important;
}

/* ── Date badge in customer table ── */
.date-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12));
  color: #667eea;
  border: 1px solid rgba(102,126,234,0.2);
  white-space: nowrap;
}

body.dark-mode .date-badge,
html.dark-mode body .date-badge {
  background: rgba(124,106,247,0.15) !important;
  color: #a78bfa !important;
  border-color: rgba(124,106,247,0.25) !important;
}


/* ══════════════════════════════════════════
   STATISTICS PAGE — DARK MODE COMPLETE FIX
   ══════════════════════════════════════════ */

/* Body & main background — instant, no flash */
html.dark-mode body,
body.dark-mode {
  background: #0d1117 !important;
  color: #e6edf3 !important;
}
html.dark-mode .main,
body.dark-mode .main {
  background: #0d1117 !important;
}

/* Sidebar */
html.dark-mode .sidebar,
body.dark-mode .sidebar {
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%) !important;
  border-right-color: #30363d !important;
}
html.dark-mode .sidebar-header,
body.dark-mode .sidebar-header {
  border-bottom-color: #30363d !important;
}
html.dark-mode .sidebar h2,
body.dark-mode .sidebar h2 {
  -webkit-text-fill-color: #a78bfa !important;
}
html.dark-mode .sidebar a,
body.dark-mode .sidebar a {
  color: #8b949e !important;
}
html.dark-mode .sidebar a:hover,
body.dark-mode .sidebar a:hover {
  background: rgba(124,106,247,0.08) !important;
  color: #a78bfa !important;
}
html.dark-mode .sidebar a.active-link,
body.dark-mode .sidebar a.active-link {
  background: rgba(124,106,247,0.12) !important;
  color: #a78bfa !important;
  border-left-color: #7c6af7 !important;
}
html.dark-mode .sidebar-close-btn,
body.dark-mode .sidebar-close-btn {
  color: #8b949e !important;
}

/* Neumorphic toggle wrap border */
html.dark-mode .sb-nm-wrap,
body.dark-mode .sb-nm-wrap {
  border-top-color: #30363d !important;
  border-bottom-color: #30363d !important;
}
html.dark-mode .sb-nm-wrap-label,
body.dark-mode .sb-nm-wrap-label {
  color: #8b949e !important;
}
html.dark-mode .sb-nm-toggle,
body.dark-mode .sb-nm-toggle {
  background: #1e2535 !important;
  box-shadow: 4px 4px 8px #0d1117, -3px -3px 7px #2d3a4a !important;
}
html.dark-mode .sb-nm-knob,
body.dark-mode .sb-nm-knob {
  left: 52px !important;
  background: #2d3748 !important;
  box-shadow: 2px 2px 5px #0d1117, -1px -1px 4px #3a4a5c !important;
}
html.dark-mode .sb-nm-label-light,
body.dark-mode .sb-nm-label-light { opacity: 0 !important; }
html.dark-mode .sb-nm-label-dark,
body.dark-mode .sb-nm-label-dark  { opacity: 1 !important; }

/* Stat cards */
html.dark-mode .stat-card,
body.dark-mode .stat-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode .stat-card:hover,
body.dark-mode .stat-card:hover {
  background: #1c2333 !important;
}
html.dark-mode .stat-content h3,
body.dark-mode .stat-content h3 {
  color: #8b949e !important;
}
/* Fix stat-number: clear webkit gradient so color applies */
html.dark-mode .stat-number,
body.dark-mode .stat-number {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #e6edf3 !important;
  background-clip: unset !important;
  color: #e6edf3 !important;
}
.dark-mode .stat-icon,
body.dark-mode .stat-icon {
  border-color: #30363d !important;
}

/* Analytics section */
html.dark-mode .analytics-section,
body.dark-mode .analytics-section {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode .analytics-section p,
body.dark-mode .analytics-section p {
  color: #8b949e !important;
}
html.dark-mode .section-header h2,
body.dark-mode .section-header h2 {
  color: #e6edf3 !important;
}
html.dark-mode .section-header p,
body.dark-mode .section-header p {
  color: #8b949e !important;
}

/* Table */
html.dark-mode .table-wrapper,
body.dark-mode .table-wrapper {
  background: #161b22 !important;
}
html.dark-mode .modern-table,
body.dark-mode .modern-table {
  background: #161b22 !important;
}
html.dark-mode .modern-table tbody tr,
body.dark-mode .modern-table tbody tr {
  border-bottom-color: #21293d !important;
}
html.dark-mode .modern-table tbody tr:hover,
body.dark-mode .modern-table tbody tr:hover {
  background: #1c2333 !important;
}
html.dark-mode .modern-table td,
body.dark-mode .modern-table td {
  color: #8b949e !important;
  border-bottom-color: #21293d !important;
  border-right-color: #30363d !important;
}
html.dark-mode .customer-email,
body.dark-mode .customer-email {
  color: #c9d1d9 !important;
}
html.dark-mode .amount-value,
body.dark-mode .amount-value {
  color: #3fb950 !important;
}
html.dark-mode .date-badge,
body.dark-mode .date-badge {
  background: rgba(124,106,247,0.15) !important;
  color: #a78bfa !important;
  border-color: rgba(124,106,247,0.25) !important;
}
html.dark-mode .resource-tag,
body.dark-mode .resource-tag {
  background: #1c2333 !important;
  color: #a78bfa !important;
}

/* Eye button */
html.dark-mode .eye-btn,
body.dark-mode .eye-btn {
  background: #1c2333 !important;
  border-color: #7c6af7 !important;
}

/* Detail sheet (mobile modal) */
html.dark-mode .detail-sheet,
body.dark-mode .detail-sheet {
  background: #161b22 !important;
}
html.dark-mode .detail-sheet-handle,
body.dark-mode .detail-sheet-handle {
  background: #30363d !important;
}
html.dark-mode .detail-sheet h3,
body.dark-mode .detail-sheet h3 {
  color: #e6edf3 !important;
}
html.dark-mode .detail-row,
body.dark-mode .detail-row {
  border-bottom-color: #30363d !important;
}
html.dark-mode .detail-label,
body.dark-mode .detail-label {
  color: #484f58 !important;
}
html.dark-mode .detail-value,
body.dark-mode .detail-value {
  color: #e6edf3 !important;
}

/* Custom date modal */
html.dark-mode .modal-content,
body.dark-mode .modal-content {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode .modal-content h2,
body.dark-mode .modal-content h2 {
  color: #a78bfa !important;
}
html.dark-mode .close,
body.dark-mode .close {
  color: #8b949e !important;
}
html.dark-mode .date-input-group label,
body.dark-mode .date-input-group label {
  color: #8b949e !important;
}
html.dark-mode .date-input,
body.dark-mode .date-input {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
html.dark-mode .date-input:focus,
body.dark-mode .date-input:focus {
  border-color: #7c6af7 !important;
  background: #21293d !important;
}
html.dark-mode .btn-cancel,
body.dark-mode .btn-cancel {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}

/* Inline JS-generated empty/error/login state divs */
html.dark-mode #analyticsContent > div,
body.dark-mode #analyticsContent > div {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode #analyticsContent h3,
body.dark-mode #analyticsContent h3 {
  color: #e6edf3 !important;
}
html.dark-mode #analyticsContent p,
body.dark-mode #analyticsContent p {
  color: #8b949e !important;
}

/* Shimmer cards */
html.dark-mode .shimmer-stat-card,
body.dark-mode .shimmer-stat-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode .shimmer-stat-icon,
html.dark-mode .shimmer-stat-title,
html.dark-mode .shimmer-stat-number,
html.dark-mode .shimmer-stat-label,
html.dark-mode .shimmer-table-cell,
body.dark-mode .shimmer-stat-icon,
body.dark-mode .shimmer-stat-title,
body.dark-mode .shimmer-stat-number,
body.dark-mode .shimmer-stat-label,
body.dark-mode .shimmer-table-cell {
  background: linear-gradient(90deg,#1c2333 25%,#21293d 50%,#1c2333 75%) !important;
  background-size: 400px 100% !important;
}
html.dark-mode #analyticsShimmer .modern-table thead,
body.dark-mode #analyticsShimmer .modern-table thead {
  background: #1c2333 !important;
}
html.dark-mode #analyticsShimmer .modern-table tbody tr,
body.dark-mode #analyticsShimmer .modern-table tbody tr {
  background: #161b22 !important;
}

/* Sidebar user section */
html.dark-mode .sidebar-user,
body.dark-mode .sidebar-user {
  background: #161b22 !important;
  border-top-color: #30363d !important;
}
html.dark-mode .user-info,
body.dark-mode .user-info {
  border-bottom-color: #30363d !important;
}
html.dark-mode .user-name,
body.dark-mode .user-name {
  color: #e6edf3 !important;
}
html.dark-mode .user-email,
body.dark-mode .user-email {
  color: #8b949e !important;
}
html.dark-mode .logout-link,
body.dark-mode .logout-link {
  background: #161b22 !important;
  color: #f87171 !important;
  border-color: #f87171 !important;
}

/* Mobile responsive overrides for dark mode */
html.dark-mode .resource-tabs,
body.dark-mode .resource-tabs {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode .customer-avatar,
body.dark-mode .customer-avatar {
  background: #1c2333 !important;
  color: #8b949e !important;
}
html.dark-mode .quantity-badge,
body.dark-mode .quantity-badge {
  background: rgba(124,106,247,0.15) !important;
  color: #a78bfa !important;
}


/* ══════════════════════════════════════════
   analyticsContent TABLE — COMPLETE BASE STYLES
   (light + dark, all screen sizes)
   ══════════════════════════════════════════ */

/* ── Table wrapper ── */
#analyticsContent .table-wrapper {
  /* overflow-x: auto; */
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

/* ── Table base ── */
#analyticsContent .modern-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

/* ── Header ── */
#analyticsContent .modern-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
#analyticsContent .modern-table th {
  padding: 14px 16px;
  text-align: left;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}
#analyticsContent .modern-table th:last-child {
  border-right: none;
}
.th-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Body rows ── */
#analyticsContent .modern-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
#analyticsContent .modern-table tbody tr:last-child {
  border-bottom: none;
}
#analyticsContent .modern-table tbody tr:hover {
  background: #f8fafc;
}
#analyticsContent .modern-table td {
  padding: 13px 16px;
  color: #475569;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}
#analyticsContent .modern-table td:last-child {
  border-right: none;
}

/* ── Customer cell ── */
.customer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.customer-email {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ── Date badge ── */
.date-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(102,126,234,0.10), rgba(118,75,162,0.10));
  color: #667eea;
  border: 1px solid rgba(102,126,234,0.2);
  white-space: nowrap;
}

/* ── Amount value ── */
.amount-value {
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
}

/* ── Resource tag ── */
.resource-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Eye / View button ── */
.eye-btn {
  background: #fff;
  border: 1.5px solid #667eea;
  border-radius: 8px;
  width: 60px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  padding: 0;
}
.eye-btn span {
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.eye-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(102,126,234,0.25) !important;
}

/* ── Inline JS empty / error / login state boxes ── */
#analyticsContent > div[style*="text-align:center"],
#analyticsContent > div[style*="text-align: center"] {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  color: #1e293b !important;
}
#analyticsContent > div[style*="text-align:center"] h3,
#analyticsContent > div[style*="text-align: center"] h3 {
  color: #1e293b !important;
}
#analyticsContent > div[style*="text-align:center"] p,
#analyticsContent > div[style*="text-align: center"] p {
  color: #64748b !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  #analyticsContent .modern-table th,
  #analyticsContent .modern-table td {
    padding: 10px 10px;
    font-size: 12px;
  }
  .customer-email { max-width: 130px; font-size: 12px; }
  .amount-value   { font-size: 12px; }
  .resource-tag   { font-size: 10px; max-width: 100px; }
}

/* ══════════════════════════════════════════
   analyticsContent TABLE — DARK MODE
   ══════════════════════════════════════════ */

html.dark-mode #analyticsContent .table-wrapper,
body.dark-mode #analyticsContent .table-wrapper {
  background: #161b22 !important;
  border-color: #30363d !important;
}
html.dark-mode #analyticsContent .modern-table,
body.dark-mode #analyticsContent .modern-table {
  background: #161b22 !important;
}
html.dark-mode #analyticsContent .modern-table thead,
body.dark-mode #analyticsContent .modern-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
}
html.dark-mode #analyticsContent .modern-table th,
body.dark-mode #analyticsContent .modern-table th {
  border-right-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}
html.dark-mode #analyticsContent .modern-table tbody tr,
body.dark-mode #analyticsContent .modern-table tbody tr {
  border-bottom-color: #21293d !important;
}
html.dark-mode #analyticsContent .modern-table tbody tr:hover,
body.dark-mode #analyticsContent .modern-table tbody tr:hover {
  background: #1c2333 !important;
}
html.dark-mode #analyticsContent .modern-table td,
body.dark-mode #analyticsContent .modern-table td {
  color: #8b949e !important;
  border-right-color: #21293d !important;
}
html.dark-mode .customer-email,
body.dark-mode .customer-email {
  color: #c9d1d9 !important;
}
html.dark-mode .date-badge,
body.dark-mode .date-badge {
  background: rgba(124,106,247,0.15) !important;
  color: #a78bfa !important;
  border-color: rgba(124,106,247,0.25) !important;
}
html.dark-mode .amount-value,
body.dark-mode .amount-value {
  color: #3fb950 !important;
}
html.dark-mode .resource-tag,
body.dark-mode .resource-tag {
  background: #1c2333 !important;
  color: #a78bfa !important;
  border-color: #30363d !important;
}
html.dark-mode .eye-btn,
body.dark-mode .eye-btn {
  background: #1c2333 !important;
  border-color: #7c6af7 !important;
}
/* Inline JS state boxes — dark */
html.dark-mode #analyticsContent > div[style*="text-align:center"],
html.dark-mode #analyticsContent > div[style*="text-align: center"],
body.dark-mode #analyticsContent > div[style*="text-align:center"],
body.dark-mode #analyticsContent > div[style*="text-align: center"] {
  background: #161b22 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
html.dark-mode #analyticsContent > div[style*="text-align:center"] h3,
html.dark-mode #analyticsContent > div[style*="text-align: center"] h3,
body.dark-mode #analyticsContent > div[style*="text-align:center"] h3,
body.dark-mode #analyticsContent > div[style*="text-align: center"] h3 {
  color: #e6edf3 !important;
}
html.dark-mode #analyticsContent > div[style*="text-align:center"] p,
html.dark-mode #analyticsContent > div[style*="text-align: center"] p,
body.dark-mode #analyticsContent > div[style*="text-align:center"] p,
body.dark-mode #analyticsContent > div[style*="text-align: center"] p {
  color: #8b949e !important;
}

/* ══════════════════════════════════════════
   DROPDOWN FILTERS — LIGHT MODE
   ══════════════════════════════════════════ */

#resourceFilter,
.chart-filters,
#purchasePageSize,
#wdPageSize {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

#resourceFilter:hover,
.chart-filters:hover,
#purchasePageSize:hover,
#wdPageSize:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

#resourceFilter:focus,
.chart-filters:focus,
#purchasePageSize:focus,
#wdPageSize:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#resourceFilter option,
.chart-filters option,
#purchasePageSize option,
#wdPageSize option {
  padding: 8px;
  background: #fff;
  color: #1e293b;
}

/* ══════════════════════════════════════════
   DROPDOWN FILTERS — DARK MODE
   ══════════════════════════════════════════ */

html.dark-mode #resourceFilter,
html.dark-mode .chart-filters,
html.dark-mode #purchasePageSize,
html.dark-mode #wdPageSize,
body.dark-mode #resourceFilter,
body.dark-mode .chart-filters,
body.dark-mode #purchasePageSize,
body.dark-mode #wdPageSize {
  background: #1c2333 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L2 4h8z'/%3E%3C/svg%3E") !important;
}

html.dark-mode #resourceFilter:hover,
html.dark-mode .chart-filters:hover,
html.dark-mode #purchasePageSize:hover,
html.dark-mode #wdPageSize:hover,
body.dark-mode #resourceFilter:hover,
body.dark-mode .chart-filters:hover,
body.dark-mode #purchasePageSize:hover,
body.dark-mode #wdPageSize:hover {
  border-color: #7c6af7 !important;
  box-shadow: 0 2px 8px rgba(124, 106, 247, 0.25) !important;
}

html.dark-mode #resourceFilter:focus,
html.dark-mode .chart-filters:focus,
html.dark-mode #purchasePageSize:focus,
html.dark-mode #wdPageSize:focus,
body.dark-mode #resourceFilter:focus,
body.dark-mode .chart-filters:focus,
body.dark-mode #purchasePageSize:focus,
body.dark-mode #wdPageSize:focus {
  border-color: #7c6af7 !important;
  box-shadow: 0 0 0 3px rgba(124, 106, 247, 0.15) !important;
}

html.dark-mode #resourceFilter option,
html.dark-mode .chart-filters option,
html.dark-mode #purchasePageSize option,
html.dark-mode #wdPageSize option,
body.dark-mode #resourceFilter option,
body.dark-mode .chart-filters option,
body.dark-mode #purchasePageSize option,
body.dark-mode #wdPageSize option {
  background: #1c2333 !important;
  color: #e6edf3 !important;
}
/* Fix for resource tag text truncation in mobile detail modal */
@media (max-width: 768px) {
  .detail-resources .resource-tag {
    font-size: 10px !important;
    padding: 4px 8px !important;
    max-width: none !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.3 !important;
    display: inline-block !important;
    width: auto !important;
    min-height: auto !important;
    height: auto !important;
  }
}

/* Dark mode fix for resource tags in detail modal */
html.dark-mode .detail-resources .resource-tag,
body.dark-mode .detail-resources .resource-tag {
  background: #1c2333 !important;
  color: #a78bfa !important;
  border-color: #30363d !important;
}

/* ── Dark mode: empty-statistic img fix ── */
body.dark-mode .empty-state-img {
  filter: invert(1) brightness(2);
}
