/* Theme tokens inherited from the shared foundation. */
/* Operação guiada: first application to Products only. */
#pageProdutos.mg-guided-products {
  --bg-card:var(--mg-surface); --bg-secondary:var(--mg-raised);
  --bg-input:var(--mg-canvas); --border:var(--mg-line); --text:var(--mg-text);
  --text-primary:var(--mg-text); --text-secondary:var(--mg-muted); --text-muted:var(--mg-muted);
  --accent:var(--mg-accent); --m2-pilot-accent:var(--mg-accent);
  background:var(--mg-canvas); color:var(--mg-text); border-radius:16px;
  padding:22px; min-width:0;
}
#pageProdutos.mg-guided-products > .page-header {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:22px; padding:25px !important; margin-bottom:20px;
  background:linear-gradient(115deg,var(--mg-surface),var(--mg-raised)); border:1px solid var(--mg-line); border-radius:14px;
}
#pageProdutos.mg-guided-products > .page-header::before { display:none; }
#pageProdutos.mg-guided-products .mg-heading-copy { min-width:0; }
#pageProdutos.mg-guided-products .mg-eyebrow { font-size:10px; color:var(--mg-accent); letter-spacing:.13em; font-weight:700; margin:0 0 10px; }
#pageProdutos.mg-guided-products .page-header h1 { font-size:30px; letter-spacing:-.7px; color:var(--mg-text); margin:0 0 7px; }
#pageProdutos.mg-guided-products .mg-description { color:var(--mg-muted); font-size:13px; margin:0; line-height:1.6; }
#pageProdutos.mg-guided-products .page-header .actions { display:flex; flex-wrap:wrap; gap:8px; max-width:600px; }
#pageProdutos.mg-guided-products .page-header .actions .btn:not([style*="background"]):not([style*="color"]):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) { background:var(--mg-raised) !important; color:var(--mg-text) !important; border:1px solid var(--mg-line); border-color:var(--mg-line)!important; border-radius:8px; min-height:40px; }
#pageProdutos.mg-guided-products .page-header .actions .btn:not([style*="background"]):not([style*="color"]):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):hover { background:var(--mg-raised) !important; }
#pageProdutos.mg-guided-products .data-card { border:1px solid var(--mg-line); border-radius:12px; background:var(--mg-surface); box-shadow:none !important; overflow:visible; }
#pageProdutos.mg-guided-products .data-card-header { gap:15px; border-color:var(--mg-line); }
#pageProdutos.mg-guided-products .data-card-header h2 { color:var(--mg-text); font-size:17px; letter-spacing:-.25px; }
#pageProdutos.mg-guided-products .data-card:has(#produtosTableWrapper) > .data-card-header { display:flex; flex-direction:column; align-items:stretch; }
#pageProdutos.mg-guided-products .search-bar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; width:100%; }
#pageProdutos.mg-guided-products .search-bar > * { width:100% !important; min-width:0; max-width:100%; }
#pageProdutos.mg-guided-products .search-bar :is(input,select,.btn) { min-height:42px; border-radius:8px; font-size:12px; border:1px solid var(--mg-line); background:var(--mg-canvas); color:var(--mg-text); }
#pageProdutos.mg-guided-products #prodBusca { grid-column:1/-1; grid-row:1; min-height:49px; font-size:15px; padding:12px 15px; border-color:var(--mg-line); background:var(--mg-canvas); }
#pageProdutos.mg-guided-products #prodBusca::placeholder { color:var(--mg-muted); }
#pageProdutos.mg-guided-products .search-bar .btn-primary { background:var(--mg-accent); color:var(--mg-surface); }
#pageProdutos.mg-guided-products .mg-view-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:16px 20px; gap:12px; }
#pageProdutos.mg-guided-products .mg-view-tools p { font-size:12px; color:var(--mg-muted); margin:0; }
#pageProdutos.mg-guided-products .mg-view-switch { display:flex; padding:4px; gap:4px; background:var(--mg-canvas); border:1px solid var(--mg-line); border-radius:9px; }
#pageProdutos.mg-guided-products .mg-view-switch button { cursor:pointer; background:transparent; color:var(--mg-muted); border:0; border-radius:6px; padding:9px 15px; font:inherit; font-size:12px; min-height:36px; }
#pageProdutos.mg-guided-products .mg-view-switch button[aria-pressed=true] { background:var(--mg-accent); color:var(--mg-surface); font-weight:700; }
#pageProdutos.mg-guided-products :is(button,input,select,[tabindex]):focus-visible { outline:3px solid var(--mg-accent); outline-offset:3px; }
#pageProdutos.mg-guided-products #produtosTableWrapper { border-top:1px solid var(--mg-line); }
#pageProdutos.mg-guided-products .mg-product-row { cursor:pointer; }
#pageProdutos.mg-guided-products .data-table :is(th,td) { color:var(--mg-text); border-color:var(--mg-line); }
#pageProdutos.mg-guided-products .data-table th { background:var(--mg-surface); }
#pageProdutos.mg-guided-products .data-table tbody tr:hover { background:var(--mg-raised); }
/* Same cells, checkboxes, inputs and actions in both views. No duplicate data. */
#pageProdutos.mg-guided-products.mg-cards #produtosTableWrapper { overflow-x:visible; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table { display:block; width:100%; min-width:0 !important; border:0; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table thead { display:block; padding:12px 20px 0; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table thead tr { display:flex; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table thead th:not(.mg-select-heading),
#pageProdutos.mg-guided-products.mg-cards .mg-product-table.mg-no-selection thead {
  position:absolute; width:1px !important; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#pageProdutos.mg-guided-products.mg-cards .mg-product-table .mg-select-heading { width:auto !important; display:flex; align-items:center; gap:9px; padding:4px 0; border:0; background:transparent; color:var(--mg-muted); }
