/* Procurement is a calm workspace beside the 3D, not a cramped nested tree. */
.purchases-mode>:not(.parts-tabs):not(#purchase-nav):not(.parts-head){display:none!important}
.purchases-mode .parts-tabs{flex-shrink:0}.parts-tabs button{white-space:nowrap}
#purchase-nav{overflow:auto;min-height:0;padding:18px 15px;flex:1;color:#49626e}
.buy-nav-progress{padding:4px 9px 18px}.buy-nav-progress strong{display:block;font-size:15px;color:#173c46;margin:12px 0}.buy-nav-progress p{font-size:11px;color:#71858f;margin:7px 0}
.buy-nav-progress progress,.buy-stat progress{appearance:none;border:0;width:100%;height:5px;border-radius:5px;background:#dfe9eb}.buy-nav-progress progress::-webkit-progress-bar,.buy-stat progress::-webkit-progress-bar{background:#dfe9eb;border-radius:5px}.buy-nav-progress progress::-webkit-progress-value,.buy-stat progress::-webkit-progress-value{background:#247d83;border-radius:5px}
#buy-categories{display:grid;gap:5px}#buy-categories button{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:12px;border:0;background:none;border-radius:9px;color:#49626e;font-size:12px;cursor:pointer}#buy-categories button[aria-current=true]{background:#e8f3f3;color:#176e77;font-weight:650}#buy-categories small{font-variant-numeric:tabular-nums;color:#7f959e}
.buy-nav-footer{border-top:1px solid #e0e8ed;margin:20px 8px 0;padding-top:20px;font-size:12px}.buy-nav-footer p{font-size:11px;line-height:1.7;color:#758995}.buy-nav-footer .button{width:100%;margin-top:8px;font-size:12px}
body.purchases-open .viewport-toolbar{display:none}#purchase-workspace{position:absolute;inset:0;background:#f5f8fa;z-index:30;overflow-y:auto;padding:30px 32px 22px;overscroll-behavior:contain;color:#244451}#purchase-workspace[hidden],#purchase-nav[hidden]{display:none}
.buy-header{display:flex;justify-content:space-between;align-items:center;gap:20px;max-width:1320px;margin:0 auto 25px}.buy-header h1{font-size:27px;letter-spacing:-.8px;color:#173d48;margin:8px 0}.buy-header p{font-size:13px;color:#738994;margin:0}.buy-header-actions{display:flex;gap:9px;flex-shrink:0}.buy-header .eyebrow{font-size:9px;letter-spacing:1.5px;color:#728d98}
.buy-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:1320px;margin:auto}.buy-stat{background:white;border:1px solid #dde7ec;border-radius:12px;min-height:125px;padding:18px;display:flex;flex-direction:column;gap:9px}.buy-stat>span{font-size:11px;color:#6e8490}.buy-stat strong{font-size:30px;line-height:1.1;letter-spacing:-1px;font-weight:600;font-variant-numeric:tabular-nums}.buy-stat small{font-size:10px;color:#8a9aa5;letter-spacing:0}.buy-stat strong small{font-size:16px}.buy-stat-primary{background:#eaf4f3;border-color:#c7e2df}.buy-stat-primary strong{color:#1d757c}.buy-stat progress{margin-top:auto}
.buy-sync-line{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin:13px auto;color:#7a919d;font-size:10px;max-width:1320px}.buy-sync-line button{font-size:11px;background:none;border:0;color:#23757e;cursor:pointer}.buy-sync-line .failed,.buy-detail-sync.failed{color:#a1672a}
.buy-method{max-width:1320px;margin:20px auto;padding:13px 16px;border:1px solid #dce6eb;border-radius:10px;background:#fff;font-size:12px;color:#5a7583}.buy-method summary{cursor:pointer;font-weight:600}.buy-method summary span{float:right;font-weight:400;font-size:10px;color:#8d9fa9}.buy-method p{line-height:1.7;margin:12px 0 0}
.buy-filters{display:flex;gap:10px;max-width:1320px;margin:25px auto 22px}.buy-search{position:relative;flex:1;min-width:170px}.buy-search svg{position:absolute;top:12px;left:13px;width:16px;height:16px;fill:none;stroke:#78939d;stroke-width:1.8}.buy-search input,.buy-filters select{height:41px;border:1px solid #d7e4eb;border-radius:8px;background:#fff;color:#42616e;font:inherit;font-size:12px;padding:0 12px}.buy-search input{width:100%;padding-left:39px}.buy-filters select{max-width:210px}
.buy-list-heading{display:flex;justify-content:space-between;align-items:center;max-width:1320px;margin:0 auto 12px}.buy-list-heading h2{font-size:14px;margin:0}.buy-list-heading>span{font-size:11px;color:#7f96a1}#buy-list{max-width:1320px;margin:auto;display:grid;gap:8px}
.buy-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e0e9ed;
  border-radius: 12px;
  background: #fff;
  padding: 12px 16px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.buy-item:hover {
  border-color: #accbd0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.buy-item.is-complete {
  border-left: 4px solid #10b981;
  padding-left: 14px;
}
.buy-check {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  width: 22px;
}
.buy-check input {
  width: 19px;
  height: 19px;
  accent-color: #0284c7;
  margin: 0;
  cursor: pointer;
}
.buy-check input:disabled {
  cursor: default;
}
.buy-item-main {
  flex: 1 1 0%;
  min-width: 0;
  text-align: left;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
}
.buy-item-main strong {
  font-size: 13.5px;
  display: block;
  margin: 3px 0 6px;
  color: #294956;
  font-weight: 650;
  line-height: 1.35;
}
.buy-item-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.buy-item-category {
  font-size: 9.5px;
  color: #7f98a3;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}
.buy-item-spec {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.55;
  color: #7a8e98;
}
.buy-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 9px;
  color: #78909a;
}
.buy-item-tags>span {
  border-radius: 4px;
  padding: 3px 6px;
  background: #f2f6f8;
}
.buy-item-tags>.buy-pending {
  color: #927341;
  background: #faf6ed;
}
.buy-item-quantity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
  min-width: 135px;
}
.buy-item-quantity>strong {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
}
.buy-item-quantity small {
  font-size: 10px;
  color: #8a9ba4;
  font-weight: 400;
}
.buy-state {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}
.buy-state.complete {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}
.buy-state.partial {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}
.buy-state.missing, .buy-state.undefined {
  color: #8a9aa4;
}
.buy-quote-price {
  color: #347d72!important;
}
.buy-quote-price span {
  display: block;
  color: #9aa9ae;
  font-size: 8px;
  margin-top: 2px;
}
.buy-empty {
  text-align: center;
  padding: 45px;
  background: #fff;
  border: 1px dashed #d1dfe5;
  border-radius: 10px;
  font-size: 13px;
}
.buy-empty p {
  color: #879ba5;
  font-size: 12px;
}
.buy-footnote {
  font-size: 10px;
  color: #91a1a9;
  text-align: center;
  margin: 22px auto;
}
.buy-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100dvh - 36px);padding:0;border:1px solid #cddde3;border-radius:16px;color:#315360;background:#fff;box-shadow:0 24px 80px #183b4638;overflow:hidden;font:inherit}.buy-dialog::backdrop{background:#17313d65;backdrop-filter:blur(3px)}.buy-detail-header{padding:23px 28px 19px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #e1e9ed;background:#fbfdfe;gap:15px}.buy-detail-header .eyebrow{font-size:9px}.buy-detail-header h2{margin:9px 0 0;color:#203f4c;font-size:20px;line-height:1.35;letter-spacing:-.4px}.buy-detail-header .icon-button{flex-shrink:0;font-size:26px;line-height:1}
.buy-detail-body{padding:0 28px 22px;overflow:auto;max-height:calc(100dvh - 180px)}.buy-detail-body>section{padding:23px 0;border-bottom:1px solid #e6ecef}.buy-detail-body h3{font-size:13px;color:#2b4e5c;margin:0 0 12px}.buy-detail-body h3>span{font-size:10px;color:#90a0a9;font-weight:400;margin-left:8px}.buy-detail-body p{font-size:12px;line-height:1.7;margin:9px 0;color:#6f8793}.buy-detail-body .buy-location{font-size:10px;color:#8ea1a9}.buy-spec-pending{border-left:3px solid #d5bb88;padding:10px 14px;background:#fcf9f2;border-radius:0 7px 7px 0;margin:14px 0}.buy-spec-pending b{font-size:11px;color:#8c713d}.buy-spec-pending p{color:#968267;font-size:11px;margin:5px 0 0}.buy-drawing-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.buy-drawing-links .button{font-size:11px;text-decoration:none}
.buy-stock-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.buy-detail-body label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#4c6b7a}.buy-detail-body label small{font-size:9px;color:#94a6af}.buy-detail-body input:not([type=hidden]),.buy-detail-body textarea{width:100%;min-height:39px;padding:9px 11px;border:1px solid #d7e3e9;border-radius:7px;background:#fcfdfe;color:#294e5e;font:inherit;font-size:12px}.buy-detail-body textarea{resize:vertical;max-height:180px}.buy-notes-label{margin-top:15px}.buy-stock-actions{display:flex;align-items:center;gap:10px;margin-top:15px;flex-wrap:wrap}.buy-stock-actions .button{font-size:11px;min-height:35px}.buy-stock-actions>span{font-size:10px;color:#458474}#buy-quote-error{color:#b45e47}
.buy-references{display:grid;gap:8px}.buy-reference{border:1px solid #e3ebef;border-radius:8px;padding:13px 15px;background:#fbfdfe}.buy-reference a,.buy-user-quote a{font-size:12px;text-decoration:none;color:#267887;display:block;overflow-wrap:anywhere}.buy-reference small{display:block;font-size:10px;color:#8a9ea8;margin-top:7px}.buy-reference p{font-size:10px;margin:6px 0 0}.buy-detail-body .buy-help{font-size:11px;margin-bottom:15px}.buy-user-quote{display:flex;justify-content:space-between;border:1px solid #dbe8e8;border-radius:9px;padding:15px;margin-bottom:8px;gap:12px}.buy-user-quote>div:first-child{min-width:0}.buy-user-quote small{display:block;font-size:9px;color:#8e9fa7;margin-top:6px;overflow-wrap:anywhere}.buy-user-quote strong{display:block;font-size:16px;color:#2b7a78;margin-top:11px}.buy-user-quote p{font-size:11px;overflow-wrap:anywhere}.buy-quote-actions{display:flex;gap:10px;align-items:flex-start}.buy-quote-actions button{border:0;padding:0;font:inherit;font-size:10px;background:none;color:#53808e;cursor:pointer}.buy-quote-actions button:last-child{color:#aa7f75}.buy-add-quote{background:#f6f9fb;border:1px solid #e1e9ef;border-radius:9px;padding:14px;margin-top:15px}.buy-add-quote summary{font-size:12px;color:#36727f;cursor:pointer}.buy-add-quote form{display:grid;gap:12px;margin-top:16px}.buy-quote-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.buy-quotes-empty{padding:15px;border:1px dashed #dbe5ea;border-radius:8px;font-size:11px!important}.buy-detail-sync{font-size:10px!important;margin-top:20px!important}
@media(max-width:1200px){#purchase-workspace{padding:23px 20px}.buy-header{align-items:flex-start}.buy-header h1{font-size:23px}.buy-header-actions{flex-direction:column}.buy-summary{gap:8px}.buy-stat{padding:13px;min-height:118px}.buy-stat>span{font-size:10px}.buy-stat small{font-size:9px}.buy-method summary span{float:none;display:block;margin-top:8px}.buy-filters{flex-wrap:wrap}.buy-search{flex-basis:100%}.buy-filters select{flex:1;max-width:none;min-width:0}.buy-item{gap:12px;padding:11px 14px}.buy-item-quantity{min-width:120px}.buy-item-spec{-webkit-line-clamp:2}}
/* Regras responsivas para telas menores (< 768px) consolidadas com arquitetura moderna Mobile-First no final do arquivo */

body.purchases-open .workspace{grid-template-rows:minmax(0,1fr)}
body.purchases-open .status-bar{display:none}
body.purchases-open .viewport-area>:not(#purchase-workspace){visibility:hidden}

/* ==========================================================================
   CNC STUDIO R27 — TEMA ESCURO: COMPRAS E FORNECEDORES
   ========================================================================== */
[data-theme="dark"] #purchase-nav {
  color: #c9d7df;
  background: #0d141d;
}
[data-theme="dark"] .buy-nav-progress strong {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-nav-progress p {
  color: #8298a6;
}
[data-theme="dark"] .buy-nav-progress progress,
[data-theme="dark"] .buy-stat progress {
  background: #1c2736;
}
[data-theme="dark"] .buy-nav-progress progress::-webkit-progress-bar,
[data-theme="dark"] .buy-stat progress::-webkit-progress-bar {
  background: #1c2736;
}
[data-theme="dark"] .buy-nav-progress progress::-webkit-progress-value,
[data-theme="dark"] .buy-stat progress::-webkit-progress-value {
  background: var(--teal);
}
[data-theme="dark"] #buy-categories button {
  color: #8fa3b0;
}
[data-theme="dark"] #buy-categories button:hover {
  background: #141f2b;
  color: #f0f6fc;
}
[data-theme="dark"] #buy-categories button[aria-current=true] {
  background: #102a33;
  color: var(--teal);
}
[data-theme="dark"] #buy-categories small {
  color: #7993a2;
}
[data-theme="dark"] .buy-nav-footer {
  border-top-color: var(--line);
}
[data-theme="dark"] .buy-nav-footer p {
  color: #7993a2;
}

[data-theme="dark"] #purchase-workspace {
  background: #0a0e14;
  color: #e6edf3;
}
[data-theme="dark"] .buy-header h1 {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-header p {
  color: #8298a6;
}
[data-theme="dark"] .buy-header .eyebrow {
  color: #607b8e;
}
[data-theme="dark"] .buy-stat {
  background: #111a24;
  border-color: #212f3e;
}
[data-theme="dark"] .buy-stat > span {
  color: #8fa3b0;
}
[data-theme="dark"] .buy-stat strong {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-stat small {
  color: #7993a2;
}
[data-theme="dark"] .buy-stat-primary {
  background: #0f2730;
  border-color: #174c59;
}
[data-theme="dark"] .buy-stat-primary strong {
  color: #5eead4;
}
[data-theme="dark"] .buy-sync-line {
  color: #7993a2;
}
[data-theme="dark"] .buy-sync-line button {
  color: #38bdf8;
}
[data-theme="dark"] .buy-method {
  background: #111a24;
  border-color: #212f3e;
  color: #c9d7df;
}
[data-theme="dark"] .buy-search input,
[data-theme="dark"] .buy-filters select {
  background: #131c26;
  border-color: #243547;
  color: #f0f6fc;
}
[data-theme="dark"] .buy-search svg {
  stroke: #7993a2;
}
[data-theme="dark"] .buy-list-heading h2 {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-list-heading > span {
  color: #7993a2;
}
[data-theme="dark"] .buy-item {
  background: #111a24;
  border-color: #212f3e;
}
[data-theme="dark"] .buy-item:hover {
  border-color: #334b63;
  background: #141f2b;
}
[data-theme="dark"] .buy-item.is-complete {
  border-left-color: #34d399;
}
[data-theme="dark"] .buy-item-main strong {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-item-category {
  color: #7993a2;
}
[data-theme="dark"] .buy-item-spec {
  color: #94a7b5;
}
[data-theme="dark"] .buy-item-tags > span {
  background: #16222f;
  color: #8da4b3;
}
[data-theme="dark"] .buy-item-tags > .buy-pending {
  background: #2b2210;
  color: #fde68a;
}
[data-theme="dark"] .buy-item-quantity > strong {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-item-quantity small {
  color: #7993a2;
}
[data-theme="dark"] .buy-detail-button {
  background: #162432;
  color: #38bdf8;
}
[data-theme="dark"] .buy-detail-button:hover {
  background: #1d3042;
  color: #7dd3fc;
}
[data-theme="dark"] .buy-quote-price {
  color: #34d399 !important;
}
[data-theme="dark"] .buy-empty {
  background: #111a24;
  border-color: #263647;
  color: #f0f6fc;
}
[data-theme="dark"] .buy-empty p {
  color: #7993a2;
}
[data-theme="dark"] .buy-footnote {
  color: #647b8a;
}

/* Purchase Details Dialog */
[data-theme="dark"] .buy-dialog {
  background: #0f1722;
  border-color: #27394b;
  color: #e6edf3;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .buy-detail-header {
  background: #121c27;
  border-bottom-color: var(--line);
}
[data-theme="dark"] .buy-detail-header h2 {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-detail-body > section {
  border-bottom-color: var(--line);
}
[data-theme="dark"] .buy-detail-body h3 {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-detail-body p {
  color: #94a7b5;
}
[data-theme="dark"] .buy-spec-pending {
  background: #2b2210;
  border-left-color: #f59e0b;
}
[data-theme="dark"] .buy-spec-pending b {
  color: #fde68a;
}
[data-theme="dark"] .buy-spec-pending p {
  color: #fef3c7;
}
[data-theme="dark"] .buy-detail-body label {
  color: #8da4b3;
}
[data-theme="dark"] .buy-detail-body input:not([type=hidden]),
[data-theme="dark"] .buy-detail-body textarea {
  background: #131c26;
  border-color: #263749;
  color: #f0f6fc;
}
[data-theme="dark"] .buy-reference {
  background: #121b25;
  border-color: #21303f;
}
[data-theme="dark"] .buy-reference a,
[data-theme="dark"] .buy-user-quote a {
  color: #38bdf8;
}
[data-theme="dark"] .buy-reference small {
  color: #7993a2;
}
[data-theme="dark"] .buy-user-quote {
  background: #121b25;
  border-color: #21303f;
}
[data-theme="dark"] .buy-user-quote strong {
  color: #34d399;
}
[data-theme="dark"] .buy-add-quote {
  background: #111a24;
  border-color: #212f3e;
}
[data-theme="dark"] .buy-add-quote summary {
  color: #38bdf8;
}
[data-theme="dark"] .buy-quotes-empty {
  border-color: #263647;
  color: #7993a2;
}

/* ==========================================================================
   GERENCIADOR DE MÚLTIPLAS LISTAS & ORDENAÇÃO
   ========================================================================== */
.buy-lists-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto 20px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #dbe6ec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(23, 60, 70, 0.04);
  flex-wrap: wrap;
}
.buy-list-selector-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 250px;
}
.buy-list-selector-box label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2b4c59;
  white-space: nowrap;
}
.buy-list-selector-box svg {
  width: 16px;
  height: 16px;
  color: #247d83;
}
.buy-list-selector-box select {
  flex: 1;
  max-width: 320px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cbe0e7;
  border-radius: 8px;
  background: #fbfdfe;
  color: #1a3d47;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.buy-list-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.list-btn {
  font-size: 11px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.list-btn.primary {
  background: #247d83 !important;
  color: #ffffff !important;
  border: 1px solid #1c686d !important;
}
.list-btn.primary:hover {
  background: #1b656a !important;
}
.list-btn.danger {
  color: #a74332 !important;
  border-color: #eed6d1 !important;
  background: #fff8f7 !important;
}
.list-btn.danger:hover {
  background: #fdeee9 !important;
}

/* Badges nos cards de compras */
.buy-item-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.buy-recent-badge {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.buy-media-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.buy-doc-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.buy-list-active-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e6f3f4;
  color: #186c74;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* ==========================================================================
   GALERIA TÉCNICA INTERATIVA NA MODAL
   ========================================================================== */
.buy-gallery-section {
  padding: 20px 0 !important;
  border-bottom: 1px solid #e6ecef;
}
.buy-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.buy-gallery-header h3 {
  margin: 0 !important;
}
.buy-btn-action {
  font-size: 11px !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  text-decoration: none !important;
  background: #f0f7f8 !important;
  border-color: #c9e0e5 !important;
  color: #1f646e !important;
  font-weight: 600 !important;
}
.buy-btn-action:hover {
  background: #e2f0f2 !important;
}
.buy-btn-video {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}
.buy-btn-video:hover {
  background: #fee2e2 !important;
}

.buy-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.buy-gallery-main {
  position: relative;
  width: 100%;
  min-height: 240px;
  max-height: 420px;
  border-radius: 12px;
  border: 1px solid #dce8ee;
  background: #0f1722;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buy-gallery-main img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.buy-gallery img[hidden],
.buy-gallery-header-actions [hidden] {
  display: none !important;
}
.buy-gallery-status {
  padding: 12px;
  color: #d6e5ee;
  font-size: 12px;
  text-align: center;
}
.buy-gallery-caption {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(15, 23, 34, 0.75);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
}
.buy-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.buy-gallery-thumb {
  position: relative;
  flex: 0 0 76px;
  height: 56px;
  border: 2px solid #e0e9ee;
  border-radius: 8px;
  background: #0f1722;
  padding: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
}
.buy-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.buy-gallery-thumb[data-gallery-view]:not([data-gallery-view="photo"]) img {
  object-fit: contain;
}
.buy-gallery-thumb.is-active,
.buy-gallery-thumb:hover {
  border-color: #247d83;
  box-shadow: 0 0 0 2px rgba(36, 125, 131, 0.25);
  transform: translateY(-1px);
}
.buy-gallery-main.is-drawing-view {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.06);
}
.buy-gallery-main.is-drawing-view img {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}
.buy-gallery-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.buy-btn-action.is-zoom-btn {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
  font-weight: 700 !important;
}
.buy-btn-action.is-zoom-btn:hover {
  background: #bae6fd !important;
  color: #0284c7 !important;
}
.buy-gallery-thumb.is-svg-thumb {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
}
.buy-gallery-thumb.is-svg-thumb img {
  object-fit: contain !important;
  padding: 2px;
}
.buy-thumb-type-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  pointer-events: none;
  line-height: 1.2;
}
.buy-thumb-type-tag.is-svg {
  background: #dc2626 !important;
  color: #ffffff !important;
}
.buy-drawing-links .button.is-drawing-link {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
  font-weight: 700 !important;
}
.buy-drawing-links .button.is-drawing-link:hover {
  background: #d1fae5 !important;
  color: #065f46 !important;
}


/* ==========================================================================
   FICHA TÉCNICA E PARÂMETROS ESTRUTURADOS
   ========================================================================== */
.buy-specs-section {
  padding: 20px 0 !important;
  border-bottom: 1px solid #e6ecef;
}
.buy-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.buy-spec-card {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.buy-spec-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 600;
}
.buy-spec-value {
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.buy-ref-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.buy-ref-price {
  font-size: 14px;
  font-weight: 700;
  color: #186c74;
}
.buy-ref-price small {
  font-size: 10px;
  color: #71858f;
  font-weight: 400;
}

/* ==========================================================================
   TEMA ESCURO — EXTENSÕES MULTI-LISTAS, GALERIA E SPECS
   ========================================================================== */
[data-theme="dark"] .buy-lists-toolbar {
  background: #111a24;
  border-color: #212f3e;
  box-shadow: none;
}
[data-theme="dark"] .buy-list-selector-box label {
  color: #c9d7df;
}
[data-theme="dark"] .buy-list-selector-box select {
  background: #152230;
  border-color: #293d52;
  color: #f0f6fc;
}
[data-theme="dark"] .buy-recent-badge {
  background: #064e3b;
  color: #a7f3d0;
  border-color: #047857;
}
[data-theme="dark"] .buy-media-badge {
  background: #172554;
  color: #93c5fd;
  border-color: #1e3a8a;
}
[data-theme="dark"] .buy-doc-badge {
  background: #451a03;
  color: #fde68a;
  border-color: #78350f;
}
[data-theme="dark"] .buy-list-active-badge {
  background: #132f38;
  color: #38bdf8;
}
[data-theme="dark"] .buy-btn-action {
  background: #162432 !important;
  border-color: #2b3e52 !important;
  color: #38bdf8 !important;
}
[data-theme="dark"] .buy-btn-video {
  background: #3a1515 !important;
  border-color: #5c2020 !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .buy-gallery-main {
  border-color: #243547;
  background: #070b10;
}
[data-theme="dark"] .buy-gallery-thumb {
  border-color: #223446;
  background: #070b10;
}
[data-theme="dark"] .buy-gallery-thumb.is-active,
[data-theme="dark"] .buy-gallery-thumb:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}
[data-theme="dark"] .buy-spec-card {
  background: #131c26;
  border-color: #233344;
}
[data-theme="dark"] .buy-spec-label {
  color: #7993a2;
}
[data-theme="dark"] .buy-spec-value {
  color: #f0f6fc;
}
[data-theme="dark"] .buy-ref-price {
  color: #34d399;
}


/* ==========================================================================
   MINIATURAS E FOTO PRINCIPAL NA LISTA DE COMPRAS
   ========================================================================== */
.buy-item-thumb-box {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: radial-gradient(circle at center, #111e2e 0%, #070d14 100%);
  border: 1px solid #1f364d;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.buy-item-thumb-box:hover {
  border-color: #38bdf8;
  box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.15), 0 4px 14px rgba(0, 0, 0, 0.4);
}
.buy-item-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.buy-item:hover .buy-item-thumb-img {
  transform: scale(1.08);
}
.buy-thumb-change-pill {
  position: absolute;
  bottom: 3px;
  left: 3px;
  right: 3px;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(13, 20, 29, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 8.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s, background 0.15s;
}
.buy-thumb-change-pill:hover {
  opacity: 1;
  background: #0f2b38;
  border-color: #5eead4;
  color: #5eead4;
}
.buy-item-thumb-cad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #527386;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #13222e 0%, #0a1118 100%);
}
.buy-item-thumb-cad svg {
  stroke: #416275;
}

/* ==========================================================================
   GALERIA NO MODAL COM DEFINIÇÃO DE FOTO PRINCIPAL
   ========================================================================== */
.buy-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(7, 11, 16, 0.92) 0%, rgba(7, 11, 16, 0.4) 70%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.buy-gallery-overlay .buy-gallery-caption {
  position: static;
  background: none;
  padding: 0;
  font-size: 11px;
}
.buy-gallery-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.buy-gallery-set-primary-btn {
  border: 1px solid #234253;
  border-radius: 6px;
  background: rgba(15, 27, 39, 0.85);
  color: #8fa5b5;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.buy-gallery-set-primary-btn:hover {
  background: #173244;
  color: #f0f6fc;
  border-color: #38bdf8;
}
.buy-gallery-set-primary-btn.is-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}
.buy-gallery-restore-cad-btn {
  border: 1px solid #283a4c;
  border-radius: 6px;
  background: rgba(15, 27, 39, 0.85);
  color: #7993a2;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.buy-gallery-restore-cad-btn:hover:not(:disabled) {
  background: #233b50;
  color: #f0f6fc;
  border-color: #38bdf8;
}
.buy-gallery-restore-cad-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #1c2733;
}
.buy-gallery-thumb {
  position: relative;
}
.buy-thumb-star {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  color: #000;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.buy-gallery-thumb.is-primary-thumb {
  border-color: #f59e0b !important;
}

/* ==========================================================================
   MODAL 3D DA PEÇA DE REFERÊNCIA (ISOLADA + INSPEÇÃO DE ENGENHARIA)
   ========================================================================== */
.buy-3d-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 1px solid #21374a;
  border-radius: 18px;
  background: #0d1520;
  color: #e6edf3;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(56, 189, 248, 0.2);
  overflow: hidden;
  font: inherit;
}
.buy-3d-dialog::backdrop {
  background: rgba(5, 9, 14, 0.82);
  backdrop-filter: blur(10px);
}
.buy-3d-container {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
}
.buy-3d-header {
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #1a2a38;
  background: #0b111a;
  gap: 16px;
  flex-shrink: 0;
}
.buy-3d-title-group h2 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #f0f6fc;
}
.buy-3d-header .icon-button {
  font-size: 24px;
  line-height: 1;
  color: #8da4b3;
  background: none;
  border: 0;
  cursor: pointer;
}
.buy-3d-header .icon-button:hover {
  color: #f0f6fc;
}
.buy-3d-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 500px;
}
.buy-3d-stage-card {
  position: relative;
  background: #080c12;
  border-right: 1px solid #1a2a38;
  display: flex;
  flex-direction: column;
}
.buy-3d-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
}
.buy-3d-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.buy-3d-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  background: rgba(13, 21, 32, 0.85);
  backdrop-filter: blur(8px);
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.buy-3d-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a7b5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.buy-3d-btn svg {
  width: 14px;
  height: 14px;
}
.buy-3d-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f6fc;
}
.buy-3d-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
}
.buy-3d-hint {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(11, 17, 26, 0.8);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #7993a2;
  font-size: 10.5px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.buy-3d-side-panel {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #0d1520;
}
.buy-3d-spec-card {
  background: #111a26;
  border: 1px solid #1e2e3d;
  border-radius: 12px;
  padding: 16px;
}
.buy-3d-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0 8px;
}
.buy-3d-metric {
  background: #152230;
  border: 1px solid #233446;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.buy-3d-metric small {
  font-size: 10px;
  color: #8da4b3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.buy-3d-metric strong {
  font-size: 18px;
  color: #38bdf8;
  font-family: monospace;
  font-weight: 700;
}
.buy-3d-metric strong small {
  font-size: 12px;
  color: #647d8d;
}
.buy-3d-metric-note {
  font-size: 10.5px;
  color: #718897;
  margin: 6px 0 0;
  line-height: 1.5;
}

.buy-3d-context-card {
  background: #111a26;
  border: 1px solid #1e2e3d;
  border-radius: 12px;
  padding: 16px;
}
.buy-3d-context-card h4 {
  margin: 8px 0 6px;
  font-size: 14px;
  color: #f0f6fc;
}
.buy-3d-context-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #8da4b3;
}

.buy-3d-actions-card {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.buy-3d-locate-full-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0e7490 0%, #0369a1 100%) !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.3);
  transition: all 0.2s ease;
}
.buy-3d-locate-full-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45);
  background: linear-gradient(135deg, #0891b2 0%, #0284c7 100%) !important;
}
.buy-3d-locate-full-btn strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.buy-3d-locate-full-btn small {
  display: block;
  font-size: 10px;
  opacity: 0.9;
  font-weight: 400;
  margin-top: 2px;
}
.buy-3d-secondary-btn {
  background: #152230 !important;
  border-color: #233446 !important;
  color: #94a7b5 !important;
  font-size: 11px;
  padding: 10px;
  border-radius: 8px;
}
.buy-3d-secondary-btn:hover {
  color: #f0f6fc !important;
  background: #1a2a3c !important;
}

/* ==========================================================================
   MODAL SELETOR DE FOTO PRINCIPAL
   ========================================================================== */
.buy-photo-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid #21374a;
  border-radius: 16px;
  background: #0d1520;
  color: #e6edf3;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  font: inherit;
}
.buy-photo-dialog::backdrop {
  background: rgba(5, 9, 14, 0.82);
  backdrop-filter: blur(8px);
}
.buy-photo-picker-container {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}
.buy-photo-picker-header {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #1a2a38;
  background: #0b111a;
  gap: 14px;
}
.buy-photo-picker-header h3 {
  margin: 6px 0 4px;
  font-size: 17px;
  color: #f0f6fc;
}
.buy-photo-picker-header p {
  margin: 0;
  font-size: 11.5px;
  color: #7993a2;
}
.buy-photo-picker-grid {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  overflow-y: auto;
}
.buy-photo-picker-card {
  background: #111a26;
  border: 1px solid #203142;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}
.buy-photo-picker-card.is-active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}
.buy-photo-picker-imgbox {
  width: 100%;
  height: 140px;
  background: #070b10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buy-photo-picker-imgbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.buy-photo-active-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f59e0b;
  color: #000;
  font-size: 9px;
  font-weight: 800;
}
.buy-photo-picker-card-actions {
  padding: 10px;
  display: flex;
}
.buy-photo-picker-card-actions button {
  width: 100%;
  font-size: 11px;
  padding: 7px;
}

