/* BuyingCore theme: Bootstrap 5 + a small set of brand variables. No build step. */
:root {
    --bc-primary: #0b5d6b;
    --bc-primary-dark: #083f49;
    --bc-accent: #e8a33d;
    --bc-bg: #f4f6f8;
    --bc-ink: #1b2430;
    --bc-muted: #5f6b7a;
    --bc-border: #dfe4ea;
    --bs-primary: #0b5d6b;
    --bs-primary-rgb: 11, 93, 107;
    --bs-link-color: #0b5d6b;
    --bs-link-hover-color: #083f49;
    --bs-body-color: #1b2430;
}

body.bc-body { background: var(--bc-bg); color: var(--bc-ink); }
.btn-primary { --bs-btn-bg: var(--bc-primary); --bs-btn-border-color: var(--bc-primary); --bs-btn-hover-bg: var(--bc-primary-dark); --bs-btn-hover-border-color: var(--bc-primary-dark); --bs-btn-active-bg: var(--bc-primary-dark); --bs-btn-active-border-color: var(--bc-primary-dark); --bs-btn-disabled-bg: var(--bc-primary); --bs-btn-disabled-border-color: var(--bc-primary); }
.btn-outline-primary { --bs-btn-color: var(--bc-primary); --bs-btn-border-color: var(--bc-primary); --bs-btn-hover-bg: var(--bc-primary); --bs-btn-hover-border-color: var(--bc-primary); --bs-btn-active-bg: var(--bc-primary-dark); }
.text-primary { color: var(--bc-primary) !important; }
.text-muted { color: var(--bc-muted) !important; }

