:root {
  --bg: #f4f7f2;
  --card: #ffffff;
  --ink: #1a2e1a;
  --muted: #4a6350;
  --accent: #2d6a3e;
  --accent-dark: #1e4a2a;
  --warn: #8a5a00;
  --danger: #8b1e1e;
  --ok: #1e6b3a;
  --border: #c9d9c9;
  --open: #e8f5e9;
  --voicemail: #e3f2fd;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(26, 46, 26, 0.08);
  font-size: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.topbar {
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow);
}
.topbar .inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.topbar nav a {
  color: #e8ffe8;
  text-decoration: none;
  font-weight: 600;
  margin-right: 1rem;
  font-size: 1.05rem;
}
.topbar nav a:hover { text-decoration: underline; color: #fff; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.big-number {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin: 0.25rem 0;
}

.muted { color: var(--muted); font-size: 0.95rem; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: #fff !important;
}
.btn:hover { background: var(--accent-dark); }
.btn-secondary {
  background: #eef3ee;
  color: var(--ink) !important;
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #dde8dd; }
.btn-warn {
  background: #c47a00;
  color: #fff !important;
}
.btn-warn:hover { background: #a36500; }

.flash {
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  margin: 1rem 0;
  font-weight: 600;
}
.flash.ok { background: #e6f6ea; border: 1px solid #9ccc9c; color: var(--ok); }
.flash.err { background: #fdecea; border: 1px solid #e0a8a8; color: var(--danger); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #eee;
}
.badge.open { background: #c8e6c9; color: #1b5e20; }
.badge.in_progress { background: #fff3cd; color: #7a5a00; }
.badge.answered { background: #d1e7dd; color: #0f5132; }
.badge.closed { background: #e2e3e5; color: #41464b; }
.badge.voicemail { background: #bbdefb; color: #0d47a1; }
.badge.email { background: #dcedc8; color: #33691e; }
.badge.web { background: #f3e5f5; color: #6a1b9a; }

.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 0.85rem;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}
.ticket-list a.row {
  text-decoration: none;
  color: inherit;
  display: block;
}
.ticket-list .subject {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.35rem 0;
}
.ticket-list .meta { color: var(--muted); font-size: 0.95rem; }

.filters a {
  display: inline-block;
  margin: 0.25rem 0.4rem 0.25rem 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #e8eee8;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.filters a.active {
  background: var(--accent);
  color: #fff;
}

label {
  display: block;
  font-weight: 700;
  margin: 0.85rem 0 0.35rem;
}
select, textarea, input[type="text"] {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
}
textarea { min-height: 140px; resize: vertical; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
}
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  :root { font-size: 18px; }
}

.body-box {
  white-space: pre-wrap;
  background: #f8faf8;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.note {
  background: #fff8e7;
  border-left: 5px solid #c47a00;
  padding: 0.85rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1rem 0;
}

.creds {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  background: #eef3ee;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.req { color: var(--danger); }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0.35rem 0 1rem;
  background: #fff;
}
label { font-weight: 600; display: block; }
.topic-set {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}
.topic-set legend {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}
.topic-chip {
  display: block;
  cursor: pointer;
  font-weight: 600;
}
.topic-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}
.topic-chip span {
  display: block;
  text-align: center;
  padding: 0.7rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #f7faf7;
  font-size: 0.95rem;
}
.topic-chip input:checked + span,
.topic-chip input:focus-visible + span {
  border-color: var(--accent);
  background: var(--open);
  color: var(--accent-dark);
}
.btn-send {
  background: #e85d04;
  color: #fff !important;
}
.btn-send:hover { background: #c44d00; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.duty-banner { font-size: 1.25rem; margin: 0 0 0.35rem; }
.duty-banner.on { color: var(--ok); }
.duty-banner.off { color: var(--muted); }
.info-box {
  background: #eef6ff;
  border: 1px solid #b6d4fe;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  color: #084298;
  font-size: 0.95rem;
}
.shift-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  max-width: 28rem;
}
.queue-glance { font-size: 1.15rem; margin: 0.25rem 0; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.setup-step {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e8eee8;
  color: var(--ink);
  text-decoration: none;
}
.setup-step.active { background: var(--accent); color: #fff; }
.setup-step.done { background: #c8e6c9; color: #1b5e20; }
.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}
.shift-edit {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  background: #fafcfa;
}
.review-dl { margin: 0; }
.review-dl dt { font-weight: 700; margin-top: 0.75rem; color: var(--muted); }
.review-dl dd { margin: 0.2rem 0 0; }
input[type="time"] {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0.35rem 0 1rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-pane h3 { font-size: 1.15rem; line-height: 1.3; }
.compare-body {
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

/* --- Find Answers + roster (from approved sketches) --- */
.callout {
  background: #e6f6ea;
  border: 1px solid #9ccc9c;
  border-left: 5px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-weight: 600;
}
.callout.warn {
  background: #fff8e7;
  border-color: #e0c070;
  border-left-color: #c47a00;
  color: #7a5a00;
}
.prefill {
  background: #f0f4f0 !important;
  color: var(--ink);
}
.field-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.65rem 0 0.85rem;
}
.answer-draft {
  background: #f8faf8;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 0.75rem 0;
  line-height: 1.5;
}
.answer-draft ol {
  margin: 0.4rem 0 0.8rem 1.2rem;
  padding: 0;
}
.answer-draft p { margin: 0.5rem 0; }
.sources-line {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #eef6ff;
  border-radius: 10px;
  border: 1px solid #b6d4fe;
}
.sources-line strong { color: #084298; }
.source-links {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
}
.source-links li { margin: 0.35rem 0; }
.source-links a {
  font-weight: 600;
  text-decoration: underline;
}
.post-answer-actions { margin-top: 0.5rem; }
.email-copy-box {
  background: #f7faf7;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 0;
}
.email-copy-box label {
  margin-top: 0;
  font-weight: 700;
}
.email-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.35rem;
}
.email-copy-row input[type="email"] {
  flex: 1 1 220px;
  margin: 0;
}
.email-copy-row .btn { flex: 0 0 auto; }
.follow-up-card { margin-top: 1rem; }
.another-q {
  background: var(--open);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.5rem 0 0;
  text-align: center;
}
.another-q h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}
.path-note {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}
.path-note strong { color: var(--ink); }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.roster-table th,
.roster-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.roster-table th {
  background: #eef3ee;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
}
.roster-table tr:last-child td { border-bottom: none; }
.roster-table .col-check {
  width: 4.5rem;
  text-align: center;
}
.roster-table input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
}
.access-note-card { margin-top: 1rem; }
.access-plain {
  background: #eef6ff;
  border: 1px solid #b6d4fe;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: #084298;
  font-size: 0.95rem;
}
.access-plain ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}
.access-plain li { margin: 0.3rem 0; }
.setup-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}
.setup-subnav a {
  background: #eef3ee;
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
}
.setup-subnav a.active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}
.topbar .nav-user {
  color: #e8ffe8;
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 0.95rem;
}
.topbar .nav-logout {
  display: inline;
  margin: 0;
}
.topbar .nav-signout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  color: #e8ffe8;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
}
.topbar .nav-signout:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Quiet roster identity on Find Answers — not form fields */
.signed-in-quiet {
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}
.signed-in-quiet strong {
  font-weight: 600;
  color: #5a6a5a;
}
.signed-in-quiet .sep {
  margin: 0 0.35rem;
  opacity: 0.7;
}

.find-answers-hello {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.find-answers-lede {
  margin: 0 0 1rem;
}

/* --- UX simplify: big choices, quiet contact, OPEN buttons --- */
.big-choice {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 28rem;
}
.btn-xl {
  display: block;
  text-align: center;
  padding: 1.15rem 1.4rem;
  font-size: 1.25rem;
  border-radius: 14px;
}
.btn-lg {
  padding: 0.9rem 1.3rem;
  font-size: 1.1rem;
}
.btn-open {
  background: #1e7a36;
  color: #fff !important;
  font-size: 1.15rem;
  padding: 0.85rem 1.4rem;
  align-self: center;
  flex: 0 0 auto;
}
.btn-open:hover { background: #155a28; }
.ticket-row-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.ticket-row-main { flex: 1 1 auto; min-width: 0; }
.ticket-num {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.contact-quiet {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-quiet .sep { margin: 0 0.35rem; opacity: 0.7; }
.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
}
.photo-thumbs .thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.action-stack {
  flex-direction: column;
  align-items: stretch;
  max-width: 28rem;
}
.action-stack .btn { text-align: center; }
.nav-simple a {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  margin-right: 0.25rem;
}
.nav-cta {
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 0.35rem 0.75rem !important;
}
.source-plain {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Rich-text editor */
.rte-toolbar { display:flex; flex-wrap:wrap; gap:.4rem; margin:.4rem 0; }
.rte-toolbar button { font-size:1.05rem; padding:.45rem .8rem; border:1px solid #9bb59b; background:#fff; border-radius:8px; cursor:pointer; }
.rte-toolbar button:hover, .rte-toolbar button:focus { background:#eef6ee; }
.rte-area { min-height:12rem; border:2px solid #9bb59b; border-radius:8px; padding:.75rem; background:#fff; outline:none; }
.rte-area:focus { border-color:#2f6b2f; }
.rte-area a { color:#1a55a0; text-decoration:underline; }

/* Inline validation */
.field-error { color:#a40000; font-weight:700; font-size:1.1rem; margin:.35rem 0; }
.field-error::before { content:"⚠ "; }
textarea.has-error, input.has-error { border:2px solid #a40000 !important; background:#fff6f6; }

/* Photo thumbnails with hover / focus preview */
.thumb-wrap { position:relative; display:inline-block; }
.thumb-preview { display:none; position:absolute; z-index:20; left:0; top:105px; background:#fff; padding:6px; border:1px solid #9bb59b; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.thumb-preview img { display:block; max-width:min(420px, 80vw); max-height:420px; border-radius:6px; }
.thumb-wrap:hover .thumb-preview, .thumb-wrap:focus .thumb-preview { display:block; }
@media (hover: none) { .thumb-wrap:hover .thumb-preview { display:none; } }
.photo-picked { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin:.4rem 0; }
.photo-picked .thumb { width:72px; height:72px; object-fit:cover; border-radius:8px; border:1px solid #ccc; }

/* Sign-in pages */
.lede-big { font-size:1.2rem; }
.big-steps { font-size:1.15rem; line-height:1.7; }
.code-input { font-size:1.8rem; letter-spacing:.3rem; max-width:12rem; }
.big-code { font-size:1.6rem; font-weight:700; letter-spacing:.25rem; }
.btn-sm { padding:.3rem .6rem; font-size:.9rem; }
.signin-link-card { border:2px solid #2f6b2f; }
