:root {
  --bg: #ffffff;
  --ink: #333;
  --muted: #666;
  --card: #ffffff;
  --line: #ddd;
  --input-line: #ccc;
  --accent: #1565c0;
  --btn: #333;
  --btn-hover: #555;
  --danger: #b00020;
  --danger-border: #8b0018;
  --ok: #116611;
  --warn: #8a5b00;
  --radius: 12px;
  --font: Arial, sans-serif;
}

html { box-sizing: border-box; overflow-x: hidden; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

.wrap { width: min(1100px, calc(100% - 28px)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}
.brand {
  font-family: var(--font);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.15;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brandText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.headerBrandLogo {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.brand-title { font-size: 1.25rem; font-weight: 700; }
.brand-sub { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem; font-size: 0.92rem; }
.nav a { color: var(--accent); font-weight: 500; }

main.wrap { padding: 24px 0 3rem; }

.site-footer,
.siteDevelopedByFooter {
  box-sizing: border-box;
  text-align: center;
  font-size: 10px;
  color: #aaa;
  margin: 20px auto 6px;
  padding: 0 14px;
  line-height: 1.35;
  width: 100%;
}
.site-footer p { margin: 0; }
.siteDevelopedByFooter a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.siteDevelopedByFooter a:hover { color: var(--muted); }

h1, h2, h3 { font-family: var(--font); line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 16px; }
h3 { font-size: 1rem; margin: 1rem 0 0.75rem; }

.muted { color: var(--muted); font-size: 12px; }

/* AdminBoard greeting under H1 */
.admin-greeting,
.adminHomeGreeting {
  margin: 0 0 16px;
  font-size: 1.12rem;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* —— AdminBoard containers —— */
.card {
  background: var(--card);
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
}
.card > h2:first-child { margin-top: 0; }

/* Top shortcut row — AdminBoard #adminNavCard */
#adminNavCard,
.nav-card {
  margin-bottom: 16px;
  padding: 12px 16px;
}
#adminNavCard .navLinks,
.nav-card .navLinks {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: stretch;
}
#adminNavCard .navLinks > *,
.nav-card .navLinks > * {
  margin: 0;
}
.navLinks a.navButton,
a.navButton,
#adminNavCard .navLinks a.navButton,
#adminNavCard .navLinks button.navButton {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
  padding: 8px 12px;
  min-height: 38px;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #333 !important;
  font-weight: 400;
  text-decoration: none !important;
}
.navLinks a.navButton:hover,
a.navButton:hover,
#adminNavCard .navLinks a.navButton:hover,
#adminNavCard .navLinks button.navButton:hover {
  background: #eee;
  text-decoration: none !important;
  color: #333 !important;
}

/* Choose-a-task menu — AdminBoard .adminMenu / .taskGroup / .menuItem */
.adminMenu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.taskGroup {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
  box-sizing: border-box;
}
h3.taskGroupTitle,
.taskGroupTitle {
  margin: 0 0 12px 0 !important;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.taskGroupItems {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adminMenu a.menuItem,
a.menuItem,
.taskGroupItems a.menuItem {
  display: block;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s;
  touch-action: manipulation;
}
.adminMenu a.menuItem:hover,
a.menuItem:hover,
.taskGroupItems a.menuItem:hover {
  background: #f5f5f5;
  border-color: #bbb;
  color: #333 !important;
  text-decoration: none !important;
}
.adminMenu a.menuItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.menuItemPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e3f2fd;
  color: #0d47a1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.dangerZoneBlock {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #f0c0c0;
  border-radius: 10px;
  background: #fff;
}

/* Full-page task panel — AdminBoard .adminPanel.card */
.adminPanel.card { display: block; }
.adminPanel > h1,
.adminPanel > h2 { margin-top: 0; }
.adminPanel .innerCard {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
  margin-top: 14px;
}
.adminPanel .innerCard:first-of-type { margin-top: 12px; }

/* Back link — AdminBoard .backRow (text link, not a gray button) */
.backRow { margin: 0 0 16px; }
.backRow a,
.backRow button,
.adminPanel .backRow a {
  display: inline;
  background: transparent !important;
  color: #1565c0 !important;
  border: none !important;
  padding: 6px 0 !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 0 !important;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none !important;
}
.backRow a:hover,
.backRow button:hover,
.adminPanel .backRow a:hover {
  text-decoration: underline;
  background: transparent !important;
  color: #1565c0 !important;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.statsSubgroup {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  background: #fafafa;
}
.statsSubgroup:first-of-type { margin-top: 10px; }
.statsSubgroupTitle {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.statsSubgroup .statsGrid { margin-top: 0; }

.tableScrollBox {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.tableScrollBox table { margin: 0; }
.tableScrollBox thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
}

.resultBox {
  margin-top: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #eee;
}

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

label { display: block; font-size: 12px; margin-bottom: 4px; color: #555; }
input, select, textarea, button, .btn {
  font-family: inherit;
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { min-height: 100px; }
.field { margin-bottom: 0.9rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; min-width: 0; }
.row > * { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
.adminMenu .menuItem,
.navLinks a,
.backRow a,
.backRow button {
  touch-action: manipulation;
}

button, .btn {
  appearance: none;
  border: 1px solid var(--btn);
  background: var(--btn);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); text-decoration: none; color: #fff; }
button.secondary, .btn.secondary {
  background: #f5f5f5;
  color: #333;
  border-color: #ddd;
}
button.secondary:hover, .btn.secondary:hover { background: #eee; color: #333; }
.logoutButton {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}
button.danger, .btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger-border);
}
button.danger:hover, .btn.danger:hover { background: var(--danger-border); }
button:disabled, .btn:disabled { opacity: 0.65; cursor: not-allowed; }
button:disabled:hover { background: var(--btn); border-color: var(--btn); }
button.secondary:disabled:hover { background: #f5f5f5; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
th {
  color: var(--ink);
  font-weight: 600;
  background: #f5f5f5;
}

.flash { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--line); }
.flash.info { background: #f8fbff; color: var(--ink); border-color: #cfd8e3; }
.flash.warning { background: #fff8e8; color: #8a5a00; border-color: #f0d59a; }
.flash.error { background: #fff3f3; color: var(--danger); border-color: #f0c0c0; }
.systemBanner {
  font-weight: 400;
}
.systemBannerTitle {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 6px;
}
.systemBannerMessage {
  white-space: pre-wrap;
  font-weight: 400;
}
.systemBannerPosted {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
}
.flash.success { background: #f4fff4; color: var(--ok); border-color: #c8e6c8; }

.stat,
.statCard {
  background: #f5f5f5;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
}
.stat .value,
.statCard .value {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
}
.stat .label,
.statCard .label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.steps span,
.steps a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  font-size: 0.8rem;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
}
.steps a:hover { background: #eee; border-color: #bbb; }
.steps a.done {
  background: #e8f5e9;
  color: var(--ok);
  border-color: #c8e6c8;
}
.steps a.done:hover {
  background: #dcedc8;
  border-color: #a5d6a7;
}
.steps a.optional,
.steps span.optional {
  border-style: dashed;
}
.steps span.active,
.steps a.active { background: #111; color: #fff; border-color: #111; }
.steps a.active:hover { background: #111; color: #fff; border-color: #111; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #eee;
  font-size: 0.75rem;
}
.badge.new { background: #e3f2fd; color: #0d47a1; }
.badge.in_progress { background: #fff8e1; color: var(--warn); }
.badge.complete { background: #e8f5e9; color: var(--ok); }
.badge.canceled { background: #ffebee; color: var(--danger); }
.badge.pending { background: #e3f2fd; color: #0d47a1; }
.badge.approved { background: #e8f5e9; color: var(--ok); }
.badge.rejected { background: #ffebee; color: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 12px; max-width: 520px; width: 100%;
  max-height: 85vh; overflow: auto; padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border: 1px solid #ddd;
}
.modal h2 { margin: 0 0 8px; }
.login-card {
  max-width: 480px;
  margin: 2rem auto;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}
.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
}
.choice-option:hover { background: #f5f5f5; border-color: #bbb; }
.choice-option input { width: auto; margin-top: 3px; flex-shrink: 0; }
.choice-option span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-option strong { font-size: 14px; color: #333; }

.pillChoice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.pillChoiceOption {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.pillChoiceOption input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pillChoiceOption span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  font-size: 0.875rem;
  line-height: 1.3;
  color: #333;
}
.pillChoiceOption:hover span {
  background: #eee;
  border-color: #bbb;
}
.pillChoiceOption input:checked + span,
.pillChoiceOption input:focus-visible + span {
  background: #111;
  color: #fff;
  border-color: #111;
}
.pillChoiceOption input:focus-visible + span {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.addonChoiceList {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 16px;
}
.addonChoice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.addonChoice .addonHelp {
  margin: 0;
  max-width: 36rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.pillChoiceOption.addonPill {
  position: relative;
}
.pillChoiceOption.addonPill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.pillChoiceOption.addonPill span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.pillChoiceOption.addonPill span::before {
  content: '';
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1.5px solid #bbb;
  border-radius: 3px;
  background: #fff;
}
.pillChoiceOption.addonPill input:checked + span,
.pillChoiceOption.addonPill input:focus-visible + span {
  background: #1b7a3d;
  color: #fff;
  border-color: #1b7a3d;
}
.pillChoiceOption.addonPill input:checked + span::before {
  border-color: #fff;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%231b7a3d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E")
    center / 0.7rem 0.7rem no-repeat;
}
.pillChoiceOption.addonPill input:focus-visible + span {
  outline: 2px solid #1b7a3d;
  outline-offset: 2px;
}
.intakeFollowup {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
}
.badge.withdrawn { background: #eee; color: #555; }

.fieldHelp {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #f8fbff;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}
.wizardSectionTitle {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wizardOptionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.wizardOptionCard {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}
.wizardOptionLabel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  cursor: pointer;
}
.wizardOptionLabel input {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
}
.wizardHidden {
  display: none !important;
}
.wizardCallout {
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}
.wizardCredTypeList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
}
.wizardCredTypeOption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 400;
}
.wizardCredTypeOption input {
  width: auto;
}
.wizardFixedRoleName {
  margin: 0 0 10px;
}
.wizardAllHours {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-weight: 400;
}
.wizardAllHours input {
  width: auto;
}
.wizardGrantSchedule {
  margin-left: 1.5rem;
}
.wizardStepLabel {
  margin: -0.5rem 0 1rem;
  font-size: 14px;
}
.wizardDivider {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 1.5rem 0;
}
.wizardContactCard {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fcfcfc;
}
.wizardContactCard h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}
.grid.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .grid.grid-3 { grid-template-columns: 1fr; }
}
.wizardRepeatList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wizardRepeatCard {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px;
  background: #fafafa;
}
.wizardRepeatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.wizardSystemUpload {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fcfcfc;
}
.choice-list-compact {
  margin: 0;
}
.wizardGrantRow {
  border-top: 1px solid #eee;
  padding: 10px 0;
}
.wizardGrantRow:first-child {
  border-top: 0;
}
.wizardGrantAccess {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-weight: 400;
}
.wizardGrantAccess input {
  width: auto;
}
.wizardWeekGrid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 1.5rem;
}
.wizardDayRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wizardDayCheck {
  min-width: 72px;
  margin: 0;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wizardDayCheck input {
  width: auto;
}
.wizardDayRow input[type="time"] {
  width: auto;
  min-width: 7rem;
}
.modifyCommunitySelect {
  width: 100%;
  margin-top: 4px;
}
.taskGroupItems > button.secondary {
  width: 100%;
  text-align: left;
  font-weight: 400;
}
.summaryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 18px;
}
.summaryItem { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summaryItem .lbl {
  font-size: 11px;
  font-weight: 600;
  color: #5b6471;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.summaryItem .val { font-size: 14px; color: #1f2937; word-break: break-word; }
.summaryLists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.progressMarkers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.progressMarkers li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fafafa;
}
.progressMarkers li.done {
  border-color: #c8e6c8;
  background: #f4fff4;
}
.progressMarkers li.current {
  border-color: #cfd8e3;
  background: #f8fbff;
}
.progressMark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #eee;
  color: #555;
}
.progressMarkers li.done .progressMark {
  background: #e8f5e9;
  color: #116611;
}
.progressMarkers li.current .progressMark {
  background: #e3f2fd;
  color: #0d47a1;
}
.switchPathPanel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e0e0e0;
}

.tableWrap {
  overflow-x: auto;
}
.dataTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dataTable th,
.dataTable td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top;
}
.dataTable th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b6471;
}
.dataTable .navButton {
  padding: 6px 12px;
  font-size: 13px;
}

/* Platform company detail */
.companyDetailHeader {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.companyDetailHeaderMain {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  flex: 1 1 280px;
}
.companyDetailLogo {
  max-height: 48px;
  max-width: 120px;
  object-fit: contain;
}
.companyDetailHeaderActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.companyDetailLayout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.companyDetailLayout > .card {
  margin-bottom: 0;
}
.companyDetailStack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.companyDetailStack > .card {
  margin-bottom: 0;
}
.companyDetailBoard .companyDetailStack {
  width: 100%;
}
.companySectionHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.licenseCardList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}
.licenseTableActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.licenseTableActions form {
  margin: 0;
  display: inline;
}
.licenseCard {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}
.licenseCardTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 6px;
}
.licenseCardMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  margin-bottom: 10px;
}
.licenseCardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.licenseCardActions form {
  margin: 0;
  display: inline;
}
.issueLicenseForm .field {
  margin-bottom: 0;
}

/* Platform company license controls */
.companyLicenseCard .dataTable {
  min-width: 0;
}
.licenseLimitInput {
  width: 110px;
  min-width: 0;
}
.licenseToggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
}
.licenseToggle input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
.licenseActions {
  white-space: nowrap;
}
.licenseActions form {
  display: inline;
  margin: 0 0 0 6px;
}
.addLicenseForm {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(170px, 220px) auto;
  gap: 16px;
  align-items: end;
  max-width: 720px;
}
.addLicenseForm .field {
  min-width: 0;
  margin-bottom: 0;
}
.addLicenseToggleField .fieldLabel {
  display: block;
  margin-bottom: 4px;
  color: #555;
  font-size: 12px;
}
.addLicenseToggleField .licenseToggle {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}
.addLicenseForm > button {
  align-self: end;
}
@media (max-width: 680px) {
  .addLicenseForm {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .addLicenseForm > button {
    justify-self: start;
  }
}
.mapTableWrap {
  margin-bottom: 20px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
}
.mapTable {
  margin: 0;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.mapTable thead th {
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b6471;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
}
.mapTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.mapTable tr:last-child td {
  border-bottom: none;
}
.mapTable .mapColField {
  width: 40%;
}
.mapTable .mapColMapTo {
  width: 60%;
}
.mapTable .mapColMapTo select.mapSelect {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.mapTable .mapColField code {
  font-size: 13px;
}
.validationPanel {
  border-width: 2px;
}
.validationPanelOk {
  border-color: #c8e6c8;
  background: #f4fff4;
}
.validationPanelErr {
  border-color: #f0c2c2;
  background: #fff7f7;
}
.validationSummary {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}
.validationSummary li {
  margin: 6px 0;
}
.validationErrorTable td {
  word-break: break-word;
}
.validationStale {
  border-color: #f0e0a8;
  background: #fffbeb;
}
.userActions summary {
  cursor: pointer;
  color: #0d47a1;
}
.userEditForm {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
}
.modal .userEditForm {
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.checklist { list-style: none; padding: 0; }
.checklist li { margin: 0.35rem 0; }
.person-block { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }

pre.code-block,
pre {
  white-space: pre-wrap;
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #eee;
  overflow: auto;
}

@media (max-width: 1024px) {
  .card { padding: 12px; }
}
@media (max-width: 700px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  #adminNavCard .navLinks,
  .nav-card .navLinks {
    flex-direction: column;
    align-items: stretch;
  }
  #adminNavCard .navLinks a.navButton,
  .nav-card .navLinks a.navButton {
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 480px) {
  textarea,
  select,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input[type="date"],
  input[type="time"],
  input[type="month"] {
    font-size: 16px;
  }
}

/* Fresh Start campaign admin board (Heron Bay / Bellmoore style) */
.csAdmin .csBrand { margin-bottom: 16px; }
.csAdmin .csBrand h1 { margin-bottom: 4px; }
.csAdmin .csLoc { font-size: 0.95rem; }
.csAdmin .csSub { margin-top: 4px; font-size: 0.9rem; }
.csAdmin .dashboardToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.csAdmin .dashboardToolbar h2 { margin: 0; }
.csAdmin .dashboardActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.csAdmin .sectionLabel {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #667);
}
.csAdmin .adminMenu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.csAdmin .taskCardForm { margin: 0; }
.csAdmin a.taskCard,
.csAdmin button.taskCard {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  padding: 16px 40px 16px 18px;
  background: #fff;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
}
.csAdmin a.taskCard::after,
.csAdmin button.taskCard::after {
  content: "›";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 300;
  color: #889;
  line-height: 1;
}
.csAdmin a.taskCard:hover,
.csAdmin button.taskCard:hover {
  background: #fafbfc;
  border-color: #b8c0cc;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}
.csAdmin a.taskCard h3,
.csAdmin button.taskCard h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}
.csAdmin a.taskCard p,
.csAdmin button.taskCard p { margin: 0; line-height: 1.4; }
.csAdmin .completionProgress {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #e5e8ef;
  border-radius: 10px;
  background: #f8fafc;
}
.csAdmin .completionProgressHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.csAdmin .completionProgressLabel {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.csAdmin .completionProgressPct {
  font-size: 1.35rem;
  font-weight: 700;
}
.csAdmin .progressTrack {
  height: 10px;
  border-radius: 999px;
  background: #e4e8f0;
  overflow: hidden;
}
.csAdmin .progressFill {
  height: 100%;
  border-radius: 999px;
  background: #1f8f5f;
  transition: width 0.25s ease;
}
.csAdmin .completionProgressMeta { margin: 8px 0 0; }
.csAdmin .statsStack { margin-top: 14px; display: grid; gap: 12px; }
.csAdmin .statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.csAdmin .statCell {
  border: 1px solid #e5e8ef;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}
.csAdmin .statCell .num {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}
.csAdmin .statCell .lbl {
  margin-top: 4px;
  font-size: 0.82rem;
  color: #667;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.csAdmin .viewHeader {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e8ef;
}
.csAdmin .viewHeader h2 { margin: 0 0 6px; }
.csAdmin .tableScrollBox { overflow-x: auto; }
.homeStatusComplete { color: #1f8f5f; font-weight: 600; }
.homeStatusNoActivity { color: #c0392b; font-weight: 600; }
.homeStatusOpenedLink { color: #c47d0e; font-weight: 600; }
.homeStatusInProgress { color: #2c6bed; font-weight: 600; }
@media (max-width: 700px) {
  .csAdmin .dashboardToolbar { align-items: flex-start; }
  .csAdmin .adminMenu { grid-template-columns: 1fr; }
}

/* Import reconcile — one-record review */
.reconcilePanel .reconcilePersonHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.reconcileSuggest {
  background: #f7f9fc;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.reconcileSuggestList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reconcileSuggestList li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.reconcileActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 12px;
}
.reconcilePicker {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.reconcileVendorPanel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.reconcileDanger summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
.reconcileDanger[open] summary {
  margin-bottom: 12px;
}

/* —— Request / modify form (portal + vendor entry) — matches classic Index.html —— */
.requestForm .headerLine {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 12px;
}
.requestForm .headerLine > * { min-width: 0; }
.requestForm .pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #ddd;
  vertical-align: middle;
}
.requestForm .pill.remove { border-color: #f3b; color: #b03; background: #fff5f8; }
.requestForm .pill.add { border-color: #7c7; color: #060; background: #f4fff4; }
.requestForm .pill.update { border-color: #cc8; color: #664; background: #fffdf0; }
.requestForm .pill.keep { border-color: #ddd; color: #444; background: #fafafa; }

.requestForm .residentList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 12px;
  max-width: 100%;
  min-width: 0;
}
.requestForm .residentCardWrap {
  max-width: 100%;
  min-width: 0;
}
.requestForm .residentIndexHeader {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.requestForm .residentDivider {
  border: none;
  border-top: 2px solid #333;
  margin: 16px 0;
}
.requestForm .residentCard {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}
.requestForm .residentCard.removing { opacity: 0.6; }
.requestForm .residentTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}
.requestForm .residentTop > * { min-width: 0; }
.requestForm .residentName { font-weight: 700; }
.requestForm .residentMeta { font-size: 12px; color: #666; margin-top: 4px; }

.requestForm .fieldGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}
.requestForm .fieldGrid > * { min-width: 0; }
.requestForm .fieldGrid .field { margin-bottom: 0; }
.requestForm .fieldGrid label .req { color: #c00; margin-left: 2px; }
.requestForm .req { color: #c00; }
.requestForm .fieldHelpInline {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}
.requestForm .field.readonlyDisplay > div {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f8f9fb;
  color: #111;
  min-height: 38px;
}

.requestForm .actionsRow {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.requestForm .footerActions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
  min-width: 0;
}
.requestForm .addPersonBottom {
  margin: 8px 0 4px;
}

.requestForm button.danger,
.requestForm .btn.danger {
  background: #fff3f3;
  color: #333;
  border-color: #f2b4b4;
}
.requestForm button.danger:hover,
.requestForm .btn.danger:hover {
  background: #ffe8e8;
  color: #333;
  border-color: #e89a9a;
}
.requestForm button.ok,
.requestForm .btn.ok {
  background: #f4fff4;
  color: #333;
  border-color: #b7e3b7;
}
.requestForm button.ok:hover,
.requestForm .btn.ok:hover {
  background: #e8fce8;
  color: #333;
}
.requestForm button.addButton,
.requestForm .btn.addButton {
  background: #d4edda;
  color: #000;
  border-color: #a3d9a5;
}
.requestForm button.addButton:hover,
.requestForm .btn.addButton:hover {
  background: #c3e6cb;
  color: #000;
  border-color: #8fce93;
}

.requestForm .vehicleBox {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fafafa;
}
.requestForm .vehicleHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.requestForm .vehicleTitle { font-weight: 700; }
.requestForm .vehicleList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.requestForm .vehicleCard,
.requestForm .credCard {
  border: 1px solid #e8e8e8;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  min-width: 0;
  max-width: 100%;
}
.requestForm .vehicleCard.removing,
.requestForm .credCard.removing { opacity: 0.6; }
.requestForm .vehicleTop,
.requestForm .credTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.requestForm .vehicleMeta { font-size: 12px; color: #666; margin-top: 4px; }
.requestForm .vehicleGrid,
.requestForm .credGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}
.requestForm .vehicleGrid > *,
.requestForm .credGrid > * { min-width: 0; }
.requestForm .vehicleGrid .field,
.requestForm .credGrid .field { margin-bottom: 0; }

.requestForm .checkboxRow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.requestForm .checkboxRow input { width: auto; }
.requestForm .metaFields {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}
.requestForm .homeLevelSection {
  margin-top: 16px;
}
.requestForm .homeLevelSection > h3 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

@media (max-width: 640px) {
  .requestForm .fieldGrid,
  .requestForm .vehicleGrid,
  .requestForm .credGrid {
    grid-template-columns: 1fr;
  }
}

/* Platform cross-portal sessions are inspection-only. GET search/filter forms
   remain usable; mutation forms are visibly disabled. Server middleware also
   rejects the requests, so this is polish rather than the security boundary. */
body.platformReadOnly form[method='post']:not([action='/platform-admin/return']) {
  opacity: 0.55;
  pointer-events: none;
}

body.platformReadOnly form[method='post']:not([action='/platform-admin/return'])::after {
  content: 'Read-only platform view';
  display: inline-block;
  margin-left: 8px;
  color: #666;
  font-size: 12px;
}
