/* Beta: plain and small on purpose. */
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, "Segoe UI", Arial, sans-serif; color: #1c1c1c; background: #fff; }
main { padding: 16px 20px 48px; max-width: 1500px; }
h1 { font-size: 22px; margin: 8px 0; }
h2 { font-size: 16px; margin: 0 0 8px; }
a { color: #0b5cad; }
.muted { color: #666; }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.num { text-align: right; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 10px 20px; background: #1f2933; color: #fff; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .brand { font-weight: 600; }
.topbar nav { display: flex; gap: 16px; flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 12px; }
.topbar form { margin: 0; }

.testmode { margin: 0; padding: 6px 20px; background: #fff3cd; border-bottom: 1px solid #e0c76a; font-size: 13px; }
.flash { margin: 12px 20px 0; padding: 8px 12px; background: #e7f3e8; border: 1px solid #9cc7a0; }
.flash.error { background: #fdeaea; border-color: #e0a0a0; }
main .flash { margin: 12px 0; }
.notice { padding: 8px 12px; background: #eef4fb; border: 1px solid #b3cbe6; }
.panel { margin: 16px 0; padding: 12px 14px; border: 1px solid #d5d5d5; background: #fafafa; }

input, select, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select {
  padding: 5px 7px; border: 1px solid #999; border-radius: 3px; background: #fff; max-width: 100%;
}
button { padding: 5px 12px; border: 1px solid #1f2933; border-radius: 3px; background: #1f2933; color: #fff; cursor: pointer; }
button.quiet { background: #fff; color: #1f2933; }
button:disabled { opacity: 0.5; cursor: default; }
.topbar button { background: transparent; border-color: #8a949e; }

.login-box { max-width: 380px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack label { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.stack.wide { max-width: 640px; }
.stack input[type="text"], .stack input[type="email"], .stack input[type="password"] { width: 100%; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 8px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; gap: 3px; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 12px 0; }
th, td { padding: 6px 8px; border: 1px solid #d5d5d5; text-align: left; vertical-align: top; }
th { background: #f0f0f0; font-weight: 600; white-space: nowrap; }
th.num, td.num { text-align: right; }
td.actions { white-space: nowrap; }
td.actions form { display: inline; }
tr.muted td { color: #888; }

.grid input[type="text"] { width: 100%; min-width: 150px; }
.grid input[type="number"] { width: 90px; }
.grid select { max-width: 240px; }
.grid td.price { font-weight: 600; white-space: nowrap; }
.grid .label { white-space: nowrap; }
.grid .msg { color: #a12622; font-size: 13px; max-width: 280px; }
.grid .msg:empty { display: none; }
.grid tr.st-cancelled td, .grid tr.st-removed td { color: #888; }
.grid tr.st-cancelled td.price { text-decoration: line-through; font-weight: normal; }
.grid tr.st-ordered td.status .label { color: #1d6b2a; font-weight: 600; }
.grid tr.busy td { background: #f6f6f6; }
.grid tr.busy td.status .label::after { content: " working..."; color: #666; }

.total { font-size: 17px; margin: 0 0 8px; }
.total .muted { font-size: 13px; }
.order-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d5d5d5; }
a.current { font-weight: 600; text-decoration: none; color: inherit; }
.err { color: #a12622; }
tr.act-failed td, tr.act-unknown td { background: #fdf3f3; }
tr.act-started td { background: #fffbe8; }

.cancel-project { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
button.danger { border-color: #a12622; color: #a12622; }
