/* ==========================================================================
   FUCollections — back office (Admin + ERP)
   ========================================================================== */
:root {
    --ink: #0b1f44;
    --ink-2: #38486b;
    --muted: #66779a;
    --bg: #f1f5fd;
    --card: #ffffff;
    --line: #e0e8f6;
    --blue: #1366e8;
    --blue-dark: #0a4db8;
    --blue-soft: #e3eeff;
    --orange: #ff7a1a;
    --orange-dark: #e85f00;
    --orange-soft: #ffebda;
    --green: #13a35e;
    --green-soft: #dff5ea;
    --yellow: #ffb41f;
    --yellow-soft: #fff1cf;
    --danger: #e04545;
    --danger-soft: #fde6e6;
    --violet: #6d4ae0;
    --violet-soft: #ece7fc;
    --teal: #0fa3b1;
    --teal-soft: #d9f3f5;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(11, 31, 68, .05), 0 8px 22px -12px rgba(19, 102, 232, .28);
    --ease: cubic-bezier(.22, .8, .24, 1);
    --sidebar: 268px;
    --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-size: .85em; background: #eaf1fd; padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.bo-muted { color: var(--muted); }
.bo-small { font-size: .84rem; }
.bo-link { color: var(--orange-dark); font-weight: 600; }
.bo-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bo-eyebrow { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--orange-dark); }
.inline { display: inline; margin: 0; }

