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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: #f5f5f5;
  color: #222;
}

/* ─── NAV ─────────────────────────────────────────────────────────────── */

nav {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: #ccc;
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

nav .brand {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  margin-right: 8px;
}

nav .spacer {
  flex: 1;
}

nav .user {
  font-size: 12px;
  color: #aaa;
}

/* ─── LAYOUT ──────────────────────────────────────────────────────────── */

main {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.back-link {
  display: block;
  margin-bottom: 16px;
  color: #2563eb;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ─── TABLE ───────────────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

th {
  background: #f0f0f0;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
}

td {
  padding: 10px 14px;
  border-top: 1px solid #eee;
  vertical-align: top;
}

tr:hover td {
  background: #fafafa;
}

.empty {
  color: #999;
  text-align: center;
  padding: 24px;
}

/* ─── LINKS ───────────────────────────────────────────────────────────── */

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─── BADGES ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

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

.badge-closed {
  background: #f1f5f9;
  color: #64748b;
}

.badge-abuse {
  background: #dc2626;
  color: #fff;
}

.badge-type {
  background: #e0e7ff;
  color: #3730a3;
}

/* ─── LOGIN ───────────────────────────────────────────────────────────── */

.login-card {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-card h1 {
  margin-bottom: 8px;
}

.login-card p {
  color: #666;
  margin-bottom: 28px;
  font-size: 13px;
}

.btn-google {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 10px 24px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.btn-google:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* ─── INCIDENT THREAD ─────────────────────────────────────────────────── */

.incident-meta {
  color: #666;
  margin-bottom: 20px;
  font-size: 13px;
}

.thread {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bubble-wrap {
  display: flex;
  margin: 8px 0;
}

.bubble-wrap.inbound {
  justify-content: flex-start;
}

.bubble-wrap.responder {
  justify-content: flex-end;
}

.bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 10px;
}

.bubble-wrap.inbound .bubble {
  background: #e5e7eb;
  color: #222;
}

.bubble-wrap.responder .bubble {
  background: #2563eb;
  color: #fff;
}

.bubble-meta {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.close-event {
  text-align: center;
  margin: 12px 0;
  color: #888;
  font-size: 12px;
}
