/* Dashboard Specific Styles */

/* Dark Theme Variables */


/* Layout */
.dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  opacity: 0;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(135deg, #000802 0%, #2d2d2d 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-sm);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  position: fixed;
  top: 110px;
  left: 0px;
  z-index: 1001;
  background: var(--primary);
  border: 2px solid var(--primary-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 8px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.nav-toggle:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.nav-toggle .menu-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: white;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-toggle.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
}

[data-theme="dark"] .nav-toggle {
  background: var(--accent);
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .nav-toggle:hover {
  background: var(--success);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
}

.nav-logo img {
  height: 55px;
  width: auto;
  margin-top: 7px;
}

.nav-title {
  display: flex;
  align-items: center;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.nav-title img {
  height: 50px;
  width: auto;
}

.nav-center {
  flex: 1;
  max-width: 400px;
  margin: 0 var(--space-lg);
}

.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: var(--space-sm) 40px var(--space-sm) 40px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  color: var(--text-muted)
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input.active {
  border-color: var(--primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.search-input.active + .search-icon {
  color: var(--primary);
}

.search-clear {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.search-clear:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.search-input.active ~ .search-clear {
  opacity: 1;
  visibility: visible;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 50;
  max-height: 300px;
  overflow-y: auto;
}

.search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-results {
  padding: var(--space-sm);
}

.search-result-item {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-base);
  border-bottom: 1px solid var(--border-light);
}

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

.search-result-item:hover {
  background: var(--bg-secondary);
}

.search-result-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.search-no-results {
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mobile-search-toggle {
  display: none;
}

.mobile-search-dropdown {
  display: none;
}

/* Responsive navbar element management */
@media (max-width: 600px) {
  .profile-name,
  .profile-button .fa-chevron-down {
    display: none;
  }
}

@media (max-width: 460px) {
  .theme-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .mobile-search-toggle {
    display: flex !important;
  }
  
  .mobile-search-dropdown {
    display: block !important;
  }
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-secondary);
  cursor: pointer;
  overflow: hidden;
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
}

.theme-toggle i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Show moon icon in light mode (to switch to dark) */
.theme-toggle .fa-sun {
  opacity: 0;
}

.theme-toggle .fa-moon {
  opacity: 1;
}

/* Show sun icon in dark mode (to switch to light) */
[data-theme="dark"] .theme-toggle {
  border-color: var(--border-medium);
}

[data-theme="dark"] .theme-toggle:hover {
  border-color: var(--primary);
}

[data-theme="dark"] .theme-toggle .fa-sun {
  opacity: 1;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  opacity: 0;
}

/* Notification Bell */
.notification-bell {
  position: relative;
}

.notification-bell > i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  cursor: pointer;
}

.notification-bell:hover > i {
  background: var(--bg-tertiary);
  border: 1px solid var(--primary);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  z-index: 1001;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h3 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

.mark-all-read {
  background: none;
  border: none;
  color: var(--primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.notification-list {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
}

/* Profile Menu */
.profile-menu {
  position: relative;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-md);
}

.profile-button:hover {
  background: #3c3d37;
}

[data-theme="dark"] .profile-button:hover {
  background: var(--bg-secondary);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.profile-name {
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--bg-secondary);
}

.profile-button .fa-chevron-down {
  color: var(--bg-secondary);
}

[data-theme="dark"] .profile-name,
[data-theme="dark"] .profile-button .fa-chevron-down {
  color: var(--text-primary);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  z-index: 1001;
}

/* Dark mode profile dropdown fixes */
[data-theme="dark"] .profile-dropdown {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-info {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.profile-email {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.profile-role {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  justify-self: anchor-center;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

/* Dark mode profile info fixes */
[data-theme="dark"] .profile-email {
  color: var(--text-primary);
}

[data-theme="dark"] .profile-role {
  color: var(--text-secondary);
}

.profile-actions {
  padding: var(--space-sm);
}

.profile-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  text-align: left;
  color: var(--text-primary);
}

.profile-action:hover {
  background: var(--bg-secondary);
}

.profile-action.logout {
  color: var(--danger);
}

/* Dark mode profile action fixes */
[data-theme="dark"] .profile-action:hover {
  background: var(--bg-tertiary);
}

/* Theme settings - preserve theme identity in both modes */
/* Light theme button */
.theme-option[data-theme="light"] {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}
.theme-option[data-theme="light"] span {
  color: #1f2937 !important;
}
.theme-option[data-theme="light"] i {
  color: #f59e0b !important;
}
.theme-option[data-theme="light"]:hover {
  background: #f9fafb !important;
  border-color: var(--primary) !important;
}

/* Dark theme button */
.theme-option[data-theme="dark"] {
  background: #1f2937 !important;
  border-color: #374151 !important;
}
.theme-option[data-theme="dark"] span {
  color: #f9fafb !important;
}
.theme-option[data-theme="dark"] i {
  color: #6366f1 !important;
}
.theme-option[data-theme="dark"]:hover {
  background: #111827 !important;
  border-color: var(--primary) !important;
}

/* System theme button */
.theme-option[data-theme="system"] {
  background: linear-gradient(45deg, #ffffff 50%, #1f2937 50%) !important;
  border-color: #6b7280 !important;
}
.theme-option[data-theme="system"] span {
  color: #1f2937 !important;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8), -1px -1px 2px rgba(0,0,0,0.8) !important;
  font-weight: 600 !important;
}
.theme-option[data-theme="system"] i {
  color: #6b7280 !important;
  filter: drop-shadow(1px 1px 1px rgba(255,255,255,0.8)) drop-shadow(-1px -1px 1px rgba(0,0,0,0.8)) !important;
}
.theme-option[data-theme="system"]:hover {
  background: linear-gradient(45deg, #f3f4f6 50%, #111827 50%) !important;
  border-color: var(--primary) !important;
}

/* Active theme indication */
.theme-option.active {
  border-width: 3px !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.theme-option[data-theme="light"].active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.theme-option[data-theme="dark"].active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.theme-option[data-theme="system"].active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-content {
  padding: var(--space-lg);
  height: 100%;
  overflow-y: auto;
}

.sidebar-header h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.nav-section {
  margin-bottom: var(--space-xl);
}

.nav-section h3 {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
}

.nav-section ul {
  list-style: none;
}

.nav-section li {
  margin-bottom: var(--space-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.nav-link i {
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  margin-left: 280px;
  margin-top: 64px;
  padding: 0;
  overflow-y: auto;
}



.content-wrapper {
  padding: var(--space-lg);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Welcome Header */
.welcome-header {
  margin-bottom: var(--space-2xl);
}

@media (max-width: 1024px) {
  .welcome-header {
  margin-bottom: var(--space-xl);
  }
}

.welcome-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.welcome-header p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  text-align: center;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-lg);
}

.stat-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: 2px;
}

.stat-content p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.dashboard-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.card-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.card-action:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.card-content {
  padding: var(--space-sm);
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.activity-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.activity-content p {
  font-size: var(--font-size-sm);
  margin-bottom: 2px;
}

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

/* Quick Actions */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quick-action {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
  color: var(--text-primary);
}

.quick-action:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  transform: translateX(4px);
}

/* Dark mode improvements for quick actions */
[data-theme="dark"] .quick-action {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

[data-theme="dark"] .quick-action:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  color: var(--text-primary);
}

/* Dark mode improvements for resource and log cards */
[data-theme="dark"] .resource-card,
[data-theme="dark"] .log-card {
  background: var(--bg-primary);
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .resource-card:hover,
[data-theme="dark"] .log-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border-color: var(--warning);
}

[data-theme="dark"] .resource-content p,
[data-theme="dark"] .log-remark {
  background: var(--bg-tertiary);
  border-left-color: var(--primary-light);
}

[data-theme="dark"] .log-time {
  background: rgba(100, 116, 139, 0.1);
}

[data-theme="dark"] .resource-category,
[data-theme="dark"] .log-category {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-light);
}

[data-theme="dark"] .log-time .duration {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
}

.section-actions {
  display: flex;
  gap: var(--space-md);
}

/* View Toggle */
.view-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 2px;
}

.toggle-btn {
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

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

/* Filter Dropdown */
.filter-dropdown {
  position: relative;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-btn:hover {
  background: var(--bg-tertiary);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 100;
}

.filter-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-option:hover {
  background: var(--bg-secondary);
}

.filter-option.active {
  background: var(--primary);
  color: white;
}

/* Export Button */
.export-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.export-btn:hover {
  background: var(--primary-dark);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

/* Login Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

#loginModal {
  background: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.2'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Cpath d='M20 20l10 10M40 10l10 10' stroke='%238b5cf6' stroke-width='1' stroke-opacity='0.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] #loginModal {
  background: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.2'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Cpath d='M20 20l10 10M40 10l10 10' stroke='%238b5cf6' stroke-width='1' stroke-opacity='0.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    rgba(0, 0, 0, 0.2);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.9);
  transition: all var(--transition-base);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  text-align: center;
}

.modal-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.modal-header p {
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  padding: var(--space-md);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.login-btn:hover {
  background: var(--primary-dark);
}

.error-message {
  color: var(--danger);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 120000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: visible;
}

.toast {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  transform: translateX(100%);
  transition: all var(--transition-base);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

/* Drive Card */
.drive-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.drive-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.drive-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #4285f4, #34a853);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-2xl);
}

.drive-info h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.drive-info p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.drive-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-base);
}

.drive-link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Toast Styles */
.toast-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.toast-content i {
  font-size: var(--font-size-lg);
}

.toast.success .toast-content i {
  color: var(--success);
}

.toast.error .toast-content i {
  color: var(--danger);
}

.toast.warning .toast-content i {
  color: var(--warning);
}

/* Resource Cards */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.resource-card {
  background: var(--bg-primary);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--warning);
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-top: 4px;
}

.resource-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.resource-category {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.resource-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.resource-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  margin-top: var(--space-md);
  transition: all var(--transition-base);
}

.resource-link:hover {
  background: var(--primary-dark);
}

/* Assignment Cards */
.assignments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.assignment-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.assignment-card.completed {
  background: rgba(34, 197, 94, 0.05);
  border-color: var(--success);
}

.assignment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.assignment-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assignment-header h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

.assignment-category {
  background: var(--accent);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.assignment-content {
  padding: var(--space-lg);
}

.assignment-content p {
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.assignment-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
}

/* Log Cards */
.logs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.log-card {
  background: var(--bg-primary);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.log-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--warning);
}

.log-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-top: 4px;
}

.log-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.log-category {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  background: rgba(100, 116, 139, 0.1);
  color: var(--secondary);
}

.log-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.log-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(100, 116, 139, 0.1);
  border-radius: var(--radius-sm);
}

.log-time .duration {
  background: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--secondary);
}

.log-remark {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary);
  line-height: 1.6;
}

/* Admin Styles */
.admin-form-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.admin-form-card h3 {
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.admin-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.admin-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.form-message {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

.categories-list {
  margin-top: var(--space-xl);
}

.categories-list h3 {
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

.category-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-name {
  font-weight: 500;
}

.category-type {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
    transition-delay: 0.1s;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .resources-grid,
  .assignments-grid,
  .logs-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
  }
  
  .mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-secondary);
    cursor: pointer;
    color: var(--text-primary);
  }
  
  .mobile-search-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
  }
  
  .mobile-search-dropdown {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 16px 16px 38px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }
  
  .mobile-search-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-search-dropdown .search-container {
    position: relative;
  }
  
  body.mobile-search-active .main-content {
    margin-top: calc(64px + 80px);
  }
  
  .mobile-search-dropdown .search-input {
    width: 100%;
    padding: var(--space-md) 40px var(--space-md) 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
  }
  
  .mobile-search-dropdown .search-input.active {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  }
  
  .mobile-search-dropdown .search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color var(--transition-base);
  }
  
  .mobile-search-dropdown .search-input.active + .search-icon {
    color: var(--primary);
  }
  
  .mobile-search-dropdown .search-clear {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }
  
  .mobile-search-dropdown .search-clear:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
  }
  
  .mobile-search-dropdown .search-input.active ~ .search-clear {
    opacity: 1;
    visibility: visible;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

@media (max-width: 520px) {
  .top-nav {
    padding: 0 var(--space-md);
  }
 
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    padding: var(--space-lg);
  }
  
  .admin-form-card {
    padding: var(--space-lg);
  }
}
/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background: var(--bg-secondary);
}

.table-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.table-link:hover {
    background: rgba(37, 99, 235, 0.1);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.completed {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

tr.completed {
    opacity: 0.7;
}

/* Admin User Data Overview */
.user-data-overview {
    padding: 24px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.user-data-overview h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

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


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

.stat-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-right: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.download-btn i {
    font-size: 1rem;
}

.error-message {
    color: var(--danger);
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--danger);
}
/* Admin Table Sections */
.admin-table-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.admin-table-section h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.download-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.no-data-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    margin-top: 16px;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* Hide empty states by default — shown via JS only when truly empty */
#assignmentsContent .empty-state,
#logsContent .empty-state,
#resourcesContent .empty-state,
#testScheduleContent .empty-state {
    display: none;
}
#assignmentsContent .empty-state.visible,
#logsContent .empty-state.visible,
#resourcesContent .empty-state.visible,
#testScheduleContent .empty-state.visible {
    display: block;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-dark);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
}

/* Notification History */
.notification-history {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.notification-history h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

#notificationHistoryList {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}
/* Categories Display */
.categories-display {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.categories-display h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .categories-grid { grid-template-columns: 1fr; }
}

.category-type-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-type-section h5 {
    margin: 0;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.category-type-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    max-height: 260px;
}

.category-type-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

.category-type-section li:last-child {
    border-bottom: none;
}

.category-type-section li.no-categories {
    color: var(--text-secondary);
    font-style: italic;
    justify-content: center;
    font-size: 0.85rem;
    padding: 16px;
}

.category-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-category-btn {
    background: none;
    color: var(--danger);
    border: none;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.delete-category-btn:hover {
    opacity: 1;
    background: rgba(239,68,68,0.1);
}

/* Filter Controls */
.filter-controls {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.filter-controls h5 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.filter-controls label {
    display: inline-block;
    margin: 0 8px 0 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.filter-controls input[type="date"] {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-right: 12px;
}

/* PDF Preview */
#pdfPreviewContainer {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

#pdfPreviewContainer h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-info {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

#pdfPreviewFrame {
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Categories display styles */
.categories-display {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.categories-display h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.category-type-section {
    margin-bottom: 2rem;
}

.category-type-section h5 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.category-type-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface-variant);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.category-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
    flex-grow: 1;
}

.delete-category-btn i {
    font-size: 0.875rem;
}

.no-categories {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--surface-variant);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
}

/* Filter controls styles */
.filter-controls {
    background: var(--surface-variant);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.filter-controls h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.filter-controls label {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-controls input[type="date"] {
    margin: 0 1rem 0.5rem 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
}

/* Download buttons styles */
.download-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-btn:nth-child(2) {
    background: var(--success);
}

.download-btn:nth-child(2):hover {
    background: var(--success-dark);
}

.download-btn:nth-child(3) {
    background: var(--warning);
}

.download-btn:nth-child(3):hover {
    background: var(--warning-dark);
}

/* PDF Preview styles */
#pdfPreviewContainer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

#pdfPreviewContainer h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-info {
    background: var(--surface-variant);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

#pdfPreviewFrame {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.preview-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.preview-actions button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-actions button:first-child {
    background: var(--success);
    color: white;
}

.preview-actions button:first-child:hover {
    background: var(--success-dark);
}

.preview-actions button:nth-child(2) {
    background: var(--primary);
    color: white;
}

.preview-actions button:nth-child(2):hover {
    background: var(--primary-dark);
}

.preview-actions button:last-child {
    background: var(--text-secondary);
    color: white;
}

.preview-actions button:last-child:hover {
    background: var(--text-primary);
}

/* Total row styles */
.table-container .total-row {
    font-weight: 600;
}

.table-container .total-row:hover {
    background: var(--primary-light) !important;
}
.no-categories {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--surface-variant);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
}

/* Image Cropping Modal Specific Styles */
.modal-overlay#cropImageModal .modal-content {
    max-width: 700px; /* Adjust as needed */
    width: 95%;
    padding: var(--space-lg);
}

.modal-overlay#cropImageModal .modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.modal-overlay#cropImageModal .img-container {
    max-height: 400px; /* Limit height of the image container */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.modal-overlay#cropImageModal .img-container img {
    max-width: 100%; /* Ensure image fits within container */
    height: auto;
    display: block;
}

.modal-overlay#cropImageModal .crop-preview-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: var(--space-md);
}

