:root { --bg: #fff8f0; --card: #fff; --ink: #2b1a0e; --muted: #7a6656; --brand: #d9480f; --ok: #2b8a3e; --warn: #e67700; --bad: #c92a2a; --line: #ecdccb; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 20px/1.3 system-ui, -apple-system, sans-serif; padding-bottom: 120px; }
header { position: sticky; top: 0; z-index: 2; background: var(--brand); color: #fff; padding: 10px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
header h1 { font-size: 22px; margin: 0; flex: 1; }
main { padding: 16px; max-width: 900px; margin: auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 14px; min-height: 64px; padding: 0 18px; font-weight: 700; }
input, textarea { width: 100%; min-height: 60px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; background: #fff; }
label { display: block; font-weight: 700; margin: 18px 0 6px; }
.tabs button { min-height: 52px; background: #fff3; color: #fff; }
.tabs button.on { background: #fff; color: var(--brand); }
header input[type=date] { width: auto; min-height: 52px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; }
.tile .add { width: 100%; min-height: 120px; background: var(--card); border: 3px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tile.on .add { border-color: var(--brand); background: #fff0e6; }
.tile .emo { font-size: 34px; }
.tile small { color: var(--muted); font-weight: 400; }
.tile .qty { position: absolute; top: 6px; left: 10px; font-size: 28px; color: var(--brand); }
.tile .minus { display: none; position: absolute; top: 6px; right: 6px; min-height: 48px; width: 48px; padding: 0; background: var(--brand); color: #fff; font-size: 28px; }
.tile.on .minus { display: block; }

.times { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 56px; width: auto; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 0 14px; font-weight: 700; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 2px solid var(--line); padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.bar .sum { flex: 1; font-size: 24px; font-weight: 800; }
.big { background: var(--brand); color: #fff; min-height: 72px; font-size: 22px; padding: 0 28px; }
.big:disabled { opacity: .4; }

h2 { margin: 24px 0 10px; font-size: 22px; }
h2 .n { background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 18px; }
.prep { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 22px; }
.card { background: var(--card); border: 2px solid var(--line); border-left: 10px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.card .time { font-size: 30px; font-weight: 800; }
.card .who { font-weight: 700; }
.card .who a { color: var(--brand); }
.card .note { grid-column: 1 / -1; color: var(--muted); font-style: italic; }
.card .acts { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 8px; }
.card .acts button { flex: 1; }
.st-pending { border-left-color: var(--warn); }
.st-todo { border-left-color: var(--brand); }
.st-ready { border-left-color: var(--ok); }
.st-done, .st-refused, .st-cancelled { opacity: .55; }
.b-ok { background: var(--ok); color: #fff; }
.b-go { background: var(--brand); color: #fff; }
.b-no { background: #eee; color: var(--bad); flex: 0 0 auto !important; }
.msg { padding: 16px; border-radius: 14px; background: #fff; border: 2px solid var(--line); font-size: 22px; text-align: center; }
.err { color: var(--bad); font-weight: 700; min-height: 1.3em; }
[hidden] { display: none !important; }
.tile .left { font-size: 15px; }
.tile.out .left { color: var(--bad); font-weight: 700; }
.tile.out:not(.on) .add { opacity: .5; }
.row { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 12px; display: grid; grid-template-columns: 64px 1fr 56px; gap: 8px; align-items: center; }
.row .r-emo { text-align: center; font-size: 26px; padding: 0; }
.row .r-del { min-height: 56px; padding: 0; background: #eee; color: var(--bad); }
.row .r-price { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.row .r-price input { padding: 6px; }
.row .stepper { grid-column: 1 / -1; display: flex; gap: 6px; }
.row .stepper button { min-width: 64px; background: var(--brand); color: #fff; font-size: 24px; padding: 0; }
.row .stepper input { text-align: center; font-size: 26px; font-weight: 800; min-width: 0; }
.row .r-left { grid-column: 1 / -1; color: var(--muted); }
#addRow { width: 100%; }
.mt { margin-top: 12px; }
.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 14px; margin-top: 24px; }
#logout { background: none; color: #fff; min-height: 52px; font-size: 16px; font-weight: 400; text-decoration: underline; }
