table { min-width: 1050px; }

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 16px;
  align-items: start;
}
.analysis-form { overflow: hidden; }
.file-input-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.analysis-form .drop-zone { margin-top: 18px; }
.analysis-form .preview-grid:empty { display: none; }
.analysis-fields { padding-bottom: 4px; }
.analysis-actions {
  margin-top: 18px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.analysis-actions small { color: var(--muted); }
.lens-manual-button { text-decoration: none; white-space: nowrap; }
.analysis-side { display: grid; gap: 14px; }
.analysis-side .price-estimate { margin: 0; }
.analysis-config { margin-top: 24px; max-width: 1050px; }
.analysis-config .api-grid { max-width: none; }
.analysis-limit {
  display: flex;
  gap: 11px;
  padding: 15px;
  border: 1px solid #cfe1d7;
  border-radius: 11px;
  background: #f1f8f4;
  color: var(--green);
}
.analysis-limit > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}
.analysis-limit p { margin: 4px 0 0; color: #667b70; font-size: 11px; line-height: 1.45; }

.estimate-toolbar {
  margin: -2px 24px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.estimate-toolbar span { font-size: 11px; color: var(--muted); }
.estimate-button {
  background: #f0eafd;
  color: #593a9d;
  border: 1px solid #ded2f6;
  white-space: nowrap;
}
.estimate-button:hover { background: #e8ddfa; }

.price-estimate {
  margin: 0 24px 20px;
  border: 1px solid #d8d0ef;
  background: #fbf9ff;
  border-radius: 11px;
  padding: 16px;
}

.create-price-box {
  margin: 0 24px 19px;
  overflow: hidden;
  border: 1px solid #d8d0ef;
  border-radius: 12px;
  background: #fbf9ff;
}
.create-price-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
}
.create-price-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.create-price-title > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eee7fb;
  color: #6244a1;
}
.create-price-title .lucide { width: 18px; height: 18px; }
.create-price-title b,.create-price-title small { display: block; }
.create-price-title b { font-size: 11px; color: #39295c; }
.create-price-title small { margin-top: 3px; color: #81778e; font-size: 9px; }
.analysis-precision {
  padding: 12px 14px 14px;
  border-top: 1px solid #e7e1f0;
  background: #fdfcff;
}
.analysis-precision-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; color: #59417f; }
.analysis-precision-head > .lucide { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.analysis-precision-head b,.analysis-precision-head small { display: block; }
.analysis-precision-head b { font-size: 10px; }
.analysis-precision-head small { margin-top: 3px; color: #81778e; font-size: 9px; line-height: 1.35; }
.analysis-context { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 11px 24px; }
.analysis-context span { max-width: 100%; overflow: hidden; padding: 5px 7px; border: 1px solid #d7e6dd; border-radius: 12px; background: #f2f8f5; color: #3f6f58; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.analysis-context span.missing { border-color: #ecd8b5; background: #fff8eb; color: #98621d; }
.analysis-context p { flex-basis: 100%; margin: 1px 0 0; color: #8a7045; font-size: 8px; line-height: 1.4; }
.analysis-precision-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.analysis-precision-fields label { display: grid; gap: 5px; color: #62586f; font-size: 9px; font-weight: 700; }
.analysis-precision-fields label.wide { grid-column: 1 / -1; }
.analysis-precision-fields input,.analysis-precision-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #ddd4ea;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  resize: vertical;
}
.analysis-precision-fields input:focus,.analysis-precision-fields textarea:focus { outline: 2px solid #d8c9f3; border-color: #9c83c9; }
.create-price-estimate { border-top: 1px solid #e7e1f0; background: #fff; }
.create-price-placeholder {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px;
  color: #8b8297;
  font-size: 10px;
  text-align: center;
}
.create-price-placeholder.ready { color: #6244a1; background: #fdfcff; }
.create-price-placeholder .lucide { width: 18px; height: 18px; flex: 0 0 auto; }
.create-price-loading,.create-price-error { display: flex; align-items: center; gap: 11px; padding: 17px; }
.create-price-loading { color: #6244a1; background: #fdfcff; }
.create-price-error { color: var(--red); background: #fff7f7; }
.create-price-loading > .lucide,.create-price-error > .lucide { width: 21px; height: 21px; flex: 0 0 auto; }
.create-price-loading b,.create-price-loading span,.create-price-error b,.create-price-error span { display: block; }
.create-price-loading b,.create-price-error b { font-size: 11px; }
.create-price-loading span,.create-price-error span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.create-estimate-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg,#f5f0ff,#fdfcff);
}
.create-estimate-price > div { min-width: 0; }
.create-estimate-price span,.create-estimate-price strong,.create-estimate-price small { display: block; }
.create-estimate-price span { color: #7658af; font-size: 8px; font-weight: 900; letter-spacing: .55px; }
.create-estimate-price strong { margin: 4px 0 3px; color: #49317c; font-size: 27px; line-height: 1; }
.create-estimate-price small { color: #6f6679; font-size: 9px; line-height: 1.4; }
.create-estimate-price.no-price strong { font-size: 18px; }
.create-estimate-price .btn { flex: 0 0 auto; }
.create-estimate-range { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 0 16px 14px; background: #fdfcff; }
.create-estimate-range span { padding: 8px 9px; border: 1px solid #ebe4f5; border-radius: 8px; background: #fff; color: #81788c; font-size: 8px; }
.create-estimate-range b { display: block; margin-top: 3px; color: #352a46; font-size: 11px; }
.create-detected { margin: 0; padding: 9px 16px; border-top: 1px solid #eee9f5; color: #706579; font-size: 9px; }
.create-query { margin: 0; padding: 9px 16px; border-top: 1px solid #eee9f5; background: #fbf9ff; color: #59417f; font-size: 9px; line-height: 1.4; }
.create-found-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px 7px; border-top: 1px solid #eee9f5; }
.create-found-head b { color: #40344e; font-size: 10px; }
.create-found-head span { padding: 3px 7px; border-radius: 10px; background: #eee7fb; color: #6244a1; font-size: 8px; font-weight: 800; }
.create-match-list { max-height: 265px; overflow-y: auto; padding: 0 10px 10px; }
.create-match {
  display: grid;
  grid-template-columns: 45px minmax(0,1fr) auto 13px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px;
  border-top: 1px solid #f0edf4;
  color: inherit;
  text-decoration: none;
}
.create-match:hover { border-radius: 8px; background: #faf7ff; }
.create-match-image { width: 45px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: #f0ebf7; color: #806ba7; }
.create-match-image img { width: 100%; height: 100%; object-fit: cover; }
.create-match-image .lucide { width: 19px; height: 19px; }
.create-match-copy { min-width: 0; }
.create-match-copy b,.create-match-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-match-copy b { color: #342b3d; font-size: 9px; }
.create-match-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.create-match > strong { color: #49317c; font-size: 10px; white-space: nowrap; }
.create-match > .lucide { width: 12px; height: 12px; color: #806ba7; }
.create-estimate-warning { margin: 0 16px 13px; padding: 8px 10px; border-radius: 7px; background: #fff8ed; color: #92511f; }
.create-estimate-warning summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 9px; font-weight: 800; }
.create-estimate-warning summary .lucide { width: 13px; height: 13px; }
.create-estimate-warning p { margin: 7px 0 0; font-size: 8px; line-height: 1.45; }
.estimate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.estimate-kicker { font-size: 9px; font-weight: 800; letter-spacing: .6px; color: #7658af; }
.estimate-head h3 { font-size: 28px; margin: 5px 0; color: #49317c; }
.estimate-head h3.estimate-no-price { font-size: 20px; }
.estimate-head p { margin: 0 0 5px; color: #5f586c; font-size: 11px; line-height: 1.45; }
.estimate-head small { color: #81788f; }
.estimate-range { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.estimate-range span { background: #fff; border: 1px solid #e9e3f4; border-radius: 8px; padding: 9px; font-size: 9px; color: #777080; }
.estimate-range b { display: block; color: var(--ink); font-size: 13px; margin-top: 4px; }
.estimate-warning { font-size: 10px; color: #92511f; background: #fff8ed; padding: 8px; border-radius: 6px; }
.estimate-comparables { margin-top: 12px; border-top: 1px solid #e5dff0; padding-top: 10px; }
.estimate-comparables summary { cursor: pointer; font-size: 11px; font-weight: 700; color: #5d4a82; }
.estimate-comparables ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 255px; overflow: auto; }
.estimate-comparables li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid #eee9f5; }
.estimate-comparables .comparable-thumb { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #eee9f5; color: #7d6c9d; }
.estimate-comparables .comparable-thumb img { width: 100%; height: 100%; object-fit: cover; }
.estimate-comparables li .comparable-thumb + span { display: flex; flex-direction: column; min-width: 0; }
.estimate-comparables li span { display: flex; flex-direction: column; min-width: 0; }
.estimate-comparables li small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 9px; margin-top: 3px; }
.estimate-comparables li a { font-size: 10px; color: #593a9d; font-weight: 700; text-decoration: none; }
.estimate-loading, .estimate-error { display: flex; flex-direction: column; gap: 5px; }
.estimate-loading span, .estimate-error span { font-size: 11px; color: var(--muted); }
.estimate-error { color: var(--red); }

.lens-results { margin-top: 14px; border-top: 1px solid #e5dff0; padding-top: 12px; }
.lens-results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.lens-results-head h4 { margin: 3px 0 0; font-size: 13px; color: var(--ink); }
.lens-results-head > a { color: #593a9d; font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lens-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 390px; overflow: auto; padding-right: 3px; }
.lens-result { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 9px; padding: 7px; border: 1px solid #e8e1f3; border-radius: 9px; background: #fff; color: inherit; text-decoration: none; }
.lens-result:hover { border-color: #cbbce7; box-shadow: 0 3px 10px rgba(67, 43, 115, .08); }
.lens-result-image { width: 62px; height: 72px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: #f1edf7; color: #7d6c9d; }
.lens-result-image img { width: 100%; height: 100%; object-fit: cover; }
.lens-result-body { display: flex; flex-direction: column; min-width: 0; }
.lens-result-body b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 10px; line-height: 1.35; }
.lens-result-body small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.lens-result-body strong { margin-top: auto; padding-top: 5px; color: #49317c; font-size: 11px; }

.marketplace-picker {
  margin: 18px 24px 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.marketplace-picker legend { padding: 0 6px; font-size: 11px; font-weight: 800; }
.marketplace-picker label { display: flex; align-items: flex-start; gap: 9px; padding: 9px; background: #f8faf8; border-radius: 7px; }
.marketplace-picker input { margin-top: 2px; }
.marketplace-picker span { display: flex; flex-direction: column; }
.marketplace-picker small { font-size: 9px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.marketplace-picker label:has(input:disabled) { opacity: .55; }

@media (max-width: 650px) {
  .estimate-toolbar, .price-estimate { margin-left: 17px; margin-right: 17px; }
  .estimate-toolbar, .estimate-head { align-items: stretch; flex-direction: column; }
  .estimate-range, .marketplace-picker { grid-template-columns: 1fr; }
  .marketplace-picker { margin-left: 17px; margin-right: 17px; }
  .estimate-comparables li { grid-template-columns: auto 1fr auto; }
  .estimate-comparables li a { grid-column: 1 / -1; }
  .lens-results-grid { grid-template-columns: 1fr; }
  .create-price-box { margin-left: 17px; margin-right: 17px; }
  .create-price-toolbar,.create-estimate-price { align-items: stretch; flex-direction: column; }
  .create-price-toolbar .btn,.create-estimate-price .btn { width: 100%; }
  .create-estimate-range { grid-template-columns: 1fr 1fr 1fr; }
  .create-match { grid-template-columns: 42px minmax(0,1fr) auto; }
  .create-match > .lucide { display: none; }
  .analysis-precision-fields { grid-template-columns: 1fr; }
  .analysis-precision-fields label.wide { grid-column: auto; }
}

@media (max-width: 1050px) {
  .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .analysis-actions { padding-left: 17px; padding-right: 17px; align-items: stretch; flex-direction: column; }
}