/* ---------- Shell ---------- */
.bo-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
    background: linear-gradient(180deg, #0b1f44 0%, #0a3274 100%);
    color: #c9d8f3; display: flex; flex-direction: column; padding: 22px 14px;
    transition: transform .4s var(--ease);
}
.bo-brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
.bo-brand svg { width: 38px; height: 38px; transition: transform .6s var(--ease); }
.bo-brand:hover svg { transform: rotate(-20deg); }
.bo-brand strong { display: block; color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.bo-brand small { color: #8fa6d1; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.bo-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.bo-nav-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #7f97c4; padding: 18px 12px 6px; }
.bo-nav a {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: .93rem;
    transition: background .2s, color .2s, transform .2s var(--ease);
}
.bo-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.bo-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(2px); }
.bo-nav a.is-active { background: rgba(255, 122, 26, .18); color: #fff; }
.bo-nav a.is-active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.bo-storelink { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .18); text-align: center; font-size: .88rem; transition: background .2s; }
.bo-storelink:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.bo-scrim { display: none; }

.bo-main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.bo-topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
    padding: 18px 32px; background: rgba(241, 245, 253, .9);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.bo-menu { display: none; width: 42px; height: 42px; border: none; background: var(--card); border-radius: 10px; cursor: pointer; place-items: center; box-shadow: var(--shadow); }
.bo-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bo-title { flex: 1; min-width: 0; }
.bo-title h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.65rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-title p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.bo-user { display: flex; align-items: center; gap: 10px; }
.bo-user form { margin: 0; }
.bo-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.bo-user-meta strong { font-size: .86rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-user-meta small { color: var(--muted); font-size: .76rem; }
.bo-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, var(--orange), var(--yellow)); color: #fff; font-weight: 700; }
.bo-avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
.bo-content { padding: 28px 32px 48px; display: grid; gap: 22px; align-content: start; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.bo-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .9rem; white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.bo-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #b9cbe9; }
.bo-btn:active { transform: none; }
.bo-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.bo-btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.bo-btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.bo-btn-ghost { background: transparent; }
.bo-btn-danger { color: var(--danger); }
.bo-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.bo-btn-sm { min-height: 32px; padding: 0 12px; font-size: .82rem; border-radius: 8px; }
.bo-btn-block { width: 100%; }
.bo-push { margin-left: auto; }

/* ---------- Alerts ---------- */
.bo-alert { padding: 14px 18px; border-radius: 12px; font-weight: 500; animation: fadeUp .4s var(--ease); }
.bo-alert-success { background: var(--green-soft); color: #0b6b3c; }
.bo-alert-error { background: var(--danger-soft); color: #9b2222; }
.bo-validation ul { margin: 0; padding: 12px 16px 12px 34px; background: var(--danger-soft); color: #9b2222; border-radius: 12px; }
.bo-validation.validation-summary-valid { display: none; }

/* ---------- KPIs ---------- */
.bo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bo-kpis-3 { grid-template-columns: repeat(3, 1fr); }
.bo-kpi {
    position: relative; overflow: hidden; background: var(--card); border-radius: var(--radius); padding: 20px 22px;
    box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
    transition: transform .3s var(--ease), box-shadow .3s;
    animation: fadeUp .6s var(--ease) both;
}
.bo-kpi:nth-child(2) { animation-delay: .06s; }
.bo-kpi:nth-child(3) { animation-delay: .12s; }
.bo-kpi:nth-child(4) { animation-delay: .18s; }
.bo-kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 122, 26, .12), transparent); }
.bo-kpi:hover { transform: translateY(-3px); }
.bo-kpi.is-warn::after { background: radial-gradient(closest-side, rgba(217, 164, 65, .25), transparent); }
.bo-kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.bo-kpi-value { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: -.01em; }
.bo-kpi-sub { font-size: .84rem; color: var(--muted); }
.bo-trend { font-size: .84rem; font-weight: 600; }
.bo-trend.is-up { color: var(--green); }
.bo-trend.is-down { color: var(--danger); }

/* ---------- Cards + grids ---------- */
.bo-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.bo-card-flush { padding: 0; overflow: hidden; }
.bo-card-accent { border-top: 4px solid var(--orange); }
.bo-card-narrow { max-width: 820px; width: 100%; }
.bo-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.bo-card-head h2, .bo-card-title { font-size: 1.05rem; font-weight: 700; }
.bo-card-title { margin-bottom: 14px; }
.bo-pad { padding: 18px 22px 0; }
.bo-grid { display: grid; gap: 22px; }
.bo-grid-2 { grid-template-columns: 1fr 1fr; }
.bo-grid-2-1 { grid-template-columns: 2fr 1fr; }
.bo-grid-1-2 { grid-template-columns: 1fr 2fr; }
.bo-stack { display: grid; gap: 22px; align-content: start; min-width: 0; }
.bo-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.bo-chart { position: relative; height: 300px; }
.bo-chart-square { height: 300px; }
.bo-empty { color: var(--muted); text-align: center; padding: 28px 12px !important; }

.bo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Filters ---------- */
.bo-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.bo-filters input[type=search], .bo-filters input[type=date], .bo-filters select {
    height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
}
.bo-filters input[type=search] { min-width: 240px; }
.bo-filters input:focus, .bo-filters select:focus { outline: none; border-color: var(--ink); }
.bo-inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); }
.bo-quick-ranges { display: flex; gap: 6px; }
.bo-chip { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; transition: all .2s; }
.bo-chip:hover { border-color: var(--ink); }
.bo-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: .75rem; font-weight: 700; margin-left: 6px; }
.bo-tag a { font-size: 1rem; line-height: 1; }