@media(max-width: 860px) {
  .buy-3d-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .buy-3d-stage-card {
    border-right: 0;
    border-bottom: 1px solid #1a2a38;
  }
  .buy-3d-canvas-wrapper {
    min-height: 320px;
    height: 320px;
  }
}

/* ==========================================================================
   ESTILOS DE KITS / GRUPOS DE COMPRAS & DRAG AND DROP (R27 v1.1.4)
   ========================================================================== */
.buy-kit-card {
  background: #0f1824;
  border: 1px solid #1f3246;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.buy-kit-card:hover {
  border-color: #2b4560;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.buy-kit-card.is-complete {
  border-left: 4px solid #10b981;
}

.buy-kit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, #132030 0%, #0f1926 100%);
  border-bottom: 1px solid #1e3144;
  gap: 12px;
}
.buy-kit-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}
.buy-kit-chevron {
  background: #17283c;
  border: 1px solid #233b54;
  color: #7dd3fc;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}
.buy-kit-chevron:hover {
  background: #1f3652;
  color: #fff;
}
.buy-kit-chevron.is-collapsed svg {
  transform: rotate(-90deg);
}

.buy-kit-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.buy-kit-tagline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.buy-kit-badge {
  background: #162a3f;
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.buy-kit-count-badge {
  background: #1e3247;
  color: #94a7b5;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.buy-kit-status-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.buy-kit-status-badge.complete {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.buy-kit-status-badge.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.buy-kit-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f0f6fc;
}

.buy-kit-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.buy-kit-total-price {
  text-align: right;
  margin-right: 6px;
  display: flex;
  flex-direction: column;
}
.buy-kit-total-price small {
  font-size: 9.5px;
  color: #7993a2;
}
.buy-kit-total-price strong {
  font-size: 13px;
  color: #34d399;
}
.buy-kit-action-btn {
  background: #162433;
  border: 1px solid #23374d;
  color: #8fa5b5;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
}
.buy-kit-action-btn:hover {
  background: #20354a;
  color: #f0f6fc;
  border-color: #38bdf8;
}
.buy-kit-action-btn.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.buy-kit-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: #ef4444;
}

.buy-kit-body {
  padding: 12px;
  background: #0b121c;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-kit-body.is-collapsed {
  display: none;
}

.buy-kit-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #101c2a;
  border: 1.5px dashed #243d57;
  border-radius: 8px;
  color: #7993a2;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.buy-kit-dropzone.can-drop {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  animation: pulse-drop 1.5s infinite;
}
.buy-kit-dropzone.drag-over {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  transform: scale(1.01);
}
@keyframes pulse-drop {
  0%, 100% { border-color: #38bdf8; }
  50% { border-color: #0284c7; }
}

.buy-kit-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-kit-empty {
  margin: 12px 0;
  text-align: center;
  color: #647b8a;
  font-size: 12px;
  font-style: italic;
}

.buy-item.is-kit-child {
  border-left: 3.5px solid #0284c7;
  background: #0f1823;
  margin-left: 0;
  width: 100%;
}
.buy-item-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #526e82;
  cursor: grab;
  padding: 6px 4px;
  width: 22px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.buy-item-drag-handle:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}
.buy-item-drag-handle:active {
  cursor: grabbing;
  transform: scale(0.95);
}
.buy-item.is-dragging {
  opacity: 0.45;
  border: 1.5px dashed #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}
.buy-item.drag-over-before {
  border-top: 3px solid #38bdf8 !important;
  box-shadow: 0 -4px 14px rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}
.buy-item.drag-over-after {
  border-bottom: 3px solid #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
  transform: translateY(2px);
}

.buy-item-actions-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
  width: 105px;
  box-sizing: border-box;
}
.buy-detail-button {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 10px;
  color: #38bdf8;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.buy-detail-button:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #7dd3fc;
  transform: translateY(-1px);
}
.buy-detail-button span {
  font-size: 12px;
}
.buy-ungroup-btn {
  width: 100%;
  box-sizing: border-box;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 7px;
  color: #f87171;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.buy-ungroup-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #f87171;
  color: #fca5a5;
  transform: translateY(-1px);
}

.buy-standalone-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 20px 0 10px;
  background: #101a26;
  border-radius: 6px;
  border: 1px solid #1a2a3c;
}
.buy-standalone-divider span {
  font-size: 10.5px;
  font-weight: 800;
  color: #8da4b3;
  letter-spacing: 0.5px;
}
.buy-standalone-divider small {
  font-size: 10px;
  color: #5d7585;
}
.buy-steel-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.buy-steel-section + .buy-steel-section {
  margin-top: 14px;
}
.buy-steel-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #c8dfe6;
  border-radius: 8px;
  background: #e9f3f6;
  color: #244d60;
}
.buy-steel-section h3 {
  font-size: 13px;
  margin: 0;
}
.buy-steel-section header small {
  font-size: 11px;
}
[data-theme="dark"] .buy-steel-section > header {
  border-color: #28475b;
  background: #142938;
  color: #cee3ef;
}
.buy-steel-lot {
  min-width: 0;
  border: 1px solid #dce8ed;
  border-radius: 10px;
  background: #fff;
}
.buy-steel-lot > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}
.buy-steel-lot > summary::-webkit-details-marker { display: none; }
.buy-steel-lot > summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.buy-steel-lot[open] > summary::before { transform: rotate(45deg); }
.buy-steel-lot-label { display: grid; gap: 3px; overflow-wrap: anywhere; }
.buy-steel-lot-label small { color: #496675; font-size: 11px; }
.buy-steel-production {
  padding: 4px 7px;
  border-radius: 6px;
  background: #e5f3ef;
  color: #185949;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.buy-steel-lot-members { display: grid; gap: 8px; padding: 0 8px 8px; }
[data-theme="dark"] .buy-steel-lot { border-color: #28475b; background: #172731; }
[data-theme="dark"] .buy-steel-lot-label small { color: #a9c0d0; }
[data-theme="dark"] .buy-steel-production { background: #153d35; color: #ade2d4; }

/* Badge 3D CAD ou Foto Real no Thumbnail */
.buy-thumb-cad-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(13, 20, 29, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.buy-thumb-cad-badge.is-custom {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* Seção de gerenciamento de fotos e Kit no modal */
.buy-photo-manager-section {
  background: #111a24;
  border: 1px solid #203142;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.buy-photo-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.buy-photo-manager-header h3 {
  margin: 0;
  font-size: 13.5px;
  color: #f0f6fc;
}
.buy-photo-manager-header h3 span {
  font-size: 11px;
  color: #7993a2;
  font-weight: 400;
  margin-left: 6px;
}
.buy-photo-status-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.buy-photo-manager-box {
  display: flex;
  gap: 16px;
  align-items: center;
}
.buy-photo-preview-card {
  width: 100px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid #243b52;
  background: #090f16;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.buy-photo-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}
.buy-photo-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  font-size: 8px;
  text-align: center;
  color: #cbd5e1;
  padding: 2px;
}
.buy-photo-manager-actions {
  flex: 1;
}
.buy-photo-manager-actions p {
  margin: 0 0 10px;
  font-size: 11.5px;
  color: #8da4b3;
  line-height: 1.4;
}
.buy-photo-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.buy-group-assign-section {
  background: #111a24;
  border: 1px solid #203142;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.buy-group-assign-section h3 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #f0f6fc;
}
.buy-group-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.buy-group-select-row label {
  font-size: 12px;
  color: #8da4b3;
  font-weight: 600;
}
.buy-group-select {
  flex: 1;
  background: #0d151f;
  border: 1px solid #23394f;
  color: #f0f6fc;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}


/* ==========================================================================
   MINIATURA, DADOS E MODAL DO KIT / GRUPO DE COMPRA
   ========================================================================== */
.buy-kit-thumb-box {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  background: radial-gradient(circle at center, #132233 0%, #091017 100%);
  border: 1.5px solid #22425b;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
}
.buy-kit-thumb-box:hover {
  border-color: #38bdf8;
  transform: scale(1.04);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}
.buy-kit-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buy-kit-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #55809e;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.buy-kit-thumb-placeholder svg {
  stroke: #416a85;
}
.buy-kit-supplier-badge {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.buy-kit-desc {
  margin: 3px 0 0 0;
  font-size: 11.5px;
  color: #8da4b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.buy-kit-pricing-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.buy-kit-total-price.is-direct {
  color: #34d399;
}
.buy-kit-total-price.is-direct strong {
  color: #34d399;
  font-size: 16px;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}
.buy-kit-subtotal-diff {
  font-size: 9.5px;
  color: #728fa3;
  font-weight: 500;
}
.buy-kit-set-price-link,
.buy-kit-add-price-btn {
  background: none;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.buy-kit-set-price-link:hover,
.buy-kit-add-price-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
}
.buy-kit-action-btn.edit-btn {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 10px;
  font-weight: 600;
  font-size: 11px;
}
.buy-kit-action-btn.edit-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}
.buy-kit-action-btn.link {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 10px;
  font-weight: 600;
  font-size: 11px;
  text-decoration: none;
}
.buy-kit-action-btn.link:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}

/* Modal de Edição de Dados do Kit */
.buy-kit-dialog {
  max-width: 780px;
  width: 92vw;
  background: #0b131d;
  border: 1px solid #233e56;
  border-radius: 16px;
  color: #e2e8f0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.15);
  padding: 0;
  overflow: hidden;
}
.buy-kit-dialog::backdrop {
  background: rgba(3, 7, 12, 0.85);
  backdrop-filter: blur(6px);
}
.buy-kit-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}
.buy-kit-modal-content {
  padding: 20px;
  overflow-y: auto;
}
.buy-kit-modal-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .buy-kit-modal-grid {
    grid-template-columns: 1fr;
  }
}
.buy-kit-photo-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.buy-kit-modal-preview-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: radial-gradient(circle at center, #152435 0%, #090f17 100%);
  border: 1.5px solid #23435e;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}
.buy-kit-modal-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buy-kit-modal-preview-box img.is-placeholder {
  object-fit: contain;
  padding: 20px;
  opacity: 0.6;
}
.buy-kit-field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a9be;
  margin-bottom: 6px;
}
.buy-kit-input,
.buy-kit-textarea {
  width: 100%;
  background: #0f1c29;
  border: 1px solid #1e384f;
  border-radius: 8px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 13px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.buy-kit-input:focus,
.buy-kit-textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
  background: #132435;
}
.buy-kit-btn-secondary {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.buy-kit-btn-secondary:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}
.buy-kit-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.buy-kit-parts-gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.buy-kit-sub-label {
  font-size: 10.5px;
  color: #7b94a8;
  font-weight: 600;
}
.buy-kit-parts-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.buy-kit-pick-thumb {
  aspect-ratio: 1;
  padding: 2px;
  background: #0f1c28;
  border: 1px solid #1e384e;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s;
}
.buy-kit-pick-thumb:hover {
  border-color: #38bdf8;
  transform: scale(1.05);
}
.buy-kit-pick-thumb.is-picked {
  border: 2px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}
.buy-kit-pick-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.buy-kit-data-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.buy-kit-field {
  display: flex;
  flex-direction: column;
}
.buy-kit-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .buy-kit-field-row {
    grid-template-columns: 1fr;
  }
}
.buy-kit-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.buy-kit-ref-sum {
  font-size: 11px;
  color: #7c95a9;
}
.buy-kit-ref-sum strong {
  color: #38bdf8;
}
.buy-kit-price-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.buy-currency-badge {
  font-weight: 800;
  font-size: 13px;
  color: #34d399;
  background: #0f2420;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.buy-kit-btn-use-sum {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.buy-kit-btn-use-sum:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
}
.buy-kit-field-hint {
  font-size: 10.5px;
  color: #6a8296;
  margin-top: 4px;
}
.buy-kit-url-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.buy-kit-btn-test-url {
  background: #112836;
  color: #38bdf8;
  border: 1px solid #1f4762;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  text-decoration: none;
  font-weight: 700;
}
.buy-kit-bulk-actions {
  background: rgba(15, 27, 39, 0.6);
  border: 1px solid #1a3246;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-kit-bulk-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.buy-kit-batch-btn {
  background: #132435;
  color: #cbd5e1;
  border: 1px solid #23425b;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.buy-kit-batch-btn.buy {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}
.buy-kit-batch-btn.buy:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}
.buy-kit-batch-btn.reset:hover {
  background: #1e354c;
  color: #fff;
}
.buy-kit-modal-footer {
  padding: 14px 20px;
  background: #091018;
  border-top: 1px solid #1a3043;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   MODAIS MODERNOS DE AÇÃO (NOVO KIT, NOVA LISTA, CLONAR, RENOMEAR, EXCLUIR)
   ========================================================================== */
.buy-action-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 520px;
  width: 90vw;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.buy-action-dialog::backdrop {
  background: rgba(4, 10, 18, 0.82);
  backdrop-filter: blur(8px);
}
.buy-action-shell {
  background: #0d1622;
  border: 1px solid #1e2f42;
  color: #f0f6fc;
  border-radius: 16px;
  overflow: hidden;
}
.buy-action-form {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.buy-action-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8da4b3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.buy-action-subtag {
  color: #0ea5e9;
  font-size: 11.5px;
  text-transform: none;
}
.buy-action-heading {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 800;
  color: #f0f6fc;
}
.buy-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.buy-field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .buy-field-row-2 {
    grid-template-columns: 1fr;
  }
}
.buy-field-help {
  font-size: 11.5px;
  color: #7b94a5;
  line-height: 1.4;
}
.buy-action-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #192738;
  margin-top: 6px;
}
.action-confirm-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.2s ease !important;
}
.action-confirm-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}
.buy-danger-shell {
  border-color: #7f1d1d;
}
.buy-danger-text {
  font-size: 14px;
  color: #fca5a5;
  margin: 0;
  line-height: 1.5;
}
.buy-kit-badge.is-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Destaque luminoso ao criar novo kit */
@keyframes kitPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.85);
    border-color: #f59e0b;
    transform: scale(1.02);
  }
  30% {
    box-shadow: 0 0 30px 8px rgba(245, 158, 11, 0.6);
    border-color: #fbbf24;
    transform: scale(1.02);
  }
  70% {
    box-shadow: 0 0 20px 4px rgba(245, 158, 11, 0.35);
    border-color: #f59e0b;
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-color: #1f3246;
    transform: scale(1);
  }
}
.buy-kit-card.is-just-created {
  animation: kitPulseGlow 3.5s ease-out;
  border-color: #f59e0b !important;
}

