/* Admin Security Events Styles */

.security-events-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.security-events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.security-events-title h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #222831;
  margin: 0 0 0.25rem 0;
}

.security-events-title p {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

.security-events-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #222831;
  background: white;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-admin:hover {
  background: #f9fafb;
  border-color: #134686;
}

.btn-admin svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* Filters */
.security-filters {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.filter-section-title svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

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

.filter-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #134686;
  box-shadow: 0 0 0 3px rgba(19, 70, 134, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.btn-primary {
  padding: 0.625rem 1.25rem;
  background: #134686;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #0f3666;
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: #f9fafb;
}

/* Table */
.security-events-table-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.security-events-table thead {
  background: linear-gradient(to right, #f9fafb, #f3f4f6);
  border-bottom: 2px solid #e5e7eb;
}

.security-events-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.security-events-table th.text-center {
  text-align: center;
}

.security-events-table th.text-right {
  text-align: right;
}

.security-events-table th svg {
  width: 0.75rem;
  height: 0.75rem;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.security-events-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.security-events-table tbody tr:hover {
  background: #eff6ff;
}

.security-events-table tbody tr.threat-row {
  background: #fef2f2;
}

.security-events-table tbody tr.threat-row:hover {
  background: #fee2e2;
}

.security-events-table td {
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
}

.event-time {
  display: flex;
  flex-direction: column;
}

.event-time-date {
  font-weight: 600;
  color: #111827;
}

.event-time-clock {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.event-details {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.event-important {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.event-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.event-description {
  font-size: 0.75rem;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-user {
  display: flex;
  flex-direction: column;
}

.event-user-email {
  font-weight: 500;
  color: #111827;
}

.event-user-username {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: 'Courier New', monospace;
}

.event-location {
  display: flex;
  flex-direction: column;
}

.event-ip {
  font-family: 'Courier New', monospace;
  font-weight: 500;
  color: #111827;
}

.event-geo {
  font-size: 0.75rem;
  color: #6b7280;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

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

.badge-failure {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-view:hover {
  background: #dbeafe;
}

.btn-view svg {
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.375rem;
}

/* Empty State */
.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
}

.empty-state svg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #d1d5db;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Pagination */
.pagination-container {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.pagination-info {
  font-size: 0.875rem;
  color: #374151;
}

.pagination-info strong {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .security-events-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .security-events-table {
    font-size: 0.75rem;
  }
  
  .security-events-table th,
  .security-events-table td {
    padding: 0.75rem 0.5rem;
  }
}