.bo-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.bo-tabs a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--ink-2); white-space: nowrap; transition: background .2s; }
.bo-tabs a span { background: #dfe9fa; border-radius: 999px; padding: 0 8px; font-size: .75rem; }
.bo-tabs a:hover { background: var(--card); }
.bo-tabs a.is-active { background: var(--ink); color: #fff; }
.bo-tabs a.is-active span { background: rgba(255, 255, 255, .2); }

/* ---------- Tables ---------- */
.bo-table-wrap { overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bo-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 12px 16px; background: #f5f8fe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bo-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bo-table tbody tr { transition: background .15s; }
.bo-table tbody tr:hover { background: #f7faff; }
.bo-table tfoot td { border-bottom: none; padding-top: 8px; padding-bottom: 8px; color: var(--ink-2); }
.bo-table .bo-total td { font-weight: 700; font-size: 1rem; color: var(--ink); border-top: 1px solid var(--line); }
.bo-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bo-table .actions { text-align: right; white-space: nowrap; }
.bo-table .actions > * + * { margin-left: 6px; }
.bo-table .thumb { width: 60px; }
.bo-table .thumb img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #eaf1fd; }

.bo-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bo-pager nav { display: flex; align-items: center; gap: 10px; }

/* ---------- Pills / stock ---------- */
.bo-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.bo-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bo-pill-pending { background: var(--yellow-soft); color: #8a5b00; }
.bo-pill-confirmed { background: var(--blue-soft); color: var(--blue-dark); }
.bo-pill-processing { background: var(--violet-soft); color: var(--violet); }
.bo-pill-shipped { background: var(--orange-soft); color: var(--orange-dark); }
.bo-pill-delivered { background: var(--green-soft); color: #0b6b3c; }
.bo-pill-cancelled { background: #eaeef6; color: var(--muted); }

.bo-stock { display: inline-block; min-width: 38px; padding: 2px 10px; border-radius: 8px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bo-stock.is-ok { background: var(--green-soft); color: #0b6b3c; }
.bo-stock.is-low { background: var(--yellow-soft); color: #8a5b00; }
.bo-stock.is-out { background: var(--danger-soft); color: var(--danger); }
.bo-level { width: 120px; height: 8px; border-radius: 999px; background: #e6eefb; overflow: hidden; }
.bo-level span { display: block; height: 100%; border-radius: inherit; animation: grow 1s var(--ease) both; transform-origin: left; }
.bo-level.is-ok span { background: var(--green); }
.bo-level.is-low span { background: var(--yellow); }
.bo-level.is-out span { background: var(--danger); }
@keyframes grow { from { transform: scaleX(0); } }

.bo-move { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #e9f0fc; }
.bo-move-sale { background: var(--blue-soft); color: var(--blue); }
.bo-move-restock { background: var(--green-soft); color: #0b6b3c; }
.bo-move-adjustment { background: var(--yellow-soft); color: #8a5b00; }
.bo-move-cancellation { background: var(--violet-soft); color: var(--violet); }
.bo-pos { color: var(--green); }
.bo-neg { color: var(--danger); }

/* ---------- Dashboard widgets ---------- */
.bo-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bo-rank-row { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 4px; }
.bo-bar { height: 8px; border-radius: 999px; background: #e6eefb; overflow: hidden; }
.bo-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--orange)); animation: grow 1.1s var(--ease) both; transform-origin: left; }
.bo-stocklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bo-stocklist li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; transition: background .2s; }
.bo-stocklist li:hover { background: #f5f8fe; }
.bo-stocklist img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.bo-stocklist strong { display: block; font-size: .9rem; }
.bo-statuslist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bo-statuslist li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- Order detail ---------- */
.bo-timeline { list-style: none; margin: 0; padding: 18px 22px; display: flex; justify-content: space-between; gap: 8px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.bo-timeline li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.bo-timeline li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.bo-timeline li:first-child::before { display: none; }
.bo-timeline-dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); transition: all .4s var(--ease); }
.bo-timeline li.is-done { color: var(--ink-2); }
.bo-timeline li.is-done::before, .bo-timeline li.is-current::before { background: var(--green); }
.bo-timeline li.is-done .bo-timeline-dot { background: var(--green); border-color: var(--green); }
.bo-timeline li.is-current { color: var(--ink); }
.bo-timeline li.is-current .bo-timeline-dot { border-color: var(--orange); box-shadow: 0 0 0 6px rgba(255, 122, 26, .18); animation: ping 2s infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 10px rgba(255, 122, 26, .05); } }

.bo-activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.bo-activity li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; position: relative; }
.bo-activity li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: -14px; width: 2px; background: var(--line); }
.bo-activity-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--orange-soft); border: 3px solid var(--orange); margin-top: 3px; }
.bo-activity p { margin: 2px 0; color: var(--ink-2); font-size: .9rem; }
.bo-note { margin-top: 12px; padding: 12px 14px; background: var(--yellow-soft); border-radius: 10px; font-size: .9rem; }
.bo-note p { margin: 4px 0 0; }

/* ---------- Forms ---------- */
.bo-form { display: grid; gap: 16px; }
.bo-form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.bo-form-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.bo-field { display: grid; gap: 6px; margin-bottom: 14px; }
.bo-field:last-child { margin-bottom: 0; }
.bo-field label { font-weight: 600; font-size: .86rem; }
.bo-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .bo-field select, .bo-field textarea {
    width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid #cbd8ee; background: #fbfdff;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.bo-field textarea { resize: vertical; }
.bo-field input:focus, .bo-field select:focus, .bo-field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(255, 122, 26, .12); }
.bo-field .input-validation-error { border-color: var(--danger) !important; background: #fff8f6 !important; }
.bo-field input[type=file] { font-size: .86rem; }
.bo-field-error { color: var(--danger); font-size: .8rem; font-weight: 500; }
.bo-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.bo-field-row-3 { grid-template-columns: repeat(3, 1fr); }
.bo-input-prefix { display: flex; align-items: center; border: 1px solid #cbd8ee; border-radius: 10px; background: #fbfdff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.bo-input-prefix:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 122, 26, .12); }
.bo-input-prefix span { padding: 0 0 0 12px; color: var(--muted); }
.bo-input-prefix input { border: none !important; box-shadow: none !important; background: transparent !important; }
.bo-readonly { min-height: 42px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: #f3f7fe; }
.bo-check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.bo-check input { width: 18px; height: 18px; accent-color: var(--orange); }

.bo-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer; font-weight: 500; }
.bo-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bo-switch-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #c9d8f3; transition: background .3s var(--ease); flex-shrink: 0; }
.bo-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .3s var(--ease); }
.bo-switch input:checked + .bo-switch-track { background: var(--green); }
.bo-switch input:checked + .bo-switch-track::after { transform: translateX(20px); }
.bo-switch input:focus-visible + .bo-switch-track { outline: 3px solid var(--orange); outline-offset: 2px; }

.bo-image-drop { border-radius: 14px; overflow: hidden; background: #eaf1fd; margin-bottom: 14px; aspect-ratio: 1; }
.bo-image-drop img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.bo-image-drop.is-updated img { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: .3; transform: scale(.96); } to { opacity: 1; transform: none; } }

.bo-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 12px; background: #eaf1fd; }
.bo-segment label { position: relative; cursor: pointer; }
.bo-segment input { position: absolute; opacity: 0; }
.bo-segment span { display: block; text-align: center; padding: 10px; border-radius: 9px; font-weight: 600; transition: background .25s, color .25s, box-shadow .25s; }
.bo-segment input:checked + span { background: var(--card); box-shadow: var(--shadow); color: var(--orange-dark); }
.bo-segment input:focus-visible + span { outline: 3px solid var(--orange); }
.bo-preview { min-height: 1.4em; margin: 0; font-weight: 600; color: var(--ink-2); }
.bo-preview.is-invalid { color: var(--danger); }

.bo-product-summary { text-align: center; display: grid; justify-items: center; gap: 6px; align-content: start; }
.bo-product-summary img { width: 160px; height: 160px; border-radius: 18px; object-fit: cover; margin-bottom: 6px; }
.bo-onhand { display: grid; gap: 4px; justify-items: center; margin-top: 10px; }
.bo-onhand .bo-stock { font-size: 2rem; padding: 6px 18px; border-radius: 14px; font-family: var(--font-display); font-weight: 400; }
.bo-dl { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; margin: 0; font-size: .9rem; }
.bo-dl dt { color: var(--muted); }
.bo-dl dd { margin: 0; overflow-wrap: anywhere; }
.bo-person { display: flex; align-items: center; gap: 10px; }
.bo-supplier header { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.bo-supplier h2 { font-size: 1.05rem; margin-bottom: 4px; }
.bo-supplier footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: linear-gradient(145deg, #0a4db8 0%, #0b1f44 70%); display: flex; align-items: flex-end; padding: 56px; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(4px); animation: drift 16s ease-in-out infinite alternate; }
.auth-orb-1 { width: 380px; height: 380px; top: -80px; right: -60px; background: radial-gradient(circle at 30% 30%, #ffb066, var(--orange) 70%); opacity: .75; }
.auth-orb-2 { width: 240px; height: 240px; bottom: 20%; left: -60px; background: radial-gradient(circle at 30% 30%, #7fb4ff, var(--blue) 70%); opacity: .55; animation-duration: 20s; }
@keyframes drift { to { transform: translate(30px, 40px) scale(1.08); } }
.auth-quote { position: relative; max-width: 440px; color: #e8f0ff; }
.auth-quote svg { width: 52px; height: 52px; margin-bottom: 20px; }
.auth-quote p { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.35; }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(420px, 100%); display: grid; gap: 14px; animation: fadeUp .6s var(--ease); }
.auth-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; }
.auth-card .bo-form { margin-top: 8px; }
.auth-card .bo-field input { min-height: 48px; }
.auth-card .bo-btn-primary { min-height: 48px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .bo-kpis { grid-template-columns: repeat(2, 1fr); }
    .bo-grid-2-1, .bo-grid-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .bo-sidebar { transform: translateX(-100%); box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
    .bo-sidebar.is-open { transform: none; }
    .bo-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(11, 31, 68, .45); }
    .bo-scrim.is-visible { display: block; }
    .bo-main { margin-left: 0; }
    .bo-menu { display: grid; }
    .bo-topbar { padding: 14px 18px; }
    .bo-content { padding: 20px 18px 40px; }
    .bo-grid-2, .bo-form-grid { grid-template-columns: 1fr; }
    .bo-user-meta { display: none; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 600px) {
    .bo-kpis, .bo-kpis-3 { grid-template-columns: 1fr; }
    .bo-field-row, .bo-field-row-3 { grid-template-columns: 1fr; }
    .bo-title h1 { font-size: 1.3rem; }
    .bo-title p { display: none; }
    .bo-filters input[type=search] { min-width: 0; flex: 1 1 100%; }
    .bo-timeline li span:last-child { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   FUCollections theme layer — brand blue + orange, bigger logo
   ========================================================================== */
:focus-visible { outline-color: var(--blue); }
.bo-eyebrow { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--blue); }
.bo-link { color: var(--blue-dark); }

/* Sidebar */
.bo-brand { flex-direction: column; align-items: stretch; gap: 10px; padding: 4px 4px 18px; }
.bo-logo-plate { display: block; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
.bo-logo-plate img { display: block; width: 100%; height: auto; }
.bo-brand small { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: #9db6e3; text-align: center; }
.bo-nav-label { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 700; color: #7f97c4; }
.bo-nav a { font-weight: 600; }
.bo-nav a:hover { background: rgba(255, 255, 255, .09); }
.bo-nav a.is-active { background: var(--blue); color: #fff; box-shadow: 0 10px 20px -12px rgba(19, 102, 232, .9); }
.bo-nav a.is-active::before { background: var(--orange); }
.bo-storelink { border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); font-weight: 600; }

/* Top bar */
.bo-title h1 { font-weight: 700; font-size: 1.55rem; letter-spacing: -.02em; }
.bo-avatar { background: linear-gradient(135deg, var(--blue), #4aa0ff); }

/* Buttons */
.bo-btn { font-weight: 700; }
.bo-btn:hover { border-color: var(--blue); }
.bo-btn-primary { background: var(--blue); border-color: var(--blue); }
.bo-btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.bo-btn-ghost { color: var(--blue-dark); }

/* KPI cards: one colour per card */
.bo-kpi { border-top: 4px solid var(--blue); }
.bo-kpi::after { background: radial-gradient(closest-side, rgba(19, 102, 232, .14), transparent); }
.bo-kpi:nth-child(2) { border-top-color: var(--orange); }
.bo-kpi:nth-child(2)::after { background: radial-gradient(closest-side, rgba(255, 122, 26, .16), transparent); }
.bo-kpi:nth-child(3) { border-top-color: var(--green); }
.bo-kpi:nth-child(3)::after { background: radial-gradient(closest-side, rgba(19, 163, 94, .16), transparent); }
.bo-kpi:nth-child(4) { border-top-color: var(--violet); }
.bo-kpi:nth-child(4)::after { background: radial-gradient(closest-side, rgba(109, 74, 224, .16), transparent); }
.bo-kpi.is-warn { border-top-color: var(--yellow); }
.bo-kpi-label { text-transform: none; letter-spacing: 0; font-size: .86rem; }
.bo-kpi-value { font-weight: 800; font-size: 2.05rem; letter-spacing: -.03em; }
.bo-card-accent { border-top-color: var(--blue); }
.bo-card { border: 1px solid var(--line); }

/* Tables, tabs, tags */
.bo-table th { text-transform: none; letter-spacing: 0; font-size: .8rem; background: var(--blue-soft); color: var(--blue-dark); }
.bo-table tbody tr:hover { background: #f5f9ff; }
.bo-tabs a.is-active { background: var(--blue); }
.bo-chip:hover, .bo-filters input:focus, .bo-filters select:focus { border-color: var(--blue); }
.bo-tag { background: var(--blue-soft); color: var(--blue-dark); }
.bo-bar span { background: linear-gradient(90deg, var(--blue), #4aa0ff); }
.bo-pill-shipped { background: var(--orange-soft); color: var(--orange-dark); }
.bo-pill-pending { background: var(--yellow-soft); }
.bo-pill-confirmed { background: var(--blue-soft); color: var(--blue-dark); }
.bo-stock.is-low, .bo-pill-pending { color: #8a5b00; }

/* Forms */
.bo-field input:focus, .bo-field select:focus, .bo-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(19, 102, 232, .14); }
.bo-input-prefix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(19, 102, 232, .14); }
.bo-check input { accent-color: var(--blue); }
.bo-switch input:checked + .bo-switch-track { background: var(--blue); }
.bo-segment { background: var(--blue-soft); }
.bo-segment input:checked + span { color: var(--blue-dark); }
.bo-timeline li.is-current .bo-timeline-dot { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(19, 102, 232, .18); animation: ping 2s infinite; }
.bo-activity-dot { background: var(--blue-soft); border-color: var(--blue); }

/* Sign-in page */
.auth-art { align-items: center; justify-content: flex-start; }
.auth-logo-plate { display: inline-block; background: #fff; border-radius: 22px; padding: 18px 26px; margin-bottom: 28px; box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .65); }
.auth-logo-plate img { display: block; width: min(420px, 70vw); height: auto; }
.auth-quote { color: #e8f0ff; }
.auth-quote p { font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; }
.auth-card h1 { font-weight: 800; letter-spacing: -.03em; }
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: flex; padding: 28px; min-height: 0; justify-content: center; }
    .auth-logo-plate { margin-bottom: 0; }
    .auth-quote p { display: none; }
}

/* ---------- Users page ---------- */
.bo-role-help { display: grid; gap: 10px; margin-bottom: 18px; padding: 16px 20px; }
.bo-role-help > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
