/* Replacement retail catalog: shared, responsive, existing brand tokens. */
.bo-store-catalog,.bo-product-page { padding:var(--bo-space-7) var(--bo-space-5); }
.bo-store-catalog-head { display:flex; align-items:end; justify-content:space-between; gap:2rem; padding-bottom:2rem; margin-bottom:2rem; border-bottom:1px solid var(--bo-border); }
.bo-store-catalog-head h1 { font-size:clamp(2rem,3.4vw,3rem); margin:0; }
.bo-store-catalog-head p { max-width:32ch; }
.bo-store-product-card { display:flex; flex-direction:column; color:inherit; text-decoration:none; min-width:0; border-top:3px solid var(--bo-moss); transition:border-color 160ms ease,background-color 160ms ease; }
.bo-store-product-card:hover { border-color:var(--bo-gold); }
.bo-store-product-card:focus-visible { outline:3px solid var(--bo-gold); outline-offset:4px; }
.bo-store-card-top { display:flex; align-items:start; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; color:var(--bo-text-muted); font-size:.75rem; }
.bo-store-code { font-family:var(--bo-font-mono); font-size:.8rem; overflow-wrap:anywhere; }
.bo-store-code span { color:var(--bo-text); margin-left:.5rem; }
.bo-store-spec { color:var(--bo-text-muted); margin:.25rem 0 1rem; }
.bo-store-card-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem; margin-top:auto; padding-top:1.5rem; font-size:.8rem; }
.bo-store-card-price { font-family:var(--bo-font-display); font-size:1.4rem; }
.bo-store-card-image { display:block; width:100%; height:180px; object-fit:contain; margin-bottom:1.5rem; }
.bo-product-head { margin-bottom:2rem; padding-bottom:1rem; border-bottom:1px solid var(--bo-border); }
.bo-product-head h1 { margin-bottom:.5rem; overflow-wrap:anywhere; }
.bo-product-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,420px); gap:3rem; align-items:start; }
.bo-product-body { min-width:0; }
.bo-store-details { padding-bottom:1.5rem; margin-bottom:1.5rem; border-bottom:1px solid var(--bo-border); }
.bo-store-details dl { display:grid; grid-template-columns:minmax(6rem,1fr) minmax(0,2fr); gap:.8rem 1rem; font-size:.9rem; }
.bo-store-details dt { color:var(--bo-text-muted); }
.bo-store-details dd { margin:0; overflow-wrap:anywhere; }
.bo-store-review-form { display:grid; gap:1rem; max-width:40rem; }
.bo-store-review-form label { display:grid; gap:.4rem; font-size:.875rem; }
.bo-store-review-form select,.bo-store-review-form input,.bo-store-review-form textarea { width:100%; min-width:0; padding:.75rem; background:var(--bo-bg); color:var(--bo-text); border:1px solid var(--bo-border); border-radius:var(--bo-radius); font:inherit; }
.bo-store-review-form :is(select,input,textarea):focus-visible { outline:2px solid var(--bo-gold); outline-offset:2px; }
.bo-store-review-form button { justify-self:start; }
.bo-product-body .bo-prose { max-width:75ch; }
/* Catalog selection and location, scoped to the approved browsing correction. */
.bo-catalog-categories { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--bo-space-5); }
.bo-catalog-category { display:flex; flex-direction:column; justify-content:space-between; gap:var(--bo-space-6); min-height:160px; text-decoration:none; color:inherit; overflow-wrap:anywhere; }
.bo-catalog-category h2 { margin:0; font-size:1.5rem; line-height:1.25; }
.bo-catalog-category > span { font-weight:600; }
.bo-catalog-category:hover { text-decoration:none; border-color:currentColor; }
.bo-catalog-category:focus-visible,.bo-catalog-breadcrumbs a:focus-visible { outline:3px solid currentColor; outline-offset:4px; }
.bo-catalog-breadcrumbs { margin-bottom:var(--bo-space-5); }
.bo-catalog-breadcrumbs ol { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .65rem; padding:0; margin:0; list-style:none; }
.bo-catalog-breadcrumbs li { min-width:0; overflow-wrap:anywhere; }
.bo-catalog-breadcrumbs li + li::before { content:"/"; margin-right:.65rem; opacity:.6; }
.bo-catalog-breadcrumbs a { display:inline-block; padding:.25rem 0; text-underline-offset:.2em; }
@media (max-width:1000px) { .bo-catalog-categories { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .bo-catalog-categories { grid-template-columns:minmax(0,1fr); } .bo-catalog-category { min-height:132px; } }
.bo-product-body h2 { margin-top:2rem; }
.bo-product-body h2:first-child { margin-top:0; }
.bo-product-buy { position:sticky; top:2rem; align-self:start; border-top:3px solid var(--bo-gold); }
.bo-product-buy .bo-buy-price { font-family:var(--bo-font-display); font-size:1.8rem; line-height:1.15; margin:0 0 1rem; }
.bo-buy-price small { font-family:var(--bo-font-body); font-size:.875rem; color:var(--bo-text-muted); }
.bo-product-buy .bo-buy-cta { width:100%; margin-top:.5rem; }
.bo-product-reviews-wrap { margin-top:3rem; }
.bo-product-legal { margin-top:2rem; max-width:75ch; }
.bo-store-choices { border:0; padding:0; margin:0 0 1.5rem; min-width:0; display:grid; gap:.65rem; }
.bo-store-choices legend { padding:0 0 .8rem; font-weight:600; font-size:.875rem; }
.bo-store-choice { display:flex; align-items:center; gap:.75rem; padding:1rem .85rem; margin:0; cursor:pointer; border:1px solid var(--bo-border); border-radius:var(--bo-radius); background:var(--bo-bg); }
.bo-store-choice input { width:1.15rem; height:1.15rem; margin:0; flex:0 0 auto; accent-color:var(--bo-moss); }
.bo-store-choice:has(input:checked) { border-color:var(--bo-gold); box-shadow:inset 0 0 0 1px var(--bo-gold); }
.bo-store-choice:focus-within { outline:2px solid var(--bo-gold); outline-offset:3px; }
.bo-store-choice__body { display:flex; flex:1; min-width:0; flex-direction:column; gap:.15rem; font-size:.875rem; overflow-wrap:anywhere; }
.bo-store-choice__body>span { color:var(--bo-text-muted); font-size:.75rem; }
.bo-store-choice>.bo-tabular { font-size:.875rem; font-weight:600; white-space:nowrap; }
.bo-store-purchase-summary { font-size:.875rem; padding:1rem 0; border-top:1px solid var(--bo-border); }
.bo-store-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin-bottom:2rem; }
.bo-store-gallery img { width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; }
.bo-store-gallery img:first-child { grid-column:1/-1; }
.bo-store-fieldset { border:1px solid var(--bo-border); border-radius:var(--bo-radius); padding:1rem; min-width:0; }
.bo-store-check-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.bo-store-check-grid label { display:flex; align-items:start; gap:.5rem; overflow-wrap:anywhere; }
.bo-store-import-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; }
.bo-store-columns,.bo-store-preview-json { white-space:pre-wrap; overflow-wrap:anywhere; font-size:.8rem; max-width:70ch; }
.bo-store-image-row { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; padding:1rem 0; border-bottom:1px solid var(--bo-border); }
.bo-store-image-row img { object-fit:contain; }
.bo-store-cart-scroll { overflow-x:auto; }
.bo-store-cart-scroll table { min-width:580px; }
@media(max-width:1023px) {
 .bo-product-split { grid-template-columns:minmax(0,1fr); gap:2rem; }
 .bo-product-buy { position:static; order:-1; }
 .bo-store-catalog-head { align-items:start; flex-direction:column; gap:1rem; }
 .bo-store-import-grid,.bo-store-check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:640px) {
 .bo-store-catalog,.bo-product-page { padding:1.5rem 1rem; }
 .bo-store-import-grid,.bo-store-check-grid { grid-template-columns:minmax(0,1fr); }
 .bo-store-choice { padding:.9rem .65rem; gap:.6rem; }
 .bo-store-card-bottom { align-items:start; }
}
/* =====================================================================
   Black Oak Peptides v2.0.0 Phase 2a
   Single site stylesheet. Section index:
     1.  Root design tokens
     2.  Theme mode overrides
     3.  Reset and base
     4.  Typography scale
     5.  Layout primitives
     6.  Forms
     7.  Buttons
     8.  Alerts and callouts
     9.  Storefront cards
     10. Admin console
     11. Header, nav, footer
     12. Utility helpers
     13. Motion and reduced motion
     14. Responsive cascade  8 breakpoints
   ===================================================================== */

/* --------------------------------------------------------------------- */
/* 1. Root design tokens                                                 */
/* --------------------------------------------------------------------- */
:root {
    /* Palette */
    --bo-black-oak:      #111512;
    --bo-oak-bark:       #29251F;
    --bo-moss:           #365043;
    --bo-forest-accent:  #53765F;
    --bo-antique-gold:   #B58A47;
    --bo-parchment:      #F4F0E8;
    --bo-stone:          #D7D2C6;
    --bo-ink:            #1D211D;
    --bo-alert-amber:    #C9852E;
    --bo-error-red:      #9C3D38;
    --bo-success-green:  #3E6C51;

    /* Semantic tokens  default is dark mode */
    --bo-bg:              var(--bo-black-oak);
    --bo-bg-surface:      var(--bo-oak-bark);
    --bo-bg-elevated:     #1B1F1B;
    --bo-border:          #3A403B;
    --bo-text:            var(--bo-parchment);
    --bo-text-muted:      #A9A69C;
    --bo-text-faint:      #7C7A74;
    --bo-accent:          var(--bo-forest-accent);
    --bo-accent-hover:    #6C9078;
    --bo-gold:            var(--bo-antique-gold);

    /* Typography */
    --bo-font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
    --bo-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --bo-font-mono:    "JetBrains Mono", "SF Mono", Consolas, monospace;

    --bo-size-h1:  clamp(2rem, 4vw + 1rem, 3.5rem);
    --bo-size-h2:  clamp(1.5rem, 2.5vw + 0.75rem, 2.25rem);
    --bo-size-h3:  clamp(1.25rem, 1.5vw + 0.75rem, 1.5rem);
    --bo-size-body: 1rem;
    --bo-size-small: 0.875rem;
    --bo-size-caption: 0.75rem;

    --bo-line-tight: 1.15;
    --bo-line-body:  1.55;

    /* Spacing scale */
    --bo-space-1: 0.25rem;
    --bo-space-2: 0.5rem;
    --bo-space-3: 0.75rem;
    --bo-space-4: 1rem;
    --bo-space-5: 1.5rem;
    --bo-space-6: 2rem;
    --bo-space-7: 3rem;
    --bo-space-8: 4rem;

    /* Radius */
    --bo-radius-sm: 4px;
    --bo-radius:    8px;
    --bo-radius-lg: 14px;

    /* Shadows */
    --bo-shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --bo-shadow:    0 6px 20px rgba(0,0,0,0.45);

    /* Motion */
    --bo-transition-fast: 120ms ease;
    --bo-transition:      200ms ease;
}

/* --------------------------------------------------------------------- */
/* 2. Theme mode overrides                                               */
/* --------------------------------------------------------------------- */
:root[data-bo-theme="light"] {
    --bo-bg:              var(--bo-parchment);
    --bo-bg-surface:      #FBF8F1;
    --bo-bg-elevated:     #FFFFFF;
    --bo-border:          var(--bo-stone);
    --bo-text:            var(--bo-black-oak);
    --bo-text-muted:      #5A5548;
    --bo-text-faint:      #8A8578;
    --bo-accent:          var(--bo-moss);
    --bo-accent-hover:    var(--bo-forest-accent);
}

@media (prefers-color-scheme: light) {
    :root:not([data-bo-theme="dark"]):not([data-bo-theme="light"]) {
        --bo-bg:              var(--bo-parchment);
        --bo-bg-surface:      #FBF8F1;
        --bo-bg-elevated:     #FFFFFF;
        --bo-border:          var(--bo-stone);
        --bo-text:            var(--bo-black-oak);
        --bo-text-muted:      #5A5548;
        --bo-text-faint:      #8A8578;
        --bo-accent:          var(--bo-moss);
        --bo-accent-hover:    var(--bo-forest-accent);
    }
}

