/* Onexteam Universal Product Sync System - premium dark gray / orange theme */
:root {
    --onx-bg: #16181c;
    --onx-surface: #1f2228;
    --onx-surface-2: #272b33;
    --onx-border: #343944;
    --onx-text: #e6e8eb;
    --onx-muted: #9aa1ad;
    --onx-orange: #ff7a1a;
    --onx-orange-rgb: 255,122,26;
    --onx-orange-dark: #e2620a;
}
body { background: var(--onx-bg); color: var(--onx-text); min-height: 100vh; }
a { color: var(--onx-orange); text-decoration: none; }
a:hover { color: #ff9a4d; }
.onx-sidebar { width: 270px; flex-shrink: 0; background: #111317; border-right: 1px solid var(--onx-border); min-height: 100vh; position: sticky; top: 0; }
.onx-brand { color: #fff; font-weight: 700; letter-spacing: .3px; line-height: 1.15; }
.onx-brand small { color: var(--onx-orange); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; }
.onx-sidebar .nav-link { white-space: nowrap; font-size: .93rem; color: var(--onx-muted); border-radius: .5rem; padding: .55rem .8rem; margin-bottom: 2px; }
.onx-sidebar .nav-link:hover { color: #fff; background: var(--onx-surface-2); }
.onx-sidebar .nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(var(--onx-orange-rgb),.25), rgba(var(--onx-orange-rgb),.05)); border-left: 3px solid var(--onx-orange); }
.onx-sidebar .nav-link i { width: 1.4rem; display: inline-block; }
.onx-topbar { background: var(--onx-surface); border-bottom: 1px solid var(--onx-border); }
.card { background: var(--onx-surface); border: 1px solid var(--onx-border); color: var(--onx-text); }
.card-header { background: var(--onx-surface-2); border-bottom: 1px solid var(--onx-border); }
.metric-card .metric-value { font-size: 2rem; font-weight: 700; color: #fff; }
.metric-card .metric-label { color: var(--onx-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .8px; }
.metric-card .metric-icon { color: var(--onx-orange); font-size: 1.8rem; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--onx-text); --bs-table-border-color: var(--onx-border); --bs-table-hover-bg: rgba(var(--onx-orange-rgb),.06); --bs-table-hover-color: #fff; }
.table thead th { color: var(--onx-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; }
.form-control, .form-select { background-color: var(--onx-surface-2); border-color: var(--onx-border); color: var(--onx-text); }
.form-control:focus, .form-select:focus { background-color: var(--onx-surface-2); color: #fff; border-color: var(--onx-orange); box-shadow: 0 0 0 .2rem rgba(var(--onx-orange-rgb),.25); }
.form-control::placeholder { color: #6c7380; }
.form-text, .text-muted { color: var(--onx-muted) !important; }
.form-check-input:checked { background-color: var(--onx-orange); border-color: var(--onx-orange); }
.btn-primary { background: var(--onx-orange); border-color: var(--onx-orange); color: #111; font-weight: 600; }
.btn-primary:hover, .btn-primary:focus { background: var(--onx-orange-dark); border-color: var(--onx-orange-dark); color: #111; }
.btn-outline-primary { color: var(--onx-orange); border-color: var(--onx-orange); }
.btn-outline-primary:hover { background: var(--onx-orange); border-color: var(--onx-orange); color: #111; }
.page-link { background: var(--onx-surface-2); border-color: var(--onx-border); color: var(--onx-text); }
.page-item.active .page-link { background: var(--onx-orange); border-color: var(--onx-orange); color: #111; }
.page-item.disabled .page-link { background: var(--onx-surface); border-color: var(--onx-border); color: #555; }
.badge-soft { background: rgba(var(--onx-orange-rgb),.15); color: var(--onx-orange); }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--onx-muted); }
.empty-state i { font-size: 2.5rem; color: var(--onx-orange); display: block; margin-bottom: .75rem; }
.secret-box { font-family: monospace; background: #0d0f12; border: 1px dashed var(--onx-orange); padding: .75rem; border-radius: .5rem; word-break: break-all; color: #ffd2b0; }
.product-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: .4rem; background: var(--onx-surface-2); }
.modal-content { background: var(--onx-surface); color: var(--onx-text); border: 1px solid var(--onx-border); }
.list-group-item { background: var(--onx-surface); color: var(--onx-text); border-color: var(--onx-border); }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top, #2a1a0e 0%, var(--onx-bg) 60%); }
pre.log { background: #0d0f12; color: #cfd3da; padding: .75rem; border-radius: .5rem; max-height: 320px; overflow: auto; font-size: .8rem; }
@media (max-width: 991.98px) { .onx-sidebar { width: 100%; min-height: auto; position: static; } }
.filter-input { max-width: 240px; }
.filter-select { max-width: 200px; }
.auth-card { width: 100%; max-width: 400px; }
.stat-sm { font-size: 1.4rem; font-weight: 700; color: #fff; }
.product-image-lg { max-width: 100%; max-height: 320px; object-fit: contain; border-radius: .5rem; background: var(--onx-surface-2); }
.category-list { max-height: 240px; overflow-y: auto; }

/* ---------- v1.1 shell (sidebar, topbar, footer) ---------- */
:root { --onx-bg: #14161a; --onx-surface: #1c1f25; --onx-surface-2: #252932; --onx-border: #2e333d; --onx-sidebar: #111317; }
.onx-shell { display: flex; min-height: 100vh; }
.onx-sidebar { width: 260px; flex-shrink: 0; background: var(--onx-sidebar); border-right: 1px solid var(--onx-border); display: flex; flex-direction: column; padding: 1.1rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; min-height: auto; transition: width .2s ease; }
.onx-brand-link { display: flex; align-items: center; gap: .7rem; text-decoration: none; padding: 0 .35rem 1.4rem; }
.onx-brand { display: flex; flex-direction: column; line-height: 1.15; color: #fff; }
.onx-brand strong { font-size: 1.3rem; font-weight: 700; }
.onx-brand small { color: var(--onx-muted); font-size: .72rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.onx-nav .nav-link { display: flex; align-items: center; gap: .85rem; color: #c9ced6; border-radius: .55rem; padding: .7rem .9rem; margin-bottom: .2rem; font-size: .93rem; white-space: nowrap; border-left: 0; }
.onx-nav .nav-link i { font-size: 1.1rem; width: 1.3rem; text-align: center; color: #aeb4bf; }
.onx-nav .nav-link:hover { background: var(--onx-surface-2); color: #fff; }
.onx-nav .nav-link.active { background: var(--onx-orange); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(var(--onx-orange-rgb),.25); border-left: 0; }
.onx-nav .nav-link.active i { color: #fff; }
.onx-sidebar-footer { margin-top: auto; padding: 1.2rem .5rem 0; border-top: 1px solid var(--onx-border); color: var(--onx-muted); font-size: .85rem; }
.onx-sidebar-footer strong { color: #fff; font-size: 1.05rem; }
.onx-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.onx-topbar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.6rem; background: var(--onx-bg); border-bottom: 1px solid var(--onx-border); position: sticky; top: 0; z-index: 10; }
.onx-icon-btn { color: #c9ced6; font-size: 1.35rem; padding: .25rem .4rem; text-decoration: none; }
.onx-icon-btn:hover { color: #fff; }
.onx-bell-badge { position: absolute; top: -2px; right: -4px; background: #ef4444; color: #fff; font-size: .62rem; font-weight: 700; border-radius: 999px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.onx-user { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; padding: 0; }
.onx-user:hover, .onx-user:focus { color: #fff; }
.onx-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #ff9a4d, #e2620a); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.onx-user-name { font-weight: 600; font-size: .9rem; line-height: 1.1; }
.onx-user-role { color: var(--onx-muted); font-size: .75rem; }
.onx-content { padding: 1.6rem; flex-grow: 1; }
.onx-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.6rem; border-top: 1px solid var(--onx-border); color: var(--onx-muted); font-size: .8rem; }
.dropdown-menu { background: var(--onx-surface); border-color: var(--onx-border); }
.dropdown-item { color: var(--onx-text); }
.dropdown-item:hover { background: var(--onx-surface-2); color: #fff; }

.onx-brand-img { width: 200px; max-width: 100%; height: auto; display: block; }
.onx-brand-mini { display: none; }
.onx-auth-logo { width: 260px; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.onx-install-logo { width: 220px; max-width: 60%; height: auto; }

@media (min-width: 992px) {
    body.onx-sidebar-open .onx-brand-mini { display: inline-flex; }
    body.onx-sidebar-open .onx-sidebar { width: 78px; }
    body.onx-sidebar-open .onx-brand, body.onx-sidebar-open .onx-nav .nav-link span, body.onx-sidebar-open .onx-sidebar-footer { display: none; }
    body.onx-sidebar-open .onx-nav .nav-link { justify-content: center; padding: .7rem; }
    body.onx-sidebar-open .onx-brand-link { justify-content: center; padding-left: 0; padding-right: 0; }
}
@media (max-width: 991.98px) {
    .onx-sidebar { position: fixed; left: 0; top: 0; z-index: 1040; transform: translateX(-100%); transition: transform .2s ease; width: 270px; }
    body.onx-sidebar-open .onx-sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.6); }
    .onx-content { padding: 1rem; }
    .onx-topbar { padding: .6rem 1rem; }
}

/* ---------- v1.1 dashboard ---------- */
.dash-welcome h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.dash-meta { color: #c9ced6; font-size: .9rem; }
.dash-meta i { color: var(--onx-muted); margin-right: .35rem; }
.dash-card { background: var(--onx-surface); border: 1px solid var(--onx-border); border-radius: .8rem; padding: 1.1rem 1.2rem; color: var(--onx-text); height: 100%; display: block; text-decoration: none; position: relative; transition: border-color .15s, transform .15s; }
a.dash-card:hover { border-color: rgba(var(--onx-orange-rgb),.55); color: var(--onx-text); transform: translateY(-1px); }
.dash-card .dash-arrow { position: absolute; right: 1rem; bottom: 1rem; color: var(--onx-orange); }
.dash-icon { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .8rem; }
.dash-icon.orange { background: rgba(var(--onx-orange-rgb),.18); color: #ff9a4d; }
.dash-icon.green { background: rgba(34,197,94,.16); color: #4ade80; }
.dash-icon.blue { background: rgba(59,130,246,.18); color: #60a5fa; }
.dash-icon.purple { background: rgba(168,85,247,.18); color: #c084fc; }
.dash-icon.red { background: rgba(239,68,68,.18); color: #f87171; }
.dash-icon.solid-green { background: #22c55e; color: #fff; }
.dash-icon.solid-red { background: #ef4444; color: #fff; }
.dash-label { color: #c9ced6; font-size: .9rem; }
.dash-value { font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1.2; }
.dash-sub { color: var(--onx-muted); font-size: .8rem; }
.trend-up { color: #4ade80; }
.trend-down { color: #f87171; }
.dash-panel { background: var(--onx-surface); border: 1px solid var(--onx-border); border-radius: .8rem; padding: 1.1rem 1.2rem; height: 100%; }
.dash-panel-title { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 0; }
.dash-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: .5rem; }
.dash-panel-head a { font-size: .85rem; }
.chart-legend { display: flex; gap: 1rem; font-size: .8rem; color: #c9ced6; }
.chart-legend .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: .35rem; vertical-align: -1px; }
.swatch-orange { background: var(--onx-orange); }
.swatch-gray { background: #9aa1ad; }
.swatch-green { background: #22c55e; border-radius: 50% !important; }
.swatch-red { background: #ef4444; border-radius: 50% !important; }
.onx-chart { width: 100%; height: auto; display: block; }
.onx-chart text { fill: #9aa1ad; font-size: 11px; }
.donut-wrap { position: relative; width: 170px; height: 170px; margin: .5rem auto 1.2rem; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 1.8rem; color: #fff; line-height: 1; }
.donut-center span { color: var(--onx-muted); font-size: .8rem; }
.donut-legend { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem 1.2rem; font-size: .9rem; align-items: center; }
.activity-item { display: flex; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--onx-border); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .95rem; }
.bg-act-green { background: #22c55e; } .bg-act-blue { background: #3b82f6; } .bg-act-orange { background: var(--onx-orange); }
.bg-act-red { background: #ef4444; } .bg-act-purple { background: #a855f7; } .bg-act-gray { background: #6b7280; }
.activity-title { color: #fff; font-size: .88rem; }
.activity-meta { color: var(--onx-muted); font-size: .75rem; }
.supplier-row { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; }
.supplier-badge { width: 38px; height: 38px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.sb-0 { background: #3b82f6; } .sb-1 { background: #ef4444; } .sb-2 { background: #f59e0b; } .sb-3 { background: #ec4899; } .sb-4 { background: #8b5cf6; }
.pill { font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.pill-green { background: rgba(34,197,94,.16); color: #4ade80; }
.pill-red { background: rgba(239,68,68,.16); color: #f87171; }
.pill-orange { background: rgba(var(--onx-orange-rgb),.18); color: #ff9a4d; }
.pill-gray { background: rgba(154,161,173,.15); color: #c9ced6; }
.status-chip { font-size: .75rem; font-weight: 600; padding: .25rem .55rem; border-radius: .35rem; color: #fff; display: inline-flex; align-items: center; gap: .3rem; }
.chip-success { background: #16a34a; } .chip-failed { background: #dc2626; } .chip-warning { background: #d97706; } .chip-muted { background: #4b5563; } .chip-info { background: #2563eb; }
.health-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; }
.health-row i { color: #4ade80; font-size: 1.05rem; }
.health-row.bad i { color: #f87171; }
.quick-action { display: flex; gap: .8rem; align-items: center; padding: .9rem; border: 1px solid var(--onx-border); border-radius: .7rem; background: var(--onx-surface-2); color: var(--onx-text); text-decoration: none; width: 100%; text-align: left; height: 100%; }
.quick-action:hover { border-color: var(--onx-orange); color: #fff; }
.quick-action .qa-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--onx-orange); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-action strong { display: block; font-size: .9rem; color: #fff; }
.quick-action small { color: var(--onx-muted); font-size: .75rem; }
.table-dash { font-size: .87rem; }
.table-dash td, .table-dash th { padding: .65rem .5rem; }
@media (min-width: 992px) {
    .onx-shell { background: linear-gradient(90deg, var(--onx-sidebar) 260px, var(--onx-bg) 260px); }
    body.onx-sidebar-open .onx-shell { background: linear-gradient(90deg, var(--onx-sidebar) 78px, var(--onx-bg) 78px); }
}
.quick-action .qa-text { min-width: 0; }
.onx-nav-badge { margin-left: auto; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .1rem .45rem; }
.onx-nav .nav-link.active .onx-nav-badge { background: #fff; color: var(--onx-orange); }
.text-orange { color: var(--onx-orange) !important; }
.install-card { width: 100%; max-width: 620px; padding: 0 1rem; }
.install-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; flex-wrap: wrap; }
.install-steps li { display: flex; align-items: center; gap: .4rem; color: var(--onx-muted); font-size: .85rem; flex: 1; }
.install-steps span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--onx-border); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; }
.install-steps li.active { color: #fff; }
.install-steps li.active span { border-color: var(--onx-orange); color: var(--onx-orange); }
.install-steps li.done span { background: var(--onx-orange); border-color: var(--onx-orange); color: #fff; }
.install-success { width: 64px; height: 64px; border-radius: 50%; background: #22c55e; color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }

.branding-preview { max-height: 56px; max-width: 240px; width: auto; height: auto; }

/* Customer record bar (order page) */
.record-bar { height: 6px; border-radius: 3px; background: #fde2e2; overflow: hidden; }
.record-bar span { display: block; height: 100%; width: 0; background: #22a06b; }
