:root {
    --ink: #111827;
    --muted: #5b6472;
    --line: #d9dee7;
    --soft: #f4f6f8;
    --brand: #105c3b;
    --brand-dark: #0b3f29;
    --accent: #f4b400;
    --danger: #b42318;
    --white: #ffffff;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #ffffff;
    line-height: 1.5;
}
a { color: inherit; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: var(--brand);
    color: var(--white);
    font-size: 13px;
    font-weight: 900;
}
.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.topnav a, .subnav a, .btn {
    text-decoration: none;
    border: 1px solid var(--line);
    padding: 9px 12px;
    background: var(--white);
    font-weight: 700;
    font-size: 14px;
}
.topnav a:hover, .subnav a:hover, .subnav a.active {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
}
.page { max-width: 1280px; margin: 0 auto; padding: 28px; }
.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
    align-items: stretch;
    margin: 16px 0 28px;
}
.panel, .card, .stat, .table-wrap {
    border: 1px solid var(--line);
    background: var(--white);
}
.panel { padding: 32px; }
.panel.dark { background: var(--brand-dark); color: var(--white); border-color: var(--brand-dark); }
.kicker { color: var(--brand); font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.panel.dark .kicker { color: var(--accent); }
h1 { margin: 8px 0 12px; font-size: clamp(34px, 5vw, 64px); line-height: 0.98; letter-spacing: -0.055em; }
h2 { margin: 0 0 14px; font-size: 28px; letter-spacing: -0.03em; }
h3 { margin: 0 0 10px; font-size: 19px; }
p { margin: 0 0 14px; color: var(--muted); }
.panel.dark p { color: #d9e6df; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { cursor: pointer; display: inline-block; }
.btn.primary { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn.dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn.danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 20px; }
.card p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 20px; }
.stat strong { display: block; font-size: 30px; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-weight: 700; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.form { max-width: 520px; }
.form.full { max-width: none; }
label { display: block; font-weight: 800; margin: 12px 0 6px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 12px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 110px; }
.notice { border-left: 6px solid var(--brand); padding: 14px 16px; background: var(--soft); margin: 14px 0 18px; }
.notice.danger { border-left-color: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.badge { display: inline-block; border: 1px solid var(--line); padding: 4px 8px; font-size: 12px; font-weight: 900; background: var(--soft); }
.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 900px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .hero, .grid, .grid.two, .stats { grid-template-columns: 1fr; }
    .page { padding: 18px; }
}

/* v0.2.0 shop/product admin additions */
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.muted { color: var(--muted); font-size: 13px; }
.actions.tight { gap: 6px; margin-top: 6px; }
.actions.tight .btn { padding: 7px 9px; font-size: 12px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.inline-form select { min-width: 160px; padding: 8px; }
.compact-form { padding: 20px; }
.field-actions { display: flex; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 12px 0; }
.check input[type="checkbox"] { width: auto; min-width: 18px; height: 18px; }
.table-check { margin: 0; }
.small-textarea { min-height: 70px; }
.category-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.badge.status-live, .badge.success-soft { border-color: #15803d; background: #dcfce7; color: #14532d; }
.badge.status-awaiting_review, .badge.status-applied { border-color: #d97706; background: #fef3c7; color: #78350f; }
.badge.status-approved_setup_required { border-color: #2563eb; background: #dbeafe; color: #1e3a8a; }
.badge.status-paused, .badge.status-hidden, .badge.status-draft { border-color: #64748b; background: #f1f5f9; color: #334155; }
.badge.status-suspended, .badge.status-rejected, .badge.danger-soft { border-color: #b42318; background: #fee4e2; color: #7a271a; }
.badge.status-active { border-color: #15803d; background: #dcfce7; color: #14532d; }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; } .inline-form { display: flex; flex-wrap: wrap; } }

/* v0.3.0 customer ordering shell */
.postcode-strip { margin-top: 24px; }
.split-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.shop-card { display: flex; flex-direction: column; gap: 8px; }
.muted-card { opacity: .72; }
.product-section { margin-bottom: 18px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-card { border: 1px solid var(--line); padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 14px; align-items: start; }
.product-card .price { color: var(--ink); font-size: 22px; font-weight: 900; letter-spacing: -0.04em; }
.add-form { display: grid; gap: 8px; }
.add-form select { padding: 9px; }
.add-form button:disabled, .add-form select:disabled { opacity: .5; cursor: not-allowed; }
.qty-input { max-width: 86px; }
.totals-panel { margin-top: 18px; }
.totals-row, .summary-line { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.totals-row.total { font-size: 22px; border-bottom: 0; }
.summary-line strong, .totals-row strong { white-space: nowrap; }
.timeline-row { border-left: 4px solid var(--line); padding: 8px 0 8px 14px; margin-bottom: 8px; }
.timeline-row span { display: block; color: var(--muted); font-size: 13px; }
.badge.status-paid_awaiting_shop { border-color: #d97706; background: #fef3c7; color: #78350f; }
.badge.status-shop_reviewing, .badge.status-shop_accepted, .badge.status-shop_amended, .badge.status-picking_packing { border-color: #2563eb; background: #dbeafe; color: #1e3a8a; }
.badge.status-ready_for_collection, .badge.status-driver_assigned, .badge.status-collected { border-color: #7c3aed; background: #ede9fe; color: #4c1d95; }
.badge.status-delivered { border-color: #15803d; background: #dcfce7; color: #14532d; }
.badge.status-cancelled, .badge.status-problem, .badge.status-shop_rejected { border-color: #b42318; background: #fee4e2; color: #7a271a; }
@media (max-width: 900px) {
    .split-control, .product-grid, .product-card { grid-template-columns: 1fr; }
}
