/* cloudflare/tendacre-billing/ops-ui/app.css: TendAcre owner console. Phone first; TendAcre palette (tendacre.com). */
:root {
  --ink: #1e3214; --leaf: #3f6b22; --leaf-dk: #2f5319; --sprout: #7fa04a; --gold: #d9a23a; --gold-lt: #f3e3bd;
  --mist: #edf1e3; --paper: #fbfcf7; --line: #c9d3b6; --muted: #4c5a40; --bad: #9b2c1f; --bad-lt: #f6dcd6; --warn-lt: #f7ebc8;
  --good-lt: #dcebcc; --serif: "Alegreya", Georgia, serif; --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --r: 14px; --shadow: 0 1px 0 #fff inset, 0 10px 26px -14px rgba(30, 50, 20, .35);
  accent-color: var(--leaf); color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e5ecd8; --leaf: #9cc36a; --leaf-dk: #b6d68a; --mist: #141b10; --paper: #1d2617; --line: #34412b; --muted: #a9b79a;
    --bad: #f08f7c; --bad-lt: #3b1d17; --warn-lt: #3a3015; --good-lt: #23361a; --gold-lt: #3a3015;
    --shadow: 0 10px 26px -14px rgba(0, 0, 0, .7); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 1.05rem/1.5 var(--sans); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--leaf); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 .6em; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 10; background: #1e3214; color: #eef3e4; padding-top: env(safe-area-inset-top);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .5); }
.top-in { display: flex; align-items: center; justify-content: space-between; max-width: 960px; margin: 0 auto; padding: .55rem 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font: 800 1.25rem/1 var(--serif); }
.brand img { border-radius: 8px; }
.brand em { font: 500 .95rem/1 var(--sans); color: #c9d8b2; font-style: normal; margin-left: .2rem; }
.icon-btn { background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 10px; width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; max-width: 960px; margin: 0 auto; padding: 0 .75rem .6rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; color: #dfe8d1; text-decoration: none; font-weight: 500; padding: .45rem .85rem; border-radius: 999px; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--gold); color: #1e3214; font-weight: 700; }

main { max-width: 960px; margin: 0 auto; padding: 1rem; outline: none; }
.loading, .muted { color: var(--muted); }
.small { font-size: .92rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .9rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.tile b { display: block; font: 800 1.75rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .92rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border-radius: 12px;
  border: 1px solid var(--leaf-dk); background: var(--leaf); color: #fff; font: 700 1rem/1.1 var(--sans); cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 14px -8px rgba(30, 50, 20, .6); }
@media (prefers-color-scheme: dark) { .btn { color: #13200b; } }
.btn.ghost { background: transparent; color: var(--leaf); border-color: var(--line); box-shadow: none; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
@media (prefers-color-scheme: dark) { .btn.danger { color: #2a0f0a; } }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row.end { justify-content: flex-end; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .7rem 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.farm { display: block; color: inherit; text-decoration: none; }
.farm-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.farm-name { font: 700 1.12rem/1.2 var(--serif); }
.meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .2rem .8rem; }

.pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; background: var(--good-lt); color: var(--ink); }
.pill.live { background: var(--good-lt); }
.pill.building, .pill.checkout, .pill.read_only, .pill.warn { background: var(--warn-lt); }
.pill.build_failed, .pill.bad, .pill.closed { background: var(--bad-lt); color: var(--bad); }
.pill.gold { background: var(--gold-lt); }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--line); margin-right: .3rem; vertical-align: .05rem; }
.dot.ok { background: #4f9a2c; } .dot.bad { background: #c8432c; } .dot.warn { background: var(--gold); }
.attn { margin: .35rem 0 0; padding: 0; list-style: none; }
.attn li { color: var(--bad); font-size: .92rem; font-weight: 500; }
.attn li::before { content: "\2022  "; }

dl.facts { display: grid; grid-template-columns: minmax(7.5rem, max-content) 1fr; gap: .35rem .9rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: .75rem; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .4rem .8rem; font: 500 .95rem/1 var(--sans); cursor: pointer; min-height: 36px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--mist); border-color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; min-height: 44px; width: 100%; }
label { display: block; font-weight: 500; margin: .5rem 0 .25rem; }
.search { margin-bottom: .6rem; }
.code-in { font: 700 1.6rem/1 var(--sans); letter-spacing: .35em; text-align: center; }
.log li { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; padding: .45rem 0; font-size: .93rem; }
.log time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.log .farm-tag { font-weight: 700; }
.runs li { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.back { display: inline-block; margin-bottom: .6rem; font-weight: 500; }
.signin { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.signin .card { text-align: left; }
.empty { text-align: center; color: var(--muted); padding: 1.2rem .5rem; }
.bar { height: .5rem; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.bar i { display: block; height: 100%; background: var(--leaf); }
.bar i.warn { background: var(--gold); } .bar i.bad { background: #c8432c; }
details.fold > summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }

.toast { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translate(-50%, 150%); background: var(--ink); color: var(--mist);
  padding: .7rem 1.1rem; border-radius: 12px; max-width: calc(100% - 2rem); font-weight: 500; transition: transform .25s ease; z-index: 30; }
.toast.on { transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; width: min(440px, calc(100% - 1.5rem)); background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(20, 30, 14, .55); }
dialog .row { margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.mt { margin-top: .6rem; }
.between { justify-content: space-between; }
.about { margin: .35rem 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
