:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #241b20; background: #f7f5f3; --ink: #241b20; --muted: #7b7077; --line: #e6dfe0; --surface: #fff; --soft: #f4eff0; --plum: #4d233d; --berry: #8d416a; --gold: #c98a4b; --green: #3d815b; --red: #b84b55; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% -10%, #fff7ef 0, transparent 36rem), #f7f5f3; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; position: sticky; top: 0; height: 100vh; flex-direction: column; padding: 28px 16px 18px; background: var(--plum); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 32px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: #d9bfd0; font-size: .7rem; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #e1a260, #a74a70); color: #fff; font-size: 1.25rem; font-weight: 800; box-shadow: 0 8px 18px #1e0b180f; }
.nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 10px; color: #e7d9e2; font-size: .88rem; text-decoration: none; }
.nav-link span { width: 18px; color: #d29bb9; font-size: 1.1rem; text-align: center; }
.nav-link:hover, .nav-link.active { background: #ffffff19; color: #fff; }
.nav-link.active { box-shadow: inset 3px 0 var(--gold); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 12px 0; border-top: 1px solid #ffffff1a; color: #ceb9c8; font-size: .7rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #83c998; box-shadow: 0 0 0 4px #83c99826; }
.logout-button { margin-left: auto; padding: 0; border: 0; background: transparent; color: #d9bfd0; font-size: .7rem; }
.main-content { width: min(1680px, 100%); margin: 0 auto; padding: 30px clamp(18px, 3vw, 48px) 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--berry); font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 1.2rem; letter-spacing: -.03em; }
h3 { margin-bottom: 0; font-size: .95rem; }
.muted { color: var(--muted); }
.top-actions, .editor-actions, .automation-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.button { border: 0; border-radius: 9px; padding: 10px 14px; color: #fff; font-weight: 750; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px #4d233d18; }
.button.primary { background: var(--plum); }
.button.secondary { background: #eadfe4; color: var(--plum); }
.button.publish { background: var(--berry); }
.button.tiny { padding: 7px 10px; font-size: .74rem; }
.button.ghost { border: 1px solid var(--line); background: transparent; color: var(--plum); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.flash { min-height: 22px; margin: 10px 0 8px; color: var(--green); font-size: .8rem; }
.flash.error { color: var(--red); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.stat-card { display: grid; min-height: 112px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 25px #41243d08; }
.accent-stat { border-color: #e1c0d1; background: linear-gradient(135deg, #fff, #fff7fb); }
.stat-label { color: var(--muted); font-size: .72rem; font-weight: 700; }
.stat-card strong { align-self: center; color: var(--plum); font-size: 1.8rem; letter-spacing: -.06em; }
.stat-hint { color: #a0969c; font-size: .68rem; }
.workspace { display: grid; grid-template-columns: minmax(540px, 1.38fr) minmax(460px, .92fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 14px 35px #41243d08; }
.catalog-panel { min-width: 0; overflow: hidden; }
.editor-panel { min-width: 0; padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 14px; }
.panel-heading h2 { margin: 0; }
.count-pill, .score-badge { border-radius: 999px; background: var(--soft); color: var(--plum); font-size: .72rem; font-weight: 800; padding: 6px 10px; }
.catalog-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 150px; gap: 8px; padding: 0 20px 12px; }
.search-field { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.search-field span { color: var(--muted); font-size: 1.25rem; }
.search-field input { flex: 1 1 auto; width: auto; min-width: 0; border: 0; outline: 0; padding: 9px 0; }
.search-status { flex: 0 0 auto; margin-left: auto; color: #a0969c; font-size: .66rem; white-space: nowrap; }
select, input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; outline: 0; background: #fff; color: var(--ink); }
select:focus, input:focus, textarea:focus { border-color: #bd7ca0; box-shadow: 0 0 0 3px #bd7ca018; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 45px; padding: 7px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fcfafb; color: var(--muted); font-size: .72rem; }
.bulk-bar .select-all { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 700; }
.bulk-bar .select-all input { width: auto; }
.bulk-bar > span { margin-right: auto; }
.bulk-bar select { width: auto; padding: 6px 8px; font-size: .72rem; }
.table-wrap { max-height: min(68vh, 780px); overflow: auto; border-top: 1px solid var(--line); }
.catalog-table { width: 100%; min-width: 1320px; border-collapse: separate; border-spacing: 0; font-size: .74rem; }
.catalog-table th { position: sticky; top: 0; z-index: 2; padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid #d9cdd2; background: #f8f5f6; color: #786b73; font-size: .63rem; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.catalog-table td { height: 54px; padding: 7px 10px; border-right: 1px solid #f0eaec; border-bottom: 1px solid #f0eaec; vertical-align: middle; background: #fff; }
.catalog-table tr:hover td { background: #fffafd; }
.catalog-table tr.selected td { background: #fff6fb; }
.catalog-table .check-col, .catalog-table .check-cell { width: 38px; padding-left: 12px; padding-right: 6px; text-align: center; }
.catalog-table .row-number { width: 48px; color: #a0969c; text-align: center; font-variant-numeric: tabular-nums; }
.catalog-table input[type=checkbox] { width: auto; accent-color: var(--berry); }
.row-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.row-open:focus-visible { outline: 2px solid #bd7ca0; outline-offset: 3px; border-radius: 4px; }
.product-cell { display: flex; align-items: center; gap: 9px; min-width: 270px; }
.product-thumb { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; background: var(--soft); }
.product-thumb.placeholder { display: grid; place-items: center; color: #b994a9; font-size: 1.1rem; }
.product-name { max-width: 275px; overflow: hidden; color: var(--ink); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.product-sku, .code-line { margin-top: 3px; color: #a0969c; font-size: .66rem; }
.code-cell { min-width: 150px; color: #665d64; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; }
.source-cell { max-width: 180px; color: #665d64; }
.source-badge { display: inline-block; margin-bottom: 3px; border-radius: 4px; background: #f1e9ed; color: var(--plum); padding: 3px 5px; font-size: .63rem; font-weight: 800; }
.source-missing { color: var(--red); }
.group-cell { min-width: 210px; max-width: 260px; color: #665d64; line-height: 1.35; }
.measure-cell { min-width: 160px; color: #665d64; line-height: 1.35; white-space: nowrap; }
.measure-cell span, .measure-cell strong { display: block; }
.measure-cell strong { color: var(--ink); font-size: .73rem; }
.revision-cell { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .66rem; }
.score { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.score-track { width: 50px; height: 5px; overflow: hidden; border-radius: 9px; background: #ede6e9; }
.score-fill { height: 100%; border-radius: inherit; background: var(--green); }
.channel-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.channel-chip { border-radius: 5px; padding: 4px 5px; background: #f0ecee; color: #8b7e86; font-size: .62rem; font-weight: 800; }
.channel-chip.on { background: #e6f2e9; color: var(--green); }
.channel-chip.warn { background: #fff1dc; color: #a06a25; }
.empty-state { padding: 40px !important; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 20px 18px; color: var(--muted); font-size: .75rem; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.editor-head h2 { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-head .muted { margin: 5px 0 0; font-size: .7rem; }
.score-badge { background: #e6f2e9; color: var(--green); }
.editor-tabs { display: flex; gap: 2px; overflow: auto; margin: 15px 0; border-bottom: 1px solid var(--line); }
.editor-tab { border: 0; border-bottom: 2px solid transparent; padding: 9px 10px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.editor-tab.active { border-color: var(--berry); color: var(--berry); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.field-grid { display: grid; gap: 10px; }
.field-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 6px; margin: 0 0 12px; color: #6d6269; font-size: .72rem; font-weight: 750; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .73rem; line-height: 1.45; }
.advanced { margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: var(--muted); font-size: .72rem; }
.advanced summary { cursor: pointer; font-weight: 750; }
.advanced textarea { margin-top: 10px; }
.source-summary { margin-bottom: 10px; color: var(--plum); font-size: .76rem; line-height: 1.5; }
.json-view, .categories-output, .schema-output { max-height: 280px; overflow: auto; margin: 0; padding: 12px; border-radius: 9px; background: #f8f5f6; color: #5f515b; font: .68rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.notice { margin: 10px 0 0; padding: 10px; border-left: 3px solid var(--gold); background: #fff8ed; color: #89673b; font-size: .7rem; line-height: 1.45; }
.channel { margin: 0 0 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfafb; }
.channel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.channel-head label { display: flex; align-items: center; margin: 0; color: var(--ink); }
.channel-head input[type=checkbox] { width: auto; accent-color: var(--berry); }
.channel-title { font-weight: 800; }
.channel-status { margin-left: auto; color: var(--muted); font-size: .65rem; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.channel-actions .button { padding: 6px 8px; font-size: .66rem; }
.channel label { margin-bottom: 8px; }
.automation-grid .button { flex: 1 1 45%; min-height: 44px; font-size: .7rem; }
.automation-status { margin-top: 12px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.editor-actions { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.editor-actions .button { flex: 1 1 auto; }
.operations-section { margin-top: 22px; border-top: 1px solid var(--line); }
.operations-section .panel-heading { padding: 18px 0 10px; }
.operation-list { display: grid; gap: 6px; }
.operation-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 7px; background: var(--soft); font-size: .68rem; }
.operation-state { color: var(--plum); font-weight: 800; }
.empty-editor { display: grid; min-height: 500px; place-content: center; padding: 30px; text-align: center; }
.empty-editor p { max-width: 300px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 16px; border-radius: 18px; background: #f8e7ee; color: var(--berry); font-size: 1.7rem; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 15%, #fff0e6 0, transparent 28rem), linear-gradient(145deg, #f7f2f4, #efe7ec); }
.login-card { width: min(400px, 100%); padding: 34px; border: 1px solid #e4d6df; border-radius: 20px; background: #fff; box-shadow: 0 25px 70px #4d233d1a; }
.login-card .brand-mark { margin-bottom: 20px; }
.login-card h1 { margin-bottom: 10px; font-size: 2rem; }
.login-card .muted { font-size: .8rem; line-height: 1.5; }
.login-form { margin-top: 24px; }
.login-form .button { width: 100%; margin-top: 5px; }
.login-error { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: .74rem; }
@media (max-width: 1180px) { .app-shell { grid-template-columns: 78px minmax(0, 1fr); } .sidebar { padding: 22px 10px 14px; } .brand { justify-content: center; padding: 0 0 28px; } .brand > span:last-child, .nav-link:not(.active)::after, .nav-link { font-size: 0; } .nav-link { justify-content: center; padding: 12px; } .nav-link span { font-size: 1.1rem; } .sidebar-foot { justify-content: center; padding-left: 0; padding-right: 0; } .sidebar-foot span:not(.status-dot), .logout-button { display: none; } .workspace { grid-template-columns: 1fr; } .editor-panel { min-height: 500px; } }
@media (max-width: 760px) { .main-content { padding: 20px 12px 40px; } .topbar { align-items: flex-start; flex-direction: column; } .top-actions { width: 100%; } .top-actions .button { flex: 1; } .stats-grid { grid-template-columns: repeat(2, 1fr); } .catalog-toolbar { grid-template-columns: 1fr; padding: 0 12px 12px; } .bulk-bar { padding-left: 12px; padding-right: 12px; } .bulk-bar > span { flex-basis: 100%; } .field-grid.compact { grid-template-columns: 1fr; } .editor-panel { padding: 14px; } .editor-actions .button { flex-basis: 100%; } }