/* --------------------------------------------------------------------- */
/* 3. Reset and base                                                     */
/* --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    background: var(--bo-bg);
    color: var(--bo-text);
    font-family: var(--bo-font-body);
    font-size: var(--bo-size-body);
    line-height: var(--bo-line-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--bo-accent); text-decoration: none; transition: color var(--bo-transition-fast); }
a:hover, a:focus { color: var(--bo-accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--bo-accent); outline-offset: 2px; border-radius: var(--bo-radius-sm); }
hr { border: 0; border-top: 1px solid var(--bo-border); margin: var(--bo-space-6) 0; }

/* --------------------------------------------------------------------- */
/* 4. Typography                                                         */
/* --------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--bo-font-display);
    font-weight: 400;
    color: var(--bo-text);
    line-height: var(--bo-line-tight);
    margin: 0 0 var(--bo-space-4);
}
h1 { font-size: var(--bo-size-h1); }
h2 { font-size: var(--bo-size-h2); }
h3 { font-size: var(--bo-size-h3); }
h4 { font-size: 1.125rem; letter-spacing: 0.01em; }
p, ul, ol { margin: 0 0 var(--bo-space-4); }
small { font-size: var(--bo-size-small); color: var(--bo-text-muted); }
code, pre { font-family: var(--bo-font-mono); font-size: 0.9em; }

/* --------------------------------------------------------------------- */
/* 5. Layout primitives                                                  */
/* --------------------------------------------------------------------- */
.bo-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--bo-space-5); }
.bo-container--narrow { max-width: 720px; }
.bo-stack > * + * { margin-top: var(--bo-space-4); }
.bo-row { display: flex; flex-wrap: wrap; gap: var(--bo-space-4); }
.bo-grid { display: grid; gap: var(--bo-space-5); }
.bo-grid--products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* --------------------------------------------------------------------- */
/* 6. Forms                                                              */
/* --------------------------------------------------------------------- */
.bo-form { display: flex; flex-direction: column; gap: var(--bo-space-4); }
.bo-field { display: flex; flex-direction: column; gap: var(--bo-space-2); }
.bo-field__label { font-size: var(--bo-size-small); color: var(--bo-text-muted); letter-spacing: 0.02em; text-transform: uppercase; }
.bo-field__input, .bo-field__textarea, .bo-field__select {
    background: var(--bo-bg-elevated);
    color: var(--bo-text);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    padding: var(--bo-space-3) var(--bo-space-4);
    font: inherit;
    transition: border-color var(--bo-transition-fast), box-shadow var(--bo-transition-fast);
}
.bo-field__input:focus, .bo-field__textarea:focus, .bo-field__select:focus {
    outline: none;
    border-color: var(--bo-accent);
    box-shadow: 0 0 0 3px rgba(83,118,95,0.25);
}
.bo-field__textarea { min-height: 8rem; resize: vertical; }

/* --------------------------------------------------------------------- */
/* 7. Buttons                                                            */
/* --------------------------------------------------------------------- */
.bo-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: var(--bo-space-3) var(--bo-space-5);
    font: inherit; font-weight: 600;
    border-radius: var(--bo-radius);
    border: 1px solid transparent;
    background: var(--bo-bg-surface);
    color: var(--bo-text);
    cursor: pointer;
    transition: background var(--bo-transition-fast), color var(--bo-transition-fast), border-color var(--bo-transition-fast), transform var(--bo-transition-fast);
    text-decoration: none;
}
.bo-btn:hover, .bo-btn:focus { text-decoration: none; }
.bo-btn:active { transform: translateY(1px); }
.bo-btn--primary { background: var(--bo-accent); color: #FFFFFF; }
.bo-btn--primary:hover { background: var(--bo-accent-hover); color: #FFFFFF; }
.bo-btn--gold { background: var(--bo-gold); color: var(--bo-black-oak); }
.bo-btn--ghost { background: transparent; border-color: var(--bo-border); color: var(--bo-text); }
.bo-btn--ghost:hover { border-color: var(--bo-accent); color: var(--bo-accent); }
.bo-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* --------------------------------------------------------------------- */
/* 8. Alerts and callouts                                                */
/* --------------------------------------------------------------------- */
.bo-alert { padding: var(--bo-space-4); border-radius: var(--bo-radius); border: 1px solid var(--bo-border); background: var(--bo-bg-surface); }
.bo-alert--error   { border-color: var(--bo-error-red);     background: rgba(156,61,56,0.15);  color: var(--bo-text); }
.bo-alert--warning { border-color: var(--bo-alert-amber);   background: rgba(201,133,46,0.15); color: var(--bo-text); }
.bo-alert--success { border-color: var(--bo-success-green); background: rgba(62,108,81,0.18);  color: var(--bo-text); }

/* --------------------------------------------------------------------- */
/* 9. Storefront cards                                                   */
/* --------------------------------------------------------------------- */
.bo-card {
    background: var(--bo-bg-surface);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius-lg);
    padding: var(--bo-space-5);
    box-shadow: var(--bo-shadow-sm);
    transition: border-color var(--bo-transition), transform var(--bo-transition), box-shadow var(--bo-transition);
}
.bo-card:hover { border-color: var(--bo-accent); transform: translateY(-2px); box-shadow: var(--bo-shadow); }
.bo-card__title { font-family: var(--bo-font-display); font-size: 1.25rem; margin: 0 0 var(--bo-space-2); }
.bo-card__meta { color: var(--bo-text-muted); font-size: var(--bo-size-small); }

/* --------------------------------------------------------------------- */
/* 10. Admin console  Phase 21 rebuild in section 15 below                */
/* --------------------------------------------------------------------- */

/* --------------------------------------------------------------------- */
/* 11. Header, nav, footer                                               */
/* --------------------------------------------------------------------- */
.bo-header { background: var(--bo-bg-surface); border-bottom: 1px solid var(--bo-border); padding: var(--bo-space-4) 0; }
.bo-header__row { display: flex; align-items: center; justify-content: space-between; }
.bo-logo { display: inline-flex; align-items: center; gap: var(--bo-space-2); font-family: var(--bo-font-display); font-size: 1.5rem; color: var(--bo-text); text-decoration: none; }
.bo-logo__mark { display: block; flex: none; width: 2rem; height: 2rem; }
.bo-nav a { margin-left: var(--bo-space-5); color: var(--bo-text-muted); }
.bo-nav a:hover { color: var(--bo-text); }
/* Sign out is a POST form; its button reads as one of the nav links. */
.bo-nav__form { display: inline; margin: 0; }
.bo-nav__button { margin-left: var(--bo-space-5); padding: 0; border: 0; background: none; font: inherit; line-height: inherit; color: var(--bo-text-muted); cursor: pointer; }
.bo-nav__button:hover { color: var(--bo-text); }
.bo-footer { background: var(--bo-oak-bark); color: var(--bo-parchment); padding: var(--bo-space-6) 0; margin-top: var(--bo-space-8); }
.bo-footer__row { display: flex; flex-direction: column; gap: var(--bo-space-2); }

/* Auth screen */
.bo-auth-shell { min-height: 100vh; display: grid; place-items: center; padding: var(--bo-space-6); }
.bo-auth-card { width: 100%; max-width: 420px; background: var(--bo-bg-surface); border: 1px solid var(--bo-border); border-radius: var(--bo-radius-lg); padding: var(--bo-space-6); box-shadow: var(--bo-shadow); }
.bo-auth-title { text-align: center; margin-bottom: var(--bo-space-5); }

/* --------------------------------------------------------------------- */
/* 12. Utility helpers                                                   */
/* --------------------------------------------------------------------- */
.bo-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.bo-text-muted { color: var(--bo-text-muted); }
.bo-text-center { text-align: center; }
.bo-mt-6 { margin-top: var(--bo-space-6); }
.bo-mb-6 { margin-bottom: var(--bo-space-6); }
.bo-tabular { font-variant-numeric: tabular-nums lining-nums; }

/* --------------------------------------------------------------------- */
/* 13. Motion and reduced motion                                         */
/* --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------- */
/* 14. Responsive cascade  8 breakpoints, desktop down                   */
/* --------------------------------------------------------------------- */
@media (max-width: 1440px) {
    .bo-container { max-width: 1160px; }
}
@media (max-width: 1280px) {
    .bo-container { max-width: 1040px; }
}
@media (max-width: 1024px) {
    .bo-container { max-width: 960px; }
}
@media (max-width: 768px) {
    :root { --bo-size-body: 0.9375rem; }
    .bo-container { padding: 0 var(--bo-space-4); }
    .bo-header__row { flex-direction: column; gap: var(--bo-space-3); }
    .bo-nav a, .bo-nav__button { margin-left: 0; margin-right: var(--bo-space-4); }
}
@media (max-width: 600px) {
    .bo-grid--products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .bo-auth-card { padding: var(--bo-space-5); }
}
@media (max-width: 430px) {
    .bo-container { padding: 0 var(--bo-space-3); }
    .bo-card { padding: var(--bo-space-4); }
}
@media (max-width: 390px) {
    :root { --bo-size-body: 0.875rem; }
    .bo-btn { padding: var(--bo-space-3) var(--bo-space-4); }
}
@media (max-width: 375px) {
    .bo-grid--products { grid-template-columns: 1fr; }
}

/* Phase 9 additions */
.bo-fulfillment-banner {
    background: #F4EFE4;
    color: #3F2E15;
    border-bottom: 1px solid #E4D9C0;
    font-size: 0.9375rem;
    padding: var(--bo-space-3) 0;
    text-align: center;
}
.bo-badge {
    display: inline-block;
    background: var(--bo-color-surface-alt, #F5F1E8);
    color: var(--bo-color-text-muted, #6E5F42);
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
}
.bo-note-thread { display: flex; flex-direction: column; gap: var(--bo-space-3); }
.bo-note {
    padding: var(--bo-space-3) var(--bo-space-4);
    border-radius: var(--bo-radius-md, 8px);
    background: var(--bo-color-surface, #FFFCF3);
    border: 1px solid var(--bo-color-border, #E4D9C0);
}
.bo-note--internal { background: #FFF7DB; border-color: #F2E4A6; }
.bo-note--customer { background: #EEF5EE; border-color: #CBDCC7; }
.bo-note__meta { font-size: 0.8125rem; color: var(--bo-color-text-muted, #6E5F42); margin-bottom: 4px; }

/* --------------------------------------------------------------------- */
/* 15. Admin console v2  Phase 21                                        */
/* --------------------------------------------------------------------- */

/* =====================================================================
   Admin console v2  Phase 21
   Utilitarian admin scope. Applied via <body class="bo-admin"> on all
   /bo_admin*.php pages. Overrides typography to Inter, tightens
   spacing, adds sidebar layout, page header, form, table, and card
   components tuned for data-dense work.
   ===================================================================== */

body.bo-admin {
    color-scheme: light;
    --bo-admin-bg:            #F5F6F3;
    --bo-admin-surface:       #FFFFFF;
    --bo-admin-surface-2:     #FBFBF9;
    --bo-admin-elevated:      #FFFFFF;
    --bo-admin-border:        #E1E3DD;
    --bo-admin-border-strong: #C9CCC4;
    --bo-admin-text:          #1B1F1C;
    --bo-admin-text-muted:    #5A6058;
    --bo-admin-text-faint:    #5A6058;
    --bo-admin-accent:        #365043;
    --bo-admin-accent-hover:  #53765F;
    --bo-admin-danger:        #A3352B;
    --bo-admin-warn:          #875600;
    --bo-admin-success:       #28643E;
    --bo-admin-focus:         #365043;

    --bo-admin-radius-sm: 4px;
    --bo-admin-radius:    6px;
    --bo-admin-radius-lg: 10px;

    --bo-admin-sidebar-w:  240px;
    --bo-admin-sidebar-rail: 72px;

    background: var(--bo-admin-bg);
    color: var(--bo-admin-text);
    font-family: var(--bo-font-body);
    font-size: 0.9375rem;
    line-height: 1.5;
}

body.bo-admin h1, body.bo-admin h2, body.bo-admin h3, body.bo-admin h4 {
    font-family: var(--bo-font-body);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--bo-admin-text);
    margin: 0;
}
body.bo-admin h1 { font-size: 1.5rem; line-height: 1.25; }
body.bo-admin h2 { font-size: 1.125rem; line-height: 1.3; }
body.bo-admin h3 { font-size: 1rem; line-height: 1.35; }
body.bo-admin h4 { font-size: 0.875rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
body.bo-admin a { color: var(--bo-admin-accent); }
body.bo-admin a:hover, body.bo-admin a:focus { color: var(--bo-admin-accent-hover); }

/* ----- Layout ----- */
.bo-admin-layout {
    display: grid;
    grid-template-columns: var(--bo-admin-sidebar-w) 1fr;
    min-height: 100vh;
    background: var(--bo-admin-bg);
}
.bo-admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bo-admin-bg);
}

/* ----- Sidebar ----- */
.bo-admin-side {
    background: var(--bo-admin-surface);
    border-right: 1px solid var(--bo-admin-border);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.75rem;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.bo-admin-side__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 0.5rem 0.5rem;
    color: var(--bo-admin-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.005em;
    border-bottom: 1px solid var(--bo-admin-border);
}
.bo-admin-side__brand-mark {
    width: 1.5rem; height: 1.5rem; border-radius: 5px;
    background: linear-gradient(135deg, var(--bo-admin-accent), var(--bo-antique-gold));
    display: grid; place-items: center;
    color: #0F1311; font-weight: 800; font-size: 0.75rem;
}
.bo-admin-side__group { display: flex; flex-direction: column; gap: 0.125rem; }
.bo-admin-side__group-label {
    padding: 0.375rem 0.625rem 0.25rem;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bo-admin-text-faint);
    font-weight: 600;
}
.bo-admin-side__link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 0.625rem;
    border-radius: var(--bo-admin-radius);
    color: var(--bo-admin-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 120ms ease, color 120ms ease;
    line-height: 1.3;
}
.bo-admin-side__link:hover {
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text);
    text-decoration: none;
}
.bo-admin-side__link[aria-current="page"] {
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text);
    box-shadow: inset 2px 0 0 var(--bo-admin-accent);
}
.bo-admin-side__link-icon {
    width: 1rem; height: 1rem;
    color: currentColor;
    flex-shrink: 0;
    opacity: 0.85;
}
.bo-admin-side__footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bo-admin-border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--bo-admin-text-muted);
}
.bo-admin-side__footer-email {
    padding: 0 0.625rem;
    color: var(--bo-admin-text);
    font-weight: 500;
    word-break: break-all;
}
.bo-admin-side__signout {
    display: block;
    padding: 0.4375rem 0.625rem;
    border-radius: var(--bo-admin-radius);
    color: var(--bo-admin-text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
}
.bo-admin-side__signout:hover { background: var(--bo-admin-surface-2); color: var(--bo-admin-danger); text-decoration: none; }

/* ----- Mobile drawer ----- */
.bo-admin-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bo-admin-surface);
    border-bottom: 1px solid var(--bo-admin-border);
    position: sticky;
    top: 0;
    z-index: 40;
}
.bo-admin-topbar__brand { color: var(--bo-admin-text); text-decoration: none; font-weight: 700; }
.bo-admin-topbar__toggle {
    background: transparent;
    border: 1px solid var(--bo-admin-border-strong);
    color: var(--bo-admin-text);
    padding: 0.4375rem 0.625rem;
    border-radius: var(--bo-admin-radius);
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
}
.bo-admin-topbar__toggle:hover { background: var(--bo-admin-surface-2); }
.bo-admin-side__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 45;
}

/* ----- Page container ----- */
.bo-admin-page {
    padding: 1.5rem 2rem 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
.bo-admin-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bo-admin-border);
    flex-wrap: wrap;
}
.bo-admin-page__title-block { min-width: 0; }
.bo-admin-page__crumbs {
    display: flex;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--bo-admin-text-faint);
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}
.bo-admin-page__crumbs a { color: var(--bo-admin-text-muted); }
.bo-admin-page__crumbs a:hover { color: var(--bo-admin-text); text-decoration: none; }
.bo-admin-page__crumbs span[aria-current] { color: var(--bo-admin-text); }
.bo-admin-page__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
.bo-admin-page__subtitle { color: var(--bo-admin-text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.bo-admin-page__actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.bo-admin-page__section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bo-admin-text-muted);
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
}
.bo-admin-page__section-title:first-child { margin-top: 0; }

