:root { --g: #123a29; --leaf: #1f7a3a; --red: #c8332a; --amber: #c27c0e; --cream: #f7f3e8; --paper: #fff; --ink: #22322a; --muted: #5b675f; --line: #dcdccd; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--g); }
.top { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--g); color: #fff; }
.top a { color: #fff; text-decoration: none; }
.brand { font-size: 18px; margin-right: auto; } .brand b { color: #ffd36b; }
.report { background: var(--red); padding: 6px 12px; border-radius: 99px; font-weight: 700; }
.menu summary { list-style: none; cursor: pointer; font-size: 22px; padding: 0 6px; }
.menu nav { position: absolute; right: 8px; top: 48px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.menu nav a { color: var(--ink); padding: 8px 10px; border-radius: 8px; } .menu nav a[aria-current] { background: #e5efe2; font-weight: 700; }
@media (min-width: 1000px) { .menu summary { display: none; } .menu nav { position: static; display: flex; background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; flex-wrap: wrap; } .menu nav a { color: #fff; padding: 4px 8px; } .menu nav a[aria-current] { background: rgba(255,255,255,.15); } .menu details, .menu { display: block; } .menu nav .link { color: #cfe; } }
.menu:not([open]) nav { display: none; } @media (min-width: 1000px) { .menu:not([open]) nav { display: flex; } }
main { max-width: 1280px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { font: 400 30px/1.15 Georgia, serif; color: var(--g); margin: 6px 0 14px; } h2 { font: 400 21px Georgia, serif; color: var(--g); margin: 22px 0 10px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; overflow-x: auto; }
.card h2 { margin-top: 0; font-size: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; } th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #e5efe2; color: var(--leaf); }
.pill.red, .over { background: #fbe3e1; color: var(--red); } .pill.amber { background: #fdf0d8; color: var(--amber); }
.bar { height: 8px; background: #e8e8dc; border-radius: 9px; overflow: hidden; min-width: 60px; } .bar i { display: block; height: 100%; background: var(--leaf); } .bar.over i { background: var(--red); }
.btn, button { display: inline-block; font: inherit; font-weight: 700; background: var(--g); color: #fff; border: 0; border-radius: 99px; padding: 8px 16px; cursor: pointer; text-decoration: none; }
.btn.ghost, button.ghost { background: none; color: var(--g); border: 1px solid var(--g); } button.link { background: none; color: inherit; padding: 8px 10px; text-align: left; font-weight: 400; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } form.inline { display: inline; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #c9ccbd; border-radius: 8px; background: #fff; max-width: 100%; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; } .form { display: grid; gap: 12px; max-width: 640px; }
.msg { padding: 10px 14px; border-radius: 10px; background: #e5efe2; } .msg.error { background: #fbe3e1; color: var(--red); }
.muted, .small { color: var(--muted); font-size: 13px; } .empty { color: var(--muted); font-style: italic; }
.matrix td, .matrix th { white-space: nowrap; } .matrix .hi { color: var(--red); font-weight: 700; } .matrix .lo { color: var(--leaf); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; } .photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.big input, .big select, .big textarea, .big button { font-size: 18px; padding: 14px; } .big .cam { display: block; text-align: center; padding: 26px; border: 2px dashed var(--leaf); border-radius: 16px; background: #fff; font-size: 18px; }
/* recipe capture */
.recipe .fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.recipe .rows { display: grid; gap: 8px; margin-bottom: 10px; }
.recipe .line, .recipe .rowhead { display: grid; gap: 6px; align-items: start; }
.recipe .rowhead { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.recipe .ing, .recipe .rowhead.ing { grid-template-columns: minmax(120px, 3fr) minmax(90px, 1.3fr) 80px 70px 70px 34px; }
.recipe .chk, .recipe .rowhead.chk { grid-template-columns: minmax(110px, 1.3fr) minmax(120px, 3fr) 70px 70px 70px 54px 34px; }
.recipe .proc, .recipe .rowhead.proc { grid-template-columns: minmax(130px, 2.2fr) minmax(110px, 1.5fr) 70px 70px 80px minmax(120px, 2.4fr) 34px; }
.recipe .step { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.recipe .stepmain { display: grid; gap: 6px; grid-template-columns: minmax(120px, 3fr) minmax(100px, 1.5fr) 70px 80px auto 34px; align-items: center; }
.recipe label.flagl { display: flex; align-items: center; gap: 6px; font-weight: 400; } .recipe label.flagl input { width: auto; }
.recipe input, .recipe select, .recipe textarea { width: 100%; min-width: 0; }
.recipe .x { background: none; color: var(--red); padding: 6px; font-size: 16px; }
.recipe .paste { margin-top: 10px; } .recipe .paste summary { cursor: pointer; color: var(--g); font-weight: 600; }
.savebar { position: sticky; bottom: 0; background: var(--cream); padding: 10px 0; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .recipe .rowhead { display: none; }
  .recipe .ing, .recipe .chk, .recipe .proc { grid-template-columns: 1fr 1fr 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .recipe .proc input:first-child, .recipe .proc input[name=proc_waste] { grid-column: 1 / -1; }
  .recipe .ing input:first-child, .recipe .chk input[name=chk_parameter] { grid-column: 1 / -1; }
  .recipe .stepmain { grid-template-columns: 1fr 1fr 1fr; } .recipe .stepmain input:first-child { grid-column: 1 / -1; }
}