/* Navigation */
.bc-nav { background: var(--bc-primary-dark); }
.bc-nav .navbar-brand { font-weight: 700; letter-spacing: .02em; color: #fff; }
.bc-nav .navbar-brand span { color: var(--bc-accent); }
.bc-nav .nav-link { color: rgba(255, 255, 255, .85); }
.bc-nav .nav-link:hover, .bc-nav .nav-link.active { color: #fff; }
.bc-nav .badge-dot { position: relative; top: -6px; }

/* Cards and panels */
.bc-card { background: #fff; border: 1px solid var(--bc-border); border-radius: .75rem; }
.bc-card .card-header-bc { padding: .85rem 1.1rem; border-bottom: 1px solid var(--bc-border); font-weight: 600; }
.bc-stat { padding: 1rem 1.1rem; }
.bc-stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bc-muted); }
.bc-stat .value { font-size: 1.65rem; font-weight: 700; line-height: 1.2; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table-bc thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bc-muted); background: #f8fafb; border-bottom: 1px solid var(--bc-border); white-space: nowrap; }

/* Hero */
.bc-hero { background: linear-gradient(135deg, var(--bc-primary-dark), var(--bc-primary)); color: #fff; padding: 4rem 0; }
.bc-hero h1 { font-weight: 700; }
.bc-hero .lead { color: rgba(255, 255, 255, .85); }
.bc-track-box { background: rgba(255, 255, 255, .12); border-radius: .75rem; padding: 1rem; }

/* Product cards */
.bc-product { height: 100%; transition: box-shadow .15s ease, transform .15s ease; }
.bc-product:hover { box-shadow: 0 .5rem 1.25rem rgba(16, 24, 40, .1); transform: translateY(-2px); }
.bc-product .thumb { aspect-ratio: 4 / 3; background: #e9eef2 center / cover no-repeat; border-radius: .75rem .75rem 0 0; display: flex; align-items: center; justify-content: center; color: #8a97a6; font-size: 2rem; }
.bc-badge { position: absolute; top: .6rem; left: .6rem; text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; }
.bc-price { font-weight: 700; color: var(--bc-primary-dark); }
.bc-price-old { color: var(--bc-muted); text-decoration: line-through; font-size: .9em; margin-left: .35rem; }

/* Timeline (order progress) */
.bc-timeline { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.bc-timeline li { flex: 1; text-align: center; position: relative; font-size: .82rem; color: var(--bc-muted); }
.bc-timeline li::before { content: ""; display: block; width: 1.6rem; height: 1.6rem; border-radius: 50%; margin: 0 auto .35rem; background: #fff; border: 2px solid var(--bc-border); position: relative; z-index: 1; }
.bc-timeline li::after { content: ""; position: absolute; top: .78rem; left: 50%; width: 100%; height: 2px; background: var(--bc-border); }
.bc-timeline li:last-child::after { display: none; }
.bc-timeline li.done { color: var(--bc-ink); }
.bc-timeline li.done::before { background: var(--bc-primary); border-color: var(--bc-primary); }
.bc-timeline li.done::after { background: var(--bc-primary); }
.bc-timeline li.current::before { box-shadow: 0 0 0 4px rgba(11, 93, 107, .2); }
.bc-timeline li.current { font-weight: 600; }

/* Messaging */
.bc-chat { max-height: 55vh; overflow-y: auto; padding: 1rem; background: #f8fafb; border-radius: .5rem; }
.bc-msg { max-width: 78%; padding: .55rem .8rem; border-radius: .8rem; margin-bottom: .6rem; white-space: pre-wrap; word-wrap: break-word; }
.bc-msg.mine { background: var(--bc-primary); color: #fff; margin-left: auto; border-bottom-right-radius: .2rem; }
.bc-msg.theirs { background: #fff; border: 1px solid var(--bc-border); border-bottom-left-radius: .2rem; }
.bc-msg .at { display: block; font-size: .7rem; opacity: .7; margin-top: .15rem; }

/* Admin shell */
.bc-admin { display: flex; min-height: 100vh; }
.bc-side { width: 232px; background: var(--bc-primary-dark); color: #fff; flex-shrink: 0; }
.bc-side .brand { padding: 1rem 1.1rem; font-weight: 700; font-size: 1.15rem; }
.bc-side .brand span { color: var(--bc-accent); }
.bc-side a { display: block; padding: .55rem 1.1rem; color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .92rem; border-left: 3px solid transparent; }
.bc-side a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.bc-side a.active { background: rgba(255, 255, 255, .12); color: #fff; border-left-color: var(--bc-accent); }
.bc-side .group { padding: .9rem 1.1rem .25rem; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.bc-main { flex: 1; min-width: 0; }
.bc-top { background: #fff; border-bottom: 1px solid var(--bc-border); padding: .6rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.bc-top > div { min-width: 0; }
/* Charts and images never push the page wider than the screen. */
canvas, img { max-width: 100%; }
/* Long unbroken text (emails, names) wraps instead of widening the page. */
.bc-content, .bc-card { overflow-wrap: anywhere; }
.bc-content { padding: 1.25rem; }
@media (max-width: 991.98px) {
    .bc-admin { display: block; }
    .bc-side { width: 100%; }
    .bc-side nav { display: none; }
    .bc-side.open nav { display: block; }
}

/* Floating assistant */
.bc-assistant-btn { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1040; border-radius: 2rem; padding: .65rem 1.1rem; box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .25); }
.bc-assistant-panel { position: fixed; right: 1.1rem; bottom: 4.5rem; width: min(380px, calc(100vw - 2rem)); height: min(520px, 70vh); z-index: 1040; display: none; flex-direction: column; background: #fff; border: 1px solid var(--bc-border); border-radius: .9rem; box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .25); overflow: hidden; }
.bc-assistant-panel.open { display: flex; }
.bc-assistant-panel header { background: var(--bc-primary-dark); color: #fff; padding: .65rem .9rem; display: flex; justify-content: space-between; align-items: center; }
.bc-assistant-log { flex: 1; overflow-y: auto; padding: .8rem; background: #f8fafb; }
.bc-assistant-panel form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--bc-border); }

.bc-footer { background: #0e1a24; color: rgba(255, 255, 255, .7); }
.bc-footer a { color: rgba(255, 255, 255, .85); }
.bc-map { height: 320px; border-radius: .5rem; border: 1px solid var(--bc-border); }
.bc-line { border: 1px solid var(--bc-border); border-radius: .6rem; padding: 1rem; background: #fff; }
.required::after { content: " *"; color: #b42318; }
.bc-progress { height: .55rem; }
.pagination { margin-bottom: 0; }

/* ---- Time & Action ---- */
.bc-ta-main { min-width: 0; flex: 1 1 14rem; overflow-wrap: anywhere; }
.bc-ta-date { width: auto; min-width: 9.5rem; }
.bc-ta-edit > summary { cursor: pointer; list-style: revert; }
/* Touch-sized controls on phones and tablets (44px is the usual minimum tap target). */
@media (max-width: 991.98px) {
    .bc-touch { min-height: 44px; padding-left: 1rem; padding-right: 1rem; }
    .bc-touch-link { display: inline-block; padding: .65rem 0; }
    .bc-ta-date { min-height: 44px; }
}

/* ---- Accessibility (second review) ---- */
.bc-skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 1100; background: #fff; color: var(--bc-primary-dark); padding: .6rem 1rem; border-radius: .375rem; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.bc-side a:focus-visible, .bc-nav a:focus-visible, .bc-nav .nav-link:focus-visible, .bc-footer a:focus-visible, .bc-top a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.bc-top a:focus-visible, .bc-footer a:focus-visible { outline-color: var(--bc-primary); outline-offset: 2px; }
#main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* Bigger tap targets and no iOS zoom on phones and tablets. */
@media (max-width: 991.98px) {
    .btn-sm, .form-control-sm, .form-select-sm { min-height: 44px; }
    .bc-side a { padding-top: .8rem; padding-bottom: .8rem; }
    input.form-control, select.form-select, textarea.form-control { font-size: 16px; }
}