/* ----- Metric tiles ----- */
.bo-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.bo-metric {
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius);
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    transition: border-color 120ms ease;
}
.bo-metric:hover { border-color: var(--bo-admin-border-strong); }
.bo-metric__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bo-admin-text-muted);
    font-weight: 600;
}
.bo-metric__value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bo-admin-text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums lining-nums;
    line-height: 1.2;
}
.bo-metric__meta {
    font-size: 0.8125rem;
    color: var(--bo-admin-text-muted);
}
.bo-metric__meta a { color: var(--bo-admin-accent); }

/* ----- Cards ----- */
.bo-admin-card {
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius);
    padding: 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}
.bo-admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bo-admin-border);
    margin: -0.25rem 0 0;
}
.bo-admin-card__title { font-size: 0.9375rem; font-weight: 600; color: var(--bo-admin-text); margin: 0; }
.bo-admin-card__body { display: flex; flex-direction: column; gap: 1rem; }
.bo-admin-card--danger { border-color: rgba(200, 97, 85, 0.35); background: rgba(200, 97, 85, 0.05); }
.bo-admin-card--danger .bo-admin-card__title { color: var(--bo-admin-danger); }

.bo-admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}
.bo-admin-card-grid > .bo-admin-card { margin-bottom: 0; }
.bo-admin-card-grid--wide { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }

/* ----- Forms ----- */
.bo-admin-form { display: flex; flex-direction: column; gap: 1rem; }
.bo-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem 1.25rem;
    align-items: end;
}
.bo-admin-form-grid--fixed-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bo-admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.bo-admin-field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.bo-admin-field--full { grid-column: 1 / -1; }
.bo-admin-field__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bo-admin-text-muted);
    letter-spacing: 0.005em;
}
.bo-admin-field__hint { font-size: 0.75rem; color: var(--bo-admin-text-faint); }
.bo-admin-field__error { font-size: 0.75rem; color: var(--bo-admin-danger); }

.bo-admin-input,
.bo-admin-select,
.bo-admin-textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text);
    border: 1px solid var(--bo-admin-border-strong);
    border-radius: var(--bo-admin-radius);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.bo-admin-textarea { min-height: 6.5rem; resize: vertical; }
.bo-admin-input:hover,
.bo-admin-select:hover,
.bo-admin-textarea:hover { border-color: var(--bo-admin-text-faint); }
.bo-admin-input:focus,
.bo-admin-select:focus,
.bo-admin-textarea:focus {
    outline: none;
    border-color: var(--bo-admin-focus);
    box-shadow: 0 0 0 3px rgba(109, 169, 133, 0.22);
}
.bo-admin-input[disabled],
.bo-admin-select[disabled],
.bo-admin-textarea[disabled] { opacity: 0.55; cursor: not-allowed; }
.bo-admin-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23A2A79E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1.5l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 12px 8px;
    padding-right: 2rem;
}
/* Type-ahead picker over a native select (admin order items). The list is
   fixed-position so the table wrapper's overflow does not clip it. */
.bo-admin-combo { min-width: 22rem; }
.bo-admin-combo__list {
    position: fixed; z-index: 60; margin: 0; padding: 0.25rem; list-style: none;
    max-height: 20rem; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border-strong);
    border-radius: var(--bo-admin-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.bo-admin-combo__list[hidden] { display: none; }
.bo-admin-combo__option {
    padding: 0.4375rem 0.625rem; border-radius: var(--bo-admin-radius-sm);
    color: var(--bo-admin-text); font-size: 0.875rem; line-height: 1.35; cursor: pointer;
}
.bo-admin-combo__option:hover { background: var(--bo-admin-surface-2); }
.bo-admin-combo__option[aria-selected="true"] { background: var(--bo-admin-accent); color: #fff; }
.bo-admin-combo__note { padding: 0.4375rem 0.625rem; color: var(--bo-admin-text-muted); font-size: 0.8125rem; }
@media (max-width: 600px) { .bo-admin-combo { min-width: 16rem; } }
.bo-admin-field .bo-admin-combo { min-width: 0; }

/* New admin order: item lines, price notes and the totals summary. */
.bo-admin-order-items { margin-bottom: 0.75rem; }
.bo-admin-table thead th.bo-admin-table__num { text-align: right; }
.bo-admin-order-items__qty { width: 5.5rem; }
.bo-admin-order-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 0 0 0.875rem; padding: 0; border: 0; }
.bo-admin-order-choice > legend { float: left; margin-right: 0.25rem; padding: 0; }
.bo-admin-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0.75rem; align-items: start; }
.bo-admin-order-discounts { margin: 1.25rem 0 0; padding: 1rem 0 0; border: 0; border-top: 1px solid var(--bo-admin-border); }
.bo-admin-order-discounts > legend { float: left; width: 100%; margin: 0 0 0.75rem; padding: 0; }
.bo-admin-order-discounts > legend + * { clear: both; }
.bo-admin-order-grid--narrow { max-width: 22rem; }
.bo-admin-order-discounts__rule { margin: 0.875rem 0 0; }
.bo-admin-input.bo-admin-input--error { border-color: var(--bo-admin-danger); }
.bo-admin-field__hint.bo-admin-field__hint--error { color: var(--bo-admin-danger); }
.bo-admin-order-warning {
    max-width: 22rem; margin: 0.75rem 0 0 auto; padding: 0.5rem 0.75rem; border-radius: var(--bo-admin-radius);
    border: 1px solid rgba(214, 155, 74, 0.45); background: rgba(214, 155, 74, 0.1); color: var(--bo-admin-warn); font-size: 0.8125rem;
}
.bo-admin-order-warning[hidden] { display: none; }
.bo-admin-order-summary { display: grid; gap: 0.375rem; max-width: 22rem; margin: 1rem 0 0 auto; }
.bo-admin-order-summary > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.875rem; }
.bo-admin-order-summary dt { color: var(--bo-admin-text-muted); }
.bo-admin-order-summary dd { margin: 0; color: var(--bo-admin-text); font-variant-numeric: tabular-nums; }
.bo-admin-order-summary__total { margin-top: 0.25rem; padding-top: 0.5rem; border-top: 1px solid var(--bo-admin-border); font-weight: 600; }
.bo-admin-order-summary__total dt { color: var(--bo-admin-text); }
/* Phones: each item line becomes a card instead of a sideways-scrolling table. */
@media (max-width: 700px) {
    .bo-admin-order-items .bo-admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .bo-admin-order-items .bo-admin-table, .bo-admin-order-items .bo-admin-table tbody { display: block; }
    .bo-admin-order-items .bo-admin-table tr {
        display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem 0.75rem;
        padding: 0.875rem; border-bottom: 1px solid var(--bo-admin-border);
    }
    .bo-admin-order-items .bo-admin-table tr:last-child { border-bottom: 0; }
    .bo-admin-order-items .bo-admin-table td { display: block; padding: 0; border: 0; text-align: left; }
    .bo-admin-order-items .bo-admin-table td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: 0.25rem;
        font-family: var(--bo-font-body); font-size: 0.75rem; font-weight: 600; color: var(--bo-admin-text-muted);
    }
    .bo-admin-order-items .bo-admin-table td:first-child { grid-column: 1 / -1; }
    .bo-admin-order-items .bo-admin-table td:last-child { align-self: end; justify-self: end; }
    .bo-admin-order-items .bo-admin-combo { min-width: 0; }
    .bo-admin-order-items__qty { width: 100%; }
    .bo-admin-order-items .bo-admin-table td[data-item-unit], .bo-admin-order-items .bo-admin-table td[data-item-total] { font-size: 0.9375rem; }
    .bo-admin-order-summary, .bo-admin-order-warning { max-width: none; }
}
.bo-admin-checkbox, .bo-admin-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--bo-admin-text);
    cursor: pointer;
}
.bo-admin-checkbox input, .bo-admin-radio input {
    width: 1rem; height: 1rem;
    accent-color: var(--bo-admin-accent);
    margin: 0;
}

/* ----- Buttons ----- */
body.bo-admin .bo-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text);
    border: 1px solid var(--bo-admin-border-strong);
    border-radius: var(--bo-admin-radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    white-space: nowrap;
}
body.bo-admin .bo-admin-btn:hover, body.bo-admin .bo-admin-btn:focus { background: var(--bo-admin-elevated); border-color: var(--bo-admin-text-faint); text-decoration: none; color: var(--bo-admin-text); }
body.bo-admin .bo-admin-btn:active { transform: translateY(1px); }
body.bo-admin .bo-admin-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
body.bo-admin .bo-admin-btn--primary { background: var(--bo-admin-accent); color: #FFFFFF; border-color: var(--bo-admin-accent); }
body.bo-admin .bo-admin-btn--primary:hover, body.bo-admin .bo-admin-btn--primary:focus { background: var(--bo-admin-accent-hover); border-color: var(--bo-admin-accent-hover); color: #FFFFFF; }
body.bo-admin .bo-admin-btn--danger { background: transparent; color: var(--bo-admin-danger); border-color: rgba(200, 97, 85, 0.5); }
body.bo-admin .bo-admin-btn--danger:hover, body.bo-admin .bo-admin-btn--danger:focus { background: var(--bo-admin-danger); color: #FFFFFF; border-color: var(--bo-admin-danger); }
body.bo-admin .bo-admin-btn--ghost { background: transparent; border-color: transparent; color: var(--bo-admin-text-muted); }
body.bo-admin .bo-admin-btn--ghost:hover, body.bo-admin .bo-admin-btn--ghost:focus { background: var(--bo-admin-surface-2); color: var(--bo-admin-text); }
body.bo-admin .bo-admin-btn--sm { padding: 0.3125rem 0.625rem; font-size: 0.8125rem; }
body.bo-admin .bo-admin-btn--icon { padding: 0.4375rem; }

.bo-admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ----- Tables ----- */
.bo-admin-table-wrap {
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.bo-admin-table-wrap__scroll { overflow-x: auto; position: relative; } /* keeps visually hidden header text inside the scroller */
.bo-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.bo-admin-table thead th {
    text-align: left;
    padding: 0.625rem 1rem;
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--bo-admin-border);
    white-space: nowrap;
}
.bo-admin-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bo-admin-border);
    color: var(--bo-admin-text);
    vertical-align: middle;
}
.bo-admin-table tbody tr:last-child td { border-bottom: 0; }
.bo-admin-table tbody tr:hover td { background: var(--bo-admin-surface-2); }
.bo-admin-table__num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.bo-admin-table__actions { text-align: right; white-space: nowrap; }
.bo-admin-table__muted { color: var(--bo-admin-text-muted); }
.bo-admin-table__link { color: var(--bo-admin-accent); font-weight: 500; }
.bo-admin-table__empty { padding: 2.5rem 1rem; text-align: center; color: var(--bo-admin-text-muted); font-size: 0.9375rem; }

/* ----- Badges ----- */
.bo-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.1875rem 0.5rem;
    background: var(--bo-admin-surface-2);
    color: var(--bo-admin-text-muted);
    border: 1px solid var(--bo-admin-border-strong);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}
