*{box-sizing:border-box}
:root{--bg:#f7f3ea;--panel:#fff;--ink:#24332d;--muted:#6f7b72;--line:#dce5db;--green:#25785b;--green2:#1f634d;--green-soft:#e7f5ed;--amber:#f0a05f;--amber-soft:#fff1e4;--rose:#d56f8b;--rose-soft:#fff0f5;--blue:#427da1;--blue-soft:#edf6fb;--shadow:0 18px 48px rgba(28,45,38,.12)}
body{margin:0;min-height:100vh;overflow-x:hidden;color:var(--ink);background:linear-gradient(180deg,rgba(37,120,91,.07),rgba(240,160,95,.06) 46%,rgba(213,111,139,.04)),var(--bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}button{cursor:pointer}
.app-shell{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}
.sidebar{display:flex;flex-direction:column;gap:18px;padding:20px;color:#fff;background:linear-gradient(180deg,#14231d,#214235 58%,#2b5945)}
.brand-block,.nav-list,.product-list,.tab-content,.table-like,.guided-production,.step-list,.component-shortcuts,.guided-list,.photo-grid,.cost-stack{display:grid;gap:10px}
.brand-logo-card{display:grid;min-height:130px;place-items:center;padding:8px;border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(0,0,0,.16)}
.brand-logo{width:100%;max-height:120px;object-fit:contain}.brand-logo.is-hidden,.nav-item.is-hidden,.tab.is-hidden,.production-product-card.is-hidden,.hidden{display:none!important}
.eyebrow{margin:0 0 4px;color:#7da894;font-size:.72rem;font-weight:900;letter-spacing:0;text-transform:uppercase}.brand-title h1,.topbar h2,.panel-header h3,.detail-title h3{margin:0}
.nav-item{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border:1px solid rgba(255,255,255,.14);border-radius:8px;color:#eef5ef;background:rgba(255,255,255,.07);text-align:left;font-weight:800}.nav-item.active,.nav-item:hover{color:#14231d;background:linear-gradient(135deg,#fff7ed,#e9f7ee)}
.nav-icon{display:inline-grid;width:24px;height:24px;place-items:center;border-radius:999px;color:#fff;background:rgba(255,255,255,.18);font-size:.76rem}
.sync-panel{display:flex;gap:10px;align-items:center;margin-top:auto;padding:12px;border-radius:8px;background:rgba(255,255,255,.09)}.sync-panel span,.sync-panel strong{display:block}.sync-dot{width:10px;height:10px;border-radius:999px;background:#8ce0a6}
.workspace{display:grid;gap:18px;align-content:start;min-width:0;padding:22px}.topbar,.panel-header,.section-toolbar,.modal-header,.modal-actions,.top-actions,.status-row,.action-cluster,.production-search-panel{display:flex;gap:10px;align-items:center}.topbar,.panel-header,.section-toolbar,.modal-header{justify-content:space-between}.top-actions{flex-wrap:wrap}
.role-switch,.search-box,label{display:grid;gap:6px;color:var(--muted);font-size:.78rem;font-weight:900;text-transform:uppercase}.search-box{min-width:260px}
input,select,textarea{width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff}input:focus,select:focus,textarea:focus{outline:2px solid rgba(66,125,161,.22);border-color:var(--blue)}textarea{resize:vertical}
.view{display:none}.view.active{display:block}.product-layout{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(0,1.45fr);gap:16px}
.catalog-panel,.detail-panel,.data-panel,.info-box,.metric,.step-card,.photo-card,.cost-line,.table-row,.guided-section,.guided-hero{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 10px 28px rgba(28,45,38,.06)}
.catalog-panel,.detail-panel,.data-panel{padding:14px}.panel-header{margin-bottom:12px}.count-pill,.code-badge,.status-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;color:var(--green);background:var(--green-soft);font-weight:900}.status-badge{color:#a24a1d;background:var(--amber-soft)}
.filter-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.product-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:12px;width:100%;padding:11px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left}.product-card[draggable=true],.structure-draggable[draggable=true]{cursor:grab}.product-card.active,.product-card:hover,.structure-draggable.drag-over,.product-card.drag-over{border-color:var(--amber);background:linear-gradient(135deg,var(--amber-soft),var(--green-soft))}.product-card.dragging,.structure-draggable.dragging{opacity:.58;transform:scale(.99)}
.product-thumb,.product-photo,.empty-visual,.step-image,.production-product-photo,.guided-photo{overflow:hidden;background:linear-gradient(135deg,rgba(37,120,91,.18),rgba(240,160,95,.17),rgba(213,111,139,.12)),repeating-linear-gradient(90deg,rgba(18,37,30,.08) 0 2px,transparent 2px 9px);background-position:center;background-size:cover}.product-thumb{width:54px;height:54px;border-radius:8px}.product-thumb img{display:block;width:100%;height:100%;object-fit:cover}.product-card strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-card span span{display:block;margin-top:4px;color:var(--muted);font-size:.84rem}
.empty-state{display:grid;min-height:420px;place-items:center;align-content:center;text-align:center}.empty-visual{width:110px;height:110px;border-radius:8px}.detail-hero{display:grid;grid-template-columns:160px minmax(0,1fr) auto;gap:14px;align-items:center;margin-bottom:14px}.product-photo{width:160px;height:130px;border-radius:8px}.detail-title p{margin:6px 0 0;color:var(--muted)}
.tabs{display:flex;flex-wrap:nowrap;gap:8px;width:100%;max-width:100%;min-width:0;margin-bottom:14px;overflow-x:auto;overflow-y:hidden;padding-bottom:4px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.tab,.mini-action,.row-action,.ghost-action,.secondary-action,.primary-action,.icon-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-weight:900}.tab{flex:0 0 auto;white-space:nowrap}.primary-action{border-color:var(--green);color:#fff;background:linear-gradient(135deg,var(--green),var(--green2))}.secondary-action,.mini-action{border-color:#cfe0d6;color:var(--green);background:linear-gradient(135deg,var(--green-soft),#fff)}.ghost-action{border-color:#cfddeb;color:var(--blue);background:var(--blue-soft)}.row-action{border-color:#f0c9b5;color:#9f4d2a;background:#fff3ec}.tab.active{color:#fff;border-color:var(--green);background:linear-gradient(135deg,var(--green),var(--blue))}
.metric-grid,.summary-grid,.photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric,.info-box{padding:12px}.metric span,.info-box span,.cost-line span,.guided-section>span{color:var(--muted);font-size:.78rem;font-weight:900;text-transform:uppercase}.metric strong,.info-box p{margin:5px 0 0}.wide-info,.wide,.structure-choice-grid{grid-column:1/-1}
.table-row{display:grid;grid-template-columns:1.2fr .7fr .8fr .8fr;gap:10px;align-items:center;padding:11px}.table-row.header{color:var(--muted);background:linear-gradient(135deg,#f4f7f2,var(--blue-soft));font-size:.78rem;font-weight:900;text-transform:uppercase}.table-row.structure-row{grid-template-columns:1.45fr .55fr .85fr .85fr auto}.table-row.component-row{grid-template-columns:1.35fr .85fr .9fr .85fr auto}.table-row.material-row{grid-template-columns:1.25fr .8fr .55fr .85fr .65fr auto}.table-row.process-row{grid-template-columns:1fr .8fr .7fr .7fr auto}.table-row.component-material-row{grid-template-columns:1fr .7fr .7fr 1.2fr auto}.table-row.history-row{grid-template-columns:.7fr .55fr .75fr 1.2fr 1.2fr}.table-row.order-row{grid-template-columns:.55fr 1.5fr .85fr}.action-cluster{flex-wrap:wrap;justify-content:flex-end}.vertical-actions{display:grid}
.photo-card{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px;padding:12px}.step-image{min-height:110px;border-radius:8px}.step-video{width:100%;max-height:260px;border-radius:8px;background:#000}.step-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;padding:12px}.step-number{display:grid;width:36px;height:36px;place-items:center;border-radius:999px;color:#fff;background:var(--rose);font-weight:900}.step-card h4{margin:0 0 4px}.step-card p,.muted-note{color:var(--muted)}.step-time{display:inline-flex;align-items:center;justify-content:center;min-width:62px;min-height:32px;padding:6px 10px;border-radius:999px;color:var(--blue);background:var(--blue-soft);font-weight:900}
.cost-line{display:flex;justify-content:space-between;gap:12px;padding:12px}.cost-line.total{border-color:rgba(37,120,91,.35);background:linear-gradient(135deg,var(--green-soft),var(--amber-soft))}
.production-home{display:grid;gap:14px}.production-search-panel{justify-content:space-between;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff}.production-search{flex:1}.production-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.production-product-card{display:grid;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left}.production-product-card:hover{border-color:var(--amber);background:var(--amber-soft)}.production-product-photo{aspect-ratio:1/1;border-radius:8px}.production-product-photo img,.guided-photo img{display:block;width:100%;height:100%;object-fit:cover}.production-product-info{display:grid;gap:2px}.production-product-info small,.production-product-info em{color:var(--muted);font-style:normal}
.guided-hero{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:center;padding:14px;background:linear-gradient(135deg,#fff,var(--green-soft))}.guided-photo{aspect-ratio:1/1;border-radius:8px}.production-form{display:flex;gap:8px;margin-top:10px}.production-form.compact input{max-width:160px}.guided-section{display:grid;gap:12px;padding:14px}.guided-section>span{color:var(--green)}.guided-item{display:grid;grid-template-columns:96px minmax(0,1fr) minmax(150px,.6fr);gap:10px;align-items:center;padding:10px;border-radius:8px;background:#f8faf6}.guided-item strong{color:var(--rose)}.guided-item em{justify-self:end;padding:6px 9px;border-radius:999px;color:var(--green);background:var(--green-soft);font-style:normal;font-weight:900}
.component-shortcut{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px;border:1px solid rgba(37,120,91,.24);border-radius:8px;background:linear-gradient(135deg,#fff,rgba(240,160,95,.12));box-shadow:0 10px 24px rgba(37,120,91,.08);text-align:left}.component-shortcut:hover{border-color:var(--green);box-shadow:0 14px 30px rgba(37,120,91,.14)}.component-shortcut strong{color:var(--green)}.component-shortcut span{color:var(--ink);font-weight:800}.component-shortcut em{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;border-radius:8px;color:#fff;background:var(--green);font-style:normal;font-weight:900;white-space:nowrap}.component-main-media{margin:12px 0}
.checklist-field{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.checklist-field label{display:flex;gap:8px;align-items:center;min-height:38px;padding:8px 10px;border:1px solid #dfe7dd;border-radius:8px;background:#fff}.checklist-field input[type=checkbox]{width:auto;min-width:16px;height:16px;margin:0;accent-color:var(--green)}
.structure-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.choice-card{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:linear-gradient(135deg,#fff,var(--blue-soft));text-align:left}.choice-card:hover{border-color:var(--blue)}
.modal{width:min(760px,calc(100vw - 24px));max-height:88vh;border:0;border-radius:8px;padding:0;color:var(--ink);box-shadow:var(--shadow)}.wide-modal{width:min(1060px,calc(100vw - 24px))}.modal::backdrop{background:rgba(15,26,22,.45)}.modal form,.modal>div:not(.modal-actions){margin:0}.modal-header,.modal-actions{padding:14px;border-bottom:1px solid var(--line)}.modal-actions{justify-content:flex-end;border-top:1px solid var(--line);border-bottom:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:62vh;overflow:auto;padding:14px}.icon-button{width:36px;padding:0}.modal-note{padding:0 14px}.order-print{padding:14px}.order-header,.order-meta,.signature-row{display:flex;justify-content:space-between;gap:12px}.order-header{margin-bottom:12px}.signature-row{margin-top:18px}
@media (max-width:980px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;top:auto;z-index:auto}.nav-list{grid-template-columns:repeat(5,minmax(0,1fr))}.product-layout{grid-template-columns:1fr}.detail-hero{grid-template-columns:130px minmax(0,1fr)}.detail-hero .ghost-action{grid-column:1/-1;justify-self:start}}
@media (max-width:620px){.workspace,.sidebar{padding:14px}.brand-logo-card{width:104px;height:58px;min-height:58px}.brand-block{grid-template-columns:104px minmax(0,1fr);gap:10px}.brand-title h1{font-size:1rem}.nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.nav-icon{display:none}.topbar,.top-actions,.production-form,.production-search-panel,.guided-hero,.modal-actions,.order-header,.order-meta,.signature-row{align-items:stretch;flex-direction:column}.search-box,.production-form.compact input{min-width:0;max-width:none}.filter-row,.metric-grid,.summary-grid,.photo-grid,.form-grid,.structure-choice-grid,.checklist-field{grid-template-columns:1fr}.detail-hero,.guided-hero,.photo-card,.table-row,.table-row.structure-row,.table-row.component-row,.table-row.material-row,.table-row.process-row,.table-row.component-material-row,.table-row.history-row,.table-row.order-row,.step-card,.guided-item,.component-shortcut{grid-template-columns:1fr}.product-photo{width:100%}.guided-item em,.component-shortcut em{justify-self:stretch;text-align:center}.table-row.header{display:none}}
@media print{body *{visibility:hidden}#orderDialog,#orderDialog *{visibility:visible}#orderDialog{position:absolute;inset:0;width:100%;max-height:none;box-shadow:none}#orderDialog .modal-header,#orderDialog .modal-actions{display:none}}

.brand-logo-card{
  position:relative;
  overflow:hidden;
  width:72px;
  height:72px;
  min-height:72px;
  padding:0;
  background:#000;
}
.brand-logo-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:6px;
  color:#fff;
  font-size:.72rem;
  font-weight:900;
  text-align:center;
  line-height:1.05;
}
.brand-logo{
  position:relative;
  z-index:1;
  width:100%;
  max-width:none;
  height:100%;
  max-height:none;
  object-fit:cover;
}
.brand-block{
  grid-template-columns:72px minmax(0,1fr);
  align-items:center;
}
.brand-title h1{
  font-size:1.18rem;
  line-height:1.12;
}
.status-badge.status-active{
  color:#2f6fb8;
  border-color:rgba(47,128,237,.18);
  background:rgba(47,128,237,.12);
}
.status-badge.status-inactive{
  color:#b92f2f;
  border-color:rgba(214,69,69,.18);
  background:rgba(214,69,69,.12);
}
.status-badge.status-development{
  color:#9a6a00;
  border-color:rgba(243,200,71,.22);
  background:rgba(243,200,71,.18);
}
.status-badge.status-review{
  color:#b65d13;
  border-color:rgba(242,140,40,.2);
  background:rgba(242,140,40,.14);
}
.product-card .status-badge{
  min-height:24px;
  padding:3px 8px;
}
/* leitura dos dados: rotulo + valor */
.field-stack{display:grid;gap:4px}
.field-stack.compact{display:flex;flex-wrap:wrap;gap:6px 12px}
.field-line{display:inline-block;color:inherit}
.field-line b{color:var(--green);font-weight:900;text-transform:uppercase}