#pageProdutos.mg-guided-products.mg-cards .mg-select-heading::after { content:'Selecionar todos desta página'; font-size:11px; font-weight:400; text-transform:none; letter-spacing:0; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table tbody { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:16px; padding:16px 20px 20px; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 15px; align-content:start;
  border:1px solid var(--mg-line); border-radius:12px; padding:18px; position:relative; background:var(--mg-surface);
}
#pageProdutos.mg-guided-products.mg-cards .mg-product-row:hover { border-color:var(--mg-accent); background:var(--mg-raised); box-shadow:0 5px 18px #0002; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row:has(.prodSelChk:checked) { background:var(--mg-raised); border-color:var(--mg-accent); box-shadow:inset 0 3px var(--mg-accent); }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > td { width:auto !important; max-width:100%; min-width:0; display:block; padding:0; margin:0; border:0; white-space:normal !important; text-align:left !important; font-size:13px; overflow-wrap:anywhere; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-value-cell { order:4; font-variant-numeric:tabular-nums; }
#pageProdutos.mg-guided-products.mg-cards .mg-value-cell::before { content:attr(data-guided-label); display:block; color:var(--mg-muted); font-size:10px; font-weight:400; margin-bottom:5px; line-height:1.4; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-title-cell { grid-column:1/-1; order:2; font-size:17px; font-weight:650; line-height:1.5; padding-bottom:12px; border-bottom:1px solid var(--mg-line); }
#pageProdutos.mg-guided-products.mg-cards .mg-title-cell::before { display:none; }
#pageProdutos.mg-guided-products.mg-cards .mg-title-cell > div { max-width:100% !important; white-space:normal !important; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-image-cell { order:0; min-height:46px; }
#pageProdutos.mg-guided-products.mg-cards .mg-image-cell img { width:46px !important; height:46px !important; background:#ecf0f8; padding:3px; border-radius:8px !important; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-code-cell { order:1; padding-right:25px; min-height:42px; color:var(--mg-accent); }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-select-cell { position:absolute; right:15px; top:16px; }
#pageProdutos.mg-guided-products.mg-cards :is(.mg-select-cell,.mg-select-heading) input { width:19px; height:19px; accent-color:var(--mg-accent); cursor:pointer; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row > .mg-actions-cell { grid-column:1/-1; order:10; display:flex; flex-wrap:wrap; gap:7px; border-top:1px solid var(--mg-line); padding-top:12px; }
#pageProdutos.mg-guided-products.mg-cards .mg-actions-cell .btn { min-width:44px; min-height:40px; width:auto !important; height:auto !important; background:var(--mg-canvas); border:1px solid var(--mg-line); border-radius:7px; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-table .marca-separator { grid-column:1/-1; display:block; }
#pageProdutos.mg-guided-products.mg-cards .marca-separator td { display:block; border:0 !important; border-radius:7px; background:var(--mg-raised) !important; }
#pageProdutos.mg-guided-products .product-assistant { background:var(--mg-surface); border-color:var(--mg-line); border-radius:12px; }
#pageProdutos.mg-guided-products .pa-result { border-color:var(--mg-line); background:var(--mg-raised); }
#pageProdutos.mg-guided-products .pa-detail { background:var(--mg-surface); border-color:var(--mg-line); }
@media(max-width:1000px) {
  #pageProdutos.mg-guided-products { padding:16px; }
  #pageProdutos.mg-guided-products > .page-header { padding:20px !important; }
  #pageProdutos.mg-guided-products .page-header .actions { max-width:none; }
  #pageProdutos.mg-guided-products .search-bar { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:600px) {
  #pageProdutos.mg-guided-products { padding:10px; border-radius:10px; }
  #pageProdutos.mg-guided-products > .page-header { padding:17px !important; gap:17px; }
  #pageProdutos.mg-guided-products .page-header h1 { font-size:27px; }
  #pageProdutos.mg-guided-products .page-header .actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  #pageProdutos.mg-guided-products .page-header .actions .btn { font-size:11px; white-space:normal; padding:9px; min-width:0; }
  #pageProdutos.mg-guided-products .search-bar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #pageProdutos.mg-guided-products .mg-view-tools { padding:13px; }
  #pageProdutos.mg-guided-products .mg-view-switch { width:100%; }
  #pageProdutos.mg-guided-products .mg-view-switch button { flex:1; min-height:40px; }
  #pageProdutos.mg-guided-products.mg-cards .mg-product-table tbody { grid-template-columns:1fr; padding:13px; gap:13px; }
  #pageProdutos.mg-guided-products.mg-cards .mg-product-row { padding:15px; }
  #pageProdutos.mg-guided-products.mg-cards .mg-product-table thead { padding-left:13px; }
  #pageProdutos.mg-guided-products.mg-cards .mg-actions-cell .btn { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { #pageProdutos.mg-guided-products * { transition:none !important; } }
/* Retire inherited industrial overrides inside this surface. Other pages keep them. */
#pageProdutos.mg-guided-products > .page-header { flex-direction:row !important; display:flex !important; text-align:left; }
#pageProdutos.mg-guided-products > .page-header::after { display:none !important; }
#pageProdutos.mg-guided-products .page-header h1 { font-size:30px !important; }
#pageProdutos.mg-guided-products .mg-management { position:relative; align-self:center; }
#pageProdutos.mg-guided-products .mg-management > summary { cursor:pointer; padding:12px 16px; border:1px solid var(--mg-line); border-radius:8px; background:var(--mg-raised); color:var(--mg-text); font-size:13px; }
#pageProdutos.mg-guided-products .mg-management > summary:focus-visible { outline:3px solid var(--mg-accent); outline-offset:3px; }
#pageProdutos.mg-guided-products .mg-management[open] > .actions { display:grid !important; position:absolute; right:0; top:52px; z-index:20; width:280px; padding:12px; background:var(--mg-surface); border:1px solid var(--mg-line); border-radius:10px; box-shadow:0 15px 35px #0005; grid-template-columns:1fr !important; }
#pageProdutos.mg-guided-products .mg-management .actions > .btn { grid-column:auto !important; grid-row:auto !important; width:100%; border-color:var(--mg-line) !important; font-size:12px !important; }
#pageProdutos.mg-guided-products .data-card { background:var(--mg-surface) !important; }
#pageProdutos.mg-guided-products .data-card-header { background:var(--mg-surface) !important; }
#pageProdutos.mg-guided-products .data-card-header h2::before { background:var(--mg-accent) !important; }
#pageProdutos.mg-guided-products #prodLeitorToggle { color:var(--mg-accent); }
#pageProdutos.mg-guided-products .data-card-header .search-bar { grid-template-columns:repeat(4,minmax(0,1fr)) !important; background:var(--mg-canvas) !important; border-color:var(--mg-line) !important; padding:12px !important; }
#pageProdutos.mg-guided-products .search-bar > * { grid-column:auto !important; grid-row:auto !important; order:0 !important; }
#pageProdutos.mg-guided-products .search-bar :is(input,select,.btn) { background:var(--mg-surface) !important; color:var(--mg-text) !important; border-color:var(--mg-line) !important; font-size:12px !important; height:auto !important; min-height:42px !important; }
#pageProdutos.mg-guided-products .search-bar #prodBusca { grid-column:1/-1 !important; grid-row:1 !important; background:var(--mg-canvas) !important; font-size:15px !important; min-height:49px !important; }
#pageProdutos.mg-guided-products .search-bar #prodBusca::placeholder { color:var(--mg-muted) !important; }
#pageProdutos.mg-guided-products .search-bar .btn-primary { background:var(--mg-accent) !important; color:var(--mg-surface) !important; }
#pageProdutos.mg-guided-products.mg-cards #produtosTableWrapper { height:auto !important; max-height:none !important; overflow:visible !important; background:var(--mg-surface) !important; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row { background:var(--mg-surface) !important; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row:hover { background:var(--mg-raised) !important; }
#pageProdutos.mg-guided-products.mg-cards .mg-product-row:has(.prodSelChk:checked) { background:var(--mg-raised) !important; }
#pageProdutos.mg-guided-products .mg-product-table .mg-select-heading { background:transparent !important; }
#pageProdutos.mg-guided-products.mg-cards .pagination { position:static !important; background:var(--mg-raised) !important; color:var(--mg-muted); }
#pageProdutos.mg-guided-products .pagination button.active { background:var(--mg-accent) !important; color:var(--mg-surface) !important; border-color:var(--mg-accent) !important; }
@media(max-width:1000px) { #pageProdutos.mg-guided-products .data-card-header .search-bar { grid-template-columns:repeat(3,minmax(0,1fr)) !important; } }
@media(max-width:600px) {
  #pageProdutos.mg-guided-products .data-card-header .search-bar { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #pageProdutos.mg-guided-products .mg-management { width:100%; }
  #pageProdutos.mg-guided-products .mg-management[open] > .actions { position:static; width:100%; margin-top:8px; box-shadow:none; }
  #pageProdutos.mg-guided-products .page-header h1 { font-size:27px !important; }
}
