* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 14px;
  color: #1C2426;
  background: #F8FAFA;
}
header {
  background: #0E7369;
  color: #FFFFFF;
  padding: 14px 16px;
}
header .brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
header h1 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 650;
}
main { padding: 16px; }
.status { color: #5B6B6E; margin: 0 0 14px; }
.status.ok { color: #0E7369; font-weight: 600; }
.context {
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.context .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5B6B6E;
  margin-bottom: 3px;
}
.context .subject { font-weight: 600; word-wrap: break-word; }
.note { color: #5B6B6E; font-size: 12.5px; }
form { display: block; }
form label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5B6B6E;
  margin: 12px 0 4px;
}
form label:first-of-type { margin-top: 0; }
.req { color: #B3261E; }
form input, form select, form textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1C2426;
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 6px;
}
form textarea {
  /* Phones only: the box the tech types or dictates the details into. */
  resize: vertical;
  line-height: 1.45;
  box-sizing: border-box;
}
form input:focus, form select:focus, form textarea:focus {
  outline: 2px solid #0E7369;
  outline-offset: -1px;
  border-color: #0E7369;
}
form button {
  margin-top: 16px;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background: #0E7369;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
form button:hover { background: #0A5A52; }
form button:focus-visible { outline: 2px solid #1C2426; outline-offset: 2px; }
.error { color: #B3261E; font-size: 13px; margin: 10px 0 0; }
.success { color: #0E7369; font-size: 13px; font-weight: 600; margin: 10px 0 0; }
form .note { margin-top: 12px; }

/* --- Verify Email Integrity pane --- */
.verdict {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #DCE5E4;
  background: #FFFFFF;
}
.verdict-title { font-size: 16px; font-weight: 700; }
.verdict-sub { font-size: 12.5px; margin-top: 2px; }
.verdict-wait { border-color: #DCE5E4; color: #5B6B6E; }
.verdict-ok { background: #EAF4F2; border-color: #0E7369; color: #0A5A52; }
.verdict-caution { background: #FDF3E1; border-color: #B57A00; color: #7A5200; }
.verdict-danger { background: #FBEAE9; border-color: #B3261E; color: #8C1D17; }
.section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5B6B6E;
  margin: 14px 0 6px;
}
.ai-summary { margin: 0 0 6px; font-weight: 600; }
.ai-reasons { margin: 0 0 4px; padding-left: 18px; }
.ai-reasons li { margin: 3px 0; font-size: 13px; }
.checks { list-style: none; margin: 0; padding: 0; }
.check {
  display: flex;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.check-icon {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}
.check-pass .check-icon { background: #0E7369; }
.check-warn .check-icon { background: #B57A00; }
.check-fail .check-icon { background: #B3261E; }
.check-info .check-icon { background: #5B6B6E; }
.check-fail { border-color: #E7B6B2; background: #FDF7F6; }
.check-warn { border-color: #E5CD9F; background: #FDFAF3; }
.check-body { word-break: break-word; }
.report-btn {
  margin-top: 16px;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background: #0E7369;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.report-btn:hover { background: #0A5A52; }
.report-btn:focus-visible { outline: 2px solid #1C2426; outline-offset: 2px; }
.report-btn[disabled] { background: #8FA9A6; cursor: default; }
.source-picker {
  background: #FDF3E1;
  border: 1px solid #E5CD9F;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.source-picker .section-label { margin-top: 0; }
.source-picker select {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1C2426;
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 6px;
}
.source-picker select:focus {
  outline: 2px solid #0E7369;
  outline-offset: -1px;
  border-color: #0E7369;
}
.source-picker .note { margin: 8px 0 0; }

/* ---- Bind to ticket ------------------------------------------------------
   Attaching a follow-up email to a ticket that already exists. Sits above the
   new-ticket form, because "does this already have a ticket?" is the question
   that comes first. Uses the same green as the rest of the pane so it reads as
   part of the form rather than an add-on. */
.bind-block { margin-bottom: 14px; }
.bind-toggle {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0E7369;
  background: #F2F8F7;
  border: 1px solid #C9E0DC;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.bind-toggle:hover { background: #E8F3F1; }
.bind-toggle.bound { color: #1C2426; background: #E3F1ED; border-color: #0E7369; }
#bind-panel { margin-top: 8px; }
#bind-search {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1C2426;
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 6px;
  box-sizing: border-box;
}
#bind-search:focus { outline: 2px solid #0E7369; outline-offset: -1px; border-color: #0E7369; }
.bind-list { max-height: 260px; overflow-y: auto; margin-top: 8px; }
.bind-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  margin-bottom: 6px;
  font-family: inherit;
  background: #FFFFFF;
  border: 1px solid #DCE5E4;
  border-radius: 6px;
  cursor: pointer;
}
.bind-row:hover { border-color: #0E7369; background: #F7FBFA; }
.bind-num { display: inline-block; font-weight: 700; font-size: 13px; color: #0E7369; margin-right: 6px; }
.bind-subject { font-size: 13px; color: #1C2426; }
.bind-meta { display: block; margin-top: 3px; font-size: 11px; color: #5B6B6E; }

/* --- AI Triage: two models, and the answers already given --- */
.triage-actions { display: grid; gap: 8px; margin-top: 12px; }
.report-btn.secondary {
  background: #FFFFFF;
  color: #0E7369;
  border: 1px solid #0E7369;
}
.report-btn.secondary:hover { background: #EAF4F2; }
.report-btn:disabled { opacity: 0.55; cursor: default; }
.triage-past {
  border-left: 3px solid #DCE5E4;
  padding: 8px 0 8px 10px;
  margin-top: 10px;
}
.triage-past-head {
  font-size: 10px;
  font-weight: 700;
  color: #5B6B6E;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.triage-past-body { font-size: 12.5px; line-height: 1.5; color: #1C2426; }
