:root {
    --ink: #17231e;
    --muted: #65716b;
    --line: #dfe6e1;
    --soft: #f3f6f3;
    --panel: #ffffff;
    --green: #22633f;
    --green-2: #2f8154;
    --lime: #a7d63d;
    --warning: #a86610;
    --danger: #b83b3b;
    --shadow: 0 18px 48px rgba(18, 46, 31, .09);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--soft);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--soft); }
button, input, select { font: inherit; }
button { cursor: pointer; }

/* Pair comparison stays unframed within the existing results surface. */
.pair-views[hidden], #comparison-pair[hidden], .pair-options[hidden], .search-panel[hidden], #results[hidden], #pagination[hidden], #comparator-controls[hidden] { display: none !important; }
.results-section.pair-mode { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.pair-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 0; }
.pair-views button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }
.pair-views button[aria-pressed="true"] { background: var(--green); color: white; }
#comparison-pair { letter-spacing: 0; }
#comparison-pair button { min-width: 40px; min-height: 40px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: white; }
#comparison-pair button:disabled { opacity: .4; cursor: default; }
#comparison-pair :focus-visible, .pair-views :focus-visible { outline: 3px solid #9b4265; outline-offset: 2px; }
.pair-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px 0; border-block: 1px solid var(--line); }
.pair-filters label, .pair-selector > label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; min-width: 0; }
.pair-filters > div { display: grid; gap: 6px; min-width: 0; }
.pair-filters input, .pair-filters select, .pair-input input { width: 100%; min-width: 0; height: 44px; border: 1px solid #bdcbc2; border-radius: 4px; background: white; color: var(--ink); padding: 8px; }
.pair-selectors { display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: end; gap: 12px; margin: 20px 0; }
.pair-selector { min-width: 0; position: relative; }
.pair-input { display: flex; gap: 6px; margin-top: 6px; }
.pair-input input { flex: 1; }
.pair-input button, .pair-swap { flex: 0 0 40px; font-size: 24px; }
.pair-swap { height: 44px; }
.pair-options { position: absolute; z-index: 20; top: 100%; inset-inline: 0; max-height: 300px; overflow-y: auto; border: 1px solid #bdcbc2; border-radius: 4px; background: white; box-shadow: var(--shadow); }
.pair-options [role="option"], .pair-options p { padding: 12px; margin: 0; overflow-wrap: anywhere; }
.pair-options [role="option"] { cursor: pointer; border-bottom: 1px solid var(--line); }
.pair-options [role="option"]:hover, .pair-options [aria-selected="true"] { background: #e6f2e9; }
.pair-options small { display: block; margin-top: 4px; color: var(--muted); }
.pair-summary { border-block: 1px solid var(--line); padding: 18px 0; margin-bottom: 20px; }
.pair-summary > strong { font-size: 20px; }
.pair-summary p { margin: 8px 0 0; }
.pair-summary-prices { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; font-size: 14px; }
.pair-panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.pair-panels > section { min-width: 0; overflow-wrap: anywhere; }
.pair-product { display: flex; align-items: start; gap: 12px; min-height: 164px; }
.pair-product > div { min-width: 0; }
.pair-letter { flex: 0 0 32px; display: grid; place-items: center; height: 32px; border-radius: 4px; background: var(--green); color: white; font-weight: 750; }
[data-side="right"] .pair-letter { background: #9b4265; }
.pair-product h2 { margin: 0; font-size: 18px; line-height: 1.4; letter-spacing: 0; }
.pair-product p { margin: 6px 0; font-size: 13px; }
.pair-warning { padding: 10px 12px; border-left: 3px solid #a86610; background: #fff6dc; font-size: 13px; }
.pair-milestones { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.pair-milestones dt, .pair-totals dt { font-size: 12px; color: var(--muted); }
.pair-milestones dd, .pair-totals dd { margin: 5px 0 0; font-size: 15px; font-weight: 650; }
.pair-milestones small { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; }
.pair-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; border-block: 1px solid var(--line); padding: 12px 0; }
.pair-chart { margin: 20px 0; }
.pair-chart figcaption { font-size: 12px; color: var(--muted); }
.pair-chart canvas { display: block; width: 100%; aspect-ratio: 16 / 5; }
.pair-panels h3 { font-size: 15px; margin: 18px 0 10px; }
.pair-history { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.pair-history th, .pair-history td { padding: 9px 5px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.pair-history th:first-child, .pair-history td:first-child { text-align: left; width: 30%; }
.pair-history small { display: block; }
.pair-pagination { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 12px; }
.pair-pagination span { text-align: center; font-size: 12px; }
#comparison-pair a { color: var(--green); text-underline-offset: 3px; }
@media (max-width: 900px) {
    .pair-panels { grid-template-columns: minmax(0,1fr); gap: 28px; }
    .pair-panels > section + section { border-top: 2px solid var(--line); padding-top: 24px; }
    .pair-product { min-height: 0; }
    .pair-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
    .pair-selectors { grid-template-columns: minmax(0,1fr); gap: 10px; }
    .pair-swap { justify-self: end; width: 44px; }
    .pair-options { position: static; margin-top: 6px; }
    .pair-filters > div { grid-column: 1 / -1; }
    .pair-history { font-size: 11px; }
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow: auto;
    display: flex; flex-direction: column; padding: 28px 20px 20px;
    color: #eef8f0; background: linear-gradient(175deg, #163a29 0%, #0d2b1d 100%);
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-mark { flex: 0 0 auto; font-size: 25px; font-weight: 900; letter-spacing: -.06em; }
.brand-mark span { color: var(--lime); letter-spacing: -.03em; }
.price-sirens { display: flex; align-items: center; gap: 8px; }
.price-siren {
    position: relative; width: 43px; height: 39px; padding: 4px 5px 3px; border: 1px solid currentColor;
    border-radius: 11px; color: #fff; background: rgba(255,255,255,.055); opacity: .5;
    transition: opacity .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.price-siren:hover { transform: translateY(-1px); opacity: .86; }
.price-siren:focus-visible { outline: 3px solid rgba(255,255,255,.28); outline-offset: 2px; }
.price-siren svg { display: block; width: 27px; height: 27px; overflow: visible; }
.price-siren .siren-ray, .price-siren .siren-dome, .price-siren .siren-base {
    vector-effect: non-scaling-stroke; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
}
.price-siren .siren-ray { fill: none; stroke-width: 2.5; }
.price-siren .siren-dome { fill: currentColor; fill-opacity: .95; stroke-width: 1.5; }
.price-siren .siren-base { fill: #f8fff9; stroke-width: 1.2; }
.price-siren-red { color: #ff3b3b; }
.price-siren-green { color: #24df70; }
.price-siren.has-alert { opacity: 1; background: rgba(255,255,255,.13); }
.price-siren-red.has-alert { box-shadow: 0 0 8px rgba(255,59,59,.95), 0 0 20px rgba(255,59,59,.52), inset 0 0 10px rgba(255,59,59,.25); }
.price-siren-green.has-alert { box-shadow: 0 0 8px rgba(36,223,112,.95), 0 0 20px rgba(36,223,112,.48), inset 0 0 10px rgba(36,223,112,.23); }
.price-siren.has-alert .siren-dome { animation: price-siren-glow 1.35s ease-in-out infinite alternate; }
.siren-count {
    position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
    display: grid; place-items: center; border: 2px solid #123825; border-radius: 99px;
    color: #fff; background: #071d12; font-size: 9px; font-weight: 900; letter-spacing: 0;
}
.price-siren:not(.has-alert) .siren-count { color: #b9c8bf; }
@keyframes price-siren-glow {
    from { filter: brightness(.95) saturate(1.1); }
    to { filter: brightness(1.48) saturate(1.45) drop-shadow(0 0 4px currentColor); }
}
@media (prefers-reduced-motion: reduce) {
    .price-siren.has-alert .siren-dome { animation: none; filter: brightness(1.28) saturate(1.3); }
}
.sidebar-label { margin: 34px 10px 10px; color: #91aa9a; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.side-nav { display: grid; gap: 5px; }
.nav-item {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 12px; border: 0; border-radius: 10px; color: #dbe8df; background: transparent; text-align: left;
}
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 var(--lime); }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item b { min-width: 29px; padding: 3px 7px; border-radius: 99px; color: #b7cabd; background: rgba(0,0,0,.18); font-size: 11px; text-align: center; }
.promotion-shortcut { margin-top: 8px; color: #efffc9; }
.price-change-shortcut { color: #ffdede; }
.analytics-shortcut { color: #d8f2ff; }
.products-shortcut span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.products-shortcut b { flex-shrink: 0; }
.sidebar-company-control { display: grid; gap: 8px; margin-top: 30px; padding: 0 10px; }
.sidebar-company-control label { color: #91aa9a; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-company-control select { height: 44px; padding-inline: 11px 34px; border-color: rgba(255,255,255,.18); color: #f3faf5; background-color: #214635; font-size: 13px; font-weight: 700; }
.sidebar-company-control select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(167,214,61,.14); }
.sidebar-company-control option { color: var(--ink); background: #fff; }
.sidebar-footer { margin-top: auto; padding: 18px 12px 4px; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 4px; }
.sidebar-footer span { font-weight: 750; }
.sidebar-footer small { color: #9fb2a6; overflow-wrap: anywhere; }
.sidebar-footer form { margin-top: 7px; }
.text-button { border: 0; padding: 0; color: var(--lime); background: transparent; }

.content { min-width: 0; padding: 32px clamp(24px, 4vw, 64px) 60px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--green-2); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.045em; }
.summary-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.summary-chips span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.7); font-size: 13px; }
.summary-chips b { color: var(--ink); }

.search-panel, .results-section { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.search-panel { padding: 18px; }
.search-box { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 2px solid #cad9cf; border-radius: 12px; background: #fbfdfb; }
.search-box:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(47,129,84,.1); }
.search-box svg { width: 22px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-width: 1.8; }
.search-box > svg { flex: 0 0 22px; height: 22px; }
.search-clear { display: grid; place-items: center; flex: 0 0 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px; color: var(--green); background: transparent; cursor: pointer; }
.search-clear:hover { background: #e8f1ea; }
.search-clear:focus-visible { outline: 2px solid var(--green-2); outline-offset: 1px; }
.search-clear svg { height: 22px; stroke: currentColor; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.supplier-search { margin-top: 13px; }
.supplier-search input { height: 42px; font-size: 16px; }
.filters-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: 10px; margin-top: 13px; align-items: end; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
input, select { width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; outline: 0; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(47,129,84,.08); }
.secondary-button, .primary-button { min-height: 39px; padding: 0 15px; border-radius: 8px; font-weight: 800; }
.secondary-button { border: 1px solid var(--line); color: var(--green); background: #f7faf7; }
.primary-button { border: 0; color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-2); }

.results-section { margin-top: 18px; overflow: hidden; }
.results-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.tabs { align-self: stretch; display: flex; gap: 22px; overflow-x: auto; }
.tab { position: relative; border: 0; color: var(--muted); background: transparent; font-weight: 780; }
.tab.active { color: var(--green); }
.tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--lime); }
#result-count { color: var(--muted); font-size: 13px; }
.results-table { width: 100%; overflow-x: auto; }
.table-row { display: grid; min-width: 900px; align-items: center; padding: 12px 18px; border-bottom: 1px solid #edf1ee; gap: 14px; }
.table-row > * { min-width: 0; }
.table-row.article { min-width: 1160px; grid-template-columns: 190px minmax(270px, 1.45fr) minmax(175px, .8fr) 90px 100px 145px 118px; }
.table-row.article.with-actions { min-width: 1270px; grid-template-columns: 190px minmax(270px, 1.45fr) minmax(175px, .8fr) 90px 100px 145px 118px 96px; }
.table-row.document { grid-template-columns: 160px 115px minmax(190px, 1fr) 120px 85px 105px 118px; }
.table-row.company-document { min-width: 900px; grid-template-columns: minmax(250px, 1.4fr) 120px 145px 85px 110px 118px; }
.table-row.promotion-list { min-width: 1190px; grid-template-columns: 140px minmax(230px, 1.2fr) minmax(210px, 1fr) minmax(190px, .9fr) 145px 120px 118px; }
.table-row.header { min-height: 40px; padding-block: 8px; color: #7b8780; background: #fafbfa; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.table-row:not(.header):hover { background: #fbfdfb; }
.line-actions { display: grid; gap: 5px; }
.line-actions button { min-height: 30px; padding: 4px 8px; border: 1px solid #cbd9cf; border-radius: 8px; color: var(--green); background: #f5f9f6; font-size: 10px; font-weight: 850; }
.line-actions button:hover { border-color: var(--green-2); background: #e9f3ec; }
.line-actions button.danger { border-color: #f0cccc; color: #9a2f2f; background: #fff6f6; }
.line-actions button.danger:hover { border-color: #cc7878; background: #ffeaea; }
.app-toast { position: fixed; z-index: 1000; right: 24px; bottom: 24px; width: min(430px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid #a8ceb3; border-radius: 12px; color: #154c2c; background: #eaf7ee; box-shadow: 0 18px 52px rgba(8, 35, 20, .24); font-size: 13px; font-weight: 800; line-height: 1.4; opacity: 0; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.app-toast.visible { opacity: 1; transform: translateY(0); }
.cell-title { min-width: 0; }
.cell-title b { display: block; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.cell-title small, .cell-stack small { color: var(--muted); }
.cell-stack { display: grid; gap: 2px; }
.cell-stack .supplier-name, .history-table .supplier-name { display: block; color: var(--green-2); font-weight: 720; line-height: 1.25; }
.code { width: max-content; max-width: 100%; padding: 4px 7px; overflow-wrap: anywhere; border-radius: 6px; color: var(--green); background: #eaf4ed; font: 750 12px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-stack { width: 100%; min-width: 0; display: grid; justify-items: start; gap: 6px; }
.history-button { border: 0; padding: 0; color: var(--green-2); background: transparent; font-size: 11px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.price-comparable { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.price-comparable b { color: var(--green); }
.price-comparable small { color: var(--muted); line-height: 1.25; }
.price-comparable.promotion-price b { color: var(--warning); }
.price-comparable.promotion-price small { color: #82601a; }
.price-comparable.has-discount { gap: 4px; }
.discount-condition { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.discount-condition span { padding: 2px 5px; border-radius: 999px; color: #1d623d; background: #e4f4ea; font-size: 9px; font-weight: 850; white-space: nowrap; }
.discount-condition span:first-child { color: #6c4f13; background: #fff1c8; }
.badge { width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.ready { color: #20613d; background: #e5f3e9; }
.badge.review { color: var(--warning); background: #fff1db; }
.document-link { width: max-content; padding: 7px 10px; border: 1px solid #cddbd2; border-radius: 8px; color: var(--green); text-decoration: none; font-size: 12px; font-weight: 800; }
.document-link:hover { border-color: var(--green-2); background: #eff7f1; }
.article-view-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f4faf5, #fbfdfb); }
.article-view-controls[hidden] { display: none; }
.article-view-controls > div:first-child { display: grid; gap: 2px; }
.article-view-controls small { color: var(--green-2); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.article-view-controls strong { font-size: 12px; }
.article-view-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #cfdcd2; border-radius: 10px; background: #fff; }
.article-view-switch button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 820; }
.article-view-switch button.active { color: #fff; background: var(--green); }
.article-group + .article-group { border-top: 9px solid var(--soft); }
.article-group-head { display: grid; grid-template-columns: minmax(280px, 1.7fr) repeat(3, minmax(105px, .56fr)) minmax(145px, .72fr); align-items: center; gap: 15px; padding: 17px 18px; background: linear-gradient(105deg, #f4faf5, #fff); }
.article-group-identity { min-width: 0; display: grid; justify-items: start; gap: 5px; }
.article-group-identity h2 { max-width: 100%; margin: 0; overflow: hidden; color: var(--ink); font-size: 16px; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.article-group-identity p { max-width: 100%; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.article-group-metric { min-width: 0; display: grid; gap: 2px; }
.article-group-metric small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.article-group-metric b { overflow: hidden; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.article-group-metric span { color: var(--green-2); font-size: 10px; line-height: 1.25; }
.article-group-price b { color: var(--green); }
.article-group-price .price-comparable { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.article-group-price .discount-condition span { max-width: 100%; white-space: normal; }
.article-group-price .price-with-trend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; overflow: visible; white-space: normal; }
button.quarter-trend { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; font: 700 25px/1 Arial, sans-serif; cursor: pointer; }
.article-group-price button.quarter-trend span { font: inherit; color: inherit; }
button.quarter-trend-up { color: #b42318; }
button.quarter-trend-down { color: #067647; }
button.quarter-trend-stable { color: #175cd3; }
button.quarter-trend:hover { background: #edf2ef; }
button.quarter-trend:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.article-group-price .quarter-trend-detail, .article-group-price .quarter-trend-unavailable { font-size: 12px; line-height: 1.5; font-weight: 400; color: #46564d; letter-spacing: 0; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
.article-group-price .quarter-trend-detail { margin-top: 6px; padding-top: 6px; border-top: 1px solid #dbe5dd; }
@media screen and (max-width: 820px) {
    button.quarter-trend { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
}
.article-group-toggle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; margin-top: -2px; border: 1px solid #cddbd2; border-radius: 8px; color: var(--green); background: #fff; font-size: 11px; font-weight: 850; }
.article-group-toggle:hover { border-color: var(--green-2); background: #eff7f1; }
.article-group-toggle b { font-size: 16px; transition: transform .18s ease; }
.article-group-toggle[aria-expanded="true"] b { transform: rotate(180deg); }
.article-group-detail { border-top: 1px solid var(--line); background: #fff; }
.article-group-detail-summary { min-width: 820px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 9px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.article-group-detail-summary span { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #dbe6de; border-radius: 9px; background: #fff; }
.article-group-detail-summary small { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.article-group-detail-summary b { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.article-group-detail-summary .adjustment-total { color: #8a6212; }
.article-group-table { overflow-x: auto; }
.article-group-row { display: grid; min-width: 1260px; grid-template-columns: 130px minmax(185px, 1fr) 80px 100px 115px 110px 155px 118px; align-items: center; gap: 13px; padding: 11px 18px; border-bottom: 1px solid #edf1ee; font-size: 12px; }
.article-group-row.with-actions { min-width: 1365px; grid-template-columns: 130px minmax(185px, 1fr) 80px 100px 115px 110px 155px 118px 92px; }
.article-group-row > * { min-width: 0; }
.article-group-row.header { min-height: 38px; padding-block: 8px; color: #7b8780; background: #fafbfa; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.article-group-row:not(.header):hover { background: #fbfdfb; }
.adjustment-cell { display: grid; gap: 2px; text-align: right; }
.linked-adjustment { width: max-content; justify-self: end; padding: 4px 7px; border-radius: 7px; color: #805c13; background: #fff3d5; font-weight: 850; font-variant-numeric: tabular-nums; }
.effective-total { color: var(--green); font-weight: 850; }
.document-overview { min-width: 900px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #cfe0d4; background: linear-gradient(105deg, #eaf5ed, #f8fbf9); }
.document-overview > div { display: grid; gap: 3px; padding: 13px 15px; border: 1px solid #d3e2d7; border-radius: 12px; background: rgba(255,255,255,.9); }
.document-overview small { color: var(--green-2); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.document-overview b { color: var(--green); font-size: 24px; font-variant-numeric: tabular-nums; }
.document-overview span { color: var(--muted); font-size: 12px; }
.company-group + .company-group { border-top: 10px solid var(--soft); }
.company-group-head { min-width: 900px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #eef6f0, #fbfdfb); }
.company-group-head small { color: var(--green-2); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.company-group-head h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.02em; }
.company-group-summary { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.company-group-summary span { padding: 7px 10px; border: 1px solid #d5e2d8; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.86); font-size: 12px; }
.company-group-summary b, .document-total { color: var(--green); }
.offers-overview { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; min-width: 760px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(105deg, #f5faf6, #fbfdfb); }
.offers-overview > div { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid #dbe7de; border-radius: 11px; background: rgba(255,255,255,.9); }
.offers-overview small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.offers-overview b { color: var(--green); font-size: 20px; font-variant-numeric: tabular-nums; }
.offers-overview .saving { border-color: #d8e9a8; background: #f8fce9; }
.offers-policy { min-width: 760px; margin: 0; padding: 10px 18px; border-bottom: 1px solid #eadfbf; color: #655528; background: #fffaf0; font-size: 11px; line-height: 1.4; }
.offer-benefit { display: grid; justify-items: start; gap: 4px; }
.offer-benefit > b { color: var(--ink); font-size: 13px; }
.offer-benefit small { color: var(--muted); line-height: 1.3; }
.offer-kind { width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .025em; text-transform: uppercase; }
.offer-kind.free { color: #6c4b0b; background: #ffe8aa; }
.offer-kind.discount { color: #1d623d; background: #dcf2e3; }
.offer-saving { display: grid; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.offer-saving b { color: var(--green); }
.offer-saving small { color: var(--muted); font-size: 10px; }
.price-change-dashboard { padding: 18px; background: #f7f9f7; }
.price-change-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 15px; }
.price-change-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.price-change-heading p:not(.eyebrow) { max-width: 680px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.price-change-tools { flex: 0 0 auto; display: grid; justify-items: end; gap: 9px; }
.price-change-window { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; text-align: right; }
.price-change-window small { color: var(--green-2); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.price-change-window b { font-size: 13px; }
.price-change-window span { color: var(--muted); font-size: 10px; }
.price-change-actions { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.price-change-actions label { min-width: 190px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.price-change-actions select { height: 37px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 780; letter-spacing: 0; text-transform: none; }
.price-change-export { min-height: 37px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 8px; color: #fff; background: var(--green); font-size: 11px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.price-change-export:hover { background: var(--green-2); }
.price-change-export span { font-size: 15px; }
.price-change-overview { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 10px; }
.price-change-overview > div { display: grid; gap: 3px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 7px 20px rgba(18, 62, 35, .045); }
.price-change-overview small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.price-change-overview b { font-size: 23px; font-variant-numeric: tabular-nums; }
.price-change-overview span { color: var(--muted); font-size: 10px; }
.price-change-overview .increase { border-color: #efcaca; background: #fff6f6; }
.price-change-overview .increase b { color: #a83232; }
.price-change-overview .decrease { border-color: #c4e3cf; background: #f3fbf5; }
.price-change-overview .decrease b { color: #237548; }
.price-change-overview .conditions { border-color: #ead8a8; background: #fffaf0; }
.price-change-overview .conditions b { color: #8a6518; }
.price-change-list { display: grid; gap: 13px; margin-top: 16px; }
.price-change-card { overflow: hidden; border: 1px solid #dbe3dd; border-left-width: 5px; border-radius: 14px; background: #fff; box-shadow: 0 9px 26px rgba(18, 62, 35, .055); }
.price-change-card.increase { border-left-color: #c94444; }
.price-change-card.decrease { border-left-color: #30915b; }
.price-change-card.conditions { border-left-color: #c99826; }
.price-change-card.stable { border-left-color: #87948d; }
.price-change-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 15px 17px; border-bottom: 1px solid #e9eeea; }
.price-change-product { min-width: 0; display: grid; justify-items: start; gap: 4px; }
.price-change-product h3 { max-width: 100%; margin: 0; overflow: hidden; font-size: 16px; letter-spacing: -.012em; text-overflow: ellipsis; white-space: nowrap; }
.price-change-product p { max-width: 100%; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.price-change-alert { display: grid; min-width: 145px; justify-items: end; gap: 2px; text-align: right; }
.price-change-alert > span { padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .07em; }
.price-change-alert b { font-size: 17px; font-variant-numeric: tabular-nums; }
.price-change-alert small { color: var(--muted); font-size: 9px; }
.increase .price-change-alert > span { color: #9c2929; background: #ffe4e4; }
.increase .price-change-alert b { color: #ad3030; }
.decrease .price-change-alert > span { color: #216a42; background: #dff3e5; }
.decrease .price-change-alert b { color: #247849; }
.conditions .price-change-alert > span { color: #76540d; background: #ffedbd; }
.conditions .price-change-alert b { color: #8b6617; }
.stable .price-change-alert > span { color: #53615a; background: #edf1ee; }
.stable .price-change-alert b { color: #52625a; }
.price-change-comparison { display: grid; grid-template-columns: minmax(250px, 1fr) 34px minmax(250px, 1fr); align-items: stretch; gap: 8px; padding: 13px 17px; background: #fafcfb; }
.price-change-side { min-width: 0; display: grid; grid-template-columns: minmax(140px, .8fr) minmax(260px, 1.4fr) auto; align-items: center; gap: 15px; padding: 12px 13px; border: 1px solid #dfe7e1; border-radius: 11px; background: #fff; }
.price-change-side.current { border-color: #bfd8c7; background: #fbfefc; }
.price-change-side > header { min-width: 0; display: grid; gap: 2px; }
.price-change-side > header span { color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .075em; }
.price-change-side > header b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.price-change-side > header small { color: var(--muted); font-size: 10px; }
.price-change-side dl { display: grid; grid-template-columns: repeat(2, minmax(105px, 1fr)); gap: 8px 15px; margin: 0; }
.price-change-side dl > div { display: grid; gap: 2px; }
.price-change-side dt { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.price-change-side dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 780; font-variant-numeric: tabular-nums; }
.price-change-side .net dd { color: var(--green); }
.price-change-side > a { width: max-content; padding: 7px 9px; border: 1px solid #cbd9cf; border-radius: 8px; color: var(--green); text-decoration: none; font-size: 10px; font-weight: 850; }
.price-change-side > a:hover { border-color: var(--green-2); background: #eef7f0; }
.price-change-arrow { align-self: center; color: var(--green-2); font-size: 22px; font-weight: 900; text-align: center; }
.price-change-card > footer { padding: 11px 17px; border-top: 1px solid #e4ebe6; color: #46544d; background: #fff; font-size: 11px; line-height: 1.45; }
.price-change-card.increase > footer { color: #792d2d; background: #fff8f8; }
.price-change-card.decrease > footer { color: #275f40; background: #f6fcf8; }
.analytics-dashboard { min-width: 0; padding: 18px; background: #f7f9f7; }
.analytics-dashboard > * { min-width: 0; max-width: 100%; overflow-x: auto; }
.analytics-overview { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 11px; }
.analytics-overview > div { display: grid; gap: 5px; padding: 16px; border: 1px solid #dbe5dd; border-radius: 13px; background: #fff; box-shadow: 0 8px 22px rgba(18, 62, 35, .05); }
.analytics-overview small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.analytics-overview b { color: var(--ink); font-size: 23px; font-variant-numeric: tabular-nums; }
.analytics-panel { margin-top: 16px; padding: 18px; border: 1px solid #dbe5dd; border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(18, 62, 35, .05); }
.analytics-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.analytics-panel > header h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.analytics-panel > header > p { width: min(470px, 48%); margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
.provider-rank-list { display: grid; gap: 8px; }
.provider-rank-row { display: grid; grid-template-columns: 32px minmax(190px, .8fr) minmax(260px, 1.7fr) 110px; align-items: center; gap: 12px; min-height: 43px; }
.rank-position { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--green); background: #eaf4ed; font-size: 11px; font-weight: 900; }
.provider-rank-row:first-child .rank-position { color: #674a0b; background: #ffe8aa; }
.provider-rank-name { min-width: 0; display: grid; gap: 2px; }
.provider-rank-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-rank-name small { color: var(--muted); font-size: 10px; }
.provider-bar { height: 12px; overflow: hidden; border-radius: 999px; background: #edf1ee; }
.provider-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-2)); }
.provider-rank-row:first-child .provider-bar i { background: linear-gradient(90deg, #7c5a14, #d5a132); }
.provider-rank-row > strong { color: var(--green); text-align: right; font-variant-numeric: tabular-nums; }
.alert-summary { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.alert-summary span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 760; }
.alert-summary b { margin-right: 3px; font-size: 13px; }
.alert-summary .increase { color: #972e2e; border-color: #efcaca; background: #fff0f0; }
.alert-summary .decrease { color: #216b43; border-color: #c4e3cf; background: #eaf7ee; }
.alert-summary .new-promotion { color: #72500d; border-color: #ebd18e; background: #fff6d7; }
.alert-summary .new-article { color: #315d78; border-color: #c6ddea; background: #edf7fc; }
.price-alert-list { display: grid; gap: 9px; }
.price-alert { display: grid; grid-template-columns: 38px minmax(230px, 1.35fr) minmax(180px, 1fr) minmax(150px, .75fr) minmax(120px, .6fr) 92px; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; background: #fff; }
.price-alert.increase { border-left-color: #cc4b4b; }
.price-alert.decrease { border-left-color: #32915c; }
.price-alert.new-promotion { border-left-color: #d4a12d; background: #fffdf7; }
.price-alert.new-article { border-left-color: #5595b7; }
.alert-symbol { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: #5e7770; font-size: 19px; font-weight: 900; }
.price-alert.increase .alert-symbol { background: #cc4b4b; }
.price-alert.decrease .alert-symbol { background: #32915c; }
.price-alert.new-promotion .alert-symbol { color: #5f440b; background: #f3c95f; }
.price-alert.new-article .alert-symbol { background: #5595b7; }
.alert-product { min-width: 0; display: grid; justify-items: start; gap: 4px; }
.alert-product h3 { max-width: 100%; margin: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.alert-kind { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.price-alert.increase .alert-kind, .price-alert.increase .alert-change b { color: #a23636; }
.price-alert.decrease .alert-kind, .price-alert.decrease .alert-change b { color: #25784a; }
.price-alert.new-promotion .alert-kind, .price-alert.new-promotion .alert-change b { color: #886213; }
.price-alert.new-article .alert-kind, .price-alert.new-article .alert-change b { color: #396f8c; }
.alert-context, .alert-prices, .alert-change { min-width: 0; display: grid; gap: 3px; }
.alert-context b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-context small, .alert-prices small, .alert-prices span, .alert-change small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.alert-prices b, .alert-change b { font-variant-numeric: tabular-nums; }
.alert-prices b { color: var(--green); font-size: 15px; }
.alert-change b { font-size: 16px; }
.audit-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 14px; padding: 4px 2px; }
.audit-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.audit-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.audit-export { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; color: #fff; background: var(--green); box-shadow: 0 8px 20px rgba(34,99,63,.18); font-size: 12px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.audit-export:hover { background: var(--green-2); }
.audit-export span { font-size: 17px; }
.audit-overview { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 11px; margin-top: 11px; }
.audit-overview > div { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #dbe5dd; border-radius: 13px; background: linear-gradient(145deg, #fff, #f8fbf9); }
.audit-overview > div.saving { border-color: #c5dfcc; background: linear-gradient(145deg, #f7fff8, #eaf7ee); }
.audit-overview > div.potential { border-color: #c8dfea; background: linear-gradient(145deg, #f8fdff, #eaf5fa); }
.audit-overview > div.priority { border-color: #ead7aa; background: linear-gradient(145deg, #fffdf8, #fff5da); }
.audit-overview small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.audit-overview b { color: var(--green); font-size: 20px; font-variant-numeric: tabular-nums; }
.audit-overview span { color: var(--muted); font-size: 10px; }
.strategic-product-list { display: grid; }
.strategic-products { min-width: 0; }
.strategic-products > header { flex-wrap: wrap; }
.strategic-products > header h2 { letter-spacing: 0; }
.product-rank-controls { display: flex; flex-wrap: wrap; gap: 12px; max-width: 100%; }
.product-rank-controls label { display: grid; gap: 5px; width: 180px; max-width: 100%; font-size: 12px; letter-spacing: 0; }
.product-rank-controls label[hidden] { display: none; }
.product-rank-controls select { letter-spacing: 0; }
.product-rank-table { max-width: 100%; overflow-x: auto; }
.product-rank-table .strategic-product-row { min-width: 960px; }
.product-rank-table .cell-title { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .product-rank-controls { width: 100%; }
    .product-rank-controls label { width: 100%; }
}
.strategic-product-row { display: grid; grid-template-columns: 32px minmax(260px, 1.45fr) minmax(105px, .55fr) minmax(120px, .65fr) minmax(155px, .75fr) minmax(135px, .7fr); align-items: center; gap: 12px; min-height: 66px; padding: 10px 7px; border-top: 1px solid var(--line); }
.strategic-product-row.header { min-height: 34px; padding-block: 0 8px; border: 0; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.strategic-product-row .number { display: grid; gap: 3px; }
.strategic-product-row small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.product-opportunity { display: grid; justify-items: end; gap: 2px; text-align: right; }
.product-opportunity > span { width: max-content; padding: 3px 6px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.product-opportunity .up { color: #9b3333; background: #fff0f0; }
.product-opportunity .down { color: #216b43; background: #eaf7ee; }
.product-opportunity .neutral { color: var(--muted); background: #f0f3f1; }
.product-opportunity > b { color: var(--green); font-variant-numeric: tabular-nums; }
.supplier-comparison-panel { border-color: #c7ddce; background: linear-gradient(145deg, #ffffff, #f7fbf8); }
.supplier-comparison-list { display: grid; gap: 14px; }
.supplier-comparison-card { overflow: hidden; border: 1px solid #d6e3da; border-radius: 14px; background: #fff; box-shadow: 0 9px 25px rgba(20, 70, 42, .055); }
.supplier-comparison-card.featured { border-color: #99c4a7; box-shadow: 0 12px 32px rgba(27, 105, 60, .11); }
.supplier-comparison-card > header { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr); align-items: center; gap: 22px; padding: 16px 18px; border-bottom: 1px solid #e0e9e2; background: #f8fbf9; }
.supplier-comparison-card.featured > header { background: linear-gradient(120deg, #eef8f0, #f9fcfa); }
.supplier-comparison-card h3 { margin: 4px 0 3px; font-size: 18px; letter-spacing: -.018em; }
.supplier-comparison-card header p { margin: 0; color: var(--muted); font-size: 11px; }
.comparison-featured { width: max-content; padding: 4px 8px; border-radius: 999px; color: #466400; background: #dfff97; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.comparison-verdict { display: grid; justify-items: end; gap: 3px; text-align: right; }
.comparison-verdict b { color: var(--green); font-size: 16px; }
.comparison-verdict span { color: var(--muted); font-size: 10px; }
.comparison-suppliers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.comparison-supplier { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .7fr) minmax(265px, 1.3fr) auto; align-items: center; gap: 15px; padding: 14px 18px; border-top: 1px solid #edf2ee; }
.comparison-supplier:first-child { border-top: 0; }
.comparison-supplier:nth-child(even) { border-left: 1px solid #e5ece7; }
.comparison-supplier.winner { background: #f2faf4; }
.comparison-supplier-title { min-width: 0; }
.comparison-supplier-title span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .065em; }
.comparison-supplier.winner .comparison-supplier-title span { color: var(--green); }
.comparison-supplier-title h4 { margin: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.comparison-main-price { display: grid; gap: 1px; }
.comparison-main-price b { color: var(--green); font-size: 19px; font-variant-numeric: tabular-nums; }
.comparison-main-price small { color: var(--muted); font-size: 8px; }
.comparison-supplier dl { display: grid; grid-template-columns: repeat(2, minmax(90px, 1fr)); gap: 5px 12px; margin: 0; }
.comparison-supplier dl div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #dce5df; }
.comparison-supplier dt { color: var(--muted); font-size: 9px; }
.comparison-supplier dd { margin: 0; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.comparison-supplier > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.comparison-supplier > a { padding: 6px 9px; border: 1px solid #c8d8cd; border-radius: 7px; color: var(--green); font-size: 9px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.supplier-comparison-card > footer { display: flex; justify-content: space-between; gap: 18px; padding: 9px 18px; color: #617268; background: #fbfcfb; font-size: 9px; }
.negotiation-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 11px; }
.negotiation-card { display: grid; align-content: start; gap: 10px; padding: 15px; border: 1px solid #d9e4dc; border-top: 4px solid #5d8770; border-radius: 13px; background: #fff; }
.negotiation-card.alta { border-top-color: #c8832d; background: linear-gradient(180deg, #fffdf8, #fff); }
.negotiation-card.media { border-top-color: #5a8ca6; }
.negotiation-card > header { display: flex; align-items: center; justify-content: space-between; }
.negotiation-card > header b { color: var(--green); font-size: 16px; }
.negotiation-priority { padding: 4px 7px; border-radius: 999px; color: #485a51; background: #eef3ef; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.negotiation-card.alta .negotiation-priority { color: #784e16; background: #ffedbf; }
.negotiation-card h3 { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.negotiation-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.negotiation-metrics span { min-width: 0; display: grid; gap: 2px; padding: 8px; border-radius: 8px; background: #f5f8f6; }
.negotiation-metrics small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.negotiation-metrics b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.negotiation-card ul { min-height: 53px; margin: 0; padding-left: 17px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.negotiation-card p { margin: 0; color: #45564d; font-size: 11px; line-height: 1.45; }
.negotiation-card > a { width: max-content; color: var(--green); font-size: 11px; font-weight: 850; }
.supplier-audit-row { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(150px, .8fr) 105px 120px 125px 55px; align-items: center; gap: 13px; min-height: 58px; padding: 9px 7px; border-top: 1px solid var(--line); }
.supplier-audit-row.header { min-height: 31px; padding-block: 0 7px; border: 0; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.supplier-audit-row > span { min-width: 0; display: grid; gap: 2px; }
.supplier-audit-row > span:first-child b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-audit-row small { color: var(--muted); font-size: 9px; }
.supplier-audit-row > a { justify-self: end; padding: 6px 9px; border: 1px solid #cddbd1; border-radius: 7px; color: var(--green); font-size: 10px; font-weight: 850; text-decoration: none; }
.audit-score { grid-template-columns: minmax(60px, 1fr) auto !important; align-items: center; gap: 8px !important; }
.audit-score i { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--lime)) 0 / var(--score) 100% no-repeat, #edf1ee; }
.audit-score b { color: var(--green); font-size: 11px; font-variant-numeric: tabular-nums; }
.empty.compact { padding: 24px 12px; }
.empty, .loading, .load-error { padding: 60px 20px; color: var(--muted); text-align: center; }
.load-error { color: var(--danger); }
.comparator-controls { display: grid; grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(150px, .42fr)); align-items: end; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f4faf5, #fbfdfb); }
.comparator-controls[hidden] { display: none; }
.comparator-controls > div { display: grid; gap: 3px; align-self: center; }
.comparator-controls small { color: var(--green-2); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.comparator-controls strong { font-size: 12px; }
.comparator-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.comparator-controls select { height: 37px; padding: 0 10px; border: 1px solid #cfdcd2; border-radius: 8px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 750; text-transform: none; }
.comparator-empty { display: grid; justify-items: center; gap: 9px; padding: 72px 24px; text-align: center; }
.comparator-empty > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: #e9f5ec; font-size: 29px; font-weight: 900; }
.comparator-empty h2 { margin: 5px 0 0; font-size: 24px; }
.comparator-empty p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.comparator-overview { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f8fbf9; }
.comparator-overview > div { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #d9e5dc; border-radius: 11px; background: #fff; }
.comparator-overview small { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.comparator-overview b { color: var(--green); font-size: 20px; }
.comparator-overview span { color: var(--muted); font-size: 9px; }
.comparator-group { border-top: 12px solid #edf3ef; }
.comparator-group:first-of-type { border-top-width: 0; }
.comparator-group > header { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(430px, 1.2fr); align-items: center; gap: 22px; padding: 17px 18px; border-bottom: 1px solid #dce6df; background: linear-gradient(120deg, #f7fbf8, #eef8f0); }
.comparator-group > header small { color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.comparator-group h2 { margin: 3px 0; font-size: 19px; }
.comparator-group header p { margin: 0; color: var(--muted); font-size: 10px; }
.comparator-verdict { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px; }
.comparator-verdict > span { display: grid; gap: 2px; padding: 9px 11px; border: 1px solid #d4e2d8; border-radius: 9px; background: rgba(255,255,255,.82); }
.comparator-verdict > span:first-child { border-color: #9fc9aa; background: #effaf2; }
.comparator-verdict .difference { border-color: #d9d6bd; background: #fffdf2; }
.comparator-verdict small { color: var(--muted) !important; }
.comparator-verdict b { color: var(--green); font-size: 15px; }
.comparator-verdict em { overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.comparator-row { display: grid; grid-template-columns: 28px minmax(260px, 1.35fr) minmax(180px, .9fr) minmax(150px, .72fr) minmax(145px, .7fr) 100px 68px; align-items: center; gap: 12px; min-height: 70px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.comparator-row.header { min-height: 34px; padding-block: 0; color: var(--muted); background: #fbfcfb; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.comparator-row.cheapest { box-shadow: inset 4px 0 #72b548; background: #f5fbf6; }
.comparator-row.expensive:not(.cheapest) { box-shadow: inset 4px 0 #dca7a7; }
.comparator-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: #edf5ef; font-size: 10px; font-weight: 900; }
.comparator-row .number { display: grid; gap: 2px; text-align: right; }
.comparator-row .number b { color: var(--green); font-size: 15px; }
.comparator-row .number small { color: var(--muted); font-size: 8px; }
.comparator-flags { display: grid; justify-items: start; gap: 3px; }
.comparator-flags b, .comparator-flags small { width: max-content; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-weight: 900; }
.comparator-flags .best { color: #1e6740; background: #dff3e5; }
.comparator-flags .worst { color: #963b3b; background: #ffe7e7; }
.comparator-flags small { color: #79540f; background: #fff0bf; }
.pagination { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 12px; }
.services-dashboard { min-width: 980px; display: grid; gap: 14px; padding: 16px; background: #f6f9f7; }
.service-overview { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 10px; }
.service-overview > div { min-height: 106px; display: grid; align-content: center; gap: 5px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 26px rgba(25,72,47,.05); }
.service-overview small, .service-overview span { color: var(--muted); font-size: 10px; }
.service-overview b { color: var(--green); font-size: 22px; }
.service-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.service-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 18px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#f6fbf7,#fff); }
.service-panel h3 { margin: 2px 0 0; font-size: 20px; }
.service-panel > header > p { width: min(500px,50%); margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: right; }
.service-supplier-row { display: grid; grid-template-columns: minmax(260px,1.4fr) repeat(4,minmax(125px,.75fr)); align-items: center; gap: 14px; min-height: 72px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.service-supplier-row:last-child { border-bottom: 0; }
.service-supplier-row > span:first-child, .service-invoice-row > span:first-child { display: grid; gap: 3px; }
.service-supplier-row small, .service-invoice-row small { color: var(--muted); font-size: 9px; }
.service-supplier-row .number, .service-invoice-row .number { display: grid; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.service-supplier-row .number b { color: var(--green); font-size: 13px; }
.service-invoice-list { overflow-x: auto; }
.service-invoice-row { display: grid; grid-template-columns: minmax(270px,1.45fr) 145px 120px 135px 155px 110px 68px; align-items: center; gap: 12px; min-height: 78px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.service-invoice-row.header { min-height: 35px; color: var(--muted); background: #fafcfb; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.service-invoice-row.credit { box-shadow: inset 4px 0 #cf8d8d; background: #fff9f9; }
.service-invoice-row em { width: max-content; padding: 3px 6px; border-radius: 999px; color: #8d3d3d; background: #ffe7e7; font-size: 8px; font-style: normal; font-weight: 850; }
.service-charts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.service-charts-title { grid-column: 1/-1; display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 5px 2px 0; }
.service-charts-title h2 { margin: 2px 0 0; font-size: 22px; }
.service-charts-title > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.service-chart-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.service-chart-card > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 15px 17px 10px; }
.service-chart-card h3 { margin: 2px 0 0; font-size: 17px; }
.service-chart-card > header > p { max-width: 270px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; text-align: right; }
.service-chart-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; padding: 0 17px 8px; color: var(--muted); font-size: 9px; }
.service-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.service-chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.service-chart { padding: 0 8px 6px; overflow-x: auto; }
.service-chart svg { display: block; width: 100%; min-width: 570px; height: 260px; }
.service-chart line { stroke: #dbe4dd; stroke-width: 1; }
.service-chart polyline { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.service-chart circle { stroke: #fff; stroke-width: 2; }
.service-chart text { fill: var(--muted); font-size: 10px; }
.service-chart .month-label { font-size: 9px; }
.page-button { min-width: 36px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); background: #fff; }
.page-button.active { border-color: var(--green); color: #fff; background: var(--green); }
.page-button:disabled { cursor: default; opacity: .4; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 12% 10%, #dbeedc 0, transparent 32%), linear-gradient(145deg, #f4f8f4, #e9f0ea); }
.login-card { width: min(440px, 100%); padding: 38px; border: 1px solid #d8e4db; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 28px 90px rgba(19,67,40,.16); }
.login-card .brand-mark { margin-bottom: 32px; color: var(--green); }
.login-card h1 { margin-bottom: 10px; font-size: 30px; }
.muted { color: var(--muted); }
.login-form { display: grid; gap: 16px; margin-top: 28px; }
.login-form label { font-size: 12px; }
.login-form input { height: 45px; }
.login-form .primary-button { height: 46px; margin-top: 4px; }
.login-help-link { display: grid; min-height: 44px; place-items: center; text-decoration: none; }
.alert { margin-top: 16px; padding: 11px 13px; border-radius: 9px; font-size: 13px; }
.alert.error { color: #8d2929; background: #ffe8e8; }
.alert.success { color: #17633a; background: #e7f6ec; }

.history-dialog { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(8, 35, 20, .28); }
.history-dialog::backdrop { background: rgba(9, 26, 17, .58); backdrop-filter: blur(3px); }
.history-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.history-head h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.history-head .muted { margin: 5px 0 0; }
.history-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.history-export-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 9px; color: #fff; background: var(--green); font-size: 11px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.history-export-button:hover { background: var(--green-2); }
.history-export-button.secondary { border: 1px solid #cbd9cf; color: var(--green); background: #f5f9f6; }
.history-export-button.secondary:hover { background: #e9f3ec; }
.history-export-button span { font-size: 15px; line-height: 1; }
.dialog-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: #fff; font-size: 25px; line-height: 1; }
.history-content { padding: 22px 24px 26px; }
.history-summary { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; }
.history-summary > div { display: grid; gap: 4px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfb; }
.history-summary small, .history-summary span { color: var(--muted); }
.history-summary b { font-size: 19px; }
.history-summary > div { min-width: 0; overflow-wrap: anywhere; }
.history-summary > div > span { font-size: 12px; }
.gldoc-price-document-link { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 44px; color: inherit; text-decoration: none; }
.gldoc-price-document-link :is(b, strong) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gldoc-price-document-link:hover :is(b, strong) { color: var(--green); text-decoration-thickness: 2px; }
.gldoc-price-document-link:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.history-price-context { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.price-up { color: var(--danger); }
.price-down { color: var(--green-2); }
.history-chart { margin-top: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #fbfdfb, #f4f8f5); overflow-x: auto; }
.history-chart svg { display: block; min-width: 680px; width: 100%; height: 230px; }
.history-chart line { stroke: #cfdad2; stroke-width: 1; }
.history-chart polyline { fill: none; stroke: var(--green-2); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.history-chart circle { fill: var(--lime); stroke: var(--green); stroke-width: 2; }
.history-chart text { fill: var(--muted); font-size: 11px; }
.history-chart-empty { margin-top: 18px; padding: 28px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.history-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; color: #6e5915; background: #fff7d8; font-size: 12px; }
.promotion-insights { margin-top: 18px; padding: 18px; border: 1px solid #cfe0d4; border-radius: 15px; background: linear-gradient(145deg, #f4faf5, #fbfdfb); }
.promotion-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.promotion-title h3 { margin: 0; color: var(--green); font-size: 20px; letter-spacing: -.02em; }
.promotion-title > p { width: min(460px, 52%); margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.promotion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.promotion-card { min-width: 0; padding: 15px; border: 1px solid #d7e4da; border-radius: 13px; background: #fff; box-shadow: 0 9px 24px rgba(24, 81, 49, .06); }
.promotion-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.promotion-badge { width: max-content; max-width: 100%; padding: 6px 9px; border-radius: 999px; color: #69490b; background: #ffe7a8; font-size: 10px; font-weight: 900; letter-spacing: .025em; }
.promotion-company { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 13px; }
.promotion-company small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.promotion-company h4 { margin: 3px 0 0; font-size: 17px; }
.promotion-invoice { margin: 6px 0 13px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.promotion-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.promotion-metrics > div { display: grid; align-content: start; gap: 3px; min-height: 78px; padding: 9px; border-radius: 9px; background: #f6f8f6; }
.promotion-metrics > div.effective { background: #e7f5eb; }
.promotion-metrics small, .promotion-metrics span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.promotion-metrics b { color: var(--green); font-size: 15px; font-variant-numeric: tabular-nums; }
.company-comparison { display: grid; gap: 4px; margin-top: 10px; padding: 11px 12px; border-left: 4px solid var(--lime); border-radius: 8px; color: #31503e; background: #eef8f0; font-size: 11px; }
.company-comparison strong { color: var(--green); font-size: 15px; }
.company-comparison a { width: max-content; margin-top: 3px; color: var(--green-2); font-weight: 800; }
.promotion-explanation { margin: 10px 0 0; padding: 10px 11px; border-radius: 8px; color: #496153; background: #f3f6f3; font-size: 11px; line-height: 1.4; }
.other-comparisons { display: grid; gap: 3px; margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; }
.older-promotions { margin-top: 12px; }
.older-promotions summary { width: max-content; padding: 7px 10px; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 800; }
.older-promotions[open] summary { margin-bottom: 10px; }
.history-table-wrap { margin-top: 18px; overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { padding: 9px 10px; color: var(--muted); background: #f7f9f7; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.history-table td { padding: 10px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.history-table td:nth-child(3), .history-table td:nth-child(4) { font-variant-numeric: tabular-nums; }
.history-table td b, .history-table td small { display: block; }
.history-table td small { margin-top: 2px; color: var(--muted); }

.line-editor-dialog { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(8, 35, 20, .28); }
.line-editor-dialog::backdrop { background: rgba(9, 26, 17, .58); backdrop-filter: blur(3px); }
.line-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); }
.line-editor-head h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.025em; }
.line-editor-body { padding: 20px 23px; }
.line-editor-context { margin: 0 0 15px; padding: 10px 12px; border-radius: 9px; color: var(--green); background: #eef7f0; font-size: 12px; font-weight: 800; }
.line-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.line-editor-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.line-editor-grid label.wide { grid-column: 1 / -1; }
.line-editor-grid input { min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #ccd8cf; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; }
.line-editor-grid input:focus { border-color: var(--green-2); outline: 3px solid rgba(36, 122, 72, .12); }
.line-editor-help { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.line-editor-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; color: #8d2929; background: #ffe8e8; font-size: 12px; }
.line-editor-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 9px; padding: 15px 23px 19px; border-top: 1px solid var(--line); background: #fafcfb; }
.line-editor-actions button { min-height: 40px; padding: 0 14px; border-radius: 9px; font-weight: 850; }
.danger-button { border: 1px solid #e4adad; color: #972d2d; background: #fff5f5; }
.secondary-button { border: 1px solid #cad6cd; color: var(--green); background: #fff; }
.line-editor-actions .primary-button { border: 1px solid var(--green); color: #fff; background: var(--green); }
.line-editor-actions button:disabled { cursor: wait; opacity: .55; }

@media (max-width: 1150px) {
    .filters-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
    .price-alert { grid-template-columns: 38px minmax(230px, 1.2fr) minmax(180px, 1fr) minmax(140px, .7fr) 100px 88px; }
    .comparison-supplier { grid-template-columns: minmax(150px, 1fr) 115px; }
    .comparison-supplier dl { grid-column: 1 / -1; }
    .comparator-controls { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .comparator-controls > div { grid-column: 1 / -1; }
    .comparator-group > header { grid-template-columns: 1fr; }
    .article-group-head { grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(115px, .6fr)); }
    .article-group-identity { grid-row: span 2; }
    .price-change-side { grid-template-columns: 1fr; align-content: start; }
}
@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { position: static; height: auto; padding: 17px; }
    .side-nav, .sidebar-label { display: none; }
    .sidebar-company-control { margin-top: 16px; padding: 0; }
    .sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; padding-top: 12px; }
    .sidebar-footer small { flex-basis: 100%; }
    .content { padding: 22px 14px 40px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .summary-chips { justify-content: flex-start; }
    .filters-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .history-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
    .promotion-grid { grid-template-columns: 1fr; }
    .promotion-title { align-items: flex-start; flex-direction: column; gap: 7px; }
    .promotion-title > p { width: 100%; }
    .offers-overview { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .analytics-dashboard { min-width: 0; padding: 10px; }
    .services-dashboard { min-width: 920px; }
    .analytics-overview { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .audit-overview { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .audit-heading { align-items: flex-start; flex-direction: column; }
    .analytics-panel > header { align-items: flex-start; flex-direction: column; gap: 7px; }
    .analytics-panel > header > p { width: 100%; text-align: left; }
    .negotiation-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
    .comparator-overview { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .supplier-comparison-card > header { grid-template-columns: 1fr; }
    .comparison-verdict { justify-items: start; text-align: left; }
    .article-view-controls { align-items: flex-start; flex-direction: column; }
    .article-group-head { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .article-group-identity { grid-column: 1 / -1; grid-row: auto; }
    .price-change-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .price-change-tools { width: 100%; justify-items: start; }
    .price-change-window { justify-items: start; text-align: left; }
    .price-change-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .price-change-overview { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
    .price-change-comparison { grid-template-columns: 1fr; }
    .price-change-arrow { transform: rotate(90deg); }
}
@media (max-width: 520px) {
    .filters-grid { grid-template-columns: 1fr; }
    .results-toolbar { align-items: flex-start; flex-direction: column; padding-top: 8px; }
    .tabs { min-height: 45px; }
    #result-count { margin-block: 4px 10px; }
    .login-card { padding: 28px 23px; }
    .history-head, .history-content { padding-inline: 16px; }
    .history-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .history-head-actions { justify-content: flex-start; flex-wrap: wrap; }
    .history-head-actions .dialog-close { margin-left: auto; }
    .history-summary { grid-template-columns: 1fr; }
    .promotion-insights { padding: 13px; }
    .promotion-metrics { grid-template-columns: 1fr; }
    .promotion-metrics > div { min-height: 0; }
    .offers-overview { grid-template-columns: 1fr; min-width: 0; }
    .document-overview { grid-template-columns: 1fr; min-width: 0; }
    .offers-policy { min-width: 0; }
    .comparator-controls, .comparator-overview { grid-template-columns: 1fr; }
    .line-editor-grid { grid-template-columns: 1fr; }
    .line-editor-grid label.wide { grid-column: auto; }
    .line-editor-actions { grid-template-columns: 1fr 1fr; }
    .line-editor-actions > span { display: none; }
    .article-view-switch { width: 100%; }
    .article-view-switch button { flex: 1; }
    .price-change-dashboard { padding: 13px; }
    .price-change-overview { grid-template-columns: 1fr; }
    .price-change-card-head { grid-template-columns: 1fr; }
    .price-change-alert { justify-items: start; text-align: left; }
    .price-change-actions label, .price-change-export { width: 100%; }
    .price-change-export { justify-content: center; }
}

/* Escandallos: enlaces desde la aplicación principal */
a.nav-item { text-decoration: none; }
.app-switch-link { display: none; }
.history-recipes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f6faf7; font-size: 13px; }
.history-recipes a { padding: 2px 9px; border: 1px solid #cad6cd; border-radius: 99px; color: var(--green); background: #fff; font-weight: 750; text-decoration: none; }
@media (max-width: 820px) {
    .app-switch-link { display: inline-block; margin-bottom: 8px; color: var(--green); font-size: 13px; font-weight: 800; text-decoration: none; }
}

/* Estado de instancia y cuenta: estilos externos compatibles con CSP. */

                html.gldoc-duplicate-instance body > :not(#gldoc-single-instance) { visibility: hidden !important; }
                #gldoc-single-instance { position: fixed; z-index: 2147483647; inset: 0; display: grid; place-items: center; padding: 24px; color: #17231e; background: #f3f6f3; font-family: Inter, system-ui, sans-serif; }
                #gldoc-single-instance article { width: min(460px, 100%); padding: 34px; border: 1px solid #d6e2d9; border-radius: 22px; background: #fff; box-shadow: 0 26px 80px rgba(18,56,37,.18); text-align: center; }
                #gldoc-single-instance .instance-logo { margin: 0 auto 18px; color: #123825; font-size: 66px; font-weight: 950; letter-spacing: -.11em; line-height: 1; }
                #gldoc-single-instance .instance-logo span { color: #8dc52b; }
                #gldoc-single-instance h1 { margin: 0 0 10px; font-size: 25px; letter-spacing: -.03em; }
                #gldoc-single-instance p { margin: 0; color: #65716b; line-height: 1.5; }
                #gldoc-single-instance button { margin-top: 24px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff; background: #22633f; font: inherit; font-weight: 800; cursor: pointer; }
            
.account-link { color: var(--lime); font-size: 13px; text-decoration: none; }
.account-link:hover { text-decoration: underline; }
.account-empty { padding: 24px; }
.service-comparison-entry { display: flex; justify-content: flex-end; padding: 0 0 14px; }
.service-comparison-entry a { color: #17664b; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.gldoc-comparison-category { display: grid; gap: 8px; margin-top: 16px; padding: 12px 0; border-top: 1px solid #dce5df; }
.gldoc-comparison-category p { margin: 4px 0 0; }
.gldoc-comparison-category-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.gldoc-comparison-category-actions label { display: grid; gap: 4px; min-width: min(100%, 220px); }
.gldoc-comparison-category-actions select { width: 100%; }


/* =====================================================================
   Portada de acceso (public/login.php) · 26/09/2026
   Prefijo lp- para no chocar con el resto de la aplicación.
   Fuentes autoalojadas: el CSP (default-src 'self') no admite Google Fonts.
   ===================================================================== */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-500.woff2") format("woff2"); }

.lp-body {
    --lp-forest: #0f2e1f; --lp-green-deep: #16462e; --lp-lime-ink: #6f9a12; --lp-paper: #f7f8f5;
    --lp-on-dark: #eef4ee; --lp-on-dark-muted: #9fb5a6; --lp-on-dark-line: rgba(238, 244, 238, .14); --lp-on-dark-card: rgba(255, 255, 255, .06);
    --lp-focus: 0 0 0 3px rgba(167, 214, 61, .45);
    --lp-display: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, sans-serif;
    --lp-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--lp-paper); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.lp-stage { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

/* ---------- panel de producto (izquierda) ---------- */
.lp-show { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: clamp(26px, 3.5vw, 44px); padding: clamp(28px, 4.5vw, 64px) clamp(20px, 5vw, 72px); color: var(--lp-on-dark); background: var(--lp-forest); }
.lp-show::before { content: ""; position: absolute; inset: 0; pointer-events: none; background:
    radial-gradient(900px 520px at 110% -10%, rgba(167, 214, 61, .18), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(47, 129, 84, .35), transparent 60%); }
.lp-show > * { position: relative; }
.lp-brand { display: inline-flex; align-items: baseline; font-family: var(--lp-display); font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--lp-on-dark); }
.lp-brand span { color: var(--lime); }
.lp-brand small { margin-left: 14px; font-family: inherit; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--lp-on-dark-muted); }
.lp-brand-ink { font-size: 24px; color: var(--lp-green-deep); }
.lp-brand-ink span { color: var(--lp-lime-ink); }
.lp-eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.lp-show h1 { max-width: 14ch; margin: 0; font-family: var(--lp-display); font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; color: var(--lp-on-dark); }
.lp-lead { max-width: 52ch; margin: 14px 0 0; font-size: clamp(15px, 1.3vw, 18px); color: var(--lp-on-dark-muted); }

/* ejemplo del buscador */
.lp-demo { padding: 16px; border: 1px solid var(--lp-on-dark-line); border-radius: 18px; background: var(--lp-on-dark-card); backdrop-filter: blur(6px); }
.lp-searchbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; color: #17231e; background: #fff; font-size: 16px; }
.lp-searchbar svg { flex: none; }
.lp-q { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; white-space: nowrap; }
.lp-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.15em; background: var(--green); animation: lp-blink 1s steps(1) infinite; }
.lp-kbd { padding: 2px 6px; border: 1px solid #dfe6e1; border-radius: 6px; font-family: var(--lp-mono); font-size: 11px; color: #65716b; }
@keyframes lp-blink { 50% { opacity: 0; } }
.lp-hits { display: grid; gap: 8px; margin-top: 12px; }
.lp-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--lp-on-dark-line); border-radius: 12px; background: rgba(255, 255, 255, .04); animation: lp-rise .5s ease-out both; }
.lp-hit:nth-child(2) { animation-delay: .12s; }
.lp-hit:nth-child(3) { animation-delay: .24s; }
@keyframes lp-rise { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lp-hit-name { overflow: hidden; font-weight: 600; color: var(--lp-on-dark); text-overflow: ellipsis; white-space: nowrap; }
.lp-hit-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--lp-on-dark-muted); font-variant-numeric: tabular-nums; }
.lp-hit-meta code { font-family: var(--lp-mono); font-size: 12px; color: var(--lp-on-dark); }
.lp-hit-price { grid-column: 2; grid-row: 1 / 3; text-align: right; font-family: var(--lp-mono); font-variant-numeric: tabular-nums; }
.lp-hit-price b { display: block; font-size: 20px; font-weight: 500; line-height: 1.1; color: var(--lime); }
.lp-hit-price small { font-size: 11px; color: var(--lp-on-dark-muted); }
.lp-demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--lp-on-dark-muted); }
.lp-pdf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--lime); }

/* cifras */
.lp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px 18px; padding-top: 22px; border-top: 1px solid var(--lp-on-dark-line); }
.lp-stat b { display: block; font-family: var(--lp-display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lp-stat span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--lp-on-dark-muted); }

/* garantías */
.lp-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lp-point { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--lp-on-dark-line); font-size: 13.5px; line-height: 1.4; }
.lp-point svg { flex: none; margin-top: 2px; color: var(--lime); }
.lp-point b { display: block; font-weight: 600; color: var(--lp-on-dark); }
.lp-point span { color: var(--lp-on-dark-muted); }

/* ---------- acceso (derecha) ---------- */
.lp-gate { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px); background: var(--soft); }
.lp-card { width: 100%; max-width: 420px; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.lp-card h2 { margin: 18px 0 4px; font-family: var(--lp-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.lp-sub { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.lp-form { display: block; }
.lp-field { display: grid; gap: 6px; margin-bottom: 14px; }
.lp-field label { font-size: 13px; font-weight: 600; }
.lp-field input { width: 100%; height: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; font: inherit; font-size: 15px; color: var(--ink); background: var(--soft); transition: border-color .15s, box-shadow .15s; }
.lp-field input:focus { border-color: var(--green); background: #fff; box-shadow: var(--lp-focus); }
.lp-pw { position: relative; }
.lp-pw input { padding-right: 84px; }
.lp-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 6px 8px; border: 0; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; color: var(--green); background: none; cursor: pointer; }
.lp-toggle:focus-visible { outline: none; box-shadow: var(--lp-focus); }
.lp-btn { width: 100%; margin-top: 6px; padding: 14px 16px; border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; color: #fff; background: var(--lp-green-deep); cursor: pointer; transition: background .15s, transform .05s; }
.lp-btn:hover { background: var(--green); }
.lp-btn:active { transform: translateY(1px); }
.lp-btn:focus-visible { outline: none; box-shadow: var(--lp-focus); }
.lp-alt { display: block; margin-top: 14px; font-size: 13.5px; font-weight: 600; text-align: center; color: var(--green); text-decoration: none; }
.lp-alt:hover { text-decoration: underline; }
.lp-alert { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(184, 59, 59, .25); border-radius: 10px; font-size: 13.5px; color: #b83b3b; background: rgba(184, 59, 59, .08); }
.lp-alert-ok { border-color: rgba(34, 99, 63, .25); color: var(--green); background: rgba(34, 99, 63, .08); }
.lp-trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-foot { margin: 18px 0 0; font-size: 12px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
    /* En móvil se apilan: primero el acceso, debajo qué es la aplicación (decisión del usuario, 26/09/2026). */
    .lp-stage { grid-template-columns: minmax(0, 1fr); }
    .lp-gate { order: -1; padding-top: clamp(20px, 6vw, 40px); padding-bottom: clamp(20px, 6vw, 40px); }
    .lp-show { min-height: auto; }
}
@media (max-width: 520px) {
    .lp-hit { grid-template-columns: minmax(0, 1fr); }
    .lp-hit-price { grid-column: 1; grid-row: auto; text-align: left; }
    .lp-hit-name { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-hit { animation: none; }
    .lp-caret { animation: none; }
}
