/* Orchard operator UI. Internal tool: clarity first, one confident accent, a
   serif wordmark as the only flourish. Not the reader theme. */
:root {
  --a-bg: #f5f6f2; --a-surface: #ffffff; --a-ink: #1b1e1a; --a-muted: #6b7168;
  --a-accent: #2f6f4f; --a-accent-ink: #ffffff; --a-line: #e5e6df;
  --a-warn: #b06a1f; --a-live: #2f6f4f; --a-radius: 12px;
  --a-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --a-serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body.admin { margin: 0; background: var(--a-bg); color: var(--a-ink); font-family: var(--a-sans); line-height: 1.5; }
a { color: inherit; }

.a-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.5rem; background: var(--a-surface); border-bottom: 1px solid var(--a-line); position: sticky; top: 0; z-index: 5; }
.a-brand { font-family: var(--a-serif); font-size: 1.3rem; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.a-brand span { color: var(--a-accent); }
.a-nav { display: flex; gap: 1.25rem; align-items: center; font-size: 0.92rem; }
.a-nav a { color: var(--a-muted); text-decoration: none; }
.a-nav a:hover, .a-nav a.is-active { color: var(--a-ink); }

.a-wrap { max-width: 68rem; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.a-head h1 { font-size: 1.6rem; margin: 0; letter-spacing: -0.01em; }
.a-head p { color: var(--a-muted); margin: 0.25rem 0 0; }
.a-back { display: inline-block; color: var(--a-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.75rem; }
.a-back:hover { color: var(--a-ink); }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--a-line);
  background: var(--a-surface); color: var(--a-ink); padding: 0.55rem 0.95rem; border-radius: 999px;
  text-decoration: none; font-size: 0.92rem; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--a-ink); }
.btn--primary { background: var(--a-accent); color: var(--a-accent-ink); border-color: var(--a-accent); }
.btn--primary:hover { filter: brightness(1.05); border-color: var(--a-accent); }
.btn--lg { padding: 0.7rem 1.3rem; font-size: 1rem; }

/* Stat tiles */
.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.85rem; margin-bottom: 1.75rem; }
.a-stat { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1rem 1.1rem; }
.a-stat b { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; display: block; }
.a-stat span { color: var(--a-muted); font-size: 0.82rem; }

/* Product grid */
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.a-card { display: block; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius);
  overflow: hidden; text-decoration: none; transition: box-shadow 0.12s ease, transform 0.12s ease; }
.a-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.07); }
.a-card__swatch { height: 4.5rem; display: flex; align-items: center; padding: 0 1.1rem; }
.a-card__swatch b { font-family: var(--a-serif); font-size: 1.15rem; }
.a-card__body { padding: 0.9rem 1.1rem 1.1rem; }
.a-card__niche { color: var(--a-muted); font-size: 0.88rem; margin: 0.1rem 0 0.75rem; min-height: 2.4em; }
.a-card__row { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--a-muted); border-top: 1px solid var(--a-line); padding-top: 0.7rem; }
.a-card__row b { color: var(--a-ink); }

.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }
.pill--live { background: color-mix(in srgb, var(--a-live) 16%, transparent); color: var(--a-live); }
.pill--ready { background: color-mix(in srgb, var(--a-warn) 16%, transparent); color: var(--a-warn); }
.pill--reserve, .pill--draft { background: #ecece6; color: var(--a-muted); }

/* Wizard */
.step { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1.5rem; margin-bottom: 1.1rem; }
.step__n { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 999px;
  background: var(--a-accent); color: var(--a-accent-ink); font-weight: 700; font-size: 0.9rem; margin-right: 0.6rem; }
.step__soon .step__n { background: #dcdcd4; color: var(--a-muted); }
.step h2 { font-size: 1.2rem; margin: 0 0 0.2rem; display: flex; align-items: center; }
.step p.hint { color: var(--a-muted); margin: 0 0 1rem; padding-left: 2.3rem; }
.step__soon { opacity: 0.75; }

.tiles { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.tile { border: 1.5px solid var(--a-line); border-radius: 10px; padding: 0.9rem 1rem; cursor: pointer; background: var(--a-surface); display: block; transition: border-color 0.1s ease; }
.tile:hover { border-color: var(--a-muted); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile.is-selected { border-color: var(--a-accent); box-shadow: inset 0 0 0 1px var(--a-accent); }
.tile b { display: block; font-size: 1rem; }
.tile small { color: var(--a-muted); display: block; margin-top: 0.2rem; font-size: 0.82rem; }
.tile .tag { font-size: 0.7rem; color: var(--a-accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.pack-tile { display: flex; gap: 0.75rem; align-items: center; }
.pack-swatch { width: 2.6rem; height: 2.6rem; border-radius: 8px; flex: none; border: 1px solid rgba(0,0,0,0.08); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.pack-swatch i { display: block; }

.field { margin-top: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field textarea, .field select { width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--a-line); border-radius: 8px; font: inherit; background: var(--a-surface); color: var(--a-ink); }
.field textarea { min-height: 7rem; resize: vertical; }
.field .help { color: var(--a-muted); font-size: 0.8rem; margin-top: 0.25rem; }
.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

.a-error { background: color-mix(in srgb, #c0392b 12%, transparent); border: 1px solid color-mix(in srgb, #c0392b 30%, transparent); color: #a12f22; padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }

/* Brand page */
.b-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.b-swatch { width: 3rem; height: 3rem; border-radius: 10px; border: 1px solid var(--a-line); }
.tracker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tracker span { font-size: 0.8rem; color: var(--a-muted); border: 1px solid var(--a-line); border-radius: 999px; padding: 0.3rem 0.75rem; background: var(--a-surface); }
.tracker span.done { color: var(--a-accent); border-color: color-mix(in srgb, var(--a-accent) 40%, var(--a-line)); }
.panel { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1.25rem 1.4rem; margin-bottom: 1.1rem; }
.panel h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.panel .sub { color: var(--a-muted); font-size: 0.88rem; margin: 0 0 1rem; }
.rowlist { list-style: none; margin: 0; padding: 0; }
.rowlist li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--a-line); font-size: 0.92rem; }
.rowlist li:first-child { border-top: 0; }
.empty { color: var(--a-muted); font-size: 0.9rem; padding: 0.5rem 0; }

/* Admin login */
.a-login { max-width: 22rem; margin: 5rem auto; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1.75rem; }
.a-login h1 { font-family: var(--a-serif); margin: 0 0 0.25rem; }
.a-login .muted { color: var(--a-muted); font-size: 0.9rem; margin: 0 0 1.25rem; }

*:focus-visible { outline: 2px solid var(--a-accent); outline-offset: 2px; }
