@font-face {
    font-family: "RoadRadio";
    src: url("/fonts/RoadRadio.ttf") format("truetype");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0e100d;
    --bg-2: #151812;
    --panel: rgba(246, 247, 239, 0.96);
    --panel-dark: rgba(27, 31, 24, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.72);
    --text: #20231d;
    --text-inverse: #f4f1e8;
    --muted: #747b6b;
    --muted-dark: #a7ad9a;
    --line: rgba(32, 35, 29, 0.12);
    --line-dark: rgba(222, 215, 191, 0.16);
    --accent: #c6a15b;
    --accent-strong: #f2c66f;
    --olive: #69735a;
    --olive-dark: #343b2c;
    --success: #3fbf72;
    --warning: #d49535;
    --error: #e05b4f;
    --border: var(--line-dark);
    --code-bg: var(--panel-dark);
    --shadow: 0 18px 60px rgba(4, 6, 4, 0.18);
    --shadow-tight: 0 10px 30px rgba(4, 6, 4, 0.14);
    --font-main: "RoadRadio", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-code: "RoadRadio", Consolas, "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 76% 14%, rgba(198, 161, 91, 0.18) 0 2px, transparent 2px 220px),
        radial-gradient(circle at 18% 34%, rgba(105, 115, 90, 0.18) 0 1px, transparent 1px 180px),
        radial-gradient(circle at 24px 24px, rgba(198, 161, 91, 0.06) 0 1px, transparent 1px),
        linear-gradient(180deg, #151812 0%, #10130e 42%, #0e100d 100%);
    background-size: auto, auto, 28px 28px, auto;
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.68), transparent 70%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(125deg, transparent 0 42%, rgba(198, 161, 91, 0.08) 42.15%, transparent 42.4% 100%),
        linear-gradient(35deg, transparent 0 62%, rgba(105, 115, 90, 0.1) 62.1%, transparent 62.35% 100%),
        conic-gradient(from 18deg at 82% 18%, rgba(198, 161, 91, 0.08), transparent 24deg, transparent 360deg);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
}

h1,
h2,
h3,
.section-title {
    font-family: var(--font-main);
    letter-spacing: 0;
}

#matrix {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.025;
    filter: grayscale(1);
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e100d;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loader-terminal {
    width: min(420px, calc(100vw - 32px));
    border: 1px solid var(--line-dark);
    background: #171a13;
    color: var(--accent-strong);
    padding: 22px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-family: var(--font-code);
    font-size: 0.78rem;
}

.loader-line {
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid var(--accent);
    animation: typing 1.2s steps(40, end), blink-caret 0.7s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

.glass-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow-tight);
}

.command-header {
    border-color: rgba(198, 161, 91, 0.26);
    background:
        linear-gradient(135deg, rgba(35, 40, 30, 0.98), rgba(18, 21, 16, 0.98)),
        var(--panel-dark);
    color: var(--text-inverse);
    box-shadow: var(--shadow);
}

.command-header::after,
.glass-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(198, 161, 91, 0.62), transparent);
}

.system-label {
    border: 1px solid rgba(198, 161, 91, 0.42);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.1);
    color: var(--accent-strong);
    padding: 6px 10px;
    font-family: var(--font-code);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.neo-input {
    min-height: 42px;
    border: 1px solid rgba(32, 35, 29, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-family: var(--font-code);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.neo-input:focus {
    border-color: rgba(198, 161, 91, 0.8);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(198, 161, 91, 0.16);
    outline: none;
}

.neo-input::placeholder {
    color: rgba(105, 115, 90, 0.78);
}

.neo-btn,
.mini-btn {
    border: 1px solid rgba(105, 115, 90, 0.32);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--olive-dark);
    font-weight: 800;
    text-transform: uppercase;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.mini-btn {
    padding: 7px 10px;
    font-size: 0.64rem;
    letter-spacing: 0.05em;
}

.neo-btn:hover:not(:disabled),
.mini-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(198, 161, 91, 0.7);
    background: rgba(198, 161, 91, 0.14);
}

.intel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.home-nav-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.intel-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid rgba(198, 161, 91, 0.34);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.12);
    color: #76571f;
    padding: 4px 9px;
    font-family: var(--font-code);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intel-pill.muted {
    border-color: rgba(105, 115, 90, 0.22);
    background: rgba(105, 115, 90, 0.08);
    color: var(--muted);
}

.neo-btn:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.section-title {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 9px;
    border-radius: 2px;
    background: var(--accent);
}

