:root {
    color-scheme: light;
    font-family: system-ui, sans-serif;
    color: #20312d;
    background: #eff4f1;
    --green: #17624e;
    --line: #d4e1db;
    --muted: #486058;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
.wrap { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }
.bar { background: #18362e; color: white; }
.bar-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: white; font-weight: 750; text-decoration: none; }
.mark { display: inline-grid; place-items: center; border-radius: 8px; width: 34px; height: 34px; font-size: 1.35rem; color: #18362e; background: #d2e6b7; }
main { padding-block: 2.5rem; }
h1, h2 { line-height: 1.15; margin: 0 0 .8rem; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.22rem; }
.sub, .hint, small { color: var(--muted); }
.sub { margin: 0 0 1.5rem; }
.hint { margin-bottom: 0; }
small { display: block; font-size: .875rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1rem; }
.stats .panel { border-top: 4px solid #78a58c; }
.stats span { color: var(--muted); font-size: .925rem; }
.stats strong { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-variant-numeric: tabular-nums; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .9rem; align-items: end; }
label { display: grid; gap: .3rem; font-weight: 650; font-size: .925rem; }
input, select, button { min-height: 44px; font: inherit; border-radius: 8px; }
input, select { width: 100%; border: 1px solid #a5b9af; padding: .55rem .65rem; background: white; color: inherit; }
button { border: 1px solid transparent; background: var(--green); color: white; font-weight: 650; padding: .52rem .9rem; cursor: pointer; }
button:hover { background: #104536; }
button.quiet { background: transparent; border-color: #a5b9af; }
button.danger { background: #862b24; margin-top: .4rem; }
a, summary { color: var(--green); text-underline-offset: .18em; }
summary { cursor: pointer; }
:focus-visible { outline: 3px solid #b26428; outline-offset: 3px; }
.back { display: inline-block; margin-bottom: .75rem; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
td, th { padding: .75rem; border-bottom: 1px solid var(--line); }
td { overflow-wrap: anywhere; }
th { background: #f2f7f4; font-size: .9rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; background: #dcefe4; color: #154a35; font-size: .9rem; font-weight: 650; }
.alert, .notice { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; }
.alert { background: #fce3e0; color: #72251f; }
.notice { background: #dcefe4; color: #154a35; }
.login { max-width: 480px; margin: 2rem auto; }
.login button { margin-top: 1rem; }
@media (max-width: 540px) {
    main { padding-block: 1.5rem; }
    .stats { gap: .5rem; margin-bottom: 1rem; }
    .stats .panel { margin-bottom: 0; }
}
.sales-list { margin-top: 1rem; }
.nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-right: auto; }
.nav a { color: #e3f2e9; text-decoration-color: transparent; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration-color: currentColor; }
.model-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.model-toolbar h2 { margin: 0; }
.model-filter { display: flex; align-items: end; gap: .5rem; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 1rem; }
.model-card { padding: 0; overflow: hidden; margin: 0; }
.model-image { aspect-ratio: 16 / 10; display: grid; place-items: center; background: #e7efea; color: var(--muted); }
.model-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.model-content { padding: 1rem; overflow-wrap: anywhere; }
.model-content h3 { margin: .1rem 0; }
.model-actions { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .75rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: 1rem; min-height: auto; }
@media (max-width: 540px) {
    .bar-inner { flex-wrap: wrap; padding-block: .7rem; gap: .5rem; }
    .nav { order: 1; width: 100%; }
}
