* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
}

header {
  background: #1e293b;
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

header h1 { font-size: 22px; }

.stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.stats span {
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 6px;
}

main { padding: 20px 30px; max-width: 1100px; margin: 0 auto; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.upload-box, .filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

button:hover { background: #1d4ed8; }

select, input[type="file"] {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

#uploadStatus { font-size: 13px; color: #16a34a; }

.ticket-card {
  background: white;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  border-left: 4px solid #94a3b8;
  transition: transform 0.1s;
}

.ticket-card:hover { transform: translateX(2px); }

.ticket-card.unreviewed { border-left-color: #f59e0b; background: #fffbeb; }

.ticket-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.ticket-card .subject { font-weight: 600; font-size: 15px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.phishing { background: #fee2e2; color: #b91c1c; }
.badge.malware { background: #fecaca; color: #991b1b; }
.badge.compromised_website { background: #fed7aa; color: #9a3412; }
.badge.vulnerability { background: #fef08a; color: #854d0e; }
.badge.malicious_domain { background: #ddd6fe; color: #5b21b6; }
.badge.spam { background: #e0e7ff; color: #3730a3; }
.badge.network_abuse { background: #cffafe; color: #155e75; }
.badge.other { background: #e2e8f0; color: #475569; }

.ticket-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}

.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.tag {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: 10px;
  padding: 30px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  color: #64748b;
  font-size: 24px;
  padding: 0;
}

.modal h2 { margin-bottom: 12px; font-size: 18px; }
.modal .description { white-space: pre-wrap; font-size: 14px; line-height: 1.6; margin-top: 16px; color: #334155; }
.modal .mark-btn { margin-top: 20px; }
