:root {
  color-scheme: light;
  --page: #f5f5ef;
  --surface: #fffefa;
  --text: #24332b;
  --subtle: #526157;
  --line: #dfe4da;
  --green: #235a43;
  --green-light: #e5efe5;
  --radius: 15px;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.55; }
.shell { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar, .identity, .brand, .tabs { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bar { min-height: 70px; justify-content: space-between; padding-block: 10px; }
.brand { font-weight: 800; color: var(--text); gap: 10px; text-decoration: none; }
.brand i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: white; font-style: normal; font-size: .8rem; }
main.shell { padding-block: 36px 64px; }
h1, h2 { line-height: 1.15; letter-spacing: -.025em; margin: 0 0 18px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 14px; }
a { color: var(--green); font-weight: 650; text-underline-offset: 3px; }
.back { display: inline-block; margin-bottom: 13px; font-size: .9rem; }
.tabs { margin: 0 0 24px; border-bottom: 1px solid var(--line); gap: 6px; }
.tabs a { padding: 9px 13px; border-bottom: 3px solid transparent; text-decoration: none; }
.tabs .selected { border-bottom-color: var(--green); background: var(--green-light); border-radius: 7px 7px 0 0; }
.card, .tile { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; }
.card { margin: 0 0 16px; min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.tiles, .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 18px; text-decoration: none; }
.tile:hover { border-color: var(--green); }
.tile strong { font-size: 1.35rem; color: var(--text); }
.tile span { display: flex; justify-content: space-between; color: var(--green); }
.auth { max-width: 440px; }
.balance { font-size: 2rem; font-weight: 750; color: var(--green); font-variant-numeric: tabular-nums; }
.notice { background: var(--green-light); border-radius: 8px; padding: 12px 16px; }
.error { background: #fae8e3; color: #753329; }
.muted { color: var(--subtle); }
.break { overflow-wrap: anywhere; }
form { display: grid; gap: 12px; justify-items: start; margin: 12px 0; }
form > label, form > fieldset, form > .table { width: min(100%, 680px); }
.inline { display: inline-block; margin: 0; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
label.check { display: flex; align-items: baseline; font-weight: 500; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
input:not([type=checkbox]), select, textarea {
  min-width: 0; width: 100%; font: inherit; color: inherit; background: white;
  border: 1px solid #bac7bb; border-radius: 8px; padding: 8px 10px;
}
input[type=checkbox] { accent-color: var(--green); }
button, .button {
  background: var(--green); border: 1px solid var(--green); color: white; border-radius: 8px;
  padding: 8px 13px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  display: inline-block; margin: 4px 5px 4px 0;
}
button:hover, .button:hover { background: #194732; }
.logout button { background: transparent; color: var(--green); margin: 0; }
:focus-visible { outline: 3px solid #8f6b25; outline-offset: 2px; }
details { margin: 9px 0; }
summary { cursor: pointer; color: var(--green); font-weight: 650; }
.detail { margin: 8px 0 0 12px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--green-light); color: var(--text); font-size: .86rem; }
td input[type=number] { width: 82px; }
fieldset { min-width: 0; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.purchase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) {
  .shell { padding-inline: 14px; }
  main.shell { padding-top: 24px; }
  .card { padding: 15px; }
  th, td { padding-inline: 8px; }
  .purchase { grid-template-columns: 1fr; }
}