/* Toast de Notificação do Módulo de Compras */
.buy-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.buy-toast-container.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.buy-toast-pill {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d1724;
  border: 1px solid #1f354d;
  color: #e2f1f8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(14, 165, 233, 0.3);
}
.buy-toast-pill.error {
  border-color: #ef4444;
  color: #fee2e2;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.25);
}

/* Botão Proeminente de Novo Kit e Toolbar de Listas */
.group-btn-prominent {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0b1118 !important;
  border: 1px solid #b45309 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.group-btn-prominent:hover {
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45) !important;
  filter: brightness(1.1) !important;
}
.group-btn-prominent:active {
  transform: scale(0.98) !important;
}
.buy-toolbar-divider {
  width: 1px;
  height: 24px;
  background: #25394d;
  margin: 0 4px;
}
.buy-btn-group-lists {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.buy-list-badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  background: #18283a;
  color: #7dd3fc;
  border: 1px solid #233b54;
  white-space: nowrap;
}


/* ==========================================================================
   DESTAQUE PARA AS NOVAS PEÇAS HOMOLOGADAS & DIVISORES ELEGANTES (R27)
   ========================================================================== */
.buy-item.is-featured-new {
  border-color: #86efac;
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.12);
}
.buy-item.is-featured-new:hover {
  border-color: #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .buy-item.is-featured-new {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, #111a24 100%);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.12);
}
[data-theme="dark"] .buy-item.is-featured-new:hover {
  border-color: rgba(56, 189, 248, 0.65);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.13) 0%, #141f2b 100%);
  box-shadow: 0 4px 22px rgba(56, 189, 248, 0.22);
}