.stat-card {
    position: relative;
    min-height: 124px;
    overflow: hidden;
    border: 1px solid rgba(32, 35, 29, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f3ec 100%);
    padding: 20px;
    box-shadow: var(--shadow-tight);
}

.command-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.strip-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.strip-status {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(198, 161, 91, 0.22);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 240, 231, 0.9)),
        var(--panel);
    padding: 16px;
    box-shadow: var(--shadow-tight);
}

.strip-status::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--olive), var(--accent), transparent);
}

.quiet-summary {
    padding: 0;
    border-color: rgba(32, 35, 29, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

.quiet-summary::after {
    display: none;
}

.quiet-summary[open] {
    background: rgba(255, 255, 255, 0.62);
}

.quiet-summary-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    list-style: none;
    padding: 14px 16px;
    cursor: pointer;
    color: var(--text);
    font-family: var(--font-code);
    font-size: 0.72rem;
    font-weight: 700;
}

.quiet-summary-toggle::-webkit-details-marker {
    display: none;
}

.quiet-summary-toggle::after {
    content: "+";
    color: var(--muted);
    font-size: 0.9rem;
}

.quiet-summary[open] .quiet-summary-toggle::after {
    content: "−";
}

.quiet-summary-hint {
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quiet-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
}

.quiet-stat {
    border: 1px solid rgba(32, 35, 29, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.64);
    padding: 12px 14px;
}

.quiet-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.quiet-stat strong {
    color: var(--text);
    font-size: clamp(1.15rem, 1.6vw, 1.6rem);
    font-weight: 800;
    line-height: 1;
}

.stat-card.compact {
    min-height: 106px;
    padding: 16px 16px 14px;
}

.stat-card.compact span {
    margin-bottom: 10px;
    font-size: 0.66rem;
}

.stat-card.compact strong {
    font-size: clamp(1.55rem, 2vw, 2.25rem);
}

.workbench-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.data-workbench {
    min-width: 0;
}

.filter-rail {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding-right: 2px;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--olive);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.stat-card strong {
    color: var(--text);
    font-size: clamp(1.9rem, 3vw, 2.9rem);
    font-weight: 800;
    line-height: 1;
}

.stat-card.danger::before {
    background: var(--error);
}

.stat-card.danger strong {
    color: var(--error);
}

.glass-panel > .w-full {
    border-radius: 999px;
    border-color: rgba(32, 35, 29, 0.14) !important;
    background: rgba(32, 35, 29, 0.12) !important;
}

#monitoringProgress {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--olive), var(--accent)) !important;
}

.collection-summary {
    display: grid;
    gap: 8px;
}

