:root {
  --bg: #f6f1e8; --card: #fffdf8; --ink: #1f1b16; --muted: #6f665b; --line: #e6ddd0;
  --accent: #1f6f5f; --accent-ink: #fff; --warn: #a65e00; --bad: #a33a2a; --good: #1f6f5f; --sale: #b5411a;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
header.top .brand { font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: .2px; }
header.top .brand small { color: var(--muted); font-family: system-ui, sans-serif; font-size: 13px; margin-left: 8px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs button { background: none; border: 1px solid transparent; padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--muted); }
nav.tabs button.active { background: var(--bg); color: var(--ink); border-color: var(--line); }
.who { color: var(--muted); font-size: 14px; }
.who a { margin-left: 10px; }
main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 80px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 34px; margin: 0 0 6px; }
h2 { font-family: Georgia, serif; font-weight: 400; font-size: 22px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 0 0 6px; }
p.lead { color: var(--muted); margin: 0 0 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 140px; }
.row .grow { flex: 4 1 320px; }
.row .small { flex: 0 1 110px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd8d0; border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border: 0; padding: 11px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; font: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.hint { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); margin-right: 6px; vertical-align: middle; }
.pill.good { border-color: #bcd8d0; color: var(--good); background: #eef7f4; }
.pill.warn { border-color: #f0d9b5; color: var(--warn); background: #fff6e8; }
.pill.bad { border-color: #efc8c1; color: var(--bad); background: #fdf0ee; }
.pill.sale { border-color: #f3c7b7; color: var(--sale); background: #fff1eb; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.plan.winner { border-color: var(--accent); box-shadow: 0 0 0 3px #e3efeb; }
.plan .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan .total { font-size: 24px; font-family: Georgia, serif; }
.plan .lines { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; }
.plan .lines li { padding: 3px 0; color: var(--ink); }
.results { margin-top: 14px; }
.suggest { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; max-height: 300px; overflow: auto; }
.suggest div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 15px; }
.suggest div:hover { background: var(--bg); }
.suggest .cat { color: var(--muted); font-size: 12px; margin-left: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } header.top { flex-direction: column; align-items: flex-start; gap: 8px; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
.status-pending { color: var(--warn); } .status-working { color: var(--accent); } .status-done { color: var(--good); } .status-failed { color: var(--bad); }
.status-approved { color: var(--good); } .status-declined { color: var(--bad); }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.signin { max-width: 440px; margin: 12vh auto; text-align: center; }
.signin .card { padding: 32px 28px; }
.signin button.primary { width: 100%; font-size: 17px; margin-top: 12px; }

.badge { display:inline-block; min-width:18px; padding:0 6px; border-radius:999px; background:var(--sale); color:#fff; font-size:12px; line-height:18px; text-align:center; margin-left:4px; }
.more { position: relative; display:inline-block; }
.more > button { background:none; border:1px solid transparent; padding:8px 12px; border-radius:8px; cursor:pointer; font:inherit; color:var(--muted); }
.menu { position:absolute; top:100%; right:0; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:6px; z-index:10; min-width:160px; box-shadow:0 8px 24px rgba(0,0,0,.08); }
.menu button { display:block; width:100%; text-align:left; }
.appr { border:1px solid var(--line); border-radius:var(--radius); background:#fff; padding:16px 18px; margin-bottom:12px; }
.appr .top { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline; }
.appr .prop { font-family:Georgia,serif; font-size:20px; }
.appr .total { font-family:Georgia,serif; font-size:22px; }
.appr ul { margin:10px 0 0; padding-left:18px; }
.appr li { padding:2px 0; }
.appr .acts { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
.appr .acts .primary { padding:12px 22px; font-size:16px; }
body.manager .owner-col { display:none; }
button.big { padding:14px 22px; font-size:17px; }
[hidden] { display: none !important; }
/* Run checker now — make it unmistakable */
#runChecker, #runNow2 { background: #f96302; color: #fff; border: 0; font-weight: 700; font-size: 16px; padding: 12px 18px; border-radius: 10px; box-shadow: 0 0 0 4px #ffd9bf; animation: ringpulse 2s ease-in-out infinite; }
#runChecker:hover, #runNow2:hover { background: #d95400; }
@keyframes ringpulse { 0%,100% { box-shadow: 0 0 0 4px #ffd9bf; } 50% { box-shadow: 0 0 0 8px #ffe9d9; } }
