/* Insta White Laundry admin page — the app's design system, trimmed to what this page uses. */
:root {
  --ground: #f3f0e9; --surface: #fffdf9; --raised: #ebe5d8; --active: #e3dccc; --border: #e2dbcb; --rule: #ece6d9; --control: #cdc4b0;
  --text: #1a1915; --muted: #5c584f; --brand: #1f4d33; --brand-ink: #15381f; --brand-tint: #dfeadf; --primary-hover: #27603f;
  --negative: #b3261e; --pill-pos-bg: #dfeadf; --pill-pos-ink: #15381f; --pill-neg-bg: #f9e4e1; --pill-neg-ink: #7a1c16; --pill-bg: #ebe5d8; --pill-ink: #3d3a33;
  --font: "Geist", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace; --serif: "Fraunces", Georgia, serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--text); font: 14px/20px var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.id { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 16px; }
.neg { color: var(--negative); }

/* shell */
.top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.top .mark { display: flex; align-items: center; gap: 10px; }
.top .mark svg { width: 24px; height: 24px; color: var(--brand); }
.top .mark b { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.top .mark span { color: var(--muted); margin-left: 8px; }
.top .spacer { flex: 1; }
.top .who { color: var(--muted); }
.page { max-width: 1100px; margin: 0 auto; padding: 24px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.title-row h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.title-row .sub { margin-top: 4px; color: var(--muted); }
.crumb { color: var(--muted); margin-bottom: 8px; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* panels & grid */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; min-width: 0; }
.panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { font-size: 16px; line-height: 1.3; font-weight: 600; }
.stack { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fields .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; }
.field .hint { color: var(--muted); font-size: 12px; line-height: 16px; }
.input, select.input { height: 36px; padding: 0 12px; border: 1px solid var(--control); border-radius: 6px; background: var(--surface); width: 100%; min-width: 0; transition: border-color 150ms ease, box-shadow 150ms ease; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.input[aria-invalid="true"] { border-color: var(--negative); }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6.5 8 10.5l4-4' fill='none' stroke='%235c584f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.prefix { display: flex; }
.prefix span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--control); border-right: 0; border-radius: 6px 0 0 6px; background: var(--raised); color: var(--muted); }
.prefix .input { border-radius: 0 6px 6px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--control); background: var(--surface); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, transform 120ms var(--ease-out); user-select: none; }
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--brand); color: #fffdf9; border-color: transparent; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--negative); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.neg { color: var(--negative); }

/* tables & pills */
table { width: 100%; border-collapse: collapse; }
th { height: 36px; padding: 0 10px; text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th.n, td.n { text-align: right; }
td .sub { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: var(--raised); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--pill-bg); color: var(--pill-ink); white-space: nowrap; }
.pill.pos { background: var(--pill-pos-bg); color: var(--pill-pos-ink); }
.pill.neg { background: var(--pill-neg-bg); color: var(--pill-neg-ink); }
.kvlist { display: grid; gap: 6px; }
.kvlist > div { display: flex; justify-content: space-between; gap: 12px; }
.kvlist > div > span:last-child { text-align: right; }
.empty { display: grid; place-items: center; gap: 6px; min-height: 96px; padding: 20px; border: 1px dashed var(--control); border-radius: 6px; color: var(--muted); text-align: center; }
.empty b { color: var(--text); font-weight: 500; }
.notice { padding: 10px 12px; border-radius: 6px; background: #f7eed6; border: 1px solid #ead9b0; color: #6b4600; font-size: 13px; line-height: 18px; }
.notice.neg { background: #f9e4e1; border-color: #efc8c3; color: #7a1c16; }
.notice.ok { background: var(--pill-pos-bg); border-color: #c5d9c6; color: var(--pill-pos-ink); }

/* dialog & toast */
dialog.dlg { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(26, 25, 21, .22); }
dialog.dlg::backdrop { background: rgba(26, 25, 21, .32); }
dialog.dlg[open] { animation: dlg-in 200ms var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: scale(0.97) translateY(6px); } }
dialog.dlg form { display: contents; }
.dlg-body { padding: 20px 20px 16px; display: grid; gap: 14px; }
.dlg-body h2 { font-size: 17px; font-weight: 600; line-height: 24px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--rule); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--text); color: var(--ground); padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 18px; box-shadow: 0 8px 24px rgba(26,25,21,.12); animation: toast-in 200ms var(--ease-out); max-width: 340px; }
.toast.neg { background: var(--negative); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* sign-in */
.login { display: grid; grid-template-columns: 420px minmax(0, 1fr); min-height: 100svh; }
.login .field-green { background: var(--brand); color: #f3efe6; padding: 48px; display: flex; flex-direction: column; }
.login .field-green .mark { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 24px; }
.login .field-green .mark svg { width: 36px; height: 36px; }
.login .field-green .claim { margin-top: auto; font-family: var(--serif); font-size: 30px; line-height: 1.15; }
.login .field-green p + p { margin-top: 14px; color: #cdd9cf; max-width: 36ch; }
.login .signin { display: grid; place-items: center; padding: 48px 24px; }
.login form { width: 360px; display: grid; gap: 16px; }
.login h1 { font-size: 24px; font-weight: 600; line-height: 1.2; }
.login h1 + p { color: var(--muted); margin-top: 6px; }
.login .input { height: 42px; }
.login .btn.primary { height: 42px; width: 100%; }
.login .error { color: var(--negative); font-size: 13px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .two, .fields { grid-template-columns: 1fr; } }
