:root {
  --navy: #0b2545;
  --blue: #1560bd;
  --light: #f4f7fb;
  --border: #d8e0ea;
  --text: #1c2733;
  --muted: #5c6b7a;
  --danger: #c0392b;
  --warn: #d68910;
  --ok: #1e8449;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--light);
  color: var(--text);
}

header.site-header {
  background: var(--navy);
  color: #fff;
  padding: 20px 24px;
}

header.site-header h1 {
  margin: 0;
  font-size: 20px;
}

header.site-header p {
  margin: 4px 0 0;
  color: #b9c6d6;
  font-size: 13px;
}

main {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 16px 48px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin: 14px 0 6px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

textarea { resize: vertical; min-height: 120px; }

.row { display: flex; gap: 16px; }
.row > div { flex: 1; }

button {
  margin-top: 20px;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: #0f4c96; }
button:disabled { background: #9db6cd; cursor: not-allowed; }

.success-box {
  background: #eafaf1;
  border: 1px solid #a9dfbf;
  color: var(--ok);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.error-box {
  background: #fdedec;
  border: 1px solid #f5b7b1;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

/* Admin dashboard */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

th { background: #eef3f9; font-weight: 700; }

tr:hover { background: #f9fbfd; cursor: pointer; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-Open { background: #fdebd0; color: var(--warn); }
.badge-In.Progress, .badge-In-Progress { background: #d6eaf8; color: var(--blue); }
.badge-On.Hold, .badge-On-Hold { background: #eaecee; color: var(--muted); }
.badge-Resolved { background: #d5f5e3; color: var(--ok); }
.badge-Closed { background: #eaeaea; color: #7a7a7a; }

.priority-High, .priority-Critical { color: var(--danger); font-weight: 700; }
.priority-Medium { color: var(--warn); font-weight: 700; }
.priority-Low { color: var(--ok); font-weight: 700; }

.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,37,69,0.5);
  align-items: center; justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

.modal h2 { margin-top: 0; }

.notes-list {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
}

.note-item {
  background: var(--light);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.note-meta { color: var(--muted); font-size: 11px; margin-bottom: 4px; }

.close-btn {
  float: right;
  background: none;
  color: var(--muted);
  border: none;
  font-size: 20px;
  margin: 0;
  padding: 0 4px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.status-select {
  padding: 6px 8px;
  font-size: 13px;
}
