:root {
    --ink: #10243e; --ink-2: #1b3555; --teal: #13a895; --teal-bright: #35d0ba;
    --amber: #f2a93b; --coral: #ee765f; --violet: #7868e6; --canvas: #f3f6f9;
    --line: #dfe6ed; --muted: #68788d; --white: #fff; --shadow: 0 10px 28px rgba(20, 42, 70, .07);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; min-height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 1040; padding: 24px 16px; background: var(--ink); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 8px 26px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-bright); color: var(--ink); font: 800 1.2rem Manrope; transform: rotate(-4deg); box-shadow: 5px 5px 0 rgba(255,255,255,.1); }
.brand strong { display: block; font: 800 1.15rem Manrope; letter-spacing: -.02em; }
.brand small { display: block; color: #9eb0c5; font-size: .75rem; margin-top: 1px; }
.side-nav { display: grid; gap: 5px; }
.utility-nav { margin-top: auto; padding-top: 24px; }
.nav-item { border: 0; width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px; background: transparent; color: #aebdd0; text-align: left; font-size: .93rem; font-weight: 600; transition: .18s ease; }
.nav-item i { font-size: 1.05rem; width: 20px; }
.nav-item:hover, .nav-item.active { background: rgba(53,208,186,.12); color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 var(--teal-bright); }
.nav-count { margin-left: auto; background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 10px; font-size: .72rem; }
.sync-card { margin-top: 18px; padding: 13px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.045); border-radius: 12px; font-size: .77rem; }
.sync-card p { color: #8fa3bb; margin: 5px 0 11px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(53,208,186,.13); }
.btn-ghost-light { color: #dce6ef; border: 1px solid rgba(255,255,255,.15); }
.btn-ghost-light:hover { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.06); }
.main-column { width: calc(100% - 248px); margin-left: 248px; min-height: 100vh; }
.topbar { height: 76px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); padding: 0 34px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1020; backdrop-filter: blur(10px); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.5rem; color: var(--ink); }
.store-switcher-wrap { display: flex; align-items: center; gap: 12px; }
.eyebrow { color: #8492a4; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.store-switcher { width: 230px; border: 0; box-shadow: none !important; font-weight: 700; color: var(--ink); padding-left: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.demo-badge { padding: 6px 10px; border-radius: 999px; color: #7c5518; background: #fff3d9; font-size: .78rem; font-weight: 700; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; display: inline-grid; place-items: center; background: #fff; color: var(--ink); }
.icon-btn:hover { background: #f7f9fb; }
.icon-btn.subtle { border: 0; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 800; }
.content { max-width: 1480px; padding: 34px; margin: 0 auto; }
.view { display: none; animation: viewIn .25s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { font: 800 clamp(1.65rem, 3vw, 2.25rem)/1.15 Manrope; letter-spacing: -.04em; margin: 5px 0 6px; }
.page-heading p { color: var(--muted); margin: 0; }
.page-heading.compact { align-items: center; }
.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { border-radius: 9px; font-weight: 700; font-size: .88rem; padding: .63rem .9rem; }
.btn-primary { background: var(--teal); border-color: var(--teal); }
.btn-primary:hover, .btn-primary:focus { background: #0e927f; border-color: #0e927f; }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-soft { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-soft:hover { background: #f8fafc; border-color: #c6d0da; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card { min-height: 134px; display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.metric-icon { width: 45px; height: 45px; flex: 0 0 45px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.metric-icon.teal { color: #087a6c; background: #dff8f3; } .metric-icon.amber { color: #a86808; background: #fff0d8; } .metric-icon.violet { color: #5948c7; background: #eeebff; } .metric-icon.coral { color: #b44d39; background: #ffe8e2; }
.metric-card div > span { color: var(--muted); display: block; font-size: .78rem; font-weight: 600; }
.metric-card strong { display: block; font: 800 1.65rem Manrope; letter-spacing: -.04em; margin: 4px 0 2px; }
.metric-card small { color: #74859a; font-size: .7rem; }
.metric-card small i { color: var(--teal); }
.dashboard-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); gap: 20px; margin-top: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.attention-panel, .activity-panel { padding: 22px; }
.panel-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.panel-header h2 { margin: 3px 0 0; font: 800 1.15rem Manrope; letter-spacing: -.025em; }
.text-btn { border: 0; background: transparent; color: var(--teal); font-weight: 700; font-size: .82rem; }
.attention-chart { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 28px 10px; }
.donut { width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; background: conic-gradient(var(--teal) 0 98.1%, var(--amber) 98.1% 100%); display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 14px; background: #fff; border-radius: 50%; }
.donut div { position: relative; z-index: 1; text-align: center; }
.donut strong, .donut span { display: block; } .donut strong { font: 800 1.25rem Manrope; } .donut span { color: var(--muted); font-size: .7rem; }
.chart-legend { min-width: 180px; display: grid; gap: 11px; }
.chart-legend div { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); }
.chart-legend strong { color: var(--ink); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; } .legend-dot.good { background: var(--teal); } .legend-dot.warn { background: var(--amber); } .legend-dot.mute { background: #cbd5df; }
.activity-list { margin-top: 15px; }
.activity-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid #edf1f4; }
.activity-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; } .activity-icon.success { color: #087a6c; background: #e1f8f3; } .activity-icon.sale { color: #af573e; background: #ffebe6; } .activity-icon.edit { color: #6555d3; background: #efecff; } .activity-icon.sync { color: #97620e; background: #fff1db; }
.activity-item strong { display: block; font-size: .85rem; } .activity-item p { margin: 2px 0 0; color: var(--muted); font-size: .74rem; } .activity-item time { color: #95a1b0; font-size: .7rem; }
.coverage-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 18px; }
.coverage-item { padding: 18px 22px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); } .coverage-item:last-child { border-right: 0; }
.coverage-top { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; font-weight: 700; margin-bottom: 9px; }
.coverage-top span:last-child { color: var(--muted); }
.progress { height: 7px; background: #edf1f4; } .progress-bar { background: var(--teal); }
.filter-bar { display: grid; grid-template-columns: minmax(210px,1fr) 190px 180px minmax(220px,.8fr) auto; gap: 10px; padding: 12px; margin-bottom: 12px; }
.search-field { position: relative; } .search-field i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8795a6; } .search-field input { width: 100%; height: 42px; padding: 0 12px 0 39px; border: 1px solid #ced7e0; border-radius: 8px; outline: none; } .search-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19,168,149,.12); }
.form-control, .form-select { border-color: #ced7e0; border-radius: 8px; min-height: 42px; }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19,168,149,.12); }
.bulk-bar { margin-bottom: 12px; border-radius: 10px; background: var(--ink); color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 9px; }
.bulk-bar strong { margin-right: auto; font-size: .84rem; }
.table-panel { overflow: hidden; }
.table thead th { padding: 13px 16px; background: #f8fafb; color: #718095; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; border-bottom-color: var(--line); }
.table tbody td { padding: 15px 16px; border-color: #edf1f4; font-size: .83rem; }
.product-cell { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.product-thumb { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; background: linear-gradient(145deg, #dce5ec, #f7f9fb); display: grid; place-items: center; color: #7f8da0; font-size: 1.15rem; }
.product-cell strong { display: block; max-width: 310px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .product-cell small { color: var(--muted); }
.taxonomy-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-chip { background: #eef3f7; color: #53647a; padding: 3px 7px; border-radius: 5px; font-size: .68rem; font-weight: 600; }
.price-main { font-weight: 700; } .price-old { display: block; color: #93a0af; font-size: .7rem; text-decoration: line-through; }
.delta { font-size: .68rem; color: #a46406; display: block; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: .69rem; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-pill.aligned { color: #087567; background: #e2f8f3; } .status-pill.aligned::before { background: #11a28e; }
.status-pill.mismatch { color: #99600a; background: #fff1d9; } .status-pill.mismatch::before { background: #e9a02f; }
.status-pill.missing { color: #b04c39; background: #ffebe6; } .status-pill.missing::before { background: #e66e58; }
.status-pill.sale { color: #594abf; background: #efedff; } .status-pill.sale::before { background: #7665e3; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions .icon-btn { width: 32px; height: 32px; font-size: .8rem; }
.table-footer { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .75rem; }
.table-footer nav { display: flex; gap: 4px; }.page-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--muted); }.page-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.taxonomy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.taxonomy-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow); }
.taxonomy-card-head { padding: 19px; border-bottom: 1px solid var(--line); }.taxonomy-card-head h2 { font: 800 1.05rem Manrope; margin: 8px 0 4px; }.taxonomy-card-head p { color: var(--muted); font-size: .76rem; min-height: 36px; margin: 0; }
.taxonomy-card-meta { display: flex; justify-content: space-between; align-items: center; }.namespace { font: 600 .68rem monospace; color: #08796a; background: #e5f8f4; padding: 4px 7px; border-radius: 5px; }
.taxonomy-fields-list { padding: 10px 19px; }.taxonomy-fields-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf1f4; font-size: .76rem; }.taxonomy-fields-list div:last-child { border-bottom: 0; }.taxonomy-fields-list code { color: #617187; }
.taxonomy-card-actions { padding: 12px 19px; background: #fafbfd; display: flex; justify-content: space-between; }
.rule-list { display: grid; gap: 12px; }.rule-card { display: grid; grid-template-columns: 48px 1.4fr 1fr auto; gap: 16px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }.rule-icon { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; background: #e2f8f3; color: #087a6b; }.rule-card h2 { font: 800 .95rem Manrope; margin: 0 0 3px; }.rule-card p { color: var(--muted); font-size: .74rem; margin: 0; }.rule-expression { font: 600 .72rem monospace; color: #596a7e; background: #f3f6f8; padding: 8px 10px; border-radius: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }.sale-summary div { background: #fff; padding: 18px 22px; }.sale-summary span { display: block; color: var(--muted); font-size: .76rem; }.sale-summary strong { font: 800 1.45rem Manrope; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }.store-list { display: grid; gap: 14px; }.store-card { padding: 21px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }.store-card-top { display: flex; align-items: center; gap: 13px; }.store-logo { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 11px; font-size: 1.15rem; }.store-card h2 { font: 800 1rem Manrope; margin: 0 0 3px; }.store-card p { color: var(--muted); font-size: .75rem; margin: 0; }.store-actions { margin-left: auto; display: flex; gap: 7px; }.store-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }.store-stats span { display: block; color: var(--muted); font-size: .7rem; }.store-stats strong { font-size: .84rem; }
.setup-note { align-self: start; padding: 22px; border-radius: 13px; color: #d9e4ef; background: var(--ink); position: sticky; top: 100px; }.note-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(53,208,186,.15); color: var(--teal-bright); }.setup-note h2 { font: 800 1rem Manrope; color: #fff; margin: 15px 0 7px; }.setup-note p { font-size: .78rem; color: #aabacd; }.setup-note code { display: block; margin: 6px 0; padding: 7px 9px; color: #bdf2e9; background: rgba(255,255,255,.06); border-radius: 6px; }.setup-note .small-note { margin-top: 17px; color: #8198b1; }
.alert-stack { position: fixed; top: 88px; right: 24px; z-index: 2000; width: min(390px, calc(100vw - 32px)); }.alert-stack .alert { box-shadow: 0 14px 30px rgba(20,42,70,.18); border: 0; }
.modal-content { border: 0; border-radius: 15px; box-shadow: 0 22px 60px rgba(16,36,62,.2); }.modal-header, .modal-footer { padding: 18px 22px; border-color: var(--line); }.modal-body { padding: 22px; }.modal-title { font: 800 1.2rem Manrope; margin-top: 3px; }.form-label { color: #44566d; font-size: .78rem; font-weight: 700; }.form-text { font-size: .7rem; }.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.check-tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .78rem; }.check-tile input { margin-right: 7px; }
.field-builder-header { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 10px; }.field-builder-header h3 { font: 800 .95rem Manrope; margin: 0; }.field-builder-header p { color: var(--muted); font-size: .73rem; margin: 3px 0 0; }
.taxonomy-field-row { display: grid; grid-template-columns: 22px 1.2fr 1.2fr .9fr 1.1fr 90px 38px; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid #edf1f4; }.drag-grip { color: #9aa7b5; }.taxonomy-field-row .form-check { font-size: .72rem; margin: 0; display: flex; align-items: center; gap: 5px; }.taxonomy-field-row .form-control, .taxonomy-field-row .form-select { font-size: .76rem; min-height: 38px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.mode-switch label { cursor: pointer; }.mode-switch input { position: absolute; opacity: 0; }.mode-switch span { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 12px; font-size: .82rem; font-weight: 700; }.mode-switch input:checked + span { border-color: var(--teal); color: #08796a; background: #e9faf6; box-shadow: 0 0 0 2px rgba(19,168,149,.08); }
.tag-product-summary { padding: 10px 12px; background: #f2f6f8; border-radius: 8px; color: #52647a; font-size: .8rem; }.sale-preview { margin-top: 18px; padding: 12px; display: flex; gap: 9px; background: #eff8ff; color: #405f7b; border-radius: 8px; font-size: .78rem; }
.empty-state { padding: 46px 20px !important; text-align: center; color: var(--muted); }
.empty-state i { display: block; font-size: 1.6rem; margin-bottom: 8px; color: #9daab8; }
.sidebar-backdrop { display: none; }
@media (max-width: 1100px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } .taxonomy-grid { grid-template-columns: repeat(2, 1fr); } .filter-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }.sidebar.open { transform: translateX(0); }.sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(8,23,40,.48); z-index: 1030; }
    .main-column { width: 100%; margin-left: 0; }.menu-toggle { display: block; }.topbar { height: 68px; padding: 0 18px; }.store-switcher-wrap .eyebrow { display: none; }.store-switcher { width: 190px; }.content { padding: 24px 18px; }.dashboard-grid, .settings-layout { grid-template-columns: 1fr; }.setup-note { position: static; }.page-heading { align-items: flex-start; flex-direction: column; }.page-heading.compact { align-items: flex-start; }.taxonomy-field-row { grid-template-columns: 22px 1fr 1fr 38px; }.taxonomy-field-row [name="field_kind"], .taxonomy-field-row [name="field_options"], .taxonomy-field-row .form-check { grid-column: span 1; }.rule-card { grid-template-columns: 48px 1fr auto; }.rule-expression { grid-column: 2 / -1; }.coverage-list { grid-template-columns: 1fr; }.coverage-item { border-right: 0; }
}
@media (max-width: 560px) { .metric-grid, .taxonomy-grid, .sale-summary { grid-template-columns: 1fr; }.topbar-actions .demo-badge, .topbar-actions .icon-btn { display: none; }.store-switcher { width: 165px; }.filter-bar { grid-template-columns: 1fr; }.attention-chart { flex-direction: column; }.check-grid, .store-stats { grid-template-columns: 1fr; }.rule-card { grid-template-columns: 44px 1fr; }.rule-card > .row-actions { grid-column: 1 / -1; }.taxonomy-field-row { grid-template-columns: 22px 1fr 38px; }.taxonomy-field-row > * { grid-column: 2; }.taxonomy-field-row .drag-grip { grid-column: 1; grid-row: 1; }.taxonomy-field-row .remove-taxonomy-field { grid-column: 3; grid-row: 1; }.page-heading h1 { font-size: 1.65rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