.bo-admin-badge--success { background: rgba(90, 156, 116, 0.14); color: var(--bo-admin-success); border-color: rgba(90, 156, 116, 0.35); }
.bo-admin-badge--warn    { background: rgba(214, 155, 74, 0.14); color: var(--bo-admin-warn); border-color: rgba(214, 155, 74, 0.35); }
.bo-admin-badge--danger  { background: rgba(200, 97, 85, 0.14); color: var(--bo-admin-danger); border-color: rgba(200, 97, 85, 0.35); }
.bo-admin-badge--info    { background: rgba(109, 169, 133, 0.14); color: var(--bo-admin-accent); border-color: rgba(109, 169, 133, 0.35); }
.bo-admin-badge--muted   { background: var(--bo-admin-surface-2); color: var(--bo-admin-text-faint); }
.bo-admin-badge--dot::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ----- Alerts ----- */
.bo-admin-alert {
    padding: 0.75rem 1rem;
    border: 1px solid var(--bo-admin-border-strong);
    border-radius: var(--bo-admin-radius);
    background: var(--bo-admin-surface);
    color: var(--bo-admin-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}
.bo-admin-alert--success { border-color: rgba(90, 156, 116, 0.4); background: rgba(90, 156, 116, 0.08); }
.bo-admin-alert--warn    { border-color: rgba(214, 155, 74, 0.4); background: rgba(214, 155, 74, 0.08); }
.bo-admin-alert--danger  { border-color: rgba(200, 97, 85, 0.4); background: rgba(200, 97, 85, 0.08); }

/* ----- Filter/toolbar row ----- */
.bo-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: end;
    padding: 0.875rem 1rem;
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius);
    margin-bottom: 1rem;
}
.bo-admin-toolbar .bo-admin-field { flex: 1 1 180px; }
.bo-admin-toolbar__actions { display: flex; gap: 0.5rem; margin-left: auto; }

/* ----- Pagination ----- */
.bo-admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius);
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--bo-admin-text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.bo-admin-pagination__links { display: flex; gap: 0.375rem; }

/* ----- Description list ----- */
.bo-admin-dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem 1rem;
    margin: 0;
}
@media (min-width: 640px) {
    .bo-admin-dl { grid-template-columns: max-content 1fr; }
}
.bo-admin-dl dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bo-admin-text-muted);
    font-weight: 600;
    padding-top: 0.125rem;
}
.bo-admin-dl dd { margin: 0; color: var(--bo-admin-text); font-size: 0.875rem; line-height: 1.5; word-break: break-word; }

/* ----- Auth login card ----- */
.bo-admin-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: var(--bo-admin-bg);
}
.bo-admin-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border);
    border-radius: var(--bo-admin-radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ----- Utility ----- */
.bo-admin-hidden { display: none !important; }
.bo-admin-inline-form { display: inline; }
.bo-admin-mono { font-family: var(--bo-font-mono); font-size: 0.8125rem; }
.bo-admin-nowrap { white-space: nowrap; }

/* ----- Responsive ----- */
.bo-admin-side__close { display: none; }
@media (max-width: 900px) {
    .bo-admin-layout { grid-template-columns: 1fr; }
    .bo-admin-side {
        position: static;
        width: 100%;
        height: auto;
    }
    .bo-admin-layout[data-drawer-ready] .bo-admin-topbar { display: flex; }
    .bo-admin-layout[data-drawer-ready] .bo-admin-side {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: min(280px, 84vw);
        z-index: 50;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 200ms ease;
        height: 100vh;
    }
    .bo-admin-layout[data-drawer-ready] .bo-admin-side__close { display: inline-flex; }
    .bo-admin-layout[data-drawer="open"] .bo-admin-side { transform: translateX(0); visibility: visible; }
    .bo-admin-side { overscroll-behavior: contain; }
    .bo-admin-layout[data-drawer="open"] .bo-admin-side__backdrop { display: block; }
    .bo-admin-page { padding: 1rem 1rem 3rem; }
    .bo-admin-page__header { padding-bottom: 0.75rem; margin-bottom: 1rem; }
    .bo-admin-form-grid--fixed-2 { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .bo-admin-page { padding: 1.5rem; }
}
@media (max-width: 600px) {
    body.bo-admin { font-size: 0.9375rem; }
    .bo-admin-page__header { flex-direction: column; align-items: flex-start; }
    .bo-admin-page__actions { width: 100%; }
    .bo-admin-toolbar { padding: 0.75rem; }
    .bo-admin-card { padding: 1rem; }
}

/* --------------------------------------------------------------------- */
/* 15b. Admin console follow-up helpers                                  */
/* --------------------------------------------------------------------- */
.bo-admin-card__note { color: var(--bo-admin-text-muted); font-size: 0.8125rem; line-height: 1.55; margin: 0.5rem 0 0.875rem; }
.bo-admin-card__meta { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-admin-card__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--bo-admin-border); }
.bo-admin-card__actions form { margin: 0; }
.bo-admin-card--danger { border-color: rgba(200, 97, 85, 0.35); }
.bo-admin-card--danger .bo-admin-card__title { color: var(--bo-admin-danger); }
.bo-admin-empty { padding: 1.5rem; text-align: center; color: var(--bo-admin-text-muted); background: var(--bo-admin-surface); border: 1px dashed var(--bo-admin-border); border-radius: 10px; }
.bo-admin-form__actions { display: flex; gap: 0.5rem; margin-top: 1rem; padding-top: 0.875rem; border-top: 1px solid var(--bo-admin-border); flex-wrap: wrap; }

/* --------------------------------------------------------------------- */
/* 15c. More helpers  inline fields, form grid columns                   */
/* --------------------------------------------------------------------- */
.bo-admin-field--inline { display: flex; align-items: center; gap: 0.5rem; }
.bo-admin-field--inline .bo-admin-field__label { margin: 0; white-space: nowrap; font-size: 0.75rem; }
.bo-admin-field--inline .bo-admin-input { width: auto; min-width: 140px; }
.bo-admin-field--full { grid-column: 1 / -1; }
.bo-admin-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bo-admin-field[hidden] { display: none; }
.bo-admin-coupon-carriers { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.bo-admin-coupon-carriers > legend { margin-bottom: 0.25rem; padding: 0; }
.bo-admin-coupon-form .bo-admin-field { align-self: start; }
@media (max-width: 640px) { .bo-admin-form-grid--2 { grid-template-columns: 1fr; } }
.bo-admin-check { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--bo-admin-text); font-size: 0.875rem; cursor: pointer; }
.bo-admin-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--bo-admin-accent); }

/* -----------------------------------------------------------------
   Section 15d, Admin utility helpers (Phase 21)
   ----------------------------------------------------------------- */
.bo-admin .bo-admin-page-inner { display: block; }
.bo-admin .bo-admin-mt-3 { margin-top: 0.75rem; }
.bo-admin .bo-admin-mt-4 { margin-top: 1rem; }
.bo-admin .bo-admin-mt-5 { margin-top: 1.5rem; }

/* Note thread */
.bo-admin .bo-note-thread { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.75rem; }
.bo-admin .bo-note { background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border); border-radius: 6px; padding: 0.75rem 0.875rem; }
.bo-admin .bo-note--internal { border-left: 3px solid var(--bo-admin-warn); }
.bo-admin .bo-note--customer { border-left: 3px solid var(--bo-admin-accent); }
.bo-admin .bo-note__meta { font-size: 0.75rem; color: var(--bo-admin-text-muted); margin-bottom: 0.375rem; }

/* -----------------------------------------------------------------
   Section 16, Retail landing (Phase 22)
   Hero, trust strip, sections, steps, why cards, RUO band. Public
   surfaces only. Admin styles are untouched.
   ----------------------------------------------------------------- */

/* Hero */
.bo-hero {
    background: linear-gradient(180deg, rgba(17,21,18,1) 0%, rgba(29,33,29,1) 100%);
    border-bottom: 1px solid var(--bo-border);
    padding: var(--bo-space-8) var(--bo-space-5);
}
.bo-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--bo-space-8);
    align-items: start;
}
.bo-hero__eyebrow {
    font-family: var(--bo-font-mono);
    font-size: var(--bo-size-caption);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bo-gold);
    margin: 0 0 var(--bo-space-3);
}
.bo-hero__title {
    font-family: var(--bo-font-display);
    font-size: var(--bo-size-h1);
    line-height: 1.1;
    margin: 0 0 var(--bo-space-4);
    color: var(--bo-text);
}
.bo-hero__lede {
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--bo-text-muted);
    margin: 0 0 var(--bo-space-5);
    max-width: 60ch;
}
.bo-hero__points {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--bo-space-6);
    display: grid;
    gap: var(--bo-space-3);
}
.bo-hero__points li {
    padding-left: var(--bo-space-5);
    position: relative;
    color: var(--bo-text);
    line-height: 1.5;
}
.bo-hero__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--bo-accent);
}
.bo-hero__ctas { margin: 0; display: flex; gap: var(--bo-space-3); flex-wrap: wrap; }

.bo-hero__card {
    background: var(--bo-bg-surface);
    border: 1px solid var(--bo-border);
    border-radius: 10px;
    padding: var(--bo-space-6);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.bo-hero__card-title {
    font-family: var(--bo-font-display);
    font-size: 1.5rem;
    margin: 0 0 var(--bo-space-2);
    color: var(--bo-text);
}
.bo-hero__card-lede {
    color: var(--bo-text-muted);
    margin: 0 0 var(--bo-space-5);
    font-size: var(--bo-size-small);
}
.bo-hero__card-alt {
    margin: var(--bo-space-4) 0 0;
    text-align: center;
    color: var(--bo-text-muted);
    font-size: var(--bo-size-small);
}
.bo-btn--block { display: block; width: 100%; text-align: center; }

@media (max-width: 900px) {
    .bo-hero__inner { grid-template-columns: 1fr; gap: var(--bo-space-6); }
    .bo-hero { padding: var(--bo-space-6) var(--bo-space-4); }
}

/* Trust strip */
.bo-trust-strip {
    background: var(--bo-bg-surface);
    border-bottom: 1px solid var(--bo-border);
    padding: var(--bo-space-5) var(--bo-space-5);
}
.bo-trust-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bo-space-5);
    text-align: center;
}
.bo-trust-strip__value {
    font-family: var(--bo-font-display);
    font-size: 2rem;
    color: var(--bo-gold);
    line-height: 1;
    margin-bottom: var(--bo-space-2);
}
.bo-trust-strip__label {
    font-size: var(--bo-size-small);
    color: var(--bo-text-muted);
    line-height: 1.4;
}
@media (max-width: 720px) {
    .bo-trust-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bo-space-4); }
}

/* Section blocks */
.bo-section { padding: var(--bo-space-8) var(--bo-space-5); }
.bo-section--dark { background: var(--bo-bg-surface); border-top: 1px solid var(--bo-border); border-bottom: 1px solid var(--bo-border); }
.bo-section__title {
    font-family: var(--bo-font-display);
    font-size: var(--bo-size-h2);
    margin: 0 0 var(--bo-space-4);
    color: var(--bo-text);
}
.bo-section__title--center { text-align: center; }
.bo-section__lede {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--bo-text-muted);
    margin: 0 0 var(--bo-space-6);
    max-width: 65ch;
}
.bo-section__title--center + .bo-section__lede { margin-left: auto; margin-right: auto; text-align: center; }

/* Why cards */
.bo-why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bo-space-4);
}
.bo-why-card {
    background: var(--bo-bg-surface);
    border: 1px solid var(--bo-border);
    border-radius: 8px;
    padding: var(--bo-space-5);
}
.bo-why-card__title {
    font-family: var(--bo-font-display);
    font-size: 1.25rem;
    margin: 0 0 var(--bo-space-3);
    color: var(--bo-gold);
}
.bo-why-card p { margin: 0; color: var(--bo-text-muted); line-height: 1.55; }
@media (max-width: 800px) { .bo-why-grid { grid-template-columns: 1fr; } }

/* Steps */
.bo-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bo-space-5);
}
.bo-steps__item {
    background: var(--bo-bg-elevated);
    border: 1px solid var(--bo-border);
    border-radius: 8px;
    padding: var(--bo-space-5);
    position: relative;
}
.bo-steps__num {
    font-family: var(--bo-font-display);
    font-size: 2.5rem;
    line-height: 1;
    color: var(--bo-gold);
    margin-bottom: var(--bo-space-3);
}
.bo-steps__title {
    font-family: var(--bo-font-display);
    font-size: 1.125rem;
    margin: 0 0 var(--bo-space-2);
    color: var(--bo-text);
}
.bo-steps__item p { margin: 0; color: var(--bo-text-muted); font-size: var(--bo-size-small); line-height: 1.5; }
@media (max-width: 900px) { .bo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bo-steps { grid-template-columns: 1fr; } }

/* RUO band */
.bo-ruo-band {
    background: var(--bo-oak-bark);
    border-top: 1px solid var(--bo-border);
    padding: var(--bo-space-5);
    color: var(--bo-text-muted);
    font-size: var(--bo-size-small);
}
.bo-ruo-band strong { color: var(--bo-alert-amber); }

/* ------------------------------------------------------------------- */
/* Phase 22d . Dark-surface text pins                                  */
/* The landing hero, trust strip, section--dark, and RUO band all      */
/* use a dark background regardless of the visitor OS theme. Pin the   */
/* body text on those surfaces to the parchment palette so it never    */
/* renders dark on dark when the OS is in light mode.                  */
/* Nothing outside these public landing selectors is affected.         */
/* ------------------------------------------------------------------- */

.bo-hero { color: var(--bo-parchment); }
.bo-hero__title { color: var(--bo-parchment); }
.bo-hero__lede { color: var(--bo-stone); }
.bo-hero__points li { color: var(--bo-parchment); }
.bo-hero__points li strong { color: var(--bo-parchment); }

