:root {
  color-scheme: light;
  --ink: #202d27;
  --muted: #6a756e;
  --line: #dce1d9;
  --paper: #f5f6f1;
  --white: #fff;
  --green: #244f3c;
  --mint: #dcece0;
  --orange: #c87045;
  --focus: #bf7343;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 15px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
::selection { color: var(--white); background: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--green); text-underline-offset: 3px; }

.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #1e382c; color: #edf3e9; padding: 29px 16px 18px; }
.brand, .loginbrand { display: flex; align-items: center; gap: 10px; padding: 0 12px; font-family: Georgia, serif; font-size: 28px; font-weight: 700; letter-spacing: -.035em; }
.brandmark { display: inline-grid; place-items: center; width: 31px; height: 31px; border: 1.5px solid currentColor; border-radius: 8px; font: 700 22px Georgia, serif; transform: rotate(-5deg); }
.brandperiod { color: #e5a16e; }
.sidebar nav { display: grid; gap: 4px; margin-top: 56px; }
.navitem { width: 100%; padding: 12px 16px; border: 0; border-radius: 9px; background: transparent; color: #c9d7cc; text-align: left; font-weight: 600; }
.navitem:hover, .navitem:focus-visible { color: white; background: #315342; }
.navitem.active { color: #193428; background: #e5eee1; }
.sidefoot { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; margin-top: auto; padding: 16px 5px 2px; border-top: 1px solid #3d5949; }
.sidefoot strong, .people strong { display: block; font-size: 13px; }
.sidefoot small, .people small { display: block; color: #bdd0c2; font-size: 11px; text-transform: capitalize; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: #284636; background: #d7e6d7; font-weight: 700; }
.textbutton { border: 0; padding: 3px; background: none; color: #d4e1d5; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.textbutton:hover { color: white; }

.main { width: 100%; max-width: 1650px; padding: clamp(24px, 3.6vw, 56px); margin: 0 auto; }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-family: Georgia, serif; font-size: clamp(31px, 3.3vw, 48px); line-height: 1.12; font-weight: 700; letter-spacing: -.035em; }
.pagehead p { margin-bottom: 0; color: var(--muted); font-size: 15px; }
h2 { margin-bottom: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; }
h3 { margin-bottom: 5px; font-size: 16px; }
p { line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--white); font-weight: 700; white-space: nowrap; }
.button:hover { background: #e8ede6; }
.button.primary { border-color: var(--green); color: white; background: var(--green); }
.button.primary:hover { background: #193c2c; }
.button.quiet { background: transparent; }
.link { border: 0; padding: 3px 0; background: none; color: var(--green); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.link:hover { color: #0b2c1d; }
.count { color: var(--muted); font-size: 13px; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: 0 10px 28px -25px #26392e; }
.summary > div { display: flex; flex-direction: column; min-height: 126px; padding: 22px 26px; }
.summary > div + div { border-left: 1px solid var(--line); }
.summary span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.summary strong { margin-top: 7px; font-family: Georgia, serif; font-size: clamp(27px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; gap: 22px; }
.columns.wide { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: 0 10px 28px -25px #26392e; }
.panel > h2, .panel > p, .panel > .setting, .panel > .helper, .panel > .people { margin-left: 25px; margin-right: 25px; }
.panel > h2:first-child { margin-top: 25px; }
.panel > p { margin-top: 8px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 20px 25px; border-bottom: 1px solid var(--line); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 16px; color: var(--muted); background: #f8faf6; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 25px; }
th:last-child, td:last-child { padding-right: 25px; }
td { padding: 15px 16px; border-top: 1px solid #edf0eb; color: #3a453e; font-size: 13px; vertical-align: middle; }
td strong { display: block; color: var(--ink); font-weight: 700; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
td.amount { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:last-child { white-space: nowrap; }
td:last-child .link + .link { margin-left: 10px; }
tr:hover td { background: #fbfcf9; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; color: #50635a; background: #eef2ee; font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.statusdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.paid, .status.active, .status.ready { color: #216640; background: #e4f1e7; }
.status.sent, .status.processing, .status.pending { color: #4c6547; background: #edf3e8; }
.status.error, .status.cancelled { color: #ad553b; background: #fbebe4; }
.status.draft, .status.setup, .status.paused { color: #8a7158; background: #f5eee5; }
.rowerror { color: #a24d35; }
.empty { padding: 52px 30px; text-align: center; }
.empty p { max-width: 300px; margin: 0 auto; color: var(--muted); font-size: 13px; }
.upcoming { padding: 4px 25px; }
.upcoming > div { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid #edf0eb; }
.upcoming > div:last-child { border-bottom: 0; }
.upcoming strong, .upcoming small { display: block; }
.upcoming strong { font-size: 13px; }
.upcoming small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.upcoming b { font-size: 13px; font-variant-numeric: tabular-nums; }
.datebadge { padding: 5px 0; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.datebadge strong { font-size: 17px; line-height: 1; }
.datebadge small { margin-top: 1px; font-size: 9px; text-transform: uppercase; }

.formpanel { padding-bottom: 25px; }
form { display: grid; gap: 15px; }
.formpanel form { padding: 0 25px; }
label { display: grid; gap: 6px; color: #405046; font-size: 12px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd4ca; border-radius: 6px; color: var(--ink); background: white; outline: 0; }
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #d9e9db; }
input::placeholder { color: #839087; }
.formrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formpanel .button { justify-self: start; }
.formpanel .button.quiet { margin-top: -8px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.setting strong, .setting small { display: block; }
.setting strong { font-size: 13px; }
.setting small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.helper { padding-top: 22px; color: var(--muted); font-size: 12px; }
.people { padding: 12px 0 18px; }
.people > div { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.people small { color: var(--muted); }
#userform, #passwordform { padding-top: 18px; border-top: 1px solid var(--line); }
#passwordform { margin-top: 22px; }
#userform h3, #settingsform h3, #passwordform h3 { margin: 0 0 4px; }
#settingsform { padding-top: 20px; }
#settingsform .link { justify-self: start; margin-top: -8px; }
.notice { margin-bottom: 20px; padding: 13px 16px; border: 1px solid #edc1af; border-radius: 7px; color: #904a36; background: #fff0e9; font-size: 13px; }
.notice.success { border-color: #b9d9c2; color: #246a40; background: #eaf5e9; }
.notice[hidden] { display: none; }

.login { display: flex; flex-direction: column; align-items: center; min-height: 100vh; padding: 7vh 20px 30px; background: #eaf0e7; }
.loginbrand { color: var(--green); }
.loginpanel { width: min(100%, 440px); margin: auto; padding: 42px; border: 1px solid #dce5d9; border-radius: 13px; background: white; box-shadow: 0 18px 60px -40px #46534b; }
.loginpanel h1 { font-size: 39px; }
.loginpanel p { margin-bottom: 30px; color: var(--muted); }
.loginpanel form { gap: 19px; }
.loginpanel .button { margin-top: 8px; }
.loginfoot { margin-top: auto; color: #748576; font-size: 11px; }

@media (max-width: 1100px) {
  .columns, .columns.wide { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 16px 0; }
  .brand { font-size: 22px; padding: 0; }
  .brandmark { width: 27px; height: 27px; font-size: 19px; }
  .sidebar nav { display: flex; gap: 2px; overflow-x: auto; margin-top: 18px; padding-bottom: 10px; }
  .navitem { width: auto; padding: 9px 11px; white-space: nowrap; font-size: 12px; }
  .sidefoot { display: none; }
  .main { padding: 25px 16px 50px; }
  .pagehead { align-items: flex-start; flex-wrap: wrap; margin-bottom: 23px; }
  .pagehead p { font-size: 13px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary > div { min-height: 110px; padding: 18px; }
  .summary > div:last-child { grid-column: span 2; border-left: 0; border-top: 1px solid var(--line); }
  .summary strong { font-size: 27px; }
  .formrow { grid-template-columns: 1fr; }
  .loginpanel { padding: 28px; }
}
