:root {
  color-scheme: light;
  --ink: #14291f;
  --muted: #506559;
  --accent: #087744;
  --green: #00a651;
  --line: #dbe8df;
  --surface: #f3f8f4;
  --white: #fff;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #055630; }
:focus-visible { outline: 3px solid #28a75f; outline-offset: 3px; }
h1, h2, p { margin: 0; }
p { line-height: 1.65; }
[hidden] { display: none !important; }
button, textarea, select, input { font: inherit; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner, .site-footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.header-inner { display: flex; min-height: 72px; justify-content: space-between; align-items: center; gap: 18px; }
.logo { line-height: 0; flex-shrink: 0; }
.logo img { width: 118px; height: 42px; object-fit: contain; object-position: left center; }
.site-header nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 650; }
.site-header nav a, .link-button { text-decoration: none; color: var(--ink); }
.site-header nav a:hover, .link-button:hover { color: var(--accent); }
.link-button { background: none; padding: 0; border: 0; cursor: pointer; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; padding-block: 22px 28px; font-size: 13px; }
.site-footer span:first-child { font-weight: 700; }
.public-layout { display: grid; grid-template-columns: minmax(255px, .8fr) minmax(0, 1.4fr); align-items: start; gap: 24px; width: min(1040px, calc(100% - 48px)); margin: 42px auto 54px; }
.public-intro { background: #103d2b; color: #fff; padding: 36px 30px 30px; border-radius: 20px; display: flex; flex-direction: column; min-height: 414px; gap: 36px; box-shadow: 0 16px 34px #163f2610; }
.eyebrow { color: #b3eac9; font-size: 13px; font-weight: 650; margin-bottom: 16px; }
.public-intro h1 { font-size: clamp(39px, 5vw, 58px); font-weight: 760; letter-spacing: -.065em; line-height: 1.11; margin-bottom: 18px; }
.public-intro p { color: #d5eadc; font-size: 15px; }
.intro-tip { margin-top: auto; padding: 17px; border: 1px solid #ffffff34; border-radius: 13px; background: #ffffff0b; }
.intro-tip p { margin-top: 5px; font-size: 13.5px; }
.intro-tip strong { font-size: 14px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 24px #153b2610; min-width: 0; }
.form-panel { padding: 29px 31px; }
.form-section { display: grid; gap: 17px; }
.form-section + .form-section { border-top: 1px solid var(--line); padding-top: 23px; margin-top: 23px; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.02em; margin-bottom: 2px; }
.form-panel > h2 + p, .form-panel > h1 + p { margin: 9px 0 18px; color: var(--muted); }
.grid-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
label:not(.choice), legend { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
label > span[aria-hidden] { color: var(--accent); }
input:not([type=checkbox]):not([type=radio]), textarea, select { width: 100%; min-width: 0; min-height: 43px; color: var(--ink); background: white; border: 1px solid #cbdcd0; border-radius: 9px; padding: 9px 11px; font-size: 15px; }
input::placeholder, textarea::placeholder { color: #65766b; }
input[aria-invalid=true] { border-color: #b43338 !important; }
textarea { resize: vertical; display: block; }
fieldset { margin: 0; border: 0; padding: 0; }
.radio-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.radio-tabs label { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #cbdcd0; border-radius: 9px; margin: 0; min-height: 43px; cursor: pointer; }
.radio-tabs label:has(:checked) { background: #eaf8ef; border-color: #379f64; color: #085332; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); margin: 0; width: 17px; height: 17px; flex: 0 0 17px; }
.company-fields { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); background: #f5faf6; border-radius: 12px; }
.lookup-row { display: flex; align-items: stretch; gap: 8px; }
#lookup-status { color: var(--muted); margin-top: 5px; display: block; }
#lookup-status:empty { display: none; }
.field-error { color: #a52d35; display: block; margin-top: 4px; }
.form-actions { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 19px; display: grid; gap: 12px; }
.choice { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.muted { color: var(--muted); font-size: 13.5px; font-weight: 400; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 15px; border-radius: 9px; font-size: 14px; line-height: 1.25; font-weight: 680; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 43px; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: #075c36; color: white; }
.secondary { color: var(--accent); border-color: #bcd7c6; background: white; }
.secondary:hover, .lightly { background: #eaf8ef; color: #075b34; }
.subtle { background: transparent; color: #9b3131; }
button:disabled { cursor: wait; opacity: .65; }
.form-actions .primary { justify-content: space-between; min-height: 46px; }
.alert, .notice { padding: 11px 14px; border-radius: 9px; margin-block: 0 15px; font-size: 14px; }
.alert { color: #85262b; background: #fceff0; border: 1px solid #f0d4d6; }
.notice { color: #075b34; background: #eaf8ef; border: 1px solid #c5e6d0; }
.success { text-align: center; padding: 23px 0; }
.success-mark { background: #eaf8ef; color: var(--accent); width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; border-radius: 50%; margin: 0 auto 14px; }
.success p { color: var(--muted); margin-top: 10px; }
p.receipt-code { display: inline-block; color: #075b34; background: #eaf8ef; border-radius: 8px; margin: 17px auto; padding: 10px 12px; font: 700 18px ui-monospace, monospace; }
.success a { display: flex; width: fit-content; margin: auto; }
.narrow { width: min(485px, calc(100% - 40px)); margin: 48px auto 65px; }
.narrow h1, .page-heading h1 { font-size: clamp(27px, 4vw, 39px); letter-spacing: -.045em; line-height: 1.18; }
.stack { display: grid; gap: 15px; margin-top: 15px; }
.stack .button { justify-self: start; }
.admin-layout { width: min(1120px, calc(100% - 48px)); margin: 37px auto 54px; }
.detail-layout { max-width: 975px; }
.page-heading { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.page-heading p { color: var(--muted); margin-top: 5px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 19px; }
.metric { text-decoration: none; color: var(--muted); font-size: 14px; padding: 16px; }
.metric:hover { border-color: #379f64; }
.metric strong { color: var(--ink); display: block; font-size: 28px; font-variant-numeric: tabular-nums; margin-top: 4px; }
.filters { display: flex; align-items: end; gap: 12px; padding: 19px; flex-wrap: wrap; }
.search-field { flex: 1 1 250px; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; text-align: left; width: 100%; min-width: 690px; font-size: 14px; }
caption { text-align: left; color: var(--muted); padding: 0 19px 10px; font-size: 13px; }
th { background: var(--surface); color: var(--muted); }
th, td { padding: 13px 16px; border-top: 1px solid var(--line); }
td small { display: block; margin-top: 4px; color: var(--muted); }
.request-link { font-weight: 650; white-space: nowrap; }
.empty { padding-block: 30px; text-align: center; color: var(--muted); }
.status { display: inline-block; border-radius: 24px; padding: 5px 9px; background: #e9eef6; color: #314567; white-space: nowrap; font-size: 13px; font-weight: 640; }
.status.review { background: #fff3db; color: #75520a; }
.status.issued { background: #eaf8ef; color: #075833; }
.status.cancelled { background: #ecefec; color: #4f6053; }
.pagination { display: flex; justify-content: center; padding: 16px; gap: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; }
.detail-grid { display: grid; gap: 14px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.details { display: grid; grid-template-columns: minmax(118px, .9fr) minmax(0,1.2fr); gap: 12px; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.mail-log, .settings-panel + .settings-panel { margin-top: 14px; }
.mail-log li { padding-block: 3px; overflow-wrap: anywhere; }
.setting-line, .recipient { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.setting-line .choice { flex: 1; }
.recipient select { width: auto; }
.recipient .email-label, .recipient > div { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.recipient-list { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.add-recipient { align-items: end; }
.add-recipient select { width: 100%; }
@media (max-width: 780px) {
  .public-layout { grid-template-columns: 1fr; margin-top: 22px; gap: 15px; }
  .public-intro { padding: 27px 24px; min-height: auto; gap: 16px; }
  .public-intro h1 br { display: none; }
  .public-intro h1 { font-size: 41px; margin-bottom: 10px; }
  .eyebrow { margin-bottom: 9px; }
  .intro-tip { padding: 12px 14px; }
  .form-panel { padding: 23px; }
  .detail-grid { grid-template-columns: 1fr; }
  .recipient { flex-wrap: wrap; }
  .recipient .email-label { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .public-layout, .admin-layout, .header-inner, .site-footer { width: calc(100% - 28px); }
  .logo img { width: 89px; height: 36px; }
  .header-inner { min-height: 61px; gap: 10px; }
  .site-header nav { gap: 11px; font-size: 12px; }
  .site-footer { display: block; }
  .site-footer span { display: block; margin-bottom: 5px; }
  .grid-two { grid-template-columns: 1fr; gap: 14px; }
  .form-panel { padding: 20px 17px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-heading { align-items: start; flex-direction: column; }
  .add-recipient > div { flex-basis: 100%; }
}
