:root {
  color-scheme: dark;
}

.admin-shell {
  min-height: 100vh;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  background: radial-gradient(circle at top, #1a1a2e, #030305);
}

[data-theme="light"] .admin-shell {
  background: #f0f2f5;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-header h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

[data-theme="light"] .admin-header h1 {
  color: #00838f;
  text-shadow: none;
}

.admin-back {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  font-family: 'Fira Code', monospace;
}

.admin-back:hover {
  color: var(--primary);
  transform: translateX(-3px);
  text-shadow: 0 0 5px var(--primary);
}

[data-theme="light"] .admin-back:hover {
  color: #00838f;
  text-shadow: none;
}

.refresh-button {
  padding: 0.65rem 1.75rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

[data-theme="light"] .refresh-button {
  background: rgba(0, 188, 212, 0.1);
}

.refresh-button:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

[data-theme="light"] .refresh-button:hover {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.refresh-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: rgba(75, 85, 99, 0.2);
  border-color: #4b5563;
  color: #6b7280;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.summary-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.summary-card {
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: rgba(3, 3, 5, 0.6);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .summary-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

[data-theme="light"] .summary-card::before {
  box-shadow: none;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
  background: rgba(0, 243, 255, 0.05);
}

[data-theme="light"] .summary-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card strong {
  font-size: 2rem;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  text-shadow: 0 0 10px var(--primary);
}

[data-theme="light"] .summary-card strong {
  color: #1a1a1a;
  text-shadow: none;
}

.summary-label {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  font-family: 'Fira Code', monospace;
}

.table-card {
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(3, 3, 5, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .table-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.last-refresh {
  font-size: 0.95rem;
  color: var(--fg-soft);
  font-family: 'Fira Code', monospace;
}

.dashboard-message {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg-soft);
  font-family: 'Fira Code', monospace;
}

#admin-select-group,
#proof-upload-group,
#proof-preview-group {
  display: none;
}

.form-hint-secondary {
  color: var(--fg-soft);
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
}

.proof-preview-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 0.5rem;
}

[data-theme="light"] .dashboard-message {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666;
}

.dashboard-message[data-tone="error"] {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .dashboard-message[data-tone="error"] {
  background: rgba(239, 68, 68, 0.1);
  color: #c62828;
  border-color: #c62828;
  box-shadow: none;
}

.dashboard-message[data-tone="success"] {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .dashboard-message[data-tone="success"] {
  background: rgba(16, 185, 129, 0.1);
  color: #2e7d32;
  border-color: #2e7d32;
  box-shadow: none;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 4px;
  border: 1px solid var(--primary);
}

[data-theme="light"] .table-wrapper {
  border: 1px solid #e0e0e0;
}

/* Scrollbar styling for dark mode */
.table-wrapper::-webkit-scrollbar {
  height: 12px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #000;
  border-radius: 0;
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0;
  border: 2px solid #000;
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border: 2px solid #f5f5f5;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #999;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
  vertical-align: top;
  color: var(--fg);
  transition: all 0.3s ease;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] th,
[data-theme="light"] td {
  border-bottom: 1px solid #eee;
  color: #333;
}

th {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background: rgba(0, 243, 255, 0.05);
  border-bottom: 1px solid var(--primary);
}

[data-theme="light"] th {
  background: #f9f9f9;
  color: #00838f;
  border-bottom: 2px solid #e0e0e0;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(0, 243, 255, 0.05);
}

[data-theme="light"] tbody tr:hover {
  background: #f5f5f5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  font-family: 'JetBrains Mono', monospace;
}

.status-submitted {
  background: rgba(66, 211, 255, 0.1);
  border-color: #42d3ff;
  color: #42d3ff;
  box-shadow: 0 0 10px rgba(66, 211, 255, 0.2);
}

[data-theme="light"] .status-submitted {
  background: rgba(66, 211, 255, 0.1);
  color: #0277bd;
  border-color: #0277bd;
  box-shadow: none;
}

.status-in-progress {
  background: rgba(255, 196, 87, 0.1);
  border-color: #ffc457;
  color: #ffc457;
  box-shadow: 0 0 10px rgba(255, 196, 87, 0.2);
}

[data-theme="light"] .status-in-progress {
  background: rgba(255, 196, 87, 0.1);
  color: #f57f17;
  border-color: #f57f17;
  box-shadow: none;
}

.status-resolved {
  background: rgba(72, 187, 120, 0.1);
  border-color: #48bb78;
  color: #48bb78;
  box-shadow: 0 0 10px rgba(72, 187, 120, 0.2);
}

[data-theme="light"] .status-resolved {
  background: rgba(72, 187, 120, 0.1);
  color: #2e7d32;
  border-color: #2e7d32;
  box-shadow: none;
}

.status-appeal-to-resolve {
  background: rgba(168, 85, 247, 0.1);
  border-color: #a855f7;
  color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

[data-theme="light"] .status-appeal-to-resolve {
  background: rgba(168, 85, 247, 0.1);
  color: #7b1fa2;
  border-color: #7b1fa2;
  box-shadow: none;
}

.status-unknown {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--fg-soft);
}

[data-theme="light"] .status-unknown {
  background: #f5f5f5;
  border-color: #ccc;
  color: #666;
}

td.description {
  max-width: 240px;
  white-space: pre-wrap;
}

td.location {
  max-width: 280px;
  min-width: 200px;
}

/* Location info styling */
.location-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.location-address {
  font-size: 0.85rem;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.location-link {
  color: var(--secondary) !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.location-link:hover {
  color: var(--primary) !important;
  text-shadow: 0 0 5px var(--primary);
}

.location-accuracy {
  color: var(--fg-soft);
  font-size: 0.8rem;
}

td a {
  color: var(--secondary);
  text-decoration: none;
}

td a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .admin-shell {
    padding: 1.5rem 1rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .admin-header h1 {
    font-size: 1.5rem;
  }

  .admin-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .admin-back {
    font-size: 0.9rem;
  }

  .refresh-button {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .summary-card {
    padding: 1.25rem;
  }

  .summary-label {
    font-size: 0.75rem;
  }

  .summary-number {
    font-size: 1.75rem;
  }

  .table-card {
    padding: 1rem;
    overflow-x: auto;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    min-width: 100px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    background: #000;
    z-index: 1;
    border-right: 1px solid var(--primary);
  }
}

@media (max-width: 480px) {
  .admin-shell {
    padding: 1rem 0.75rem;
  }

  .admin-header h1 {
    font-size: 1.25rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table-card {
    padding: 0.75rem;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem 0.4rem;
    min-width: 80px;
  }
}

/* Complainer info styling */
.complainer-info {
  white-space: pre-line;
  font-size: 0.9rem;
  color: var(--fg-soft);
}

/* Update table column count */
th:nth-child(5),
td:nth-child(5) {
  min-width: 150px;
}

/* Loading message styles */
.loading-message, .empty-message {
  text-align: center;
  color: var(--primary);
  padding: 3rem;
  font-size: 1.1rem;
  background: rgba(3, 3, 5, 0.8);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-weight: 500;
  font-family: 'Fira Code', monospace;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

/* 🔥 NEW: Filter Controls */
.filter-controls {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(3, 3, 5, 0.8);
  border: 1px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

[data-theme="light"] .filter-controls {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 250px;
  flex: 1;
}

.filter-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--secondary);
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
}

[data-theme="light"] .filter-group label {
  color: #666;
}

.filter-group select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .filter-group select {
  background: #ffffff;
  border: 1px solid #ccc;
  color: #333;
}

.filter-group select:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

[data-theme="light"] .filter-group select:hover {
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.1);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(188, 19, 254, 0.3);
}

[data-theme="light"] .filter-group select:focus {
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

.filter-clear {
  padding: 0.65rem 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary);
  border-radius: 4px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  height: fit-content;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

[data-theme="light"] .filter-clear {
  background: #ffffff;
  border: 1px solid #00bcd4;
  color: #00bcd4;
}

.filter-clear:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 15px var(--primary-glow);
}

[data-theme="light"] .filter-clear:hover {
  background: #00bcd4;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

/* 🔥 NEW: Bulk Operations Toolbar */
.bulk-toolbar {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(3, 3, 5, 0.8);
  border: 1px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 1rem;
  align-items: center;
}

[data-theme="light"] .bulk-toolbar {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Fira Code', monospace;
}

.bulk-select-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.bulk-forward-btn {
  padding: 0.65rem 1.5rem;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--primary);
  border-radius: 4px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.bulk-forward-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

.bulk-forward-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(75, 85, 99, 0.2);
  border-color: #4b5563;
  color: #6b7280;
}

/* 🔥 NEW: Table checkbox and index columns */
.col-checkbox {
  width: 40px;
  text-align: center;
}

.col-index {
  width: 60px;
  text-align: center;
  font-weight: 600;
}

.index-cell {
  text-align: center;
  color: var(--secondary);
  font-weight: 600;
  font-family: 'Fira Code', monospace;
}

.complaint-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* 🔥 NEW: Actions Dropdown */
.col-actions {
  width: 80px;
  text-align: center;
}

.actions-dropdown {
  position: relative;
  display: inline-block;
}

.actions-btn {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary);
}

[data-theme="light"] .actions-btn {
  background: #ffffff;
  border: 1px solid #ccc;
  color: #333;
}

.actions-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 10px var(--primary-glow);
}

[data-theme="light"] .actions-btn:hover {
  background: #f0f0f0;
  color: #000;
  box-shadow: none;
  border-color: #999;
}

.actions-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: rgba(3, 3, 5, 0.95);
  border: 1px solid var(--primary);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
  z-index: 1000;
  min-width: 180px;
  overflow: hidden;
}

.actions-menu.show {
  display: block;
}

[data-theme="light"] .actions-menu {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .action-item {
  color: #333;
}

.action-item:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
}

[data-theme="light"] .action-item:hover:not(:disabled) {
  background: #f5f5f5;
  color: #000;
}

.action-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-item + .action-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 🔥 NEW: Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background: rgba(3, 3, 5, 0.95);
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
  border: 1px solid var(--primary);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
  position: relative;
}

[data-theme="light"] .modal-content {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

[data-theme="light"] .modal-content::before {
  background: linear-gradient(90deg, #00838f, #00acc1);
}

.modal-small {
  max-width: 400px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--primary);
  background: rgba(0, 243, 255, 0.05);
}

[data-theme="light"] .modal-header {
  background: #f9f9f9;
  border-bottom: 2px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--primary-glow);
}

[data-theme="light"] .modal-header h3 {
  color: #00838f;
  text-shadow: none;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--primary);
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

[data-theme="light"] .modal-close {
  border-color: #00838f;
  color: #00838f;
}

.modal-close:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 10px var(--primary-glow);
}

[data-theme="light"] .modal-close:hover {
  background: #00838f;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 131, 143, 0.3);
}

.modal-body {
  padding: 1.5rem;
}

[data-theme="light"] .modal-body {
  color: #333;
}

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

[data-theme="light"] .modal-footer {
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
}

.btn-primary, .btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.btn-primary {
  background: rgba(0, 243, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .btn-primary {
  background: rgba(0, 131, 143, 0.1);
  border-color: #00838f;
  color: #00838f;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

[data-theme="light"] .btn-primary:hover:not(:disabled) {
  background: #00838f;
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 131, 143, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

[data-theme="light"] .btn-secondary {
  color: #666;
  border-color: #ddd;
}

.btn-secondary:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .btn-secondary:hover {
  border-color: #999;
  background: #f5f5f5;
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 🔥 NEW: Complaint Preview */
.complaint-preview {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

[data-theme="light"] .complaint-preview {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.preview-field {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .preview-field {
  color: #333;
  border-bottom: 1px solid #eee;
}

.preview-field:last-child {
  border-bottom: none;
}

.preview-alert {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-weight: 600;
  border: 1px solid #ffc107;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .preview-alert {
  background: rgba(255, 193, 7, 0.1);
  color: #f57f17;
  border: 1px solid #f57f17;
}

/* 🔥 NEW: Form Groups in Modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--secondary);
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
}

[data-theme="light"] .form-group label {
  color: #00838f;
}

.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .form-group select {
  background: #ffffff;
  border: 1px solid #00838f;
  color: #00838f;
}

[data-theme="light"] .form-group select option {
  background: #ffffff;
  color: #333;
}

.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(188, 19, 254, 0.3);
}

[data-theme="light"] .form-group select:focus {
  border-color: #00acc1;
  box-shadow: 0 0 15px rgba(0, 172, 193, 0.2);
}

/* 🔥 NEW: History Table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.history-table th,
.history-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .history-table th,
[data-theme="light"] .history-table td {
  border-bottom: 1px solid #eee;
  color: #333;
}

.history-table th {
  background: rgba(0, 243, 255, 0.05);
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

[data-theme="light"] .history-table th {
  background: #f9f9f9;
  color: #00838f;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .history-table tr:hover {
  background: #f5f5f5;
}

/* 🔥 NEW: Forwarded Icon in Status Badge */
.forwarded-icon {
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

.status-badge.forwarded {
  background: rgba(147, 51, 234, 0.1);
  color: #d8b4fe;
  border: 1px solid #d8b4fe;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.2);
}

/* 🔥 NEW: Responsive Adjustments */
@media (max-width: 768px) {
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-group {
    min-width: 100%;
  }
  
  .filter-clear {
    width: 100%;
  }
  
  .bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bulk-forward-btn {
    margin-left: 0;
    width: 100%;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .actions-menu {
    right: auto;
    left: 0;
  }
}