.bo-hero .bo-btn--ghost { color: var(--bo-parchment); border-color: var(--bo-stone); }
.bo-hero .bo-btn--ghost:hover,
.bo-hero .bo-btn--ghost:focus { color: var(--bo-accent); border-color: var(--bo-accent); }

.bo-trust-strip { color: var(--bo-parchment); background: var(--bo-oak-bark); }
.bo-trust-strip__label { color: var(--bo-stone); }

.bo-section--dark { background: var(--bo-black-oak); color: var(--bo-parchment); }
.bo-section--dark .bo-section__title { color: var(--bo-parchment); }
.bo-section--dark .bo-section__lede { color: var(--bo-stone); }
.bo-section--dark .bo-steps__item { background: var(--bo-oak-bark); border-color: rgba(213,208,196,0.15); }
.bo-section--dark .bo-steps__title { color: var(--bo-parchment); }
.bo-section--dark .bo-steps__item p { color: var(--bo-stone); }

.bo-ruo-band { background: var(--bo-oak-bark); color: var(--bo-stone); }
.bo-ruo-band strong { color: var(--bo-alert-amber); }

/* ------------------------------------------------------------------- */
/* Phase 22d . Dark-surface text pins                                  */
/* Pin body text on landing dark surfaces to the parchment palette so  */
/* they always render light on dark regardless of visitor OS theme.    */
/* ------------------------------------------------------------------- */

.bo-hero { color: var(--bo-parchment); }
.bo-hero__title { color: var(--bo-parchment); }
.bo-hero__lede { color: var(--bo-stone); }
.bo-hero__points li { color: var(--bo-parchment); }
.bo-hero__points li strong { color: var(--bo-parchment); }

.bo-hero .bo-btn--ghost { color: var(--bo-parchment); border-color: var(--bo-stone); }
.bo-hero .bo-btn--ghost:hover,
.bo-hero .bo-btn--ghost:focus { color: var(--bo-accent); border-color: var(--bo-accent); }

.bo-trust-strip { color: var(--bo-parchment); background: var(--bo-oak-bark); }
.bo-trust-strip__label { color: var(--bo-stone); }

.bo-section--dark { background: var(--bo-black-oak); color: var(--bo-parchment); }
.bo-section--dark .bo-section__title { color: var(--bo-parchment); }
.bo-section--dark .bo-section__lede { color: var(--bo-stone); }
.bo-section--dark .bo-steps__item { background: var(--bo-oak-bark); border-color: rgba(213,208,196,0.15); }
.bo-section--dark .bo-steps__title { color: var(--bo-parchment); }
.bo-section--dark .bo-steps__item p { color: var(--bo-stone); }

.bo-ruo-band { background: var(--bo-oak-bark); color: var(--bo-stone); }
.bo-ruo-band strong { color: var(--bo-alert-amber); }

/* ------------------------------------------------------------------- */
/* Phase 22e . Footer 4-column grid                                    */
/* Replaces the previous single-row link soup with a proper column     */
/* layout. Shop, Support, Legal, Company columns. Bottom bar carries   */
/* the RUO note on the left and the copyright on the right.            */
/* ------------------------------------------------------------------- */

.bo-footer {
    background: var(--bo-oak-bark);
    color: var(--bo-parchment);
    padding: var(--bo-space-7) 0 var(--bo-space-5);
    margin-top: var(--bo-space-8);
    border-top: 1px solid rgba(213,208,196,0.12);
}
.bo-footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--bo-space-6);
}
.bo-footer__cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bo-space-6);
}
.bo-footer__col { min-width: 0; }
.bo-footer__heading {
    font-family: var(--bo-font-mono);
    font-size: var(--bo-size-caption);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bo-gold);
    margin: 0 0 var(--bo-space-3);
    font-weight: 600;
}
.bo-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--bo-space-2);
}
.bo-footer__link {
    color: var(--bo-parchment);
    text-decoration: none;
    font-size: var(--bo-size-small);
    line-height: 1.5;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.bo-footer__link:hover,
.bo-footer__link:focus {
    color: var(--bo-accent);
    border-bottom-color: var(--bo-accent);
    outline: none;
}
.bo-footer__bar {
    border-top: 1px solid rgba(213,208,196,0.12);
    padding-top: var(--bo-space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--bo-space-4);
    flex-wrap: wrap;
}
.bo-footer__ruo {
    margin: 0;
    color: var(--bo-stone);
    font-size: var(--bo-size-small);
    max-width: 60ch;
}
.bo-footer__copy {
    margin: 0;
    color: var(--bo-stone);
    font-size: var(--bo-size-small);
    font-family: var(--bo-font-mono);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .bo-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bo-space-5); }
}
@media (max-width: 520px) {
    .bo-footer__cols { grid-template-columns: 1fr; }
    .bo-footer__bar { flex-direction: column; align-items: flex-start; }
}