.collection-summary.compact {
    max-height: 96px;
    overflow: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(32, 35, 29, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
    font-size: 0.72rem;
}

.summary-row span {
    color: var(--text);
}

.summary-row strong {
    color: var(--success);
    text-align: right;
}

.summary-row.error strong {
    color: var(--error);
}

.table-shell {
    max-height: 70vh;
    overflow: auto;
    border: 1px solid rgba(32, 35, 29, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pagination-status {
    color: var(--muted);
    font-family: var(--font-code);
    font-size: 0.68rem;
    margin-left: auto;
    text-transform: uppercase;
}

.data-table {
    width: 100%;
    min-width: 1220px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.76rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #20251b;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid rgba(32, 35, 29, 0.09);
    padding: 12px 14px;
    vertical-align: top;
}

.data-table th {
    color: #efe5cf;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sort-btn {
    color: inherit;
    font: inherit;
    text-transform: inherit;
}

.sort-btn::after {
    content: "-";
    margin-left: 6px;
    color: var(--muted);
}

.sort-btn.active::after {
    content: "^";
    color: var(--accent);
}

.sort-btn.active[data-direction="desc"]::after {
    content: "v";
}

.data-table td {
    color: var(--text);
}

.data-table tbody tr.product-group-row {
    background: rgba(255, 255, 255, 0.76);
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.data-table tbody tr.product-group-row:hover {
    background: #fff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.data-table tbody tr.product-group-row.expanded {
    background: #f8f7f1;
    box-shadow: inset 3px 0 0 var(--olive);
}

.expand-btn {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 9px;
    border: 1px solid rgba(105, 115, 90, 0.34);
    border-radius: 8px;
    color: var(--olive-dark);
    background: #f5f4ed;
    font-weight: 900;
    line-height: 1;
}

.product-group-row.expanded .expand-btn {
    border-color: rgba(198, 161, 91, 0.7);
    background: var(--accent);
    color: #171a13;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 120px;
}

.chip {
    border: 1px solid rgba(105, 115, 90, 0.24);
    border-radius: 999px;
    background: rgba(105, 115, 90, 0.09);
    color: var(--olive-dark);
    padding: 3px 7px;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.chip.muted {
    color: var(--muted);
    background: rgba(116, 123, 107, 0.08);
}

.variant-row.hidden {
    display: none;
}

.variant-row td {
    padding: 0;
    background: #22271d;
}

.variant-panel {
    padding: 14px;
    border-left: 3px solid var(--accent);
}

.variant-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #171a13;
    font-size: 0.7rem;
}

.variant-table th,
.variant-table td {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(222, 215, 191, 0.09);
}

.variant-table th {
    color: var(--accent-strong);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.variant-table td {
    color: #e4dfd1;
}

.product-cell {
    min-width: 320px;
    max-width: 540px;
    color: #11150f !important;
    font-weight: 750;
}

.price-cell {
    color: #1f8e55 !important;
    font-family: var(--font-code);
    font-weight: 800;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-badge.ok {
    color: var(--success);
    background: rgba(63, 191, 114, 0.1);
}

.status-badge.off {
    color: var(--error);
    background: rgba(224, 91, 79, 0.1);
}

.data-table a {
    color: #76571f;
    font-weight: 800;
    text-decoration: none;
}

.data-table a:hover {
    color: #1f241a;
    text-decoration: underline;
}

.empty-row td {
    color: var(--muted);
    text-align: center;
    padding: 48px 12px;
}

.source-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    max-height: 56vh;
    overflow-y: auto;
    padding-right: 8px;
}

.source-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.25;
}

.source-row input {
    flex: 0 0 auto;
}

.source-summary-row {
    align-items: flex-start;
    border: 1px solid rgba(32, 35, 29, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    padding: 11px;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.source-summary-row:hover {
    border-color: rgba(198, 161, 91, 0.34);
    background: #fff;
}

.source-summary-name {
    color: var(--text);
    font-weight: 800;
    min-width: 120px;
}

.source-summary-meta {
    color: var(--muted);
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.match-probe-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 96px 96px auto;
    gap: 8px;
    width: min(100%, 760px);
}

.match-probe-results {
    display: grid;
    gap: 12px;
}

.match-probe-card,
.empty-probe-result {
    border: 1px solid rgba(32, 35, 29, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    padding: 14px;
}

.match-probe-competitor {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.match-probe-candidates {
    display: grid;
    gap: 8px;
}

.match-probe-candidate {
    display: grid;
    grid-template-columns: 48px 90px minmax(220px, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(105, 115, 90, 0.18);
    border-radius: 10px;
    background: rgba(246, 247, 239, 0.8);
    padding: 9px 10px;
    font-size: 0.72rem;
}

.match-probe-candidate strong {
    color: var(--accent);
    font-family: var(--font-code);
}

.match-probe-candidate small {
    grid-column: 3;
    color: var(--muted);
    font-family: var(--font-code);
}

.matching-reference {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.matching-reference-button {
    display: block;
    width: 100%;
    border: 1px solid rgba(198, 161, 91, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.48);
    padding: 16px;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.matching-reference-button:hover {
    border-color: rgba(198, 161, 91, 0.72);
    background: rgba(255, 255, 255, 0.74);
    transform: translateY(-1px);
}

.matching-catalog-tree {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.matching-catalog-node {
    border: 1px solid rgba(32, 35, 29, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    overflow: hidden;
}

.matching-catalog-node.child {
    background: rgba(246, 247, 239, 0.84);
}

.matching-catalog-node summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 11px 12px;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.matching-catalog-node summary strong {
    min-width: 28px;
    border: 1px solid rgba(198, 161, 91, 0.36);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.12);
    color: #76571f;
    padding: 3px 7px;
    text-align: center;
    font-family: var(--font-code);
    font-size: 0.64rem;
}

.matching-catalog-children,
.matching-catalog-products {
    display: grid;
    gap: 7px;
    padding: 0 10px 10px;
}

.matching-catalog-product {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    border: 1px solid rgba(105, 115, 90, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
    padding: 8px 9px;
    color: var(--text);
    text-decoration: none;
}

.matching-catalog-product:hover,
.matching-catalog-product.active {
    border-color: rgba(198, 161, 91, 0.68);
    background: rgba(198, 161, 91, 0.12);
}

.matching-catalog-product span {
    color: #76571f;
    font-family: var(--font-code);
    font-size: 0.68rem;
    font-weight: 900;
}

.matching-catalog-product strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.matching-catalog-empty {
    color: var(--muted);
    padding: 8px 9px;
    font-size: 0.68rem;
}

.matching-title {
    color: var(--text);
    font-family: var(--font-code);
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-weight: 900;
    line-height: 1;
}

.matching-product-name {
    color: var(--text);
    font-size: clamp(1rem, 1.4vw, 1.35rem);
    font-weight: 800;
    margin-top: 10px;
}

.matching-controls {
    display: flex;
    align-items: end;
    gap: 8px;
}

.matching-controls label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
}

.matching-controls input {
    width: 120px;
}

.matching-table {
    min-width: 1280px;
}

.matching-review-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.matching-status-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.matching-status-metrics span,
.matching-status-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid rgba(105, 115, 90, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--muted);
    padding: 6px 10px;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.matching-status-metrics strong {
    color: var(--text);
    font-family: var(--font-code);
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.quality-badge.strong {
    color: var(--success);
    background: rgba(63, 191, 114, 0.1);
}

.quality-badge.medium {
    color: var(--warning);
    background: rgba(212, 149, 53, 0.1);
}

.quality-badge.weak {
    color: var(--muted);
    background: rgba(116, 123, 107, 0.1);
}

.matching-details {
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--font-code);
    font-size: 0.66rem;
    font-weight: 500;
}

.matching-details summary {
    cursor: pointer;
    color: #76571f;
    font-weight: 800;
}

.matching-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 260px;
    max-width: 360px;
}

.matching-review-reason,
.matching-review-note {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 0.6rem;
}

.matching-review-reason {
    width: 168px;
}

.matching-review-note {
    width: 170px;
}

.matching-review-actions .mini-btn {
    padding: 6px 8px;
    font-size: 0.58rem;
}

.color-mapping-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.color-mapping-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.color-mapping-actions .neo-input {
    width: min(420px, 58vw);
}

.price-report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.price-report-toolbar label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.price-report-toolbar input,
.price-report-toolbar select {
    min-width: 180px;
}

.price-report-total {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.price-report-total strong {
    color: var(--text);
    font-family: var(--font-code);
}

.price-report-table {
    min-width: 1320px;
}

.price-delta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-family: var(--font-code);
    font-size: 0.62rem;
    font-weight: 900;
    white-space: nowrap;
}

.price-delta-badge.cheaper {
    color: var(--success);
    background: rgba(63, 191, 114, 0.12);
}

.price-delta-badge.expensive {
    color: var(--warning);
    background: rgba(212, 149, 53, 0.14);
}

.price-delta-badge.same {
    color: var(--muted);
    background: rgba(116, 123, 107, 0.12);
}

.color-only-unknown {
    min-height: 42px;
    border: 1px solid rgba(32, 35, 29, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    padding: 0 12px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.master-color-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.color-mapping-table {
    min-width: 1240px;
}

.color-map-select {
    width: 180px;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.68rem;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(32, 35, 29, 0.08);
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(105, 115, 90, 0.52);
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(198, 161, 91, 0.76);
    background-clip: content-box;
}

@media (max-width: 768px) {
    body {
        background-size: 22px 22px, auto;
    }

    .loader-line {
        white-space: normal;
        border-right: none;
        animation: none;
    }

    .glass-panel,
    .stat-card {
        border-radius: 14px;
    }

    .table-shell {
        max-height: 65vh;
    }

    .intel-toolbar {
        justify-content: stretch;
    }

    .home-nav-actions {
        justify-content: stretch;
    }

    .home-nav-actions .mini-btn {
        flex: 1 1 calc(50% - 8px);
    }

    .intel-toolbar .mini-btn,
    .intel-toolbar .neo-input {
        flex: 1 1 auto;
    }

    .quiet-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .match-probe-form,
    .match-probe-candidate {
        grid-template-columns: 1fr;
    }

    .match-probe-candidate small {
        grid-column: auto;
    }

    .matching-reference,
    .matching-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .matching-controls input {
        width: 100%;
    }

    .color-mapping-toolbar,
    .color-mapping-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .color-mapping-actions .neo-input,
    .color-mapping-actions .mini-btn,
    .color-only-unknown {
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .command-strip,
    .workbench-layout {
        grid-template-columns: 1fr;
    }

    .strip-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-rail {
        position: static;
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
    }

    .source-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        max-height: 300px;
    }
}
