/* Farm View publisher demo */
:root { --ink: #1f1d1a; --ink-2: #4a463f; --ink-3: #6f695e; --hair: #e2ddd2; --bg: #f5f3ee; --green: #00804b; --green-d: #00663c; --green-l: #e3f2e9; --sun: #ffe33b; --red: #c62b26; --r: 8px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 "Barlow", "Segoe UI", sans-serif; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; line-height: 1.1; margin: 0 0 .5rem; }
h1 { font-size: 2.4rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
a { color: var(--green-d); }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid #1b87cc; outline-offset: 2px; }

.demo-bar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .55rem 1.25rem; background: var(--sun); font-size: .95rem; }
.demo-actions { display: flex; gap: 1rem; align-items: center; }
.demo-actions a { color: var(--ink); font-weight: 600; }
.demo-actions button { font: 600 .9rem/1 inherit; font-family: inherit; padding: .45rem .8rem; border: 1px solid var(--ink); background: transparent; border-radius: 6px; cursor: pointer; }

.signin { position: fixed; inset: 0; z-index: 40; background: rgba(31, 29, 26, .55); display: grid; place-items: center; padding: 1rem; }
.signin[hidden] { display: none; }
.signin-card { background: #fff; border-radius: 12px; padding: 2rem; width: min(100%, 380px); display: grid; gap: .9rem; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.signin-card img { width: 200px; margin: 0 auto .25rem; }
.signin-card h1 { font-size: 1.8rem; text-align: center; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 42px); }
.side { background: #fff; border-right: 1px solid var(--hair); padding: 1.25rem .9rem; display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 42px; height: calc(100vh - 42px); }
.side-logo { display: flex; flex-direction: column; gap: .25rem; text-decoration: none; padding: 0 .5rem; }
.side-logo span { font: 700 .75rem/1 "Barlow", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.side nav { display: grid; gap: .2rem; }
.side nav a { display: flex; gap: .7rem; align-items: center; padding: .7rem .75rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 600; }
.side nav a:hover { background: var(--bg); }
.side nav a.on { background: var(--green-l); color: var(--green-d); }
.side-foot { margin-top: auto; font-size: .85rem; color: var(--ink-3); padding: 0 .5rem; }

.main { padding: 2rem 2.25rem 4rem; max-width: 1240px; }
.ph { margin-bottom: 1.5rem; }
.ph p { color: var(--ink-2); max-width: 44rem; margin: 0; font-size: 1.05rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.grid2.wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.stack { display: grid; gap: 1rem; }
.card { background: #fff; border: 1px solid var(--hair); border-radius: var(--r); padding: 1.4rem; display: grid; gap: .9rem; align-content: start; }
.card.narrow { max-width: 560px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: 400 1rem/1.4 inherit; font-family: inherit; padding: .6rem .7rem; border: 1px solid #c9c2b3; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 2px solid var(--green-l); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--green); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.row-btns { display: flex; gap: .6rem; }
.hint { font-size: .88rem; color: var(--ink-3); margin: 0; }
.wc { font-weight: 500; color: var(--ink-3); font-size: .85rem; }
.wc.over { color: var(--red); }
.b { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; min-height: 42px; border-radius: 6px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: 600 .95rem/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.b:hover { background: var(--bg); }
.b.primary { background: var(--green); border-color: var(--green); color: #fff; font-size: 1.02rem; min-height: 48px; }
.b.primary:hover { background: var(--green-d); }
.b.primary:disabled { background: #b9c9bf; border-color: #b9c9bf; cursor: not-allowed; }
.b.ghost { border-color: var(--hair); }
.b.danger { color: var(--red); border-color: #e9c6c4; }
.b.danger.sure { background: var(--red); color: #fff; border-color: var(--red); }
.b.sm { min-height: 34px; padding: .35rem .7rem; font-size: .85rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.checklist li { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .85rem .9rem; border: 1px solid var(--hair); border-radius: 6px; }
.checklist small { display: block; color: var(--ink-3); }
.tick { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #c9c2b3; display: grid; place-items: center; }
.checklist li.done { background: var(--green-l); border-color: #bfe0cc; }
.checklist li.done .tick { background: var(--green); border-color: var(--green); }
.checklist li.done .tick::after { content: ""; width: .45rem; height: .8rem; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.stat { gap: .2rem; }
.stat small { color: var(--ink-3); font-weight: 600; }
.stat strong { font: 800 1.9rem/1.1 "Barlow Condensed", sans-serif; }
.stat a { font-weight: 600; font-size: .92rem; }

.drop { position: relative; border: 2px dashed #c9c2b3; border-radius: var(--r); padding: 1.5rem; text-align: center; cursor: pointer; background: #fcfbf8; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--green); background: var(--green-l); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.drop-empty { display: grid; justify-items: center; gap: .4rem; font-weight: 500; }
.drop-empty svg { width: 2rem; height: 2rem; color: var(--green); }
.drop-full { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: center; text-align: left; }
.drop-full canvas { width: 110px; height: auto; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); background: #fff; }
.drop-full small { display: block; color: var(--ink-3); }
.drop-full .ok { color: var(--green-d); font-weight: 600; }
.drop.small { padding: 1rem; }

.issue-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; max-height: 560px; overflow: auto; }
.issue-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: .8rem; align-items: center; padding: .45rem .5rem; border-radius: 6px; }
.issue-list li:hover { background: var(--bg); }
.issue-list img { width: 48px; aspect-ratio: .72; object-fit: cover; object-position: top; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .35); background: #fff; }
.badge { display: inline-block; margin-left: .4rem; padding: .1rem .45rem; background: var(--sun); border-radius: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; vertical-align: middle; }
.badge.new { background: var(--green); color: #fff; }
.badge.grey { background: #ece8df; color: var(--ink-3); }

.cal-admin, .ad-admin, .albums { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.cal-admin li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .8rem; align-items: center; padding: .6rem; border: 1px solid var(--hair); border-radius: 6px; }
.cal-admin li.past { opacity: .55; }
.cal-admin .d { text-align: center; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.cal-admin .d b { display: block; background: var(--ink); color: #fff; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.cal-admin .d span { font: 800 1.35rem/1.3 "Barlow Condensed", sans-serif; }
.cal-admin small { display: block; color: var(--ink-3); }
.acts { display: flex; gap: .35rem; }
.ad-admin { max-height: 560px; overflow: auto; }
.ad-admin li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .55rem .7rem; border-bottom: 1px solid var(--hair); }
.ad-admin small { display: block; color: var(--ink-3); }
.search { max-width: 220px; min-height: 40px; }
.albums li { display: grid; grid-template-columns: 84px 1fr; gap: .9rem; align-items: center; padding: .5rem; border: 1px solid var(--hair); border-radius: 6px; }
.albums img { width: 84px; height: 64px; object-fit: cover; border-radius: 4px; }
.albums small { display: block; color: var(--ink-3); }
.thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.thumbs li { display: grid; gap: .35rem; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.thumbs input { font-size: .85rem; min-height: 36px; padding: .4rem .5rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--ink); color: #fff; padding: .85rem 1.2rem; border-radius: 8px; font-weight: 600; max-width: min(92vw, 560px); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); transition: transform .3s ease; z-index: 50; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; }
  .side-logo img { width: 120px; }
  .side nav { display: flex; flex-wrap: wrap; gap: .2rem; }
  .side nav a { padding: .5rem .6rem; font-size: .92rem; }
  .side-foot { display: none; }
  .main { padding: 1.5rem 1rem 3rem; }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .checklist li { grid-template-columns: auto 1fr; }
  .checklist li .b { grid-column: 2; justify-self: start; }
  h1 { font-size: 2rem; }
}