/* Unified parent / strength / purchase editor. Existing brand tokens retained. */
.bo-unified-strength, .bo-unified-option {
    min-width: 0;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--bo-border, #d4d0c9);
    border-radius: 6px;
}
.bo-unified-strength > legend, .bo-unified-option > legend { padding: 0 .5rem; font-weight: 600; }
.bo-unified-option .bo-admin-field { min-width: 0; }
.bo-unified-option input, .bo-unified-option textarea, .bo-unified-option select { max-width: 100%; }
.bo-unified-save { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.bo-unified-preview { margin: 0; max-width: 50rem; overflow-wrap: anywhere; }
.bo-unified-preview dt { font-weight: 600; }
.bo-unified-preview dd { margin: 0 0 .65rem; white-space: pre-wrap; }
.bo-store-choice[hidden], [data-add-option][hidden] { display: none; }
#bo-strength { width: 100%; max-width: 100%; }
@media (max-width: 640px) {
    .bo-unified-strength, .bo-unified-option { padding: .75rem; }
    #unified-product-form .bo-admin-form-grid { grid-template-columns: minmax(0, 1fr); }
    .bo-unified-save > * { width: 100%; text-align: center; }
}
.bo-admin-btn[data-add-option][hidden] { display: none; }
/* Square payment page only. Existing storefront palette and typography are retained. */
.bo-square-page { padding-block: clamp(2rem,5vw,4rem); }
.bo-square-back { display:inline-block; margin-bottom:1.5rem; }
.bo-square-heading { max-width:44rem; margin-bottom:2rem; }
.bo-square-heading h1 { margin-block:.5rem 1rem; }
.bo-square-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:2rem; align-items:start; }
.bo-square-form-card,.bo-square-summary { padding:clamp(1.25rem,3vw,2rem); min-width:0; }
.bo-square-form-card h2,.bo-square-summary h2 { margin-top:0; font-size:1.4rem; }
.bo-square-check { display:flex; gap:.7rem; align-items:center; padding-block:1rem; cursor:pointer; }
.bo-square-check input { width:1.1rem; height:1.1rem; flex:none; }
.bo-square-billing { border:0; padding:0; margin:1rem 0; display:grid; grid-template-columns:1fr 1fr; gap:1rem; min-width:0; }
.bo-square-billing[hidden] { display:none; }
.bo-square-billing legend { padding-bottom:1rem; font-weight:600; }
.bo-square-billing label { display:flex; flex-direction:column; gap:.4rem; min-width:0; font-size:.9rem; }
.bo-square-billing input { width:100%; box-sizing:border-box; min-height:44px; font-size:1rem; }
#bo-square-card { margin-top:1.2rem; min-height:100px; }
.bo-square-status { min-height:3em; line-height:1.5; overflow-wrap:anywhere; }
.bo-square-status:focus { outline:2px solid currentColor; outline-offset:4px; }
#bo-square-pay,#bo-square-refresh { width:100%; margin-top:.75rem; min-height:48px; }
#bo-square-pay:disabled { opacity:.65; cursor:not-allowed; }
.bo-square-note { font-size:.8rem; line-height:1.6; margin-top:1.25rem; }
.bo-square-line { display:flex; justify-content:space-between; gap:1rem; padding:1rem 0; border-bottom:1px solid var(--bo-border, #b9b2a644); }
.bo-square-line span { display:block; font-size:.85rem; margin-top:.35rem; }
.bo-square-line>strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.bo-square-totals { margin:1.5rem 0; }
.bo-square-totals>div { display:flex; justify-content:space-between; gap:1rem; padding:.4rem 0; }
.bo-square-totals dd { margin:0; font-variant-numeric:tabular-nums; }
.bo-square-totals .bo-square-total { font-weight:700; border-top:1px solid var(--bo-border,#b9b2a644); padding-top:1rem; margin-top:.5rem; font-size:1.15rem; }
@media(max-width:800px) { .bo-square-grid { grid-template-columns:1fr; gap:1.25rem; } }
@media(max-width:420px) { .bo-square-billing { grid-template-columns:1fr; } }

/* Phase 1: focus-visible skip navigation and a single responsive cart form. */
.bo-skip-link {
    position: fixed; top: .75rem; left: .75rem; z-index: 1000;
    padding: .75rem 1rem; background: #fff; color: #111;
    border: 2px solid #111; border-radius: .25rem;
    transform: translateY(-200%); clip-path: inset(50%); font-weight: 600;
    transition: none;
}
.bo-skip-link:focus { transform: translateY(0); clip-path: none; outline: 3px solid #916c24; outline-offset: 2px; }
body.bo-admin a.bo-skip-link:focus { color: #111; }
#bo-apply-strength[hidden] { display: none; }
.bo-admin-topbar__toggle,.bo-admin-side__close { min-height: 44px; min-width: 44px; }
body.bo-admin .bo-admin-side__close {
    color: var(--bo-admin-text); background: var(--bo-admin-surface);
    border-color: var(--bo-admin-border);
}
body.bo-admin .bo-admin-side__close:hover,
body.bo-admin .bo-admin-side__close:focus {
    color: var(--bo-admin-text); background: var(--bo-admin-surface-2);
}
@media (prefers-reduced-motion: reduce) {
    .bo-admin-layout[data-drawer-ready] .bo-admin-side { transition: none; }
}
.bo-cart-line-controls { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.bo-cart-line-controls .bo-btn,.bo-cart-line-controls input { min-height: 44px; }
.bo-cart-field-error { flex-basis: 100%; color: var(--bo-text); font-size: .875rem; }
.bo-cart-form [aria-invalid="true"] { outline: 2px solid #b3261e; outline-offset: 2px; }
#bo-option-controls { display: grid; gap: .65rem; }
#bo-strength-form { margin-bottom: 1rem; }
@media (max-width: 768px) {
    .bo-cart-form .bo-store-cart-scroll { overflow: visible; }
    .bo-cart-form .bo-cart-table { min-width: 0; }
    .bo-cart-table thead {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip-path: inset(50%); white-space: nowrap;
    }
    .bo-cart-table,.bo-cart-table tbody,.bo-cart-table tfoot { display: block; width: 100%; }
    .bo-cart-table tr { display: grid; grid-template-columns: minmax(0,1fr); padding: 1rem 0; }
    .bo-cart-table td { display: block; padding: .4rem 0 !important; text-align: left !important; overflow-wrap: anywhere; }
    .bo-cart-table td[data-label]::before { content: attr(data-label); display: inline-block; margin-right: .75rem; font-weight: 600; }
    .bo-cart-table .bo-cart-line-controls { margin-top: .4rem; }
    .bo-cart-form > .bo-row { display: flex; flex-wrap: wrap; gap: .75rem; }
}

/* Reporting: existing admin tokens and components, scoped to report surfaces. */
.bo-report-filters { margin-bottom: 1.25rem; }
.bo-report-filters .bo-admin-toolbar { flex-wrap: wrap; align-items: end; gap: .75rem; }
.bo-report-filters label { display: inline-flex; flex-direction: column; gap: .35rem; }
.bo-report-filters fieldset { margin-top: 1rem; padding: .75rem; border: 1px solid var(--bo-border, #d1d5db); }
.bo-report-filters fieldset label { flex-direction: row; align-items: center; margin: .35rem .75rem .35rem 0; }
.bo-report-options { max-height: 18rem; overflow: auto; display: grid; gap: .25rem; }
.bo-report-filters .bo-ref-picker { background:#fff;color:#333;border:1px solid #e5e7eb;border-radius:8px;padding:12px 14px; }
.bo-ref-picker-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr));gap:10px; }
.bo-ref-compound { border:1px solid #e5e7eb;border-radius:6px;padding:8px 10px;min-width:0; }
.bo-ref-children { margin-top:4px;padding-left:18px;display:flex;flex-direction:column;gap:2px; }
.bo-report-filters .bo-ref-picker label { font-size:12px;color:#333; }
.bo-report-filters .bo-ref-picker .bo-admin-btn { background:#fff;color:#111;border:1px solid #d1d5db;margin:6px 0; }
.bo-report-filters .bo-ref-picker legend { color:#333;background:#fff;font-size:14px;font-weight:bold; }
.bo-report-filters .bo-ref-picker .bo-admin-toolbar { background:#fff;border:0;padding:4px 0; }
.bo-report-section { margin: 1.25rem 0; }
.bo-report-section h2,.bo-report-delivery h2 { font-size: 1rem; margin: 1rem 0 .5rem; }
.bo-report-address { white-space: pre-line; overflow-wrap: anywhere; }
.bo-report-metadata,.bo-report-warning { margin: .75rem 0; overflow-wrap: anywhere; }
.bo-report-print-title { display: none; }
.bo-report-print-only { display: none; }
.bo-report-party { width: 100%; }
.bo-report-party td { width: 50%; vertical-align: top; padding: .75rem; }
.bo-report-document { margin: 1rem 0 2rem; }
.bo-report-invoice-totals { width: 60%; margin-left: auto; }
.bo-report .bo-admin-table td { white-space: normal; overflow-wrap: anywhere; }
.bo-report-selection .bo-admin-table { min-width: 72rem; }
.bo-report-selection .bo-admin-table th:nth-child(2) { min-width: 8rem; }
.bo-report-selection .bo-admin-table th:nth-child(3) { min-width: 13rem; }
.bo-report-selection .bo-admin-table th:nth-child(5) { min-width: 12rem; }
.bo-report-links { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; }
#bo-report-batch { flex-direction: row; align-items: center; }
.bo-report-standalone { background: #fff !important; color: #111 !important; margin: 0; padding: 24px 32px; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
.bo-report-standalone h1 { font-size: 22px; }
.bo-report-standalone h2 { color: #444; }
.bo-report-standalone .bo-admin-table { min-width: 0; width: 100%; }
.bo-report-standalone .bo-admin-table td,.bo-report-standalone .bo-admin-table th { color: #111; background: #fff; border-color: #ccc; padding: 8px 6px; }
.bo-report-standalone .bo-admin-table-wrap { border: 0; background: #fff; }
.bo-report-document-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 1rem; }
.bo-report-document-actions a { color: #111; text-decoration: underline; }
.bo-report-document-actions button { background: #111; color: #fff; padding: 8px 14px; border: 0; border-radius: 4px; cursor: pointer; }
@media (max-width: 600px) {
    .bo-report-filters .bo-admin-toolbar > label { width: 100%; }
    .bo-report-filters input,.bo-report-filters select { max-width: 100%; min-height: 44px; }
    .bo-report-party,.bo-report-party tbody,.bo-report-party tr,.bo-report-party td { display: block; width: 100%; }
}
@media print {
    body.bo-admin:has(.bo-report) { background: #fff; color: #111; }
    body:has(.bo-report) .bo-admin-side,body:has(.bo-report) .bo-admin-topbar,
    body:has(.bo-report) .bo-admin-side__backdrop,body:has(.bo-report) .bo-admin-page__header,
    .bo-report-filters,.bo-report-links,.bo-report-selection,.bo-report-screen { display: none !important; }
    body:has(.bo-report) .bo-admin-layout,body:has(.bo-report) .bo-admin-main,
    body:has(.bo-report) .bo-admin-page { display: block !important; margin: 0 !important; padding: 0 !important; }
    .bo-report-print-title { display: block; }
    .bo-report-print-only { display: block; }
    .bo-report .bo-admin-table-wrap__scroll { overflow: visible; }
    .bo-report .bo-admin-table { min-width: 0; width: 100%; font-size: 9pt; }
    .bo-report .bo-admin-table th,.bo-report .bo-admin-table td { color: #111; background: #fff; border-color: #ccc; }
    .bo-report-document+.bo-report-document { break-before: page; }
    .bo-report thead { display: table-header-group; }
    .bo-report tr { break-inside: avoid; }
    .bo-report * { -webkit-print-color-adjust:exact;print-color-adjust:exact; }
    .bo-report .bo-ref-actions { display:none!important; }
    .bo-report .bo-admin-table-wrap__scroll { height:auto;max-height:none; }
    .bo-report .bo-admin-table { table-layout:auto; }
}

/* =====================================================================
   Admin dashboard (bo_admin.php)
   Series colours pass the dataviz palette checks on the admin surface:
   current period #1F8A5B (bars), comparison #C9852E (line).
   ===================================================================== */
body.bo-admin {
    --bo-dash-cur: #1F8A5B;
    --bo-dash-cmp: #C9852E;
    --bo-dash-good: #28643E;
    --bo-dash-bad: #A3352B;
}
.bo-dash-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bo-dash-pulse {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem;
    padding: 0.75rem 1rem; margin-bottom: 1rem;
    background: var(--bo-admin-accent); color: #FFFFFF;
    border-radius: var(--bo-admin-radius);
    font-size: 0.875rem;
}
.bo-dash-pulse__title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.bo-dash-pulse__item strong { font-size: 1.0625rem; font-variant-numeric: tabular-nums; margin-right: 0.25rem; }
body.bo-admin .bo-dash-pulse__link { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
body.bo-admin .bo-dash-pulse__link--bad { background: #FFFFFF; color: var(--bo-admin-danger); padding: 0.125rem 0.5rem; border-radius: 999px; text-decoration: none; font-weight: 600; }

.bo-dash-range { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.bo-dash-range__presets { display: flex; flex-wrap: wrap; gap: 0.375rem; }
body.bo-admin .bo-dash-chip {
    display: inline-block; padding: 0.3125rem 0.75rem;
    border: 1px solid var(--bo-admin-border-strong); border-radius: 999px;
    background: var(--bo-admin-surface); color: var(--bo-admin-text);
    font-size: 0.8125rem; font-weight: 500; text-decoration: none;
}
body.bo-admin .bo-dash-chip:hover { border-color: var(--bo-admin-accent); }
body.bo-admin .bo-dash-chip[aria-current="true"] { background: var(--bo-admin-accent); border-color: var(--bo-admin-accent); color: #FFFFFF; }
.bo-dash-range__custom { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.bo-dash-range__field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--bo-admin-text-muted); }
.bo-dash-range__field .bo-admin-input, .bo-dash-range__field .bo-admin-select { width: auto; min-width: 9rem; }

.bo-dash-export { position: relative; }
.bo-dash-export > summary { list-style: none; cursor: pointer; }
.bo-dash-export > summary::-webkit-details-marker { display: none; }
.bo-dash-export__menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 12rem;
    display: flex; flex-direction: column; padding: 0.375rem;
    background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border-strong);
    border-radius: var(--bo-admin-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body.bo-admin .bo-dash-export__menu a { padding: 0.4375rem 0.625rem; border-radius: var(--bo-admin-radius-sm); color: var(--bo-admin-text); font-size: 0.875rem; text-decoration: none; }
body.bo-admin .bo-dash-export__menu a:hover { background: var(--bo-admin-surface-2); }

.bo-dash-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
body.bo-admin .bo-dash-kpi {
    display: flex; flex-direction: column; gap: 0.25rem; min-width: 0;
    padding: 0.875rem 1rem; background: var(--bo-admin-surface);
    border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius);
    color: var(--bo-admin-text); text-decoration: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
body.bo-admin .bo-dash-kpi:hover, body.bo-admin .bo-dash-kpi:focus-visible { border-color: var(--bo-admin-accent); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.bo-dash-kpi__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 0.5rem; }
.bo-dash-kpi__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-dash-kpi__value { font-size: 1.625rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums lining-nums; }
.bo-dash-kpi__meta, .bo-dash-kpi__cmp { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-dash-kpi__cmp { font-size: 0.75rem; }
.bo-dash-spark { width: 100%; height: 28px; display: block; }
.bo-dash-spark polyline { fill: none; stroke: var(--bo-dash-cur); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.bo-dash-delta { display: inline-block; padding: 0.0625rem 0.4375rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bo-dash-delta--good { background: rgba(40, 100, 62, 0.12); color: var(--bo-dash-good); }
.bo-dash-delta--bad  { background: rgba(163, 53, 43, 0.12); color: var(--bo-dash-bad); }
.bo-dash-delta--flat, .bo-dash-delta--new { background: var(--bo-admin-surface-2); color: var(--bo-admin-text-muted); border: 1px solid var(--bo-admin-border); }

.bo-dash-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.bo-dash-card-sub { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--bo-admin-text-muted); max-width: 70ch; }

.bo-dash-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.1875rem; background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius); }
.bo-dash-tab { border: 0; background: transparent; padding: 0.3125rem 0.625rem; border-radius: var(--bo-admin-radius-sm); font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--bo-admin-text-muted); cursor: pointer; }
.bo-dash-tab:hover { color: var(--bo-admin-text); }
.bo-dash-tab[aria-selected="true"] { background: var(--bo-admin-surface); color: var(--bo-admin-text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.bo-dash-tab:focus-visible, .bo-dash-chart:focus-visible { outline: 2px solid var(--bo-admin-focus); outline-offset: 2px; }

.bo-dash-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-dash-legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.bo-dash-legend__bar { display: inline-block; width: 10px; height: 12px; border-radius: 3px 3px 0 0; background: var(--bo-dash-cur); }
.bo-dash-legend__line { display: inline-block; width: 16px; height: 2px; background: var(--bo-dash-cmp); position: relative; }
.bo-dash-legend__line::after { content: ""; position: absolute; left: 4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bo-dash-cmp); }

.bo-dash-chart { position: relative; height: 280px; width: 100%; }
.bo-dash-chart svg { display: block; overflow: visible; }
.bo-dash-gridline { stroke: var(--bo-admin-border); stroke-width: 1; shape-rendering: crispEdges; }
.bo-dash-axis { stroke: var(--bo-admin-border-strong); stroke-width: 1; shape-rendering: crispEdges; }
.bo-dash-tick { fill: var(--bo-admin-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bo-dash-bar { fill: var(--bo-dash-cur); transition: opacity 120ms ease; }
.bo-dash-bar.is-dim { opacity: 0.45; }
.bo-dash-line { fill: none; stroke: var(--bo-dash-cmp); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bo-dash-dot { fill: var(--bo-dash-cmp); stroke: var(--bo-admin-surface); stroke-width: 2; }
.bo-dash-cross { stroke: var(--bo-admin-text-muted); stroke-width: 1; }
.bo-dash-empty { fill: var(--bo-admin-text-muted); font-size: 13px; }
.bo-dash-tip {
    position: absolute; z-index: 5; width: 230px; pointer-events: none;
    padding: 0.5rem 0.625rem; background: var(--bo-admin-text); color: #FFFFFF;
    border-radius: var(--bo-admin-radius); box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    font-size: 0.8125rem;
}
.bo-dash-tip[hidden] { display: none; }
.bo-dash-tip__title { font-weight: 600; margin-bottom: 0.25rem; }
.bo-dash-tip__row { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 0.375rem; }
.bo-dash-tip__row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.bo-dash-tip__chg { margin-top: 0.25rem; opacity: 0.85; }

.bo-dash-table-toggle > summary { cursor: pointer; font-size: 0.8125rem; font-weight: 500; color: var(--bo-admin-accent); }
.bo-dash-table-toggle[open] > summary { margin-bottom: 0.75rem; }
.bo-dash-taglist { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
body.bo-admin .bo-dash-taglist a { padding: 0.125rem 0.5rem; border: 1px solid var(--bo-admin-border); border-radius: 999px; font-size: 0.8125rem; color: var(--bo-admin-text); }

.bo-dash-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 1100px) {
    .bo-dash-grid { grid-template-columns: 1fr 1fr; }
    .bo-dash-grid--wide-left { grid-template-columns: 1.6fr 1fr; }
}
.bo-dash-grid > .bo-admin-card { min-width: 0; }

.bo-dash-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }
body.bo-admin .bo-dash-queue a {
    display: grid; grid-template-columns: 1.5rem 3rem 1fr; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.625rem; border: 1px solid var(--bo-admin-border); border-left-width: 4px;
    border-radius: var(--bo-admin-radius); color: var(--bo-admin-text); text-decoration: none;
}
body.bo-admin .bo-dash-queue a:hover { background: var(--bo-admin-surface-2); }
.bo-dash-queue__icon { display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; font-size: 0.75rem; font-weight: 700; color: #FFFFFF; background: var(--bo-admin-text-muted); }
.bo-dash-queue__n { font-size: 1.125rem; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.bo-dash-queue__label { font-size: 0.875rem; }
.bo-dash-queue__meta { display: block; font-size: 0.75rem; color: var(--bo-admin-text-muted); }
.bo-dash-queue__item--danger a { border-left-color: var(--bo-admin-danger); }
.bo-dash-queue__item--danger .bo-dash-queue__icon { background: var(--bo-admin-danger); }
.bo-dash-queue__item--warn a { border-left-color: var(--bo-dash-cmp); }
.bo-dash-queue__item--warn .bo-dash-queue__icon { background: var(--bo-admin-warn); }
.bo-dash-queue__item--info a { border-left-color: var(--bo-admin-accent); }
.bo-dash-queue__item--info .bo-dash-queue__icon { background: var(--bo-admin-accent); }
.bo-dash-queue__item--success a { border-left-color: var(--bo-admin-border); color: var(--bo-admin-text-muted); }
.bo-dash-queue__item--success .bo-dash-queue__icon { background: var(--bo-admin-success); }
.bo-dash-queue__item--success .bo-dash-queue__n { font-weight: 500; }

.bo-dash-ledger { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.bo-dash-ledger th { text-align: left; font-weight: 400; padding: 0.375rem 0; color: var(--bo-admin-text-muted); }
.bo-dash-ledger td { text-align: right; padding: 0.375rem 0; white-space: nowrap; }
.bo-dash-ledger__sub th, .bo-dash-ledger__sub td { color: var(--bo-admin-text); font-weight: 600; border-top: 1px solid var(--bo-admin-border); }
.bo-dash-ledger__total th, .bo-dash-ledger__total td { color: var(--bo-admin-text); font-weight: 700; font-size: 1rem; border-top: 2px solid var(--bo-admin-text); }
.bo-dash-ledger__note th, .bo-dash-ledger__note td { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }

.bo-dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.bo-dash-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bo-dash-stats > div { padding: 0.625rem 0.75rem; background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius); font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-dash-stats > div > span { display: block; font-size: 1.25rem; font-weight: 650; color: var(--bo-admin-text); font-variant-numeric: tabular-nums; }

.bo-dash-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.bo-dash-bars li { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr auto; align-items: center; gap: 0.625rem; font-size: 0.875rem; }
.bo-dash-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-dash-bars__track { display: block; height: 10px; background: var(--bo-admin-surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.bo-dash-bars__fill { display: block; height: 100%; background: var(--bo-dash-cur); border-radius: 0 4px 4px 0; }
.bo-dash-bars__value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bo-dash-bars__value small { color: var(--bo-admin-text-muted); margin-left: 0.25rem; }

body.bo-admin .bo-dash-step { display: grid; grid-template-columns: 1fr auto; gap: 0.375rem 1rem; padding: 0.5rem 0; color: var(--bo-admin-text); text-decoration: none; font-size: 0.875rem; }
.bo-dash-step .bo-dash-bars__track { grid-column: 1 / -1; }
.bo-dash-step__value { font-variant-numeric: tabular-nums; color: var(--bo-admin-text-muted); }
.bo-dash-step__value strong { color: var(--bo-admin-text); margin-left: 0.375rem; }
.bo-dash-facts { margin: 0; display: grid; gap: 0.25rem; font-size: 0.875rem; }
.bo-dash-facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.375rem 0; border-top: 1px solid var(--bo-admin-border); }
.bo-dash-facts dt { color: var(--bo-admin-text-muted); }
.bo-dash-facts dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.bo-dash-facts--row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.25rem; }

.bo-dash-heat-wrap { overflow-x: auto; position: relative; }
.bo-dash-heat { border-collapse: separate; border-spacing: 2px; font-size: 0.6875rem; color: var(--bo-admin-text-muted); }
.bo-dash-heat th { font-weight: 500; padding: 0 0.25rem; text-align: left; white-space: nowrap; }
.bo-dash-heat thead th { text-align: center; }
.bo-dash-heat td { width: 22px; min-width: 18px; height: 20px; background: var(--bo-admin-surface-2); border-radius: 3px; }
.bo-dash-heat td.is-on { background: rgba(31, 138, 91, var(--a, 0.2)); }

@media (max-width: 640px) {
    .bo-dash-range__custom { width: 100%; }
    .bo-dash-range__field { flex: 1 1 8rem; }
    .bo-dash-range__field .bo-admin-input, .bo-dash-range__field .bo-admin-select { min-width: 0; width: 100%; }
    .bo-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bo-dash-kpi__value { font-size: 1.25rem; }
    .bo-dash-stats--2 { grid-template-columns: 1fr; }
    .bo-dash-bars li { grid-template-columns: 6rem 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
    body.bo-admin .bo-dash-kpi, .bo-dash-bar { transition: none; }
}
#bo-dash-products .bo-admin-table td:first-child, #bo-dash-customers .bo-admin-table td:first-child, #bo-dash-campaigns .bo-admin-table td:first-child { min-width: 12rem; }
#bo-dash-campaigns .bo-admin-table td:last-child { white-space: nowrap; }

/* Campaigns (bo_admin_campaigns.php) */
.bo-camp-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius); }
.bo-camp-link code { font-family: var(--bo-font-mono); font-size: 0.8125rem; overflow-wrap: anywhere; flex: 1 1 16rem; min-width: 0; }
.bo-camp-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.bo-camp-funnel > div { padding: 0.75rem; background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius); font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-camp-funnel > div > span { display: block; font-size: 1.375rem; font-weight: 650; color: var(--bo-admin-text); font-variant-numeric: tabular-nums; }
.bo-camp-funnel small { display: block; margin-top: 0.125rem; font-size: 0.75rem; }
.bo-camp-delete { border-top: 1px solid var(--bo-admin-border); padding-top: 1rem; }
.bo-camp-table td:first-child { min-width: 12rem; }
.bo-camp-table td:nth-child(2) { white-space: nowrap; }

/* Customer insights (bo_admin_customer_insights.php) */
.bo-ins-tabs { display: inline-flex; margin-bottom: 1rem; }
body.bo-admin .bo-ins-tabs a { text-decoration: none; }
.bo-ins-tabs a[aria-current="page"] { background: var(--bo-admin-surface); color: var(--bo-admin-text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.bo-ins-segments { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
body.bo-admin .bo-ins-seg { border-left-width: 4px; }
body.bo-admin .bo-ins-seg--warn { border-left-color: var(--bo-dash-cmp); }
body.bo-admin .bo-ins-seg--danger { border-left-color: var(--bo-admin-danger); }
body.bo-admin .bo-ins-seg--info { border-left-color: var(--bo-admin-accent); }
body.bo-admin .bo-ins-seg--success { border-left-color: var(--bo-admin-success); }
.bo-ins-key--repeat { background: var(--bo-dash-cmp); }
.bo-ins-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bo-ins-stack li { display: grid; grid-template-columns: 5.5rem 1fr minmax(9rem, auto); align-items: center; gap: 0.625rem; font-size: 0.875rem; }
.bo-ins-stack__track { display: flex; height: 12px; background: var(--bo-admin-surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.bo-ins-stack__new { background: var(--bo-dash-cur); }
.bo-ins-stack__repeat { background: var(--bo-dash-cmp); margin-left: 2px; border-radius: 0 4px 4px 0; }
.bo-ins-stack__new:last-child { border-radius: 0 4px 4px 0; }
.bo-ins-rate { display: grid; grid-template-columns: 6rem auto; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.bo-ins-lines { max-width: 28rem; font-size: 0.8125rem; }
.bo-ins-partial th, .bo-ins-partial td { color: var(--bo-admin-text-muted); }
@media (max-width: 640px) { .bo-ins-stack li { grid-template-columns: 4.5rem 1fr; } .bo-ins-stack .bo-dash-bars__value { grid-column: 2; text-align: left; } }
.bo-ins-people td:nth-child(5), .bo-ins-people td:nth-child(7), .bo-ins-people td:nth-child(9) { white-space: nowrap; }

/* Site traffic card (bo_admin.php, bo_matomo_lib.php) and broadcast link lists */
.bo-dash-traffic-stats > div > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.bo-dash-traffic-grid { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; }
@media (min-width: 1100px) { .bo-dash-traffic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bo-dash-traffic-grid .bo-dash-ledger th { overflow-wrap: anywhere; }
.bo-dash-traffic-grid .bo-dash-ledger thead th, .bo-dash-traffic-grid .bo-dash-ledger thead td { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bo-admin-text-muted); }
.bo-bc-links summary { cursor: pointer; font-size: 0.75rem; color: var(--bo-admin-accent); }
.bo-bc-links ul { margin: 0.375rem 0 0; padding: 0; list-style: none; text-align: left; font-size: 0.75rem; min-width: 14rem; }
.bo-bc-links li { display: flex; gap: 0.375rem; align-items: baseline; }
.bo-bc-links li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }

/* Email previews: Broadcast > Check and send, Email templates. */
.bo-bc-check { margin-bottom: 1rem; }
.bo-bc-check__grid { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.bo-bc-check__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.375rem 0.875rem; margin: 0 0 1rem; font-size: 0.875rem; }
.bo-bc-check__facts dt { color: var(--bo-admin-text-muted); }
.bo-bc-check__facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.bo-bc-check__who { margin: 0 0 1rem; font-size: 0.8125rem; }
.bo-bc-check__who summary { cursor: pointer; color: var(--bo-admin-accent); }
.bo-bc-check__who ul { margin: 0.5rem 0 0; padding-left: 1rem; overflow-wrap: anywhere; }
.bo-bc-check__note { margin: 0 0 0.5rem; font-size: 0.8125rem; color: var(--bo-admin-text-muted); overflow-wrap: anywhere; }
.bo-bc-check__queue { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bo-admin-border); }
.bo-email-frame { display: block; width: 100%; height: 72vh; min-height: 560px; border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius); background: #F4F0E8; }
@media (max-width: 900px) {
    .bo-bc-check__grid { grid-template-columns: minmax(0, 1fr); }
    .bo-email-frame { height: 80vh; min-height: 480px; }
}

/* Admin > Settings: section list beside the form, stacked on small screens. */
.bo-settings-grid { grid-template-columns: 240px minmax(0, 1fr); align-items: flex-start; }
.bo-settings-grid > * { min-width: 0; }
@media (max-width: 900px) { .bo-settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* Admin > Email templates */
.bo-et { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.bo-et__nav { padding: 0.75rem; position: sticky; top: 1rem; }
.bo-et__jump { display: none; }
.bo-et__nav .bo-et__group { margin: 0.75rem 0.5rem 0.25rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-et__nav .bo-et__group:first-of-type { margin-top: 0.25rem; }
.bo-et__list { list-style: none; margin: 0; padding: 0; }
.bo-et__link { display: block; padding: 0.4375rem 0.625rem; border-radius: var(--bo-admin-radius-sm); color: var(--bo-admin-text); text-decoration: none; font-size: 0.875rem; }
.bo-et__link:hover { background: var(--bo-admin-surface-2); }
.bo-et__link[aria-current="page"] { background: var(--bo-admin-accent); color: #fff; font-weight: 600; }
.bo-et__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.bo-et__actions { flex-wrap: wrap; gap: 0.5rem; }
.bo-et__reset { margin-top: 0.75rem; }
.bo-et__subject { margin: 0 0 0.75rem; font-size: 0.875rem; overflow-wrap: anywhere; }
.bo-et__subject span { display: inline-block; margin-right: 0.5rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
@media (min-width: 1400px) {
    .bo-et__main { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); }
    .bo-et__preview .bo-email-frame { height: 80vh; }
}
@media (max-width: 900px) {
    .bo-et { grid-template-columns: minmax(0, 1fr); }
    .bo-et__nav { position: static; }
    .bo-et__jump { display: grid; gap: 0.375rem; }
    .bo-et__group, .bo-et__list { display: none; }
}
body.bo-admin .bo-dash-traffic-grid h3 { margin: 1.25rem 0 0.625rem; }
body.bo-admin .bo-dash-traffic-grid > div > h3:first-child { margin-top: 0.75rem; }
.bo-dash-traffic-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* =====================================================================
   Reports (bo_rpt_lib.php): filter panel, summary tiles, sortable tables.
   ===================================================================== */
.bo-rpt-filters { background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius-lg); padding: 1rem 1.125rem; margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; }
.bo-rpt-filters__grid { flex: 1 1 640px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.875rem 1rem; align-items: end; }
.bo-rpt-filters__actions { display: flex; gap: 0.5rem; margin-left: auto; }
.bo-rpt-field { display: flex; flex-direction: column; gap: 0.3125rem; min-width: 0; }
.bo-rpt-field--period { grid-column: span 2; }
.bo-rpt-field--search { grid-column: span 2; }
.bo-rpt-field--check { justify-content: flex-end; padding-bottom: 0.5rem; }
.bo-rpt-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-rpt-period { display: grid; grid-template-columns: minmax(9rem, 1.1fr) 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.bo-rpt-period__to { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-rpt-filters .bo-admin-input, .bo-rpt-filters .bo-admin-select { width: 100%; min-width: 0; }
.bo-rpt-multi { position: relative; }
.bo-rpt-multi > summary { list-style: none; cursor: pointer; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-rpt-multi > summary::-webkit-details-marker { display: none; }
.bo-rpt-multi__panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 22rem; background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border-strong); border-radius: var(--bo-admin-radius); box-shadow: 0 10px 28px rgba(0,0,0,0.14); padding: 0.5rem; }
.bo-rpt-multi__search { margin-bottom: 0.375rem; }
.bo-rpt-multi__actions { display: flex; gap: 0.75rem; padding: 0.125rem 0.25rem 0.375rem; border-bottom: 1px solid var(--bo-admin-border); margin-bottom: 0.25rem; }
.bo-rpt-multi__actions button { border: 0; background: none; padding: 0; color: var(--bo-admin-accent); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.bo-rpt-multi__list { max-height: 16rem; overflow-y: auto; display: flex; flex-direction: column; }
.bo-rpt-multi__opt { display: flex; gap: 0.5rem; align-items: center; padding: 0.3125rem 0.375rem; border-radius: var(--bo-admin-radius-sm); font-size: 0.875rem; cursor: pointer; }
.bo-rpt-multi__opt:hover { background: var(--bo-admin-surface-2); }
.bo-rpt-multi__opt[hidden] { display: none; }

.bo-rpt-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.bo-rpt-tile { background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border); border-left: 3px solid var(--bo-admin-accent); border-radius: var(--bo-admin-radius); padding: 0.75rem 0.875rem; display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.bo-rpt-tile__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-rpt-tile__value { font-size: 1.375rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bo-rpt-tile__note { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }

.bo-rpt-section { background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius-lg); margin-bottom: 1.25rem; overflow: hidden; }
.bo-rpt-section__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--bo-admin-border); }
body.bo-admin .bo-rpt-section__head h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.bo-rpt-section__head p { margin: 0.125rem 0 0; font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-rpt-count { font-size: 0.8125rem; color: var(--bo-admin-text-muted); white-space: nowrap; }
.bo-rpt-scroll { overflow: auto; max-height: 72vh; }
.bo-rpt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.bo-rpt-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bo-admin-surface-2); border-bottom: 1px solid var(--bo-admin-border-strong); text-align: left; padding: 0; white-space: nowrap; }
.bo-rpt-table thead th button { display: flex; align-items: center; gap: 0.25rem; width: 100%; padding: 0.5625rem 0.75rem; border: 0; background: none; font: inherit; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bo-admin-text-muted); cursor: pointer; text-align: inherit; }
.bo-rpt-table thead th.is-num button { justify-content: flex-end; }
.bo-rpt-table thead th button:hover { color: var(--bo-admin-text); }
.bo-rpt-sort::after { content: "↕"; opacity: 0.35; font-size: 0.75rem; }
.bo-rpt-table th[aria-sort="ascending"] .bo-rpt-sort::after { content: "↑"; opacity: 1; }
.bo-rpt-table th[aria-sort="descending"] .bo-rpt-sort::after { content: "↓"; opacity: 1; }
.bo-rpt-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--bo-admin-border); vertical-align: top; }
.bo-rpt-table tbody tr:hover td { background: var(--bo-admin-surface-2); }
.bo-rpt-table .is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bo-rpt-table .is-code { font-family: var(--bo-font-mono); font-size: 0.8125rem; white-space: nowrap; }
.bo-rpt-table .is-wide { min-width: 14rem; }
.bo-rpt-table td a { color: var(--bo-admin-accent); font-weight: 500; }
.bo-rpt-table tfoot td { position: sticky; bottom: 0; background: var(--bo-admin-surface-2); border-top: 2px solid var(--bo-admin-border-strong); font-weight: 650; padding: 0.5625rem 0.75rem; }
.bo-rpt-table tr.is-group td { background: var(--bo-admin-surface-2); font-weight: 650; color: var(--bo-admin-accent); }
.bo-rpt-sub { font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-rpt-empty { text-align: center; color: var(--bo-admin-text-muted); padding: 2rem 1rem; }
.bo-rpt-badge { display: inline-block; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--bo-admin-surface-2); border: 1px solid var(--bo-admin-border-strong); color: var(--bo-admin-text-muted); text-transform: capitalize; white-space: nowrap; }
.bo-rpt-badge--paid, .bo-rpt-badge--shipped { color: var(--bo-admin-accent); border-color: rgba(54, 80, 67, 0.35); background: rgba(54, 80, 67, 0.08); }
.bo-rpt-badge--delivered, .bo-rpt-badge--accepts { color: var(--bo-admin-success); border-color: rgba(40, 100, 62, 0.35); background: rgba(40, 100, 62, 0.1); }
.bo-rpt-badge--pending { color: var(--bo-admin-warn); border-color: rgba(214, 155, 74, 0.4); background: rgba(214, 155, 74, 0.12); }
.bo-rpt-badge--refunded, .bo-rpt-badge--failed { color: var(--bo-admin-danger); border-color: rgba(200, 97, 85, 0.35); background: rgba(200, 97, 85, 0.1); }
.bo-rpt-note { font-size: 0.8125rem; color: var(--bo-admin-text-muted); max-width: 80ch; margin: 0 0 0.5rem; }

/* Reports home (bo_admin_reports.php) */
.bo-rpt-home { display: grid; gap: 1.5rem; }
body.bo-admin .bo-rpt-home h2 { margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-rpt-home__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
body.bo-admin .bo-rpt-card { display: flex; flex-direction: column; gap: 0.375rem; padding: 1rem 1.125rem; background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border); border-radius: var(--bo-admin-radius-lg); color: var(--bo-admin-text); text-decoration: none; transition: border-color 120ms ease, box-shadow 120ms ease; }
body.bo-admin .bo-rpt-card:hover, body.bo-admin .bo-rpt-card:focus-visible { border-color: var(--bo-admin-accent); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.bo-rpt-card strong { font-size: 1rem; }
.bo-rpt-card span { font-size: 0.875rem; color: var(--bo-admin-text-muted); }

@media (max-width: 760px) {
    .bo-rpt-field--period, .bo-rpt-field--search { grid-column: 1 / -1; }
    .bo-rpt-period { grid-template-columns: 1fr 1fr; }
    .bo-rpt-period select { grid-column: 1 / -1; }
    .bo-rpt-period__to { display: none; }
    .bo-rpt-filters__actions { width: 100%; justify-content: flex-end; }
    .bo-rpt-scroll { max-height: none; }
}
.bo-rpt-table .is-date { white-space: nowrap; }
.bo-rpt-table .bo-rpt-th { display: block; padding: 0.5625rem 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bo-admin-text-muted); }
.bo-rpt-table th.is-num .bo-rpt-th { text-align: right; }

/* Vendor pages (bo_vendor_kit_order.php, bo_admin_cog_orders.php) on the report layout */
.bo-rpt-table th.is-check, .bo-rpt-table td.is-check { width: 2.75rem; text-align: center; padding-left: 0.75rem; padding-right: 0.25rem; }
.bo-rpt-table th.is-check { padding-top: 0.5625rem; padding-bottom: 0.5625rem; }
.bo-rpt-table tr.is-off td { color: var(--bo-admin-text-muted); }
.bo-rpt-lines { white-space: pre-line; font-size: 0.8125rem; line-height: 1.5; }
.bo-rpt-problem { display: inline-block; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--bo-admin-danger); border: 1px solid rgba(200, 97, 85, 0.35); background: rgba(200, 97, 85, 0.1); white-space: nowrap; }
.bo-rpt-selbar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 0.75rem 1.125rem; background: var(--bo-admin-surface); border-top: 1px solid var(--bo-admin-border-strong); box-shadow: 0 -4px 12px rgba(0,0,0,0.04); }
.bo-rpt-selbar__stats { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.875rem; color: var(--bo-admin-text-muted); }
.bo-rpt-selbar__stats strong { color: var(--bo-admin-text); font-variant-numeric: tabular-nums; }
.bo-rpt-panel { background: var(--bo-admin-surface); border: 1px solid var(--bo-admin-border); border-left: 3px solid var(--bo-admin-accent); border-radius: var(--bo-admin-radius-lg); padding: 1rem 1.125rem; margin-bottom: 1.25rem; }
.bo-rpt-panel--danger { border-left-color: var(--bo-admin-danger); }
body.bo-admin .bo-rpt-panel h2 { margin: 0 0 0.375rem; font-size: 1rem; font-weight: 650; }
.bo-rpt-panel p { margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--bo-admin-text-muted); max-width: 80ch; }
.bo-rpt-panel__checks { display: flex; flex-direction: column; gap: 0.375rem; margin: 0 0 0.875rem; font-size: 0.875rem; }
.bo-rpt-panel__checks label { display: inline-flex; gap: 0.5rem; align-items: center; cursor: pointer; }
.bo-rpt-steps { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1rem; font-size: 0.8125rem; color: var(--bo-admin-text-muted); }
.bo-rpt-steps span { padding: 0.25rem 0.75rem; border-radius: 999px; border: 1px solid var(--bo-admin-border); background: var(--bo-admin-surface); }
.bo-rpt-steps span[aria-current="step"] { background: var(--bo-admin-accent); border-color: var(--bo-admin-accent); color: #fff; font-weight: 600; }
.bo-rpt-table .bo-rpt-lines { min-width: 13rem; }

/* =========================================================================
 * Pop-up ads (bo_popup_lib.php, bo-popup.js). The card always wears the dark
 * Black Oak palette, like the pepdosings promotion, so it reads as an offer in
 * either theme. Colours are local properties shared by the storefront dialog
 * and the admin preview. Gold on the card surface is 5.9 to 1; the gold button
 * text is 6.4 to 1.
 * ========================================================================= */
.bo-promo, .bo-promo-card {
    --bo-promo-bg: #1B1F1B;
    --bo-promo-text: #F4F0E8;
    --bo-promo-muted: #A9A69C;
    --bo-promo-gold: #B58A47;
    --bo-promo-border: #3A403B;
}
.bo-promo {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--bo-promo-border);
    border-radius: var(--bo-radius-lg);
    background: var(--bo-promo-bg);
    color: var(--bo-promo-text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    overflow: auto;
}
.bo-promo:focus, .bo-promo-card:focus { outline: none; }
.bo-promo::backdrop { background: rgba(10, 12, 10, 0.72); }
.bo-promo[open] { animation: bo-promo-in 0.22s ease-out; }
@keyframes bo-promo-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bo-promo[open] { animation: none; } }
/* A modal dialog does not stop the page behind it from scrolling. */
html.bo-promo-open { overflow: hidden; }
.bo-promo-card {
    position: relative;
    padding: 28px 28px 18px;
    background: var(--bo-promo-bg);
    color: var(--bo-promo-text);
    font-family: var(--bo-font-body);
}
.bo-promo-close {
    position: absolute; top: 10px; right: 10px; z-index: 1;
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 50%; background: rgba(17, 21, 18, 0.55); color: var(--bo-promo-text); cursor: pointer;
}
.bo-promo-close:hover { background: rgba(17, 21, 18, 0.85); }
.bo-promo-card .bo-promo-link { display: flex; flex-direction: column; gap: 14px; color: var(--bo-promo-text); text-decoration: none; }
.bo-promo-card .bo-promo-link:hover { color: var(--bo-promo-text); text-decoration: none; }
/* The ad image sits inside the card where the ad says (image_position, sql/48):
   inset with rounded corners, or edge to edge across the top. */
.bo-promo-image {
    display: block; width: 100%; max-width: 100%; height: auto; max-height: 240px; object-fit: cover;
    border-radius: 10px;
}
.bo-promo-image--top {
    width: calc(100% + 56px); max-width: none; max-height: 260px;
    margin: -28px -28px 2px; border-radius: var(--bo-radius-lg) var(--bo-radius-lg) 0 0;
}
.bo-promo-brand { display: flex; align-items: center; gap: 10px; padding-right: 36px; color: var(--bo-promo-gold); }
.bo-promo-image--top:not([hidden]) + .bo-promo-brand { padding-right: 0; }
.bo-promo-logo { flex: none; }
.bo-promo-brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.bo-promo-title { color: var(--bo-promo-text); font-family: var(--bo-font-display); font-size: 30px; font-weight: 400; line-height: 1.12; overflow-wrap: anywhere; }
.bo-promo-desc { color: var(--bo-promo-muted); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.bo-promo-code {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border: 1.5px dashed var(--bo-promo-gold); border-radius: 10px;
}
.bo-promo-code-label { color: var(--bo-promo-muted); font-size: 13px; }
.bo-promo-code-value { color: var(--bo-promo-gold); font-family: var(--bo-font-mono); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.bo-promo-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
    border-radius: 10px; background: var(--bo-promo-gold); color: #111512; font-size: 16px; font-weight: 700; text-align: center;
    transition: filter 0.15s ease;
}
.bo-promo-link:hover .bo-promo-cta { filter: brightness(1.1); }
.bo-promo-link:focus-visible { outline: none; }
.bo-promo-link:focus-visible .bo-promo-cta, .bo-promo-close:focus-visible, .bo-promo-never:focus-visible { outline: 2px solid var(--bo-promo-text); outline-offset: 3px; }
.bo-promo-fine { color: var(--bo-promo-muted); font-size: 12px; line-height: 1.4; text-align: center; }
.bo-promo-never {
    display: block; margin: 12px auto 0; padding: 8px 10px; border: 0; background: none;
    color: var(--bo-promo-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.bo-promo-never:hover { color: var(--bo-promo-text); }
@media (max-width: 420px) {
    .bo-promo-card { padding: 22px 20px 14px; }
    .bo-promo-image--top { width: calc(100% + 40px); margin: -22px -20px 2px; }
    .bo-promo-title { font-size: 26px; }
}

/* Admin: pop-up ad editor with a live preview beside the form. */
.bo-admin-popup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 1.5rem; align-items: start; }
.bo-admin-popup-preview { position: sticky; top: 1rem; }
.bo-admin-popup-preview__frame { padding: 1.5rem 1rem; border-radius: var(--bo-admin-radius); background: rgba(10, 12, 10, 0.72); }
.bo-admin-popup-preview .bo-promo-card {
    max-width: 440px; margin: 0 auto; border: 1px solid var(--bo-promo-border); border-radius: var(--bo-radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); overflow: hidden;
}
.bo-admin-popup-preview .bo-promo-card [hidden] { display: none; }
.bo-admin-popup-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--bo-admin-border); }
.bo-admin-popup-current { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bo-admin-inline-form { display: inline; margin: 0 0 0 0.75rem; }
.bo-admin-linkbtn { padding: 0; border: 0; background: none; font: inherit; color: var(--bo-admin-accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bo-admin-linkbtn:hover { color: var(--bo-admin-accent-hover); }
.bo-admin-linkbtn--danger { color: var(--bo-admin-danger); }
.bo-admin-linkbtn--danger:hover { color: var(--bo-admin-danger); text-decoration-thickness: 2px; }
@media (max-width: 1100px) {
    .bo-admin-popup-layout { grid-template-columns: minmax(0, 1fr); }
    .bo-admin-popup-preview { position: static; }
}