.buy-featured-badge {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

[data-theme="dark"] .buy-featured-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.buy-standalone-divider.is-featured {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, #101a26 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-top: 10px;
}
.buy-standalone-divider.is-featured span {
  color: #34d399;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.buy-standalone-divider.is-featured small {
  color: #a7f3d0;
}

/* ==========================================================================
   CNC STUDIO R27 — MOBILE FIRST & ERGONOMIA REFINADA (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Área de Workspace e Espaçamento */
  #purchase-workspace {
    padding: 12px 10px !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  /* Cabeçalho do Workspace */
  .buy-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }
  .buy-header h1 {
    font-size: 20px !important;
    letter-spacing: -0.3px !important;
  }
  .buy-header p {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }
  .buy-header-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .buy-header-actions .button {
    flex: 1 !important;
    min-height: 38px !important;
    font-size: 11px !important;
    padding: 8px 10px !important;
    justify-content: center !important;
    touch-action: manipulation;
  }

  /* Toolbar do Gerenciador de Listas e Kits */
  .buy-lists-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .buy-list-selector-box {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
  }
  .buy-list-selector-box select {
    flex: 1 !important;
    min-width: 130px !important;
    min-height: 38px !important;
    font-size: 12px !important;
  }
  .buy-list-buttons {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .buy-btn-group-lists {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .buy-btn-group-lists .list-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    min-height: 36px !important;
    padding: 6px 4px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    touch-action: manipulation;
  }
  .group-btn-prominent {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    touch-action: manipulation;
  }
  .buy-toolbar-divider {
    display: none !important;
  }

  /* Resumo Estatístico em 2 Colunas */
  .buy-summary {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .buy-stat {
    padding: 12px 10px !important;
    min-height: 88px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-radius: 10px !important;
  }
  .buy-stat > span {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }
  .buy-stat strong {
    font-size: 21px !important;
    line-height: 1.15 !important;
    margin: 4px 0 !important;
  }
  .buy-stat small {
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    opacity: 0.8 !important;
    white-space: normal !important;
    word-break: normal !important;
  }

  /* Filtros e Busca */
  .buy-filters {
    margin-top: 14px !important;
    gap: 8px !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  .buy-search {
    width: 100% !important;
    flex-basis: 100% !important;
  }
  .buy-search input {
    height: 42px !important;
    font-size: 13px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .buy-filters select {
    width: 100% !important;
    max-width: none !important;
    min-height: 40px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
  }

  /* Cabeçalho do Kit em 2 Andares */
  .buy-kit-card {
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    overflow: hidden !important;
  }
  .buy-kit-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
    gap: 10px !important;
  }
  .buy-kit-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    cursor: pointer !important;
  }
  .buy-kit-chevron {
    width: 32px !important;
    height: 32px !important;
    margin-top: 4px !important;
    flex-shrink: 0 !important;
  }
  .buy-kit-thumb-box {
    width: 58px !important;
    height: 58px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
  }
  .buy-kit-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .buy-kit-title {
    font-size: 14.5px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  .buy-kit-tagline {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .buy-kit-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: 10px !important;
    margin-top: 2px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-sizing: border-box !important;
  }
  [data-theme="light"] .buy-kit-header-actions {
    border-top-color: #e2e8f0 !important;
  }
  .buy-kit-pricing-box {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .buy-kit-total-price {
    text-align: left !important;
    margin-right: 0 !important;
  }
  .buy-kit-total-price strong {
    font-size: 15px !important;
  }
  .buy-kit-action-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    touch-action: manipulation;
  }
  .buy-kit-dropzone {
    display: none !important;
  }

  /* Divisores de Seção e Peças Avulsas */
  .buy-standalone-divider {
    padding: 8px 10px !important;
    margin: 14px 0 8px !important;
    font-size: 10px !important;
    border-radius: 8px !important;
  }

  /* Cartão de Item de Peça (CSS Grid Refinado em 2 Andares) */
  .buy-item {
    display: grid !important;
    grid-template-columns: 24px 62px 1fr minmax(92px, auto) !important;
    grid-template-rows: auto auto !important;
    gap: 8px 10px !important;
    padding: 12px 10px !important;
    align-items: start !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .buy-item-drag-handle {
    display: none !important;
  }
  .buy-check {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    align-self: center !important;
    margin-top: 2px !important;
    transform: scale(1.15) !important;
    touch-action: manipulation;
  }
  .buy-item-thumb-box {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    width: 62px !important;
    height: 62px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .buy-item-main {
    grid-column: 3 / 5 !important;
    grid-row: 1 / 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .buy-item-topline {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .buy-item-category {
    font-size: 8.5px !important;
    letter-spacing: 0.3px !important;
  }
  .buy-featured-badge,
  .buy-recent-badge,
  .buy-media-badge,
  .buy-doc-badge {
    white-space: nowrap !important;
    font-size: 8px !important;
    padding: 2px 6px !important;
    flex-shrink: 0 !important;
  }
  .buy-item-main strong {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    margin: 2px 0 !important;
    color: inherit !important;
  }
  .buy-item-spec {
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 2 !important;
    color: inherit !important;
    opacity: 0.8 !important;
  }
  .buy-item-tags {
    font-size: 8.5px !important;
    margin-top: 2px !important;
  }

  /* Linha 2 do Item: Quantidade/Preço na esquerda e Botão de Ação na direita */
  .buy-item-quantity {
    grid-column: 1 / 4 !important;
    grid-row: 2 / 3 !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 8px !important;
    margin-top: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 2px !important;
  }
  [data-theme="light"] .buy-item-quantity {
    border-top-color: #e2e8f0 !important;
  }
  .buy-item-quantity > strong {
    font-size: 13px !important;
  }
  .buy-item-quantity small {
    font-size: 9.5px !important;
  }
  .buy-quote-price {
    font-size: 10.5px !important;
  }
  .buy-quote-price span {
    font-size: 8.5px !important;
  }

  .buy-item-actions-col {
    grid-column: 4 / 5 !important;
    grid-row: 2 / 3 !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 8px !important;
    margin-top: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 4px !important;
  }
  [data-theme="light"] .buy-item-actions-col {
    border-top-color: #e2e8f0 !important;
  }
  .buy-detail-button {
    min-height: 38px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    touch-action: manipulation;
  }
  .buy-ungroup-btn {
    min-height: 32px !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    touch-action: manipulation;
  }

  /* Modais em Bottom Sheet Nativo */
  dialog.buy-dialog,
  dialog.buy-kit-dialog,
  dialog.buy-action-dialog,
  dialog#buy-dialog,
  dialog#buy-kit-dialog,
  dialog#buy-action-dialog,
  dialog#buy-photo-dialog,
  dialog#buy-3d-dialog {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 90dvh !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6) !important;
    animation: slideUpBottomSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  dialog.buy-dialog::before,
  dialog.buy-kit-dialog::before,
  dialog.buy-action-dialog::before {
    content: '' !important;
    display: block !important;
    width: 38px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: rgba(148, 163, 184, 0.4) !important;
    margin: 8px auto 4px auto !important;
  }
  @keyframes slideUpBottomSheet {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
  .buy-detail-header {
    padding: 14px 16px 12px !important;
  }
  .buy-detail-header h2 {
    font-size: 16px !important;
  }
  .buy-detail-body {
    padding: 0 16px 16px !important;
    max-height: calc(90dvh - 120px) !important;
  }
  .buy-stock-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .buy-kit-modal-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .buy-kit-modal-preview-box {
    max-height: 180px !important;
  }
  .buy-kit-parts-thumbs {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .buy-dialog-close,
  #buy-kit-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    display: grid !important;
    place-items: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    z-index: 20 !important;
  }
  .buy-kit-modal-footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
  }
  .buy-kit-modal-footer button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Microinterações e Feedback Tátil ao Toque */
  .button:active,
  .buy-detail-button:active,
  .buy-kit-action-btn:active,
  .buy-list-btn:active,
  .group-btn-prominent:active,
  .buy-kit-chevron:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
  }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA DESENHOS TÉCNICOS E FURAÇÕES EXATAS (R27)
   ========================================================================== */
.buy-thumb-cad-badge.is-tech-drawing {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: #dc2626 !important;
  color: #f87171 !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35) !important;
}

.buy-item-thumb-box.is-drawing-box {
  background: #ffffff !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.buy-item-thumb-box.is-drawing-box:hover {
  border-color: #dc2626 !important;
  box-shadow: inset 0 0 14px rgba(220, 38, 38, 0.15), 0 4px 14px rgba(220, 38, 38, 0.3) !important;
}

.buy-item-thumb-img.is-vector-drawing {
  object-fit: contain !important;
  padding: 2px !important;
  background: #ffffff !important;
}

.buy-tech-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(220, 38, 38, 0.12) !important;
  border: 1px solid rgba(220, 38, 38, 0.45) !important;
  color: #dc2626 !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  padding: 1.5px 7px !important;
  border-radius: 4px !important;
  letter-spacing: 0.3px !important;
}

[data-theme="dark"] .buy-tech-badge {
  background: rgba(220, 38, 38, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
}

.buy-view-drawing-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #0f172a !important;
  border: 1px solid rgba(220, 38, 38, 0.7) !important;
  color: #fca5a5 !important;
  padding: 5px 9px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  margin-top: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.buy-view-drawing-btn:hover {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4) !important;
}

.buy-gallery-zoom-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(14, 165, 233, 0.15) !important;
  border: 1px solid rgba(14, 165, 233, 0.5) !important;
  color: #0284c7 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
}

[data-theme="dark"] .buy-gallery-zoom-btn {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #7dd3fc !important;
}

.buy-gallery-zoom-btn:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
}

.buy-drawing-links .button.is-drawing-action {
  background: #0f172a !important;
  border: 1px solid #dc2626 !important;
  color: #f87171 !important;
  font-weight: 800 !important;
}

.buy-drawing-links .button.is-drawing-action:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Banners de Governança do Projeto Base vs Listas Pessoais */
.buy-governance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  margin: 0 0 20px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  transition: all 0.2s ease;
}
.buy-governance-banner p {
  margin: 2px 0 0;
  font-size: 11px;
  opacity: 0.92;
}
.buy-governance-banner.is-admin {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #d97706;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}
[data-theme="dark"] .buy-governance-banner.is-admin {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.buy-governance-banner.is-readonly {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0369a1;
}
[data-theme="dark"] .buy-governance-banner.is-readonly {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #7dd3fc;
}
.buy-governance-banner.is-personal {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
}
[data-theme="dark"] .buy-governance-banner.is-personal {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* ==========================================================================
   FILTRO "ESTRUTURA DA BANCADA" E PAINEL DE PREÇO POR BARRA DE 6 M
   ========================================================================== */
#buy-categories button.buy-cat-sub {
  padding-left: 20px;
  font-size: 11.5px;
  border-left: 2px solid rgba(14, 165, 233, 0.45);
  margin-left: 6px;
}

.buy-quick-bench-bar {
  margin: 0 0 14px;
}
.buy-quick-bench-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.24);
}
.buy-quick-bench-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #0369a1;
  margin-right: 4px;
}
[data-theme="dark"] .buy-quick-bench-label {
  color: #38bdf8;
}
.buy-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
[data-theme="dark"] .buy-quick-pill {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.25);
}
.buy-quick-pill small {
  font-weight: 600;
  opacity: 0.78;
}
.buy-quick-pill:hover {
  border-color: #0284c7;
  color: #0284c7;
}
[data-theme="dark"] .buy-quick-pill:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}
.buy-quick-pill.is-active {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
.buy-quick-pill.is-bom-link {
  margin-left: auto;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
[data-theme="dark"] .buy-quick-pill.is-bom-link {
  color: #34d399;
}
.buy-quick-pill.is-bom-link:hover {
  background: #059669;
  color: #fff;
}

.buy-bench-bars-panel {
  margin: 0 0 18px;
}
.buy-bench-box {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.42);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(14, 165, 233, 0.05) 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.buy-bench-box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.buy-bench-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #047857;
  margin-bottom: 3px;
}
[data-theme="dark"] .buy-bench-eyebrow {
  color: #34d399;
}
.buy-bench-box-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.buy-bench-box-header p {
  margin: 0;
  font-size: 12px;
  color: #475569;
  max-width: 680px;
}
[data-theme="dark"] .buy-bench-box-header p {
  color: #94a3b8;
}
.buy-bench-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.buy-bench-kpi {
  min-width: 210px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .buy-bench-kpi {
  background: rgba(15, 23, 42, 0.82);
}
.buy-bench-kpi span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
}
.buy-bench-kpi strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  margin: 2px 0;
}
.buy-bench-kpi.is-sp strong {
  color: #0369a1;
}
[data-theme="dark"] .buy-bench-kpi.is-sp strong {
  color: #38bdf8;
}
.buy-bench-kpi.is-paid {
  border-color: rgba(16, 185, 129, 0.5);
}
.buy-bench-kpi.is-paid strong {
  color: #047857;
}
[data-theme="dark"] .buy-bench-kpi.is-paid strong {
  color: #34d399;
}
.buy-bench-kpi small {
  display: block;
  font-size: 10.5px;
  color: #64748b;
}

