:root {
  --ink: #18332e;
  --muted: #75837f;
  --green: #14785e;
  --canvas: #f7f9f7;
  --line: #e8eeeb;
  --shadow: 0 7px 26px rgba(26, 65, 50, .045);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px "DM Sans", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { width: 248px; position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; padding: 31px 19px; background: #fff; border-right: 1px solid #e9efec; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 53px; padding: 0 12px; color: #163b31; text-decoration: none; font: 800 20px Manrope, Arial, sans-serif; letter-spacing: -.65px; }
.brand-logo { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; }
.side-label { margin: 0 0 13px; padding: 0 13px; color: #9aa8a2; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; }
.nav-item { width: 100%; height: 45px; display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: #65736e; text-align: left; font-size: 14px; font-weight: 500; cursor: pointer; }
.nav-item.active { background: #eaf4ef; color: #147458; font-weight: 700; }
.nav-icon { width: 19px; color: #70857c; text-align: center; font-size: 23px; line-height: 1; }
.nav-item.active .nav-icon { color: #18765b; }
.overlap-icon { font-size: 17px; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 10px; background: #fff; color: #7a8781; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.privacy-card { display: flex; align-items: flex-start; gap: 10px; padding: 15px 13px; border: 1px solid #edf1ef; border-radius: 9px; background: #f5f8f6; }
.privacy-icon { color: #4e9b7a; font-size: 19px; line-height: 1; }
.privacy-card strong { font: 700 12px Manrope, Arial, sans-serif; }
.privacy-card p { margin: 5px 0 0; color: #7e8b85; font-size: 11px; line-height: 1.55; }
.side-foot { margin: 21px 12px 2px; color: #a0aaa5; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.side-foot span { padding: 0 5px; color: #bdd2c7; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid #e9efec; background: rgba(255,255,255,.76); }
.breadcrumb { color: #85918c; font-size: 12px; }
.breadcrumb span { padding: 0 10px; color: #c2ccc7; }
.breadcrumb strong { color: #465b53; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 8px; color: #83908a; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #3cab7d; box-shadow: 0 0 0 3px #e5f4eb; }
.avatar { width: 27px; height: 27px; display: grid; place-items: center; margin-left: 12px; border-radius: 50%; background: #eaf2ed; color: #35775c; font-size: 10px; font-weight: 700; }
.content-wrap { max-width: 1270px; margin: 0 auto; padding: 39px 48px 25px; }
.hero-row { min-height: 95px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #328367; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
.eyebrow-line { width: 18px; height: 2px; background: #53a281; }
.hero-row h1 { margin: 8px 0 4px; color: #1d3b32; font: 800 32px/1.25 Manrope, Arial, sans-serif; letter-spacing: -1.1px; }
.hero-row h1 span { color: #318c6b; }
.subtitle { margin: 0; color: #88948f; font-size: 14px; }
.hero-art { position: relative; width: 133px; height: 84px; margin: 0 35px 3px 0; }
.art-sheet { position: absolute; top: 9px; left: 28px; width: 70px; height: 65px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 5px; padding: 12px; transform: rotate(-6deg); border: 1px solid #d7e9df; border-radius: 8px; background: #fff; box-shadow: 0 8px 16px #dfece5; }
.art-sheet span { border-radius: 2px; background: #e5f2ea; }
.art-sheet span:nth-child(2), .art-sheet span:nth-child(4), .art-sheet span:nth-child(9) { background: #a9d4bc; }
.art-search { position: absolute; top: 32px; left: 77px; width: 30px; height: 30px; display: grid; place-items: center; transform: rotate(-15deg); border: 3px solid #f4f8f5; border-radius: 50%; background: #218162; color: white; font-size: 21px; line-height: 1; }
.art-spark { position: absolute; top: 4px; right: 6px; color: #9dcdb0; font-size: 15px; }
.upload-panel, .query-panel, .results-panel { border: 1px solid #e9efec; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.upload-panel { margin-bottom: 19px; padding: 19px 22px 16px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.step-badge { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 7px; background: #e9f5ee; color: #218161; font: 700 10px Manrope, Arial, sans-serif; }
.section-heading h2 { margin: 0 0 3px; color: #263f36; font: 700 15px Manrope, Arial, sans-serif; }
.section-heading p { margin: 0; color: #8b9691; font-size: 12px; }
.text-button { margin-left: auto; border: 0; background: transparent; color: #438b6d; font-size: 12px; font-weight: 600; cursor: pointer; }
.dropzone { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c9dcd1; border-radius: 8px; background: #fbfdfb; cursor: pointer; transition: .18s; }
.dropzone:hover, .dropzone.dragging { border-color: #3a9a73; background: #f2faf5; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 33px; height: 33px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 50%; background: #edf6f0; color: #298564; }
.upload-icon svg { width: 17px; height: 17px; }
.drop-title { color: #385448; font-size: 13px; font-weight: 700; }
.drop-sub { margin-top: 3px; color: #87958e; font-size: 12px; }
.browse-link { color: #26805f; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.file-hint { margin-top: 9px; color: #899890; font-size: 10px; }
.file-hint i { padding: 0 5px; color: #c1cbc5; font-style: normal; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.file-chip { max-width: 265px; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #e6eee9; border-radius: 6px; }
.file-type { padding: 3px 4px; border-radius: 3px; background: #e8f3ec; color: #398365; font-size: 9px; font-weight: 700; }
.file-name { overflow: hidden; color: #53675d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: #899890; font-size: 10px; white-space: nowrap; }
.upload-progress { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 0 0; color: #628173; font-size: 12px; }
.spinner { width: 14px; height: 14px; border: 2px solid #dcebe2; border-top-color: #278261; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message { margin-top: 12px; padding: 9px 12px; border-radius: 6px; background: #fff0ed; color: #bd513e; font-size: 12px; }
.workspace[hidden], .upload-progress[hidden], .file-list[hidden], .error-message[hidden], #clearFiles[hidden], .clear-search[hidden], #tableFooter[hidden] { display: none; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { min-width: 0; min-height: 96px; display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid #e9efec; border-radius: 8px; background: #fff; box-shadow: 0 4px 17px rgba(26,65,50,.025); }
.stat-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 7px; font-size: 16px; }
.stat-icon.green { background: #eaf5ef; color: #328567; }
.stat-icon.blue { background: #edf4f7; color: #5b8ba1; }
.stat-icon.amber { background: #faf5e9; color: #b18c48; }
.stat-content { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.stat-card span { color: #899890; font-size: 9px; font-weight: 700; letter-spacing: .55px; }
.stat-card strong { color: #244438; font: 700 19px Manrope, Arial, sans-serif; }
.stat-detail { max-height: 42px; overflow: auto; color: #65776e; font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1.55; overflow-wrap: anywhere; }
.stat-detail-item { display: block; }
.stats-row .stat-card:last-child .stat-detail { color: #9aa59f; }
.query-panel { margin-bottom: 18px; padding: 18px 20px 17px; }
.query-heading { margin-bottom: 14px; }
.search-form { display: flex; gap: 8px; }
.search-form.duplicates-view .search-box, .search-form.duplicates-view #searchButton { display: none; }
.search-box { height: 41px; flex: 1; display: flex; align-items: center; padding: 0 10px; border: 1px solid #e2eae5; border-radius: 6px; background: #fff; }
.search-box:focus-within { border-color: #70b196; box-shadow: 0 0 0 3px #eaf5ef; }
.search-symbol { margin-right: 7px; color: #98a7a0; font-size: 23px; line-height: 1; }
.search-box input { min-width: 50px; flex: 1; border: 0; outline: 0; color: #314c40; font-size: 13px; }
.search-box input::placeholder { color: #929f98; }
.clear-search { border: 0; background: transparent; color: #8d9b94; font-size: 18px; cursor: pointer; }
.primary-button, .duplicate-button, .export-button { height: 41px; padding: 0 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.primary-button { border: 1px solid #177457; background: #177457; color: #fff; box-shadow: 0 3px 7px #d6e8de; }
.primary-button:hover { background: #12674f; }
.primary-button span, .duplicate-button span { margin-right: 4px; font-size: 16px; vertical-align: -1px; }
.duplicate-button { border: 1px solid #dfe9e3; background: #fff; color: #527064; }
.duplicate-button:hover { border-color: #a8c9b6; background: #f9fcfa; }
.results-panel { overflow: hidden; }
.results-top { min-height: 67px; display: flex; align-items: center; justify-content: space-between; padding: 14px 19px 12px; border-bottom: 1px solid #edf1ef; }
.results-title-row { display: flex; align-items: center; gap: 8px; }
.results-title-row h2 { margin: 0; color: #29443a; font: 700 14px Manrope, Arial, sans-serif; }
.result-count { padding: 3px 7px; border-radius: 10px; background: #edf5f0; color: #3f8569; font-size: 10px; font-weight: 700; }
.results-top p { margin: 4px 0 0; color: #899890; font-size: 11px; }
.export-button { height: 34px; padding: 0 11px; border: 1px solid #d8e7de; background: #fff; color: #32785d; font-size: 11px; }
.export-button span { margin-right: 4px; font-size: 15px; vertical-align: -1px; }
.export-button:hover:not(:disabled) { background: #f1f8f4; }
.export-button:disabled { opacity: .45; cursor: not-allowed; }
.export-button.loading { opacity: .65; }
.table-wrap { width: 100%; max-height: 420px; overflow: auto; }
.results-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 11px; }
.results-table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid #e8eeea; background: #f8faf8; color: #687970; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .15px; white-space: nowrap; }
.results-table td { max-width: 260px; overflow: hidden; padding: 9px 12px; border-bottom: 1px solid #f0f3f1; color: #495d53; text-overflow: ellipsis; white-space: nowrap; }
.results-table tbody tr:hover { background: #f8fbf9; }
.results-table .source-col { background: #f5f8f6; }
.source-cell { color: #397459 !important; font-weight: 600; }
.sheet-badge { display: inline-block; padding: 3px 6px; border-radius: 4px; background: #eef5f0; color: #557866; font-size: 9px; }
.line-cell { color: #7f8e85 !important; font-variant-numeric: tabular-nums; }
.cell-empty { color: #c6cfca; }
.empty-state { min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #63756c; }
.empty-illustration { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 10px; transform: rotate(-5deg); border: 1px solid #e8f0eb; border-radius: 14px; background: #f2f7f3; color: #81ae96; font-size: 29px; }
.empty-state strong { color: #455b50; font: 700 13px Manrope, Arial, sans-serif; }
.empty-state p { margin: 5px 0 0; color: #899890; font-size: 11px; }
.table-footer { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-top: 1px solid #edf1ef; color: #899890; font-size: 10px; }
.table-footer b { padding-left: 4px; color: #56806a; font-size: 12px; }
.workspace-foot { display: flex; align-items: center; gap: 7px; margin: 12px 3px; color: #899890; font-size: 11px; }
.workspace-foot span { color: #71a987; font-size: 12px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 31px; padding: 12px 1px 0; border-top: 1px solid #e9efec; color: #899890; font-size: 10px; }
.page-footer i { padding: 0 4px; color: #c3cdc7; font-style: normal; }

@media (max-width: 1050px) {
  .content-wrap { padding-right: 30px; padding-left: 30px; }
  .topbar { padding: 0 30px; }
  .sidebar { width: 218px; }
  .main-area { margin-left: 218px; }
  .hero-art { margin-right: 5px; }
}
@media (max-width: 760px) {
  .sidebar { width: 62px; padding: 22px 8px; }
  .brand { justify-content: center; margin: 0 0 37px; padding: 0; font-size: 0; }
  .brand-logo { width: 36px; height: 36px; flex: 0 0 36px; }
  .side-label, .nav-item span:not(.nav-icon), .privacy-card, .side-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .main-area { margin-left: 62px; }
  .topbar { height: 54px; padding: 0 15px; }
  .top-right { font-size: 0; }
  .avatar { margin-left: 8px; }
  .content-wrap { padding: 26px 14px; }
  .hero-row h1 { font-size: 26px; }
  .hero-art { display: none; }
  .upload-panel { padding: 15px; }
  .stats-row { gap: 6px; }
  .stat-card { min-height: 76px; gap: 6px; padding: 11px 8px; }
  .stat-icon { width: 27px; height: 27px; flex-basis: 27px; }
  .stat-card span { font-size: 8px; letter-spacing: .2px; }
  .stat-card strong { font-size: 16px; }
  .stat-detail { max-height: 43px; font-size: 10px; line-height: 1.45; }
  .query-panel { padding: 15px 13px; }
  .search-form { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; }
  .primary-button, .duplicate-button { flex: 1; padding: 0 6px; }
  .results-top { padding: 12px; }
  .page-footer span:last-child { display: none; }
  .table-wrap { max-height: 380px; }
}
@media (max-width: 400px) {
  .hero-row h1 { font-size: 23px; }
  .stats-row { grid-template-columns: 1fr; }
  .stat-card { min-height: 66px; }
  .dropzone { min-height: 130px; }
  .results-top p { max-width: 205px; line-height: 1.5; }
}
