:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #17243b;
  background: #f6f8fc;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #285ed1;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: #285ed1;
  color: white;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 600;
}
button.secondary {
  background: white;
  color: #334968;
  border-color: #dce3ee;
}
button.danger { background: #b73337; }
button.danger:hover { background: #92272d; }
button.success { background: #18734c; }
button.success:hover { background: #10593a; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.decision-actions button { min-width: 160px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.guide-grid .card { margin: 0; }
.guide-grid h2 { margin-top: 12px; }
.guide-step { color: #285ed1; font-size: 11px; font-weight: 750; letter-spacing: .1em; }
.dialog-error { color: #a9342a; }
dialog .decision-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
dialog .decision-form .policy { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .guide-grid { grid-template-columns: 1fr; }
  .decision-actions { flex-direction: column; }
  .decision-actions button { width: 100%; }
  dialog .decision-form { grid-template-columns: 1fr; }
  .brand img { width: 92px; }
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #aecbff;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background: white;
  border-bottom: 1px solid #e3e8f1;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #17243b;
  font-size: 18px;
  font-weight: 650;
}
.brand img {
  display: block;
  width: 112px;
  height: auto;
  max-height: 42px;
}
.brand span {
  color: #557296;
  font-weight: 400;
}
.brand:hover {
  text-decoration: none;
}
#menu-toggle {
  display: none;
}
#topnav {
  display: flex;
  justify-content: flex-end;
  padding: 12px 32px;
  background: white;
}
.authenticated #topnav {
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  width: 236px;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  border-right: 1px solid #e3e8f1;
  overflow-y: auto;
}
.nav-role {
  padding: 0 12px 16px;
  color: #7b879c;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.5px;
}
#topnav > a {
  padding: 12px 14px;
  border-radius: 9px;
  color: #52617a;
  font-weight: 550;
  font-size: 14px;
}
#topnav > a:hover,
#topnav > a[aria-current] {
  background: #eef4ff;
  color: #2459d2;
  text-decoration: none;
}
.nav-account {
  margin-top: auto;
  padding: 24px 12px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #64748b;
}
.nav-account button {
  margin-top: 14px;
  width: 100%;
  font-size: 13px;
}
.container {
  max-width: 1240px;
  padding: 36px 40px 64px;
  margin: auto;
  min-height: calc(100vh - 160px);
}
.authenticated .container {
  margin-left: 236px;
  max-width: none;
}
.page-heading {
  margin: 8px 0 28px;
}
.eyebrow {
  color: #3466bc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.6px;
}
h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.9px;
  margin: 10px 0 12px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 0 0 14px;
}
h3 {
  font-size: 15px;
  margin: 22px 0 10px;
}
p {
  line-height: 1.65;
}
.muted {
  color: #69788e;
  font-size: 14px;
  max-width: 800px;
}
.card {
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  padding: 26px;
  margin: 20px 0;
  box-shadow: 0 4px 18px #18345b03;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stats .card {
  margin: 0;
}
.stats strong {
  display: block;
  font-size: 30px;
  letter-spacing: -1px;
  margin-top: 12px;
}
.stats a:hover {
  border-color: #a5bdf1;
  text-decoration: none;
}
.stats small {
  color: #718097;
}
.pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eef3fa;
  color: #506888;
  font-size: 11px;
  font-weight: 650;
  flex-wrap: wrap;
}
.pill.paid,
.pill.payable,
.pill.approved,
.pill.active {
  background: #eaf7ef;
  color: #207549;
}
.pill.rejected,
.pill.suspended {
  background: #fff0ee;
  color: #af4437;
}
.pill.pending,
.pill.reconciliation_pending,
.pill.processing {
  background: #fff7e5;
  color: #966916;
}
form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 960px;
}
form > button {
  justify-self: start;
  align-self: end;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  min-width: 0;
}
.required {
  color: #51749d;
}
.field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.term-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border: 1px solid #8da8cb;
  border-radius: 50%;
  color: #315d9c;
  background: #eef4ff;
  font-size: 11px;
  font-weight: 750;
  cursor: help;
  flex: none;
}
.term-help:focus-visible { outline: 3px solid #aecbff; outline-offset: 2px; }
.tooltip-content {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  width: min(320px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 10px;
  background: #17243b;
  color: white;
  box-shadow: 0 12px 28px #17243b33;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  transform: translateX(-50%);
}
.term-help:hover .tooltip-content,
.term-help:focus .tooltip-content { display: block; }
@media (max-width: 640px) {
  .tooltip-content { position: fixed; left: 20px; right: 20px; top: auto; bottom: 24px; width: auto; transform: none; }
  .field-label { white-space: normal; flex-wrap: wrap; }
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd7e5;
  border-radius: 8px;
  padding: 12px;
  color: #17243b;
  background: white;
  font-size: 14px;
  min-height: 44px;
}
input::placeholder,
textarea::placeholder {
  color: #91a0b4;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
small {
  display: block;
  line-height: 1.5;
  color: #748298;
  font-size: 12px;
  font-weight: 400;
  margin-top: 3px;
}
.inline {
  display: inline;
}
.wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 12px 0;
}
.check input {
  width: 18px;
  min-height: 18px;
}
.toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}
.toolbar label {
  min-width: 180px;
}
.toolbar label:first-child {
  flex: 1;
  max-width: 400px;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: #7a899e;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.3px;
  background: #f8fafd;
  white-space: nowrap;
}
th,
td {
  padding: 15px 13px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}
td a {
  font-weight: 600;
}
tbody tr:hover {
  background: #fbfcff;
}
td small {
  max-width: 240px;
  overflow-wrap: anywhere;
}
.empty {
  text-align: center;
  padding: 48px;
  color: #8a96a8;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  font-size: 12px;
  color: #748298;
}
.pagination button {
  font-size: 12px;
  padding: 8px 12px;
}
.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.details dt {
  font-size: 12px;
  color: #7a889a;
  margin-bottom: 8px;
}
.details dd {
  font-size: 14px;
  font-weight: 550;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.policy {
  background: #f0f5fd;
  border: 1px solid #e0e9f8;
  border-radius: 10px;
  padding: 16px 20px;
  color: #536b8e;
  font-size: 13px;
  line-height: 1.7;
}
.actions {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0;
}
.notice {
  padding: 16px 20px;
  background: #eaf7ef;
  color: #26794c;
  border-radius: 10px;
  font-size: 14px;
  margin: 18px 0;
}
.notice.error {
  background: #fff0ee;
  color: #a9342a;
}
.timeline {
  padding-left: 24px;
}
.timeline li {
  padding: 8px 0 16px;
  font-size: 14px;
}
.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  color: #50617a;
}
.copy-link {
  background: #f6f8fc;
  border: 1px solid #e4eaf4;
  border-radius: 8px;
  padding: 18px;
  overflow-wrap: anywhere;
}
details {
  padding: 18px 0;
  border-bottom: 1px solid #edf0f5;
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.footer {
  padding: 24px 40px;
  font-size: 12px;
  border-top: 1px solid #e4eaf3;
  display: flex;
  gap: 24px;
  color: #7b879b;
}
.authenticated .footer {
  margin-left: 236px;
}
dialog {
  border: 1px solid #e0e7f2;
  border-radius: 18px;
  max-width: 760px;
  width: calc(100% - 32px);
  padding: 32px;
  color: #17243b;
}
dialog::backdrop {
  background: #14243b80;
}
dialog .details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body:not(.authenticated) .container {
  max-width: 800px;
}
body:not(.authenticated) #topnav {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 21;
  padding: 8px 16px;
}
body:not(.authenticated) .page-heading,
body:not(.authenticated) .card:has(#login) {
  max-width: 540px;
  margin-inline: auto;
}
body:not(.authenticated) .card:has(#login) {
  padding: 28px;
}
body:not(.authenticated) form {
  grid-template-columns: 1fr;
}
body:not(.authenticated) #login {
  gap: 18px;
}
body:not(.authenticated) #login > button {
  width: 100%;
  justify-self: stretch;
  min-height: 46px;
}
.turnstile-slot {
  min-height: 65px;
}
.recovery-link {
  justify-self: center;
  font-size: 13px;
  font-weight: 600;
}
body:not(.authenticated) .page-heading {
  margin-top: 40px;
}
@media (min-width: 1600px) {
  .authenticated .container {
    max-width: 1400px;
  }
}
@media (max-width: 1000px) {
  .container {
    padding: 28px 22px;
  }
  .authenticated #topnav {
    width: 210px;
  }
  .authenticated .container,
  .authenticated .footer {
    margin-left: 210px;
  }
  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    gap: 10px;
  }
  .stats .card {
    padding: 18px;
  }
  .stats strong {
    font-size: 24px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 20px;
  }
  #menu-toggle {
    display: block;
    padding: 7px 11px;
    color: #476084;
    background: #f5f8fc;
  }
  .authenticated #topnav {
    display: none;
    top: 64px;
    width: min(290px, 90vw);
    z-index: 30;
    box-shadow: 20px 0 50px #18304d22;
  }
  .authenticated.menu-open #topnav {
    display: flex;
  }
  .authenticated .container,
  .authenticated .footer {
    margin-left: 0;
  }
  .container {
    padding: 24px 18px 40px;
  }
  .card {
    padding: 20px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stats .card {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .stats strong {
    margin: 0;
  }
  .details {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  form {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .toolbar {
    flex-direction: column;
  }
  .toolbar label {
    max-width: none !important;
  }
  .pagination {
    gap: 8px;
    justify-content: space-between;
  }
  dialog {
    padding: 24px;
  }
  .footer {
    padding: 24px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  body:not(.authenticated) #menu-toggle {
    display: none;
  }
}