.modal-overlay#cropImageModal .img-preview {
    width: 100px; /* Size of the preview */
    height: 100px;
    overflow: hidden;
    border-radius: 50%; /* Circular preview */
    border: 1px solid var(--border-light);
}

.modal-overlay#cropImageModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-lg);
}

/* Filter controls styles */
.filter-controls {
    background: var(--surface-variant);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.filter-controls h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.filter-controls label {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-controls input[type="date"] {
    margin: 0 1rem 0.5rem 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
}

/* Download buttons styles */
.download-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-btn:nth-child(2) {
    background: var(--success);
}

.download-btn:nth-child(2):hover {
    background: var(--primary);
}

.download-btn:nth-child(3) {
    background: var(--warning);
}

.download-btn:nth-child(3):hover {
    background: var(--primary);
}

/* PDF Preview styles */
#pdfPreviewContainer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

#pdfPreviewContainer h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-info {
    background: var(--surface-variant);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

#pdfPreviewFrame {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.preview-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.preview-actions button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-actions button:first-child {
    background: var(--success);
    color: white;
}

.preview-actions button:first-child:hover {
    background: var(--success-dark);
}

.preview-actions button:nth-child(2) {
    background: var(--primary);
    color: white;
}

.preview-actions button:nth-child(2):hover {
    background: var(--primary-dark);
}

.preview-actions button:last-child {
    background: var(--text-secondary);
    color: white;
}

.preview-actions button:last-child:hover {
    background: var(--text-primary);
}

.table-container .total-row:hover {
    background: var(--primary-light) !important;
}

/* User data overview styles */
.user-data-overview {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.user-data-overview h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

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

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

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

/* Category Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.selection-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selection-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.selection-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.category-item input[type="checkbox"] {
    margin: 0;
}

.category-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary, .btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

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

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

.loading, .no-categories, .error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error {
    color: var(--danger);
}

/* Export wizard styles */
.export-wizard {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wizard-steps {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}

.wizard-steps .step {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid var(--border);
    transition: background 0.2s, color 0.2s;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.wizard-steps .step:last-child { border-right: none; }
.wizard-steps .step:hover { background: var(--bg-hover); }
.wizard-steps .step.active { background: var(--primary); color: white; }
.wizard-steps .step.completed { background: var(--success); color: white; }

.step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.step.active .step-number,
.step.completed .step-number {
    background: rgba(255,255,255,0.25);
    color: white;
}

.step-title { font-size: 0.8rem; font-weight: 500; }

.wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.wizard-step { display: none; }
.wizard-step.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wizard-step h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.selection-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selection-btn {
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.selection-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 2px;
    flex: 1;
    align-content: start;
}

.selection-list-wrap {
    flex: 1;
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.selection-list-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s;
}

.selection-list-wrap.scrolled-end::after {
    opacity: 0;
}

.selection-list-wrap .scroll-hint {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 0.75rem;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    opacity: 1;
    transition: opacity 0.2s;
}

.selection-list-wrap.scrolled-end .scroll-hint {
    opacity: 0;
}

.selection-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-secondary);
}

.selection-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.selection-item input[type="checkbox"],
.selection-item input[type="radio"] { margin: 0; flex-shrink: 0; }

.selection-item span {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.date-range-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.custom-date-range {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.test-filter-options {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.test-filter-options h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.export-summary {
    background: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.export-summary h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.export-options {
    display: flex;
    gap: 0.75rem;
}

.export-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-btn:hover { background: var(--primary-dark); }

.wizard-navigation {
    flex-shrink: 0;
    padding: 0.875rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.wizard-btn {
    padding: 0.55rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

.wizard-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.wizard-btn.reset {
    background: transparent;
    color: var(--warning);
    border-color: var(--warning);
}

.wizard-btn.reset:hover {
    background: var(--warning);
    color: white;
}

@media (max-width: 768px) {
    .wizard-steps .step { min-width: 60px; padding: 0.6rem 0.4rem; }
    .step-title { display: none; }
    .selection-list { grid-template-columns: 1fr; }
    .date-range-options { grid-template-columns: 1fr 1fr; }
    .export-options { flex-direction: column; }
    #exportWizardDialog > div { height: 85vh !important; }
}

/* Admin count displays */
.admin-count-display {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.admin-count-display .count-item {
    display: inline-block;
    margin-right: 1.5rem;
}

.admin-count-display .count-number {
    font-weight: 600;
    color: var(--primary);
}

.admin-count-display .count-label {
    color: var(--text-secondary);
}

/* Form hint styling */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}
/* Enhanced PDF Log Display Styles */
.log-entry {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.log-entry:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

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

.log-type {
    font-weight: 600;
    color: var(--text-primary);
}

.log-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.log-source {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.log-source.cloud {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.log-source.local {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.log-info {
    margin-bottom: 12px;
}

.log-filename {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.log-stats {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.log-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-details {
    margin-bottom: 12px;
}

.log-summary {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.expand-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.expand-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.export-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
}

.export-details.expanded {
    max-height: 500px;
}

.log-actions {
    display: flex;
    gap: 8px;
}

.download-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.download-btn {
    background: var(--primary);
    color: white;
}

.download-btn:hover {
    background: var(--primary-dark);
}

.delete-btn {
    background: var(--danger);
    color: white;
}

.delete-btn:hover {
    background: #dc2626;
}

.log-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Mobile responsive adjustments for log display */
@media (max-width: 768px) {
    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .log-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .log-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .download-btn, .delete-btn {
        width: 100%;
        text-align: center;
    }
}
/* Log header actions */
.log-actions-header {
    display: flex;
    gap: 8px;
    align-items: center;
}

.migrate-log-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.migrate-log-btn:hover {
    background: #16a34a;
}

.migrate-log-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .log-actions-header {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }
    
    .migrate-log-btn, .clear-log-btn {
        width: 100%;
        text-align: center;
    }
}
/* Login Links */
.login-links {
    text-align: center;
    margin: 10px 0;
}

.subtle-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.subtle-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.subtle-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
/* Compact Login Modal */
.login-modal {
    max-width: 350px !important;
    padding: 20px !important;
}

.login-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: calc(-1 * var(--space-2xl));
    margin-bottom: var(--space-lg);
    padding: 35px 0 5px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-modal .modal-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-primary);
}

.login-modal .form-group {
    margin-bottom: 10px;
}

.login-modal .form-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.login-modal .form-group input {
    padding: 8px 10px !important;
    font-size: 0.9rem;
    height: auto !important;
}

/* Password Input with Eye Button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 35px !important;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Login Options Row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 0.8rem;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
}

.remember-checkbox input {
    margin: 0;
    width: auto;
    height: auto;
}

.login-modal .login-btn,
.login-modal .anonymous-btn {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    font-size: 0.9rem;
}

.login-modal .login-divider {
    margin: 8px 0;
    font-size: 0.8rem;
}

.login-modal .login-links {
    margin: 6px 0;
    font-size: 0.8rem;
}

.login-modal .subtle-link,
.login-modal .subtle-text {
    font-size: 0.8rem;
}

.login-modal .error-message {
    font-size: 0.85rem;
    padding: 8px;
    margin-top: 8px;
}
/* Drive Actions */
.drive-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.remove-drive-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.remove-drive-btn:hover {
    background: var(--danger-dark, #dc2626);
}

/* Drive Notice Styling */
.drive-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 8px 12px;
    background: var(--warning-light, #fff3cd);
    border: 1px solid var(--warning, #f59e0b);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--warning-dark, #b45309);
}

.drive-notice i {
    color: var(--warning);
    font-size: 14px;
}
/* Login Modal Link Styling */
.login-modal .subtle-link {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.login-modal .subtle-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

[data-theme="dark"] .login-modal .subtle-link {
  color: #60a5fa;
}

[data-theme="dark"] .login-modal .subtle-link:hover {
  color: #93c5fd;
}
/* Login Modal Brand Styling */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.login-logo {
  height: 55px;
  width: auto;
}

.login-name {
  height: 50px;
  width: auto;
}
/* Landing Page Integration */
.landing-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  z-index: 10000;
  background: #000;
  overflow-y: auto;
}

.dashboard-container {
  display: none;
}
/* Desktop slide-in modal */
@media (min-width: 768px) {
  .modal-overlay.desktop-slide {
    position: fixed !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: 50% !important;
    height: 100vh !important;
    background: 
      url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.2'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Cpath d='M20 20l10 10M40 10l10 10' stroke='%238b5cf6' stroke-width='1' stroke-opacity='0.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
      var(--bg-primary) !important;
    backdrop-filter: blur(10px);
    z-index: 15000;
    opacity: 1;
    visibility: hidden;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
  }

  [data-theme="dark"] .modal-overlay.desktop-slide {
    background: 
      url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.2'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Cpath d='M20 20l10 10M40 10l10 10' stroke='%238b5cf6' stroke-width='1' stroke-opacity='0.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
      var(--bg-primary) !important;
  }

  .modal-overlay.desktop-slide.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
  }

  .modal-overlay.desktop-slide::before {
    display: none;
  }

  /* #loginModal .modal-close {
    display: block;
  } */

  .modal-overlay:not(.desktop-slide):not(#exportWizardDialog) .modal-close {
    display: none;
  }

  .modal-overlay.desktop-slide .login-brand img {
    display: none;
  }

  .modal-overlay.desktop-slide .login-brand::after {
    content: 'Sign in';
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
  }

  .modal-overlay.desktop-slide .modal-header {
    background: none;
  }

  .modal-overlay.desktop-slide .modal-content {
    max-width: 350px;
    width: 90%;
    transform: scale(1) !important;
    transition: none !important;
  }
}

/* Install Banner */
.install-banner {
  position: fixed;
  top: -60px;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: 10001;
  transition: top 0.3s ease;
  font-size: var(--font-size-sm);
}

.install-banner.show {
  top: 0;
}

.install-banner button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  cursor: pointer;
}

.install-banner button:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (min-width: 769px) {
  .install-banner {
    display: none;
  }
}
.online-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.online-test-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.online-test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.online-test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.online-test-card .test-info h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    padding-top: 4px;
}

.online-test-card .test-info p {
    margin: 8px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.online-test-card .test-actions {
    margin-top: 16px;
}

.btn-start-test {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-start-test:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-start-test:hover {
    background: #1d4ed8;
}

.instructions {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.instructions h3 {
    margin: 0 0 12px 0;
    color: #0c4a6e;
}

.instructions ul {
    margin: 0;
    padding-left: 20px;
}

.instructions li {
    margin: 4px 0;
    color: #0c4a6e;
}

/* Test Session Interface */
.test-session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.test-timer {
    font-size: 24px;
    font-weight: bold;
    color: #dc2626;
}

.test-screen {
    margin: 20px 0;
}

.test-info-card, .test-actions-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.test-info-card h4 {
    margin: 0 0 12px 0;
    color: #1f2937;
}

.upload-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.upload-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--accent);
}

.upload-section input[type="file"] {
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 100%;
}

.btn-primary, .btn-success, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}
/* Uploaded Tests Section */
.uploaded-test-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.uploaded-test-item .test-info h4 {
    margin: 0 0 4px 0;
    /* color: #1f2937; */
}

.uploaded-test-item .test-info p {
    margin: 0 0 8px 0;
    /* color: #6b7280; */
    font-size: 14px;
}

.uploaded-test-item .status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}

.status.answered {
    background: var(--success);
    color: var(--bg-dark);
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.test-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn.download {
    background: #2563eb;
    color: white;
}

.action-btn.download:hover {
    background: #1d4ed8;
}

.action-btn.hide {
    background: #f59e0b;
    color: white;
}

.action-btn.show {
    background: #22c55e;
    color: white;
}

.action-btn.reset {
    background: #6b7280;
    color: white;
}

.action-btn.delete {
    background: #ef4444;
    color: white;
}

.action-btn:hover {
    transform: scale(1.05);
}

.no-tests, .error {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}
/* Test Status Labels */
.test-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.test-label.expired {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border-color: #ef4444;
}

.test-label.completed {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #10b981;
}

.test-label.in-progress {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: #3b82f6;
}

.test-label.available {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #22c55e;
}

.online-test-card.disabled {
    opacity: 0.6;
    background: #f9fafb;
}

.btn-disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
    cursor: not-allowed;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.btn-submit {
    background: #f59e0b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #d97706;
}
/* Admin Test Badge */
.test-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
}

.test-badge.expired {
    background: #fee2e2;
    color: #dc2626;
}
/* Test Sessions Expandable */
.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 12px;
    color: #6b7280;
}

.test-sessions {
    padding: 16px;
    background: var(--bg-glass);
    /* border-radius: 6px;
    border-top: 1px solid #e5e7eb; */
}

.test-sessions h5 {
    margin: 0 0 12px 0;
    /* color: #374151; */
    font-size: 14px;
}

.session-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

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

.user-name {
    font-weight: 500;
    /* color: #1f2937; */
}

.session-info {
    font-size: 12px;
    color: inherit;
}

.session-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.status-submitted {
    background: #dcfce7;
    color: #166534;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

.no-sessions {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 12px;
}

.action-btn.answer {
    background: #8b5cf6;
    color: white;
}

.action-btn.answer:hover {
    background: #7c3aed;
}
/* New Test Button */
.new-test-btn {
    margin-left: 8px;
    padding: 8px 12px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.new-test-btn:hover {
    background: #16a34a;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 15% auto;
    padding: 0;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
}

.close:hover {
    color: var(--text-primary);
}

.modal form {
    padding: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

/* Test Timer Dual Display Styles */
.timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Courier New', monospace;
}

.test-timer-active,
.test-timer-finished {
  font-size: 1.2rem;
  font-weight: bold;
}

.test-timer-active {
  color: #22c55e;
}

.test-timer-finished {
  color: #6b7280;
}

.grace-timer {
  font-size: 1.1rem;
  font-weight: bold;
  color: #ef4444;
}

.grace-timer-waiting {
  font-size: 0.9rem;
  color: #6b7280;
}

.submit-deadline {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 500;
}

.test-timer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
/* User Pill Styling */
.user-pill {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.60rem;
  font-weight: 500;
  margin-left: auto;
}

/* Activity Meta Layout */
.activity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.activity-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Device Timer Button */
.btn-info {
  background: #0ea5e9;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.btn-info:hover {
  background: #0284c7;
  transform: translateY(-2px);
}

/* Test Resume Button Styles */
.btn-resume-test {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.btn-resume-test:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    border-color: #d97706 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-resume-test::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-resume-test:hover::before {
    left: 100%;
}

.test-label.in-progress {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    animation: pulse-glow 2s infinite;
    border: 1px solid #f59e0b;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
    }
}

/* Status-based styling for online test cards */
.online-test-card:has(.test-label.completed) {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.online-test-card:has(.test-label.in-progress) {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.online-test-card:has(.test-label.expired) {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.online-test-card.disabled {
    opacity: 0.7;
    background: var(--bg-tertiary);
    border-color: var(--border);
}

/* Enhanced test card for in-progress tests */
.online-test-card:has(.btn-resume-test) {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fefce8);
}

.online-test-card:has(.btn-resume-test):hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

/* Dark theme support for online test cards */
[data-theme="dark"] .online-test-card {
    background: var(--bg-secondary);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .online-test-card:hover {
    box-shadow: 0 8px 25px rgba(139, 139, 139, 0.4);
}

[data-theme="dark"] .online-test-card .test-info h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .online-test-card .test-info p {
    color: var(--text-secondary);
}

[data-theme="dark"] .online-test-card.disabled {
    background: var(--bg-tertiary);
    opacity: 0.7;
}

[data-theme="dark"] .online-test-card:has(.test-label.completed) {
    background: linear-gradient(135deg, #1f2937 0%, rgba(16, 185, 129, 0.08) 100%);
}

[data-theme="dark"] .online-test-card:has(.test-label.in-progress) {
    background: linear-gradient(135deg, #1f2937 0%, rgba(245, 158, 11, 0.08) 100%);
}

[data-theme="dark"] .online-test-card:has(.test-label.expired) {
    background: linear-gradient(135deg, #1f2937 0%, rgba(239, 68, 68, 0.08) 100%);
}

[data-theme="dark"] .online-test-card:has(.btn-resume-test) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(254, 252, 232, 0.05));
    border-left-color: #f59e0b;
}

/* Dark theme test label enhancements */
[data-theme="dark"] .test-label.expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.15));
    color: #fca5a5;
    border-color: #ef4444;
}

[data-theme="dark"] .test-label.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.15));
    color: #86efac;
    border-color: #10b981;
}

[data-theme="dark"] .test-label.in-progress {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.15));
    color: #93c5fd;
    border-color: #3b82f6;
}

[data-theme="dark"] .test-label.available {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.15));
    color: #86efac;
    border-color: #22c55e;
}

/* Additional online test card enhancements */
.online-test-card .test-info p i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.online-test-card .test-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Hover effects for interactive elements */
.online-test-card:hover .test-info h3 {
    color: var(--primary);
    transition: color 0.2s ease;
}

/* Focus states for accessibility */
.btn-start-test:focus,
.btn-resume-test:focus,
.btn-disabled:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .online-test-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Dark theme for online tests section instructions */
[data-theme="dark"] #online-testsSection .section-header p {
    color: var(--text-secondary);
}
