:root {
    --ink: #16241f;
    --muted: #67746f;
    --line: #dfe6e2;
    --paper: #ffffff;
    --canvas: #f3f6f4;
    --green: #0d6b52;
    --green-dark: #07493a;
    --mint: #dcefe7;
    --amber: #c98216;
    --rose: #b84646;
    --shadow: 0 12px 34px rgba(20, 52, 41, .08);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
.login-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at top, #dfeee8, var(--canvas) 48%); }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 24px; }
.login-card h1 { margin: 7px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.login-card > p:not(.eyebrow) { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }
.login-card form { display: grid; gap: 15px; }
.login-card label { display: grid; gap: 6px; color: #45564f; font-size: 12px; font-weight: 700; }
.login-card input:not([type=hidden]) { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(13,107,82,.10); }
.login-card input[readonly] { background: #f2f5f3; color: #5f6d67; cursor: not-allowed; }
.login-card .button { width: 100%; margin-top: 4px; }
.login-card > small { display: block; margin-top: 20px; color: #8a9691; text-align: center; line-height: 1.45; }
.login-error { margin-bottom: 16px; padding: 11px 12px; border-radius: 9px; background: #fff0f0; color: #8a2929; font-size: 12px; }
.google-login { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border: 1px solid #cfd8d4; border-radius: 9px; color: #24312c; font-weight: 700; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.google-login:hover { border-color: #8ca59b; box-shadow: 0 3px 12px rgba(10,55,42,.10); }
.google-login span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #4285f4; color: white; font-weight: 800; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #8a9691; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.logout-form { margin: 0; }
.signed-user { max-width: 220px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.registration-card { width: min(570px, 100%); }
.registration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.access-card { text-align: center; }
.access-status { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px; background: #fff0d8; color: #85560e; font-size: 25px; font-weight: 800; }
.access-status.approved { background: var(--mint); color: var(--green-dark); }
.access-status.rejected, .access-status.blocked { background: #fff0f0; color: #8a2929; }
.account-summary { margin: 18px 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; text-align: left; }
.account-summary strong, .account-summary span { display: block; }
.account-summary span { margin-top: 4px; color: var(--muted); font-size: 12px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; background: #123d32; color: white; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: #dcf5e8; color: var(--green-dark); border-radius: 13px; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; }
.brand span { margin-top: 3px; color: #a9c7bc; font-size: 12px; }
nav { display: grid; gap: 7px; margin-top: 26px; }
.nav-item { border: 0; border-radius: 10px; padding: 12px 13px; background: transparent; color: #c7dbd3; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: .2s ease; }
.nav-item span { width: 20px; font-size: 19px; text-align: center; }
.nav-item b { margin-left: auto; min-width: 25px; padding: 3px 7px; border-radius: 20px; background: rgba(255,255,255,.12); font-size: 11px; text-align: center; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.12); }
.sidebar-note { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(0,0,0,.08); }
.sidebar-note small, .sidebar-note strong, .sidebar-note span { display: block; }
.sidebar-note small { color: #9fbeb2; text-transform: uppercase; letter-spacing: .11em; font-size: 9px; }
.sidebar-note strong { margin-top: 7px; font-size: 20px; }
.sidebar-note span { margin-top: 4px; color: #b8cec6; font-size: 12px; }
main { min-width: 0; padding: 0 34px 46px; }
.topbar { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.035em; }
.eyebrow { margin: 0; color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.eyebrow.light { color: #a7d8c6; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.global-search { width: min(340px, 34vw); height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.button { height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.primary { border: 1px solid var(--green); background: var(--green); color: white; cursor: pointer; }
.button.primary:disabled { border-color: #aebbb6; background: #aebbb6; cursor: not-allowed; }
.view { display: none; animation: rise .22s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
.hero { min-height: 220px; padding: 34px 38px; border-radius: 18px; background: linear-gradient(120deg, #0a4b3b, #147056); color: white; display: flex; justify-content: space-between; align-items: center; gap: 38px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -70px; bottom: -140px; width: 360px; height: 360px; border: 45px solid rgba(255,255,255,.06); border-radius: 50%; }
.hero > * { position: relative; z-index: 1; }
.hero h2 { max-width: 680px; margin: 9px 0 11px; font-size: clamp(27px, 4vw, 43px); line-height: 1.05; letter-spacing: -.04em; }
.hero p:not(.eyebrow) { max-width: 680px; margin: 0; color: #cce1d9; line-height: 1.55; }
.hero-stat { min-width: 230px; padding: 22px; border: 1px solid rgba(255,255,255,.17); border-radius: 14px; background: rgba(255,255,255,.09); backdrop-filter: blur(8px); }
.hero-stat span, .hero-stat small, .hero-stat strong { display: block; }
.hero-stat span { color: #b9d8cc; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.hero-stat strong { margin: 10px 0 4px; font-size: 28px; }
.hero-stat small { color: #d5e7e0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#inventorySummary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 20px rgba(30,55,47,.03); }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin: 9px 0 4px; font-size: 25px; letter-spacing: -.03em; }
.stat-card small { color: #8b9692; }
.grid-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 5px 20px rgba(30,55,47,.03); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.panel h3 { margin: 4px 0 0; font-size: 18px; }
.text-button { border: 0; background: none; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 800; }
.category-row { margin: 20px 0; }
.category-row:first-child { margin-top: 0; }
.category-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.category-label span { color: var(--muted); }
.bar { height: 9px; border-radius: 10px; background: #edf1ef; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.category-row:nth-child(2) .bar i { background: #d3942e; }
.project-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #edf0ee; }
.project-item:first-child { border-top: 0; padding-top: 0; }
.rank { width: 30px; height: 30px; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); border-radius: 9px; font-size: 11px; font-weight: 800; }
.project-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.project-item small { color: var(--muted); }
.funding-project-item { grid-template-columns: 34px minmax(0, 1fr) minmax(155px, auto); }
.project-status-select { min-width: 215px; border-color: #cad6d1; font-size: 12px; font-weight: 700; }
.project-status-select.compact-select { min-width: 155px; max-width: 175px; height: 34px; font-size: 10px; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.duplicate-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inventory-callout { margin: 0 0 18px; padding: 22px 25px; border-radius: 14px; background: #193f36; color: white; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.inventory-callout h3 { margin: 6px 0; font-size: 19px; }
.inventory-callout p:not(.eyebrow) { max-width: 850px; margin: 0; color: #c6d9d2; font-size: 12px; line-height: 1.55; }
.inventory-button { border: 1px solid rgba(255,255,255,.28); background: white; color: var(--green-dark); cursor: pointer; }
.preview-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
.preview-card .tag { display: inline-block; margin-bottom: 10px; padding: 4px 7px; border-radius: 6px; background: #fff1db; color: #89580d; font-size: 10px; font-weight: 800; }
.preview-card strong { display: -webkit-box; min-height: 38px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.4; }
.preview-card footer { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 11px; }
.section-intro { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 8px 0 22px; }
.section-intro h2 { margin: 5px 0 7px; font-size: 28px; }
.section-intro p:not(.eyebrow) { margin: 0; color: var(--muted); }
.count-pill { padding: 8px 12px; border-radius: 20px; background: var(--mint); color: var(--green-dark); font-size: 12px; font-weight: 800; }
.filters { display: flex; gap: 10px; margin-bottom: 13px; }
select { min-width: 170px; height: 40px; padding: 0 33px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 12px 14px; background: #f7f9f8; color: #60706a; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid #edf0ee; vertical-align: top; }
.item-name { max-width: 430px; min-width: 270px; line-height: 1.4; font-weight: 700; }
.item-name small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; }
.category-chip { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #e9f5f0; color: var(--green-dark); white-space: nowrap; font-size: 10px; font-weight: 800; }
.category-chip.equipment { background: #fff0dc; color: #83530d; }
.source-link { color: var(--green); font-weight: 800; text-decoration: none; white-space: nowrap; }
.source-ref { color: var(--muted); white-space: nowrap; font-size: 11px; }
.cpv-cell { min-width: 300px; }
.cpv-select { width: 100%; min-width: 290px; height: 38px; font-size: 11px; }
.cpv-state { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 6px; background: #f0f2f1; color: var(--muted); font-size: 9px; font-weight: 800; }
.cpv-state.confirmed, .cpv-state.high { background: var(--mint); color: var(--green-dark); }
.cpv-state.medium { background: #fff0d8; color: #85560e; }
.funding-state { display: inline-block; padding: 6px 9px; border-radius: 7px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.funding-state.funded { background: var(--mint); color: var(--green-dark); }
.funding-state.not_funded { background: #f1f2f1; color: #59645f; }
.funding-state.pending { background: #fff0d8; color: #85560e; }
.funded-plan-panel, .cpv-search-panel { margin-top: 18px; }
.cpv-search-controls { display: grid; grid-template-columns: minmax(280px, 1.3fr) minmax(250px, 1fr) auto; gap: 10px; margin-bottom: 16px; }
.cpv-search-controls select, .cpv-search-controls input { width: 100%; }
.cpv-search-results { display: grid; gap: 8px; }
.cpv-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; }
.cpv-result strong, .cpv-result span, .cpv-result small { display: block; }
.cpv-result strong { color: var(--green-dark); font-size: 13px; }
.cpv-result span { margin-top: 4px; font-size: 12px; }
.cpv-result small { margin-top: 4px; color: var(--muted); }
.cpv-result-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.service-cell { min-width: 260px; max-width: 420px; color: #51625c; line-height: 1.45; }
.inventory-register { margin-top: 18px; }
.inventory-filters { flex-wrap: wrap; }
.standalone-search { min-width: 280px; flex: 1; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.planning-panel { margin-top: 15px; }
.planning-matches { display: grid; gap: 10px; }
.planning-match { display: grid; grid-template-columns: 105px minmax(220px, .9fr) 28px minmax(300px, 1.1fr); align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.planning-score { padding: 11px 8px; border-radius: 9px; background: #edf3f0; text-align: center; }
.planning-score strong, .planning-score span { display: block; }
.planning-score strong { color: var(--green-dark); font-size: 20px; }
.planning-score span { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; }
.planning-score.high { background: #ffe7c2; }
.planning-score.high strong { color: #8b5400; }
.planning-score.possible { background: var(--mint); }
.planned-item small, .planned-item strong, .planned-item span, .existing-item small, .existing-item strong, .existing-item span, .existing-item em { display: block; }
.planned-item small, .existing-item small { margin-bottom: 5px; color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.planned-item strong, .existing-item strong { font-size: 12px; line-height: 1.4; }
.planned-item span, .existing-item span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.existing-item em { margin-top: 8px; color: #52635d; font-size: 10px; line-height: 1.4; font-style: normal; }
.match-arrow { color: var(--green); font-size: 22px; text-align: center; }
.threshold-panel { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, 420px) 65px; align-items: center; gap: 20px; padding: 18px 21px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.threshold-panel strong, .threshold-panel span { display: block; }
.threshold-panel span { margin-top: 4px; color: var(--muted); font-size: 12px; }
input[type=range] { accent-color: var(--green); }
.threshold-panel output { padding: 8px 10px; border-radius: 8px; background: var(--mint); color: var(--green-dark); font-weight: 800; text-align: center; }
.mini-stats { display: flex; gap: 10px; margin-bottom: 15px; }
.mini-stat { padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: 11px; }
.mini-stat strong { color: var(--ink); font-size: 13px; }
.duplicate-groups { display: grid; gap: 13px; }
.duplicate-group { border: 1px solid var(--line); border-radius: 13px; background: white; overflow: hidden; }
.group-head { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto auto; align-items: center; gap: 15px; padding: 18px 20px; cursor: pointer; }
.group-id { width: 48px; padding: 7px 5px; border-radius: 8px; background: #f1f4f2; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.group-head h3 { margin: 0 0 4px; font-size: 14px; }
.group-head p { margin: 0; color: var(--muted); font-size: 11px; }
.score { color: var(--green); font-size: 12px; font-weight: 800; }
.group-body { display: none; padding: 0 20px 20px; border-top: 1px solid #edf0ee; }
.duplicate-group.open .group-body { display: block; }
.recommendation { margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--green); background: #f1f8f5; color: #38594e; font-size: 12px; line-height: 1.5; }
.group-item { display: grid; grid-template-columns: minmax(0, 1fr) 210px 110px; gap: 15px; padding: 12px 0; border-top: 1px solid #edf0ee; font-size: 12px; }
.group-item:first-of-type { border-top: 0; }
.group-item strong { display: block; line-height: 1.4; }
.group-item small { color: var(--muted); }
.quality-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 100px; gap: 14px; padding: 13px 0; border-top: 1px solid #edf0ee; font-size: 12px; }
.quality-row:first-child { border-top: 0; }
.quality-row p { margin: 4px 0 0; color: var(--muted); }
.import-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; margin-bottom: 18px; }
.secure-note { padding: 5px 8px; border-radius: 7px; background: var(--mint); color: var(--green-dark); font-size: 10px; font-weight: 800; }
.drop-zone { min-height: 225px; padding: 28px; border: 1.5px dashed #aac0b7; border-radius: 13px; background: #f8fbfa; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: #eff8f4; transform: translateY(-1px); }
.upload-icon { width: 48px; height: 48px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 15px; background: var(--mint); color: var(--green); font-size: 26px; font-weight: 700; }
.drop-zone strong { font-size: 16px; }
.drop-zone small { max-width: 420px; margin-top: 7px; color: var(--muted); line-height: 1.5; }
.selected-files { display: grid; gap: 7px; margin-top: 12px; }
.selected-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 12px; }
.selected-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file span { color: var(--muted); }
.import-actions { min-height: 50px; margin-top: 15px; display: flex; align-items: center; gap: 14px; }
.import-status { color: var(--muted); font-size: 12px; line-height: 1.4; }
.import-status.working::before { content: ""; width: 13px; height: 13px; margin-right: 7px; display: inline-block; border: 2px solid #c8d5d0; border-top-color: var(--green); border-radius: 50%; vertical-align: -3px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-result { margin-top: 15px; padding: 13px 15px; border-radius: 10px; background: #edf8f3; color: #285a48; font-size: 12px; line-height: 1.5; }
.import-result.error { background: #fff1f1; color: #8a2929; }
.method-panel ol { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: method; }
.method-panel li { position: relative; min-height: 58px; padding: 0 0 18px 45px; counter-increment: method; }
.method-panel li::before { content: counter(method); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); color: var(--green-dark); font-size: 11px; font-weight: 800; }
.method-panel li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 31px; bottom: 2px; width: 1px; background: var(--line); }
.method-panel li b, .method-panel li span { display: block; }
.method-panel li b { font-size: 13px; }
.method-panel li span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.import-history { display: grid; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 90px; gap: 15px; align-items: center; padding: 13px 0; border-top: 1px solid #edf0ee; font-size: 12px; }
.history-row:first-child { border-top: 0; }
.history-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row small { color: var(--muted); }
.history-status { width: fit-content; padding: 5px 8px; border-radius: 7px; background: #e9f5f0; color: var(--green-dark); font-size: 10px; font-weight: 800; }
.user-name { min-width: 180px; }
.user-name strong, .user-name small, .user-phone { display: block; }
.user-name small, .user-phone { margin-top: 4px; color: var(--muted); font-size: 10px; }
.user-status { display: inline-block; padding: 6px 9px; border-radius: 7px; background: #fff0d8; color: #85560e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.user-status.approved { background: var(--mint); color: var(--green-dark); }
.user-status.rejected, .user-status.blocked { background: #fff0f0; color: #8a2929; }
.user-actions { min-width: 165px; display: flex; flex-wrap: wrap; gap: 6px; }
.user-action { min-height: 31px; padding: 0 10px; border: 1px solid #bfd0c9; border-radius: 7px; background: white; color: var(--green-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.user-action.approve { border-color: var(--green); background: var(--green); color: white; }
.user-action.reject { border-color: #eccaca; color: #8a2929; }
.user-action:disabled { opacity: .55; cursor: wait; }
.error-box { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #f0c7c7; border-radius: 10px; background: #fff2f2; color: #8a2929; }
.hidden { display: none !important; }
.empty { padding: 26px; color: var(--muted); text-align: center; }

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
    .sidebar { padding: 24px 12px; }
    .brand { justify-content: center; padding-left: 0; padding-right: 0; }
    .brand > div:last-child, .nav-item:not(.active) b, .nav-item { font-size: 0; }
    .nav-item { justify-content: center; padding: 12px 8px; }
    .nav-item span { font-size: 20px; }
    .nav-item b { font-size: 9px; }
    .sidebar-note { display: none; }
    .stats-grid, #inventorySummary { grid-template-columns: repeat(2, 1fr); }
    .duplicate-preview { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 10; top: auto; bottom: 0; width: 100%; height: 64px; padding: 8px 10px; }
    .brand, .sidebar-note { display: none; }
    nav { grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); margin: 0; gap: 4px; }
    .nav-item, .nav-item.active { display: grid; place-items: center; padding: 6px; font-size: 0; }
    .nav-item span { line-height: 1; }
    .nav-item b { position: absolute; transform: translate(13px, -10px); }
    main { padding: 0 15px 86px; }
    .topbar { align-items: flex-start; flex-direction: column; padding: 20px 0; }
    .top-actions { width: 100%; }
    .global-search { width: 100%; }
    .top-actions .button { display: none; }
    .hero { padding: 27px 23px; flex-direction: column; align-items: stretch; }
    .hero-stat { min-width: 0; }
    .stats-grid, .stats-grid.compact, #inventorySummary, .grid-two { grid-template-columns: 1fr; }
    .inventory-callout { align-items: flex-start; flex-direction: column; }
    .section-intro { align-items: flex-start; flex-direction: column; }
    .filters { overflow: auto; }
    .threshold-panel { grid-template-columns: 1fr 60px; }
    .threshold-panel > div { grid-column: 1 / -1; }
    .group-head { grid-template-columns: 52px minmax(0, 1fr); }
    .group-head > .money, .group-head > .score { display: none; }
    .group-item, .quality-row { grid-template-columns: 1fr; }
    .planning-match { grid-template-columns: 80px minmax(0, 1fr); align-items: start; }
    .planning-match .match-arrow { display: none; }
    .planning-match .existing-item { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
    .import-layout { grid-template-columns: 1fr; }
    .history-row { grid-template-columns: minmax(0, 1fr) auto; }
    .history-row > :nth-child(2), .history-row > :nth-child(3) { display: none; }
    .cpv-search-controls { grid-template-columns: 1fr; }
    .cpv-result { grid-template-columns: 1fr; }
    .cpv-result-meta { justify-content: space-between; }
    .registration-grid { grid-template-columns: 1fr; }
}