.buy-bench-supplier-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
[data-theme="dark"] .buy-bench-supplier-bar {
  background: rgba(15, 23, 42, 0.7);
}
.buy-bench-supplier-bar label {
  font-size: 12px;
  font-weight: 700;
}
.buy-bench-supplier-bar input {
  flex: 1;
  min-width: 220px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.95);
  color: inherit;
  font-size: 12.5px;
}
[data-theme="dark"] .buy-bench-supplier-bar input {
  background: rgba(15, 23, 42, 0.9);
}

.buy-bench-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-bench-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) 120px 175px 195px minmax(170px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
}
[data-theme="dark"] .buy-bench-row {
  background: rgba(15, 23, 42, 0.78);
}
.buy-bench-row.is-configured {
  border-color: rgba(16, 185, 129, 0.5);
}
@media (max-width: 1024px) {
  .buy-bench-row {
    grid-template-columns: 1fr 1fr;
  }
}
.buy-bench-prof-info strong {
  display: block;
  font-size: 13px;
  color: #0369a1;
}
[data-theme="dark"] .buy-bench-prof-info strong {
  color: #38bdf8;
}
.buy-bench-comm-spec {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 3px !important;
}
[data-theme="dark"] .buy-bench-comm-spec {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
}
.buy-bench-prof-info span {
  display: block;
  font-size: 11.5px;
  margin-top: 2px;
}
.buy-bench-prof-info small {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
.buy-bench-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.buy-bench-field span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
}
.buy-bench-field input {
  width: 100%;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.95);
  color: inherit;
  font-size: 12.5px;
  font-weight: 700;
}
[data-theme="dark"] .buy-bench-field input {
  background: rgba(15, 23, 42, 0.92);
}
.buy-bench-field.is-paid input {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.08);
}
.buy-bench-field small {
  font-size: 10.5px;
  color: #475569;
}
[data-theme="dark"] .buy-bench-field small {
  color: #94a3b8;
}

.buy-bench-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.buy-bench-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
}
.buy-bench-pill.is-sp {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #0369a1;
}
[data-theme="dark"] .buy-bench-pill.is-sp {
  color: #7dd3fc;
}
.buy-bench-pill.is-paid {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #047857;
}
[data-theme="dark"] .buy-bench-pill.is-paid {
  color: #6ee7b7;
}
.buy-bench-pill.is-pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  color: #b45309;
}
[data-theme="dark"] .buy-bench-pill.is-pending {
  color: #fcd34d;
}
.buy-bench-pill.is-sup {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #4338ca;
}
[data-theme="dark"] .buy-bench-pill.is-sup {
  color: #c7d2fe;
}
.buy-bench-supplier-card {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
[data-theme="dark"] .buy-bench-supplier-card {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.35);
}
.buy-bench-supplier-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.buy-bench-supplier-card-info strong {
  font-size: 13px;
  color: #312e81;
}
[data-theme="dark"] .buy-bench-supplier-card-info strong {
  color: #e0e7ff;
}
.buy-bench-supplier-card-info a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.buy-bench-supplier-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
}
.buy-bench-supplier-card-info small {
  font-size: 11px;
  color: #475569;
}
[data-theme="dark"] .buy-bench-supplier-card-info small {
  color: #94a3b8;
}


