/* Identidade global. Os estados e as permissões continuam definidos pela aplicação. */
:root {
  --brand: #009b5a; --brand-strong: #008550; --brand-hover: #007d49; --sidebar: #073d30;
  --positive: #087c48; --positive-bg: #e9f7ef; --eurocer: #2458b8; --ltm: var(--brand);
  --negative: #cf304a; --negative-bg: #fff0f3; --warning: #93600a; --warning-bg: #fff8e5;
  --ink: #17212f; --muted: #627289; --border: #e2e8f0;
  --surface: #fff; --canvas: #f5f7f8; --radius: 10px;
  --shadow: 0 2px 8px #17212f05; --sidebar-width: 184px; --blue: var(--brand-strong);
  font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; color: var(--ink); background: var(--canvas);
}
body { background: var(--canvas); color: var(--ink); line-height: 1.4; }
button, input, select, textarea { font-family: inherit; font-size: 13px; color: var(--ink); }
button { border: 1px solid #d5dfe8; border-radius: 8px; padding: 8px 12px; background: var(--surface); line-height: 1.3; min-height: 32px; transition: background .12s, border-color .12s; }
button:hover { background: #f2f7f5; border-color: #abcbbb; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.primary { background: var(--brand-strong); border-color: var(--brand-strong); color: white; font-weight: 600; box-shadow: 0 2px 4px #009b5a13; }
button.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.danger { color: var(--negative); border-color: #efbcc6; background: white; }
button.danger:hover { background: var(--negative-bg); }
button.selected, .viewcontrols .selected, #generalView.selected { background: var(--positive-bg); color: var(--positive); border-color: #b8dfc9; }
input, select, textarea { background: white; border: 1px solid #d6e0e8; padding: 8px 12px; border-radius: 7px; margin-top: 4px; line-height: 1.35; }
input:focus, select:focus, textarea:focus { outline: 2px solid #009b5a35; outline-offset: 1px; border-color: var(--brand); }
input:read-only { background: #f6f8fa; color: var(--muted); }
textarea { resize: vertical; min-height: 68px; }
input[type=checkbox] { accent-color: var(--brand); }
h1, h2, h3, strong { color: inherit; }
p, td small, .toolbar label, #count { color: var(--muted); }
a { color: var(--eurocer); }
[hidden] { display: none !important; }
#appHeader, body[data-view=today] #appHeader { background: white; border-top: 0; border-bottom: 1px solid var(--border); min-height: 64px; padding: 8px 16px; gap: 8px; box-shadow: var(--shadow); }
#appHeader > button { min-height: 40px; }
#lastSync { color: var(--muted); font-size: 11px; }
#refreshButton { font-size: 13px; margin-left: 0; padding: 8px 12px; }
#refreshButton:before { font-size: 17px; }
#notificationsButton b, #requestsButton b { border-radius: 20px; padding: 2px 8px; margin-left: 4px; background: var(--positive-bg); color: var(--positive); }
#appMain, body[data-view=today] #appMain { max-width: none; padding: 16px; }
.title { margin-bottom: 16px; }
.title h1 { font-size: 26px; letter-spacing: -.6px; color: #142231; font-weight: 700; }
.title p { margin: 4px 0 0; font-size: 13px; }
.workspace { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); background: white; }
.toolbar, body[data-view=today] .toolbar { padding: 12px 16px; gap: 12px; background: white; border-bottom: 1px solid var(--border); }
.toolbar label { font-size: 12px; font-weight: 500; }
.toolbar input, .toolbar select { padding: 8px 12px; font-size: 13px; margin-top: 4px; min-height: 36px; }
.toolbar .search { max-width: 420px; min-width: 220px; }
.toolbar #count { font-size: 12px; padding-bottom: 8px; }
.viewcontrols { gap: 4px; }
.viewcontrols button { padding: 8px; font-size: 12px; }
.badge, .health, .projectState, .companychip { border-radius: 6px; font-size: 12px; line-height: 1.35; }
.health { padding: 8px; font-weight: 500; }
.health.green, .projectState.ok { background: var(--positive-bg); color: var(--positive); }
.health.yellow { background: #fff4d6; color: var(--warning); }
.health.red, .blocked, .projectState.problem { background: #ffe7ed; color: #bf2140; }
.health.gray, .badge { background: #eef2f6; color: #5f7083; }
.companychip { background: #eaf6ef; color: #087649; margin-bottom: 0; font-weight: 600; padding: 4px 8px; }
.companychip.eurocer, .branchEuro .companychip { color: var(--eurocer); background: #eaf0fd; }
.purchase, .ordersTable .purchase { font-size: 12px; font-weight: 500; }
.purchase.ok { color: var(--positive); }
.purchase.problem, .late { color: var(--negative); }
.statusHint { line-height: 1.4; }
.noteDot { background: #2774dd; }
.obsbutton { color: #2464c5; border-color: #bfd1ee; background: #f9fbff; font-size: 12px; padding: 8px; }
.compact { padding: 8px; font-size: 12px; }
/* Navegação: mesma estrutura e mesmos controles, com dimensões compartilhadas. */
@media(min-width:1100px) {
  #appHeader { margin-left: var(--sidebar-width); justify-content: flex-end; position: sticky; top: 0; z-index: 19; }
  #appMain { margin-left: var(--sidebar-width); }
  #appHeader .brand { position: fixed; inset: 0 auto auto 0; width: var(--sidebar-width); height: 82px; background: var(--sidebar); padding: 16px 20px; z-index: 22; border: 0; }
  #appHeader .brand img { width: 139px; max-width: 100%; background: white; border-radius: 5px; padding: 4px; }
  #appHeader .brand span { display: none; }
  #appHeader nav { position: fixed; left: 0; top: 82px; bottom: 0; width: var(--sidebar-width); padding: 12px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; background: var(--sidebar); z-index: 20; overflow-y: auto; padding-bottom: 244px; }
  #appHeader nav button { border: 0; border-left: 3px solid transparent; border-radius: 8px; background: transparent; color: #d4e5df; padding: 12px 8px; min-height: 40px; font-size: 13px; text-align: left; flex: 0 0 auto; transition: none; }
  #appHeader nav button:hover { background: #ffffff0d; color: white; }
  #appHeader nav button.selected { background: #116347; border-left-color: #21d67b; color: white; }
  #appHeader nav .navIcon { width: 19px; height: 19px; flex: 0 0 19px; opacity: .95; }
  #appHeader .account { position: fixed; left: 0; bottom: 0; width: var(--sidebar-width); padding: 16px 12px; background: var(--sidebar); border-top: 1px solid #ffffff20; color: #d4e5df; z-index: 23; gap: 4px; }
  #appHeader .account #accountName { color: #edf8f3; max-width: none; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
  #appHeader .account button { border-color: #ffffff25; background: #ffffff09; color: #e0eee8; border-radius: 6px; font-size: 11px; min-height: 28px; padding: 4px 8px; }
  #appHeader .account button:hover { background: #ffffff18; }
  #appHeader .accountData { border-color: #ffffff20; background: var(--sidebar); color: #c7ddd3; padding-top: 8px; margin-top: 8px; }
  #appHeader .accountData a { color: #c7ddd3; }
  #menuToggle { left: calc(var(--sidebar-width) - 15px); top: 19px; border: 1px solid var(--border); background: white; width: 30px; height: 30px; padding: 4px; min-height: 32px; box-shadow: 0 2px 6px #17212f12; z-index: 25; }
  body.menuCollapsed { --sidebar-width: 64px; }
  body.menuCollapsed #appHeader, body.menuCollapsed #appMain { margin-left: var(--sidebar-width); }
  body.menuCollapsed #appHeader .brand, body.menuCollapsed #appHeader nav, body.menuCollapsed #appHeader .account { width: var(--sidebar-width); }
  body.menuCollapsed #appHeader .brand { padding: 16px 8px; }
  body.menuCollapsed #appHeader .brand img { width: 48px; object-fit: contain; }
  body.menuCollapsed #appHeader nav { padding: 8px 8px 160px; }
  body.menuCollapsed #appHeader nav button { padding: 12px 8px; }
  body.menuCollapsed #appHeader .account { padding: 8px 4px; }
  body.menuCollapsed #menuToggle { left: 49px; }
}
/* Pedidos: linhas com a leitura e os estados da tabela original. */
table { font-size: 13px; }
th { background: #f1f5f8; color: #33465c; font-size: 12px; font-weight: 600; padding: 12px; }
td { border-color: var(--border); padding: 12px; }
td strong { font-size: 14px; }
td small { font-size: 12px; }
.ordersTable table { min-width: 1050px; }
.ordersTable th { padding: 12px 8px; font-size: 12px; }
.ordersTable td { padding: 12px 8px; font-size: 13px; vertical-align: middle; }
.ordersTable td:nth-child(4) { min-width: 105px; }
.ordersTable td:nth-child(3) { min-width: 133px; }
.ordersTable td small { font-size: 11px; margin-top: 4px; }
.ordersTable .datecell > strong { font-size: 15px; }
.quickDateButton { font-size: 11px; padding: 4px 8px; min-height: 24px; border-radius: 5px; }
body[data-view=orders] .ordersTable { padding: 0 8px 8px; background: #f8fafb; }
body[data-view=orders] .ordersTable table { border-collapse: separate; border-spacing: 0 8px; }
body[data-view=orders] .ordersTable th { padding-top: 8px; padding-bottom: 8px; }
body[data-view=orders] .ordersTable td { background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
body[data-view=orders] .ordersTable td:first-child { border-left: 4px solid #a7b4c1; border-radius: 9px 0 0 9px; min-width: 175px; }
body[data-view=orders] .ordersTable .green td:first-child { border-left-color: #0aae65; }
body[data-view=orders] .ordersTable .yellow td:first-child { border-left-color: #f0b629; }
body[data-view=orders] .ordersTable .red td:first-child { border-left-color: #e93b59; }
body[data-view=orders] .ordersTable td:last-child { border-right: 1px solid var(--border); border-radius: 0 9px 9px 0; min-width: 145px; }
body[data-view=orders] .orderrow:hover td { background: #f8fcfa; }
body[data-view=orders] .ordersTable td:last-child button { margin: 2px; }
body[data-view=orders] .ordersTable .compact { min-height: 32px; }
@media(min-width:601px) {
  body[data-view=orders] .ordersTable table { table-layout: fixed; }
  body[data-view=orders] .ordersTable td { min-width: 0; max-width: none; }
  body[data-view=orders] .ordersTable th:nth-child(1) { width: 16%; }
  body[data-view=orders] .ordersTable th:nth-child(2) { width: 17%; }
  body[data-view=orders] .ordersTable th:nth-child(3) { width: 12%; }
  body[data-view=orders] .ordersTable th:nth-child(4) { width: 10%; }
  body[data-view=orders] .ordersTable th:nth-child(5) { width: 8%; }
  body[data-view=orders] .ordersTable th:nth-child(6) { width: 10%; }
  body[data-view=orders] .ordersTable th:nth-child(7) { width: 8%; }
  body[data-view=orders] .ordersTable th:nth-child(8) { width: 9%; }
  body[data-view=orders] .ordersTable th:last-child { width: 10%; }
  body[data-view=orders] .ordersTable .compact { white-space: normal; padding: 8px; }
  body[data-view=orders] .ordersTable td:first-child, body[data-view=orders] .ordersTable td:last-child { min-width: 0; }
}
.financeCell strong { color: #09613d; font-size: 13px; }
/* Painel: duas filiais, mesma hierarquia, cores de situação preservadas. */
body[data-view=today] .productionPanel { padding: 12px; gap: 16px; background: #f7f9fb; }
.productionlane { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.productionlane.branchLtm, .productionlane.branchEuro { border-top: 0; }
.productionlane .branchHeading, body[data-view=today] .productionlane .branchHeading { position: static; padding: 12px 16px; border-radius: 12px 12px 0 0; border-bottom: 0; }
.branchLtm .branchHeading { background: #e5f5ec; color: #086540; }
.branchEuro .branchHeading { background: #e8f0ff; color: var(--eurocer); }
.branchHeading h2 { background: transparent; font-size: 25px; letter-spacing: -.6px; padding: 0; }
.branchTotal { font-size: 29px; padding-left: 16px; border-left: 1px solid #17212f12; line-height: 1; }
.branchTotal small { color: var(--muted); font-size: 11px; margin-top: 4px; font-weight: 400; }
.branchStats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 8px 12px; border-bottom: 0; background: white; }
.branchStats > button, .branchStats > span { display: flex; align-items: center; gap: 8px; background: #eff8f3; border: 0; padding: 8px; border-radius: 8px; font-size: 11px; color: #486455; min-width: 0; }
.branchStats > :nth-child(2) { background: #eef4ff; color: #4c668a; }
.branchStats > :nth-child(3) { background: #fff9e9; color: #857042; }
.branchStats b, .branchStats button b { display: block; font-size: 22px; line-height: 1.15; margin: 0; color: var(--ink); }
.branchStats button:hover { box-shadow: inset 0 0 0 1px #abd9c1; }
.branchListCaption { padding: 1px 12px 8px; font-size: 10px; color: var(--muted); }
.trackingOrders { padding: 0 12px 12px; min-height: 0; }
.productionStage { margin-bottom: 16px; }
.productionStageHeading { padding: 8px 0; border-top: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.productionStageHeading h3 { font-size: 15px; color: var(--ink); margin: 0; }
.productionStageHeading h3 b { background: #e1f4e8; color: #087a46; font-size: 12px; }
.branchEuro .productionStageHeading h3 b { background: #e4edff; color: var(--eurocer); }
.productionStageHeading small { font-size: 10px; margin: 0; display: block; text-align: right; max-width: 56%; }
.organizedCard.compactTracking { grid-template-columns: minmax(0,1fr) 190px; gap: 8px 12px; border-radius: 9px; padding: 8px 12px; margin-bottom: 8px; box-shadow: none; border: 1px solid #dbe6df; border-left: 4px solid #18a264; }
.trackingOrder.delivery-green { background: #effaf4; border-color: #c0e7d1; border-left-color: #0bad61; }
.trackingOrder.delivery-yellow { background: #fff9e8; border-color: #f0df9e; border-left-color: #f2b924; }
.trackingOrder.delivery-red { background: #fff0f3; border-color: #f3c3ce; border-left-color: #e53559; }
.trackingOrder.delivery-orange { background: #fff4e9; border-color: #f4d0a7; border-left-color: #eb9342; }
.trackingOrder.delivery-unknown { background: #f7f9fb; border-color: #dfe5eb; border-left-color: #9eafbf; }
.orderNumber { font-size: 10px; color: #637383; }
.cardIdentity h3 { font-size: 15px; line-height: 1.3; letter-spacing: -.25px; margin: 4px 0; }
.cardIdentity p { font-size: 12px; color: #52667a; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.cardDelivery { border-left: 1px solid #17212f12; padding: 0 24px 0 12px; }
.cardDelivery > span { font-size: 10px; color: #586b80; line-height: 1.2; }
.cardDelivery > strong { font-size: 21px; letter-spacing: -.5px; margin-top: 2px; white-space: nowrap; color: #172b3a; line-height: 1.1; }
.cardDelivery > small, .cardSalesDeadline { font-size: 10px; color: #637385; line-height: 1.25; margin-top: 2px; }
.organizedCard .openTracking { top: 10px; right: 8px; min-height: 28px; padding: 4px 8px; background: #ffffffb3; }
.cardProgress { gap: 8px; padding-top: 8px; border-color: #17212f10; grid-template-columns: repeat(3,minmax(0,1fr)); }
.cardProgress > div { gap: 2px; line-height: 1.25; }
.cardProgress > div + div { border-left: 1px solid #17212f0c; padding-left: 8px; }
.cardFieldLabel { font-size: 10px; color: #637388; }
.cardProgress strong, .cardProgress .statusHint { font-size: 12px; line-height: 1.25; }
.cardProgress small { font-size: 10px; color: #637388; }
.cardFootnote { padding-top: 4px; padding-right: 72px; min-height: 24px; font-size: 10px; border-color: #17212f0c; }
.cardFootnote .obsbutton { position: absolute; bottom: 9px; right: 12px; font-size: 11px; padding: 4px 8px; min-height: 24px; border: 1px solid #ccd9eb; background: #ffffffa3; }
.productionUnconfirmed { border-top-color: var(--border); color: var(--muted); padding-top: 8px; }
.plannedEntry { font-size: 11px; color: #54718c; }
/* Componentes dos módulos e diálogos. */
#metrics { gap: 8px; margin-bottom: 12px; }
#metrics .metric { padding: 8px 12px; border-color: var(--border); border-radius: 9px; background: white; box-shadow: var(--shadow); }
#metrics .metric strong { font-size: 23px; margin-bottom: 4px; }
#metrics .metric span { font-size: 11px; color: var(--muted); }
.board { background: #f7f9fb; padding: 16px; gap: 12px; }
.lane { border-color: var(--border); background: #f1f5f7; border-radius: 10px; }
.lane h2 { padding: 12px; font-size: 14px; border-top-width: 3px; color: #274b3a; }
.ordercard, .requestCard, .tripCard, .notice, .teamUser, .personalCard { border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); background: white; }
.ordercard { padding: 12px; margin-bottom: 8px; }
.ordercard h3 { font-size: 14px; margin: 8px 0; }
.ordercard .equipment { font-size: 12px; margin-bottom: 8px; }
.cardmeta { font-size: 11px; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px; }
.cardmeta .statusHint { white-space: normal; overflow-wrap: anywhere; }
.projectQueueHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-top: 3px solid var(--brand); }
.projectQueueHead h2 { border: 0; padding: 0; font-size: 14px; gap: 8px; }
.projectQueueHead .queuePause { margin: 0; font-size: 11px; min-height: 28px; padding: 4px 8px; }
.projectQueueHead .queueWarning { width: 100%; margin: 0; }
.person { background: #f0f7f3; border-color: #60b98d; border-radius: 6px; padding: 8px; }
.personlabel { font-size: 10px; letter-spacing: .2px; }
.person strong { font-size: 14px; }
.projectDue strong { font-size: 16px; }
.queueActions button, .projectDecisions button { border-radius: 6px; }
.purchaseQueueHead { padding: 12px 16px; background: #fbfcfd; border-bottom: 1px solid var(--border); }
.purchaseTable td { padding: 12px; font-size: 13px; }
.purchaseTable td:nth-child(4) { min-width: 110px; }
.purchaseIncoming { border-radius: 10px; box-shadow: var(--shadow); }
.financeStandalone, .financeOverview { border-color: var(--border); border-radius: 11px; box-shadow: var(--shadow); }
.financeStandalone .financeMetrics span { background: #eff8f3; border: 1px solid #e1eee6; border-radius: 8px; }
.financeStandalone .financeMetrics .financeLate { background: #fff3ed; border-color: #f5ded0; }
.financeMonthStrip button { border-color: var(--border); border-radius: 8px; }
.financeMonthStrip button.selected { background: #e9f7ef; border-color: #9ed9b9; }
.requestCard, .tripCard { padding: 12px 16px; }
.requestCard { border-left: 4px solid var(--brand); }
.personalRequests { padding: 4px 16px; }
.personalRequests > details { margin: 4px 0; padding-top: 8px; }
.personalRequests > details > summary { font-size: 12px; }
.personalRequests .requestCard { padding: 8px 12px; margin: 8px 0; gap: 8px; }
.personalRequests .requestCard p { margin: 4px 0 0; font-size: 12px; }
.personalRequests .requestCard small { font-size: 11px; }
.financialSummary, .dateSummary span { background: #f3f7f9; border-radius: 8px; }
.knowledgePanel { border-color: var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.knowledgeResult h3 { color: #125e40; }
dialog { border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: 0 20px 70px #122b3b35; color: var(--ink); background: white; max-height: 91dvh; }
dialog::backdrop { background: #122b3b66; backdrop-filter: blur(2px); }
.dialogtitle { padding-bottom: 12px; border-bottom: 1px solid var(--border); gap: 12px; }
.dialogtitle h2 { font-size: 20px; letter-spacing: -.4px; }
dialog footer { position: sticky; bottom: -22px; background: #fffffff5; border-top: 1px solid var(--border); padding: 12px 0 4px; margin-top: 12px; flex-wrap: wrap; z-index: 2; }
.fields { gap: 16px; margin: 16px 0; }
.fields label { font-size: 12px; font-weight: 500; }
.fields small { font-size: 11px; color: var(--muted); }
.formSection, .compactSection { border-color: var(--border); border-radius: 8px; background: #fbfcfd; padding: 12px; }
.formSection summary, .compactSection summary { font-size: 13px; color: #315745; }
.deliveryBox { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.deliveryBox span { font-size: 12px; color: var(--muted); }
.deliveryBox strong { font-size: 15px; }
.deliveryBox small { font-size: 11px; color: var(--muted); }
.deliveryBox button { margin-left: auto; }
.orderTypeChoice { display: flex; flex-wrap: wrap; gap: 8px 16px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0; }
.orderTypeChoice legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.orderTypeChoice label, #quickProjectForm .orderTypeChoice label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 2px 0; }
#quickProjectForm .orderTypeChoice input { display: inline-block; width: auto; margin: 0; }
.orderTypeText { font-size: 13px; color: #315745; margin: 0; }
.partsBox h3 { font-size: 14px; margin: 4px 0; }
.partsHint, .partsPhotoHint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.partsPhotoHint { color: #315745; font-weight: 600; }
.partsRow { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto; gap: 8px; margin-bottom: 8px; }
.partsList { margin: 4px 0 8px; padding-left: 16px; }
.partsAdd { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; margin: 8px 0 12px; }
.partsAdd button { grid-column: span 2; }
.partsAdd p { grid-column: span 2; margin: 0; }
.improvementsPanel { display: grid; gap: 8px; }
.improvementsBar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.improvementsBar button { margin-left: auto; }
.improvementsSummary { font-size: 12px; color: var(--muted); margin: 0; }
.improvementsList { display: grid; gap: 8px; }
.improvementCard { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.improvementCard:hover, .improvementCard:focus { border-color: #9cc5b0; outline: none; }
.improvementCard.done { opacity: .75; }
.improvementCard > div:first-child { min-width: 0; }
.improvementCard strong { overflow-wrap: anywhere; }
.improvementCard small { display: block; font-size: 11px; color: var(--muted); }
.improvementMeta { display: grid; justify-items: end; align-content: start; gap: 2px; white-space: nowrap; }
.personalQueueGrid.withFree { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.personalMine { min-width: 0; }
.personalQueueGrid.withFree .personalCard { flex-basis: calc((100% - 12px) / 2); }
.personalFree { padding: 12px; border: 1px solid #ecd98c; border-radius: 10px; background: #fffbea; }
.personalFree h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; }
.personalFree h3 span { padding: 0 8px; border-radius: 999px; background: #f3e3a3; color: #6b5300; font-size: 12px; }
.personalFree > small { display: block; color: #6b5f2e; font-size: 12px; margin-bottom: 8px; }
.personalFreeTabs { display: flex; gap: 4px; margin: 4px 0 8px; }
.personalFreeTabs button { font-size: 12px; padding: 4px 12px; min-height: 32px; }
.personalFreeTabs button.selected { background: #fff; border-color: #c9a227; color: #6b5300; font-weight: 600; }
.personalFreeList { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.personalFreeCard { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid #ece2b8; border-radius: 8px; background: #fff; }
.personalFreeCard strong { font-size: 13px; overflow-wrap: anywhere; }
.personalFreeCard small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.personalFreeCard button { justify-self: start; margin-top: 4px; font-size: 12px; padding: 4px 12px; }
@media (max-width: 900px) { .personalQueueGrid.withFree { grid-template-columns: minmax(0, 1fr); } .personalQueueGrid.withFree .personalCard { flex-basis: 100%; } }
.improvementDone { margin-top: 4px; color: var(--brand-strong); border-color: #9cc5b0; font-weight: 600; }
.improvementHint { font-size: 12px; color: var(--muted); }
.improvementCommentAdd { display: grid; gap: 8px; margin-top: 8px; }
#improvementDialog form > label, #improvementDialog details > label { display: block; margin: 8px 0; }
.tripSix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.tripSix span { min-width: 0; }
.tripSix strong { display: block; overflow-wrap: anywhere; }
.tripSix small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.tripSix .compact { font-size: 11px; padding: 2px 8px; margin-left: 4px; }
.tripFilters { display: flex; gap: 4px; flex-wrap: wrap; }
.tripFilters button.selected { background: #e6f3ec; border-color: #9cc5b0; font-weight: 600; }
.tripMembers { display: grid; gap: 8px; margin-bottom: 8px; }
.tripMembers article { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.tripMembers small, .tripList small { color: var(--muted); }
.tripMembers small { display: block; font-size: 11px; }
.tripList { margin: 4px 0 8px; padding-left: 16px; }
.coverageTable { width: 100%; font-size: 12px; }
.coverageTable small { display: block; }
.advanceBeneficiaries { border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.advanceBeneficiaries label { display: flex; align-items: center; gap: 8px; }
.advanceBeneficiaries input { width: auto; }
.badge.ok { background: #e6f3ec; color: #1f6b45; }
.badge.warn { background: #fff4d6; color: #7a5a00; }
@media (max-width: 600px) { .tripSix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .improvementCard { flex-direction: column; } .improvementMeta { justify-items: start; } .improvementsBar button { margin-left: 0; width: 100%; } }
.projectfields { border-color: #d2e7db; border-radius: 8px; background: #f8fcfa; padding: 16px; }
.projectfields legend { color: #147045; font-size: 13px; }
.salesBrief { border-color: var(--border); background: #f7fafb; border-radius: 9px; }
.salesCard { background: white; border-color: var(--border); }
.salesBrief h3 { font-size: 13px; }
.userRow { border-color: var(--border); padding: 12px 0; gap: 8px; }
.userRow small { font-size: 12px; color: var(--muted); }
@media(min-width:701px) {
  .userRow { display: grid; grid-template-columns: minmax(140px,1fr) auto auto 130px auto; align-items: center; }
  .userRow > div { min-width: 0; }
  .userRow select { margin: 0; width: 130px; }
  .userRow button { font-size: 11px; padding: 8px; white-space: nowrap; }
}
.notice.unread { background: #f0faf4; border-left-color: var(--brand); }
.notice strong { font-size: 14px; }
.notice p { font-size: 13px; }
#hoverTip { background: #1b3443; border-radius: 9px; font-size: 12px; line-height: 1.5; box-shadow: 0 8px 25px #17212f25; }
#toast { background: var(--sidebar); border-radius: 9px; font-size: 13px; box-shadow: 0 4px 18px #17212f25; z-index: 1100; }
.stageEmpty, .laneempty, #empty { color: var(--muted); font-size: 13px; }
.loginScreen { background: #f1f6f4; border-color: var(--brand); }
.loginCard { border-color: var(--border); border-radius: 14px; box-shadow: 0 12px 44px #073d3010; }
.loginCard h1 { color: #14382a; }
@media(min-width:1600px) {
  .organizedCard.compactTracking { grid-template-columns: minmax(0,1fr) 200px; padding: 12px 16px; }
  .cardIdentity h3 { font-size: 17px; }
  .cardDelivery > strong { font-size: 23px; }
  .cardProgress .statusHint, .cardProgress strong { font-size: 13px; }
}
@media(max-width:1099px) {
  #appHeader { position: sticky; top: 0; z-index: 19; flex-wrap: wrap; padding: 8px 12px; }
  #appHeader .brand img { width: 110px; }
  #appHeader .brand span { display: none; }
  #appHeader nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding: 4px 0; gap: 4px; }
  #appHeader nav button { white-space: nowrap; min-height: 36px; border-radius: 7px; font-size: 12px; padding: 8px; }
  #appHeader nav button.selected { background: var(--positive-bg); color: var(--positive); }
  #appHeader .account { margin-left: auto; }
  #appHeader .accountData { width: auto; }
  .toolbar .search { max-width: none; }
  .organizedCard.compactTracking { grid-template-columns: minmax(0,1fr) 153px; }
}
@media(max-width:800px) {
  .productionPanel, body[data-view=today] .productionPanel { grid-template-columns: 1fr; }
  .productionlane .branchHeading { position: static; }
  .toolbar { flex-wrap: wrap; }
  .toolbar label { flex: 1 1 140px; }
  .toolbar .search { flex-basis: 100%; }
  dialog { padding: 16px; }
  dialog footer { bottom: -17px; }
}
@media(max-width:600px) {
  #appHeader, body[data-view=today] #appHeader { position: relative; }
  #appMain, body[data-view=today] #appMain { padding: 8px; }
  #appHeader > button { min-height: 32px; padding: 8px; font-size: 12px; }
  #appHeader .account { flex-basis: 100%; justify-content: flex-end; }
  .title h1 { font-size: 23px; }
  .toolbar, body[data-view=today] .toolbar { padding: 8px; gap: 8px; }
  .toolbar label { min-width: 0; }
  .toolbar #count { padding-bottom: 0; }
  body[data-view=orders] .ordersTable { padding: 0; }
  body[data-view=orders] .ordersTable table { min-width: 0; border-spacing: 0; }
  body[data-view=orders] .ordersTable td { border: 0; background: transparent; padding: 8px; }
  body[data-view=orders] .ordersTable td:first-child, body[data-view=orders] .ordersTable td:last-child { border: 0; border-radius: 0; min-width: 0; }
  body[data-view=orders] .ordersTable tr { border-left: 4px solid #a7b4c1; }
  body[data-view=orders] .ordersTable tr.green { border-left-color: #0aae65; }
  body[data-view=orders] .ordersTable tr.yellow { border-left-color: #f0b629; }
  body[data-view=orders] .ordersTable tr.red { border-left-color: #e93b59; }
  .organizedCard.compactTracking { grid-template-columns: minmax(0,1fr) 146px; gap: 8px; padding: 8px; }
  .cardDelivery { padding-left: 8px; padding-right: 20px; }
  .cardDelivery > strong { font-size: 19px; }
  .cardIdentity h3 { font-size: 14px; }
  .cardIdentity p { font-size: 11px; }
  .cardProgress { gap: 8px; }
  .cardProgress > div + div { padding-left: 8px; }
  .cardProgress .statusHint, .cardProgress strong { font-size: 11px; }
  .productionlane .branchHeading { padding: 12px; }
  .branchHeading h2 { font-size: 23px; }
  .branchTotal { font-size: 25px; }
  .purchaseTable { min-width: 800px; }
  .fields { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .userRow { flex-wrap: wrap; }
  .userRow > div { flex-basis: 100%; }
  .loginCard { padding: 24px; }
}

/* Painel operacional: produção atual e próxima entrada sempre no mesmo quadro. */
body[data-view=today] #metrics .metric { display:flex;align-items:center;gap:8px;padding:8px 12px; }
body[data-view=today] #metrics .metric strong { margin:0;font-size:21px; }
body[data-view=today] #metrics .metric span { font-size:12px; }
body[data-view=today] .personalRequests { padding:2px 16px; }
body[data-view=today] .personalRequests>details { padding-top:4px;margin:4px 0; }
body[data-view=today] .productionPanel { padding:8px;gap:12px; }
body[data-view=today] .productionlane .branchHeading { padding:8px 12px; }
body[data-view=today] .branchStats { padding:8px;gap:8px; }
body[data-view=today] .branchStats>button,body[data-view=today] .branchStats>span { padding:8px; }
body[data-view=today] .branchListCaption { padding:0 12px 4px; }
.operationList { display:grid;gap:4px;align-content:start; }
.productionStage.running>.operationList { max-height:clamp(120px,calc(100dvh - 600px),250px);overflow-y:auto;scrollbar-width:thin;padding-right:4px; }
.trackingOrders>.productionStage { margin-bottom:8px; }
.productionStage.next>.operationList { max-height:clamp(130px,23vh,250px);overflow-y:auto;scrollbar-width:thin;padding-right:4px; }
.productionStage.next { margin-bottom:8px;padding-top:4px; }
.productionStage.next .productionStageHeading h3 { color:#245a88; }
.productionStage.next .productionStageHeading h3 b { background:#eaf1ff;color:#2458b8; }
.productionStageHeading small { font-size:10px; }
.operationOrder { position:relative;min-width:0;margin:0!important;padding:0!important;border:1px solid var(--border);border-left:3px solid #a3b5c3;border-radius:8px;overflow:visible; }
.operationOrder>summary { display:grid;grid-template-columns:minmax(0,1fr) 140px 15px;gap:4px 8px;align-items:center;list-style:none;padding:8px;font-weight:400; }
.operationOrder>summary::-webkit-details-marker { display:none; }
.operationOrder>summary:hover { background:#ffffff40; }
.opIdentity { min-width:0; }
.opIdentity .orderNumber { font-size:9px;float:left;margin-right:8px;line-height:19px; }
.opIdentity h3 { font-size:13px;line-height:19px;margin:0;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.opIdentity p { margin:2px 0 0;font-size:11px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#5e7082; }
.opDeadline { border-left:1px solid #17212f10;padding-left:8px;min-width:0; }
.opDeadline>span { font-size:9px;color:#607285;display:block;line-height:11px; }
.opDeadline>strong { font-size:16px;line-height:20px;letter-spacing:-.2px;display:flex;gap:4px;align-items:baseline;white-space:nowrap; }
.opChange { font-size:9px;font-weight:500;color:#627386;letter-spacing:0; }
.opDeadline .deadlineHint { color:inherit;padding:0;font-size:inherit; }
.opDeadline .countdown { display:block;font-size:9px;line-height:12px;color:#627482; }
.delivery-red .opDeadline>strong { color:var(--negative); }
.opSectors { grid-column:1/-2;display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;font-size:10px;color:#617385;line-height:16px; }
.opSectors>span { display:inline-flex;gap:4px;align-items:center;min-width:0; }
.opSectors .projectState,.opSectors .purchase { font-size:10px;padding:0;background:transparent; }
.opSectors .opEntry { color:#245a88; }
.opExpand { grid-column:3;grid-row:1/3;color:#627386;font-size:16px;align-self:center; }
.operationOrder[open] .opExpand { transform:rotate(180deg); }
.opDetails { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px;border-top:1px solid #17212f12;background:#ffffffaa;border-radius:0 0 7px 7px; }
.opDetails>div>span { display:block;font-size:10px;color:#627289; }
.opDetails strong { font-size:12px;font-weight:500;display:block; }
.opReason { grid-column:1/-1;font-size:12px;color:#526879;margin:0;white-space:pre-wrap;overflow-wrap:anywhere; }
.opActions { grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end; }
.opActions button { font-size:11px;min-height:28px;padding:4px 8px; }
.productionUnconfirmed .operationOrder { margin-bottom:4px!important; }
@media(max-width:600px) {
  body[data-view=today] #metrics .metric { gap:8px;padding:8px; }
  body[data-view=today] #metrics .metric span { font-size:10px; }
  .operationOrder>summary { grid-template-columns:minmax(0,1fr) 110px 12px;gap:4px 8px;padding:8px; }
  .opIdentity .orderNumber { float:none;display:block;line-height:12px; }
  .opIdentity h3 { font-size:12px; }
  .opDeadline>strong { font-size:14px;flex-wrap:wrap;gap:0 4px; }
  .opSectors { grid-column:1/-1;gap:4px 8px; }
  .opExpand { grid-row:1; }
  .productionStageHeading { align-items:flex-start; }
}

/* Entrada direta no acompanhamento: controles de apoio ocupam uma faixa compacta. */
body[data-view=today] #appMain { padding-top:8px; }
body[data-view=today] #metrics { margin-bottom:8px;gap:8px; }
body[data-view=today] #metrics .metric { min-height:32px;padding:4px 8px;gap:8px; }
body[data-view=today] #metrics .metric strong { font-size:18px; }
body[data-view=today] #metrics .metric span { font-size:11px; }
body[data-view=today] .toolbar { padding:8px;gap:8px; }
body[data-view=today] .toolbar label { font-size:0; }
body[data-view=today] .toolbar input,body[data-view=today] .toolbar select { margin-top:0;padding:8px;min-height:32px;font-size:12px; }
body[data-view=today] .toolbar .search { max-width:350px; }
body[data-view=today] .toolbar #count { padding-bottom:8px;font-size:11px; }
body[data-view=today] .productionStage.running>.operationList { max-height:clamp(220px,calc(100dvh - 440px),520px); }
body[data-view=today] .personalRequests { border-top:1px solid var(--border);margin:0 8px 8px;padding:4px 0; }
.orderMediaPanel { border-top:1px solid var(--border);padding-top:8px;margin:12px 0; }
.orderMediaPanel h3 { font-size:13px;margin:0 0 8px; }
.orderMediaPanel label { font-size:12px;display:block; }
.orderMediaPanel small { color:var(--muted);font-size:11px;display:block; }
.orderMediaInput { padding:8px;background:#f8fafb;max-width:100%;font-size:12px; }
.orderMediaInput::file-selector-button { border:1px solid #c9dacf;background:#eaf6ef;color:#17633c;border-radius:5px;padding:4px 8px;margin-right:8px;cursor:pointer; }
.mediaSelected { font-size:11px;overflow-wrap:anywhere;margin:4px 0;color:#35664a; }
.mediaSelected:empty { display:none; }
.orderMediaGallery { display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-top:8px; }
.orderMediaGallery:empty { display:none; }
.orderMediaGallery figure { margin:0;padding:8px;border:1px solid var(--border);border-radius:8px;min-width:0;background:#fafcfd; }
.orderMediaGallery img,.orderMediaGallery video { width:100%;height:115px;object-fit:contain;border-radius:5px;background:#edf1f4;display:block; }
.orderMediaGallery figcaption { margin-top:4px;font-size:11px;overflow-wrap:anywhere; }
#quickProjectForm>label { margin:8px 0; }
#quickProjectForm>p { font-size:12px;margin:8px 0; }
#quickProjectForm>label>textarea { min-height:60px; }
#quickProjectDialog { width:min(680px,95vw); }
#quickProjectForm.quickAdmin { display:grid;grid-template-columns:1fr 1fr;gap:8px 12px; }
#quickProjectForm.quickAdmin>.dialogtitle,#quickProjectForm.quickAdmin>p,#quickProjectForm.quickAdmin>label,#quickProjectForm.quickAdmin>section,#quickProjectForm.quickAdmin>details { grid-column:1/-1; }
#quickProjectForm.quickAdmin>label { margin:0;font-size:12px; }
#quickProjectForm.quickAdmin>#quickDeliveryWrap,#quickProjectForm.quickAdmin>#quickAmountWrap { grid-column:auto; }
#quickProjectForm.quickAdmin>label input { font-size:12px;padding:8px; }
#quickProjectForm.quickAdmin>p { margin:2px 0; }
#quickProjectForm.quickAdmin .orderMediaPanel { margin:4px 0;padding-top:8px; }
#quickProjectForm.quickAdmin>#quickProjectSave,#quickProjectForm.quickAdmin>#quickComplete { width:100%;margin:2px 0 0; }
#quickProjectForm.quickAdmin>#quickProjectError:empty { display:none; }
@media(max-width:600px) {
 #quickProjectForm.quickAdmin { grid-template-columns:1fr; }
 #quickProjectForm.quickAdmin>#quickDeliveryWrap,#quickProjectForm.quickAdmin>#quickAmountWrap { grid-column:1; }
 body[data-view=today] .toolbar .search { flex-basis:100%;max-width:none; }
 body[data-view=today] .toolbar label { flex-basis:90px; }
 body[data-view=today] .productionStage.running>.operationList { max-height:340px; }
}

/* Celular: alvos de toque e campos legíveis sem zoom automático do iPhone. */
@media(max-width:600px) {
 #appHeader button, #appMain button, dialog button,
 #appHeader nav button, #appHeader .account button { min-height:44px; }
 input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
 select, textarea,
 #quickProjectForm.quickAdmin>label input { font-size:16px;min-height:44px;min-width:0; }
 input[type=file] { max-width:100%;min-height:44px; }
 dialog { box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto; }
 dialog footer { bottom:0; }
 .fields>label, .quickAdmin>label { min-width:0; }
 .orderMediaGallery video, .orderMediaGallery img { max-width:100%; }
}

/* Etapa 3 — panorama de Projetos */
.projectsPanorama { display: grid; gap: 8px; margin: 0 0 12px; }
.panoramaTiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.panoramaTile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; text-align: left; border: 1px solid var(--line, #d7dde3); border-radius: 8px; background: var(--surface, #fff); }
.panoramaTile strong { font-size: 22px; line-height: 1; }
.panoramaTile span { font-size: 12px; }
.panoramaTile.risk strong { color: #b42318; }
.panoramaTile.near strong { color: #b54708; }
.panoramaCols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panoramaCols > div { border: 1px solid var(--line, #d7dde3); border-radius: 8px; padding: 8px 12px; background: var(--surface, #fff); }
.panoramaCols h3 { margin: 0 0 8px; font-size: 13px; }
.panoramaDesigner { padding: 4px 0; border-top: 1px solid #eef1f4; font-size: 13px; }
.panoramaDesigner:first-of-type { border-top: 0; }
.panoramaAttention summary { cursor: pointer; font-size: 13px; padding: 4px 0; }
.panoramaAttention .linkish, .panoramaDesigner .linkish { display: block; text-align: left; }
.projectsPanorama .linkish { background: none; border: 0; padding: 2px 0; min-height: 0; color: var(--brand-strong, #00753a); text-decoration: underline; cursor: pointer; font-size: 12px; }
.projectsPanorama .muted { color: #667085; }
.queueMore summary { cursor: pointer; font-size: 12px; color: #667085; }
@media (max-width: 800px) { .panoramaTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panoramaCols { grid-template-columns: 1fr; } }

/* Etapa 5 — Expedição */
.shippingPanel { display: grid; gap: 12px; }
.shipTiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.panoramaTile.selected { border-color: var(--brand, #00753a); box-shadow: inset 0 0 0 1px var(--brand, #00753a); }
.shipBar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.shipBar label { display: grid; gap: 4px; font-size: 12px; min-width: 130px; flex: 1 1 130px; }
.shipBar label:first-child { flex: 2 1 220px; }
.shipList { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.shipCard h3 { margin: 4px 0 0; }
.shipFacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.shipFacts span { display: grid; font-size: 11px; color: #667085; }
.shipFacts strong { font-size: 13px; color: inherit; overflow-wrap: anywhere; }
.shipTransport { display: block; font-size: 12px; color: #475467; overflow-wrap: anywhere; }
.shipStatus { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f4; }
.shipStatus.s-pronto-para-expedir { background: #e3f4ea; color: #00753a; }
.shipStatus.s-programada { background: #e8eefc; color: #1d4ed8; }
.shipStatus.s-em-transporte { background: #fff4e5; color: #b54708; }
.shipStatus.s-entregue { background: #e3f4ea; color: #05603a; }
.shipStatus.s-cancelada { background: #fdecec; color: #b42318; }
.shipTag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #fff4e5; color: #b54708; }
.shipRoutes { border: 1px solid var(--line, #d7dde3); border-radius: 8px; padding: 8px 12px; background: var(--surface, #fff); }
.shipRoutes summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.shipRoutes .muted { color: #667085; font-size: 12px; }
.tableScroll { overflow-x: auto; }
.shipRouteTable { width: 100%; border-collapse: collapse; font-size: 12px; }
.shipRouteTable th, .shipRouteTable td { text-align: left; padding: 4px 8px; border-top: 1px solid #eef1f4; white-space: nowrap; }
.shipRouteRecords td { border-top: 0; white-space: normal; padding-top: 0; }
.shipRouteRecords summary { font-size: 12px; font-weight: 400; }
#shipDialog form { display: grid; gap: 8px; }
.shipOrder { margin: 0; font-weight: 600; }
.shipHint { margin: -4px 0 0; font-size: 12px; color: #667085; }
.shipGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 8px; }
.shipStage { border: 1px solid var(--line, #d7dde3); border-radius: 8px; padding: 8px; display: grid; gap: 8px; }
.shipCheck { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.shipCheck input { width: auto; min-height: 0; }
.shipReference { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; padding: 8px; border-radius: 8px; background: #f5f8f6; border: 1px dashed #b7d3c2; }
.shipReference strong { width: 100%; }
.shipHistoryRow { padding: 4px 0; border-top: 1px solid #eef1f4; font-size: 12px; }
.shipHistoryRow small { display: block; color: #475467; }
@media (max-width: 800px) { .shipTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shipGrid { grid-template-columns: 1fr; } }

/* Etapa 6 — cadastro mínimo */
.optionalBox { border: 1px dashed var(--line, #d7dde3); border-radius: 8px; padding: 8px; display: grid; gap: 8px; }
.optionalBox > summary { cursor: pointer; font-size: 13px; color: #475467; }
.formHint { display: block; color: #667085; font-size: 12px; margin: 4px 0; }

/* Celular (até 600px): abas fixas no rodapé, topo em duas linhas (logo + ☰ / ações), conta atrás do ☰ Menu,
   lista compacta de pedidos. Campos com 16px: abaixo disso o Safari do iPhone dá zoom ao tocar e a barra
   fixa "flutua" no meio da tela. Desktop inalterado. */
#mobileMenu { display: none; }
@media (max-width: 600px) {
  body input, body select, body textarea { font-size: 16px !important; }
  body #appHeader { position: relative; background: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; box-shadow: 0 1px 0 var(--border); }
  body #appHeader .brand { order: 0; flex: 1 0 calc(100% - 64px); min-width: 0; }
  body #appHeader .brand img { height: 30px; width: auto; }
  body #appHeader #mobileMenu { order: 1; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 44px; padding: 4px 12px; font-size: 14px; }
  body #appHeader #new, body #appHeader #notificationsButton, body #appHeader #requestsButton { order: 2; flex: 1 1 0; min-width: 0; min-height: 40px; padding: 4px 8px; font-size: 13px; justify-content: center; text-align: center; white-space: nowrap; }
  body #appHeader #new { flex-grow: 1.3; }
  body #appHeader #refreshButton, body #appHeader #printButton, body #appHeader #exportOrdersButton { order: 5; min-height: 32px; padding: 4px 8px; font-size: 12.5px; }
  body #appHeader .account { order: 6; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 0; }
  body:not(.mobileMenuOpen) #appHeader #refreshButton, body:not(.mobileMenuOpen) #appHeader #printButton, body:not(.mobileMenuOpen) #appHeader #exportOrdersButton, body:not(.mobileMenuOpen) #appHeader .account { display: none; }
  body #appHeader .account button { min-height: 36px; padding: 4px 12px; font-size: 13px; }
  body #appHeader .account #accountName { width: 100%; font-size: 12px; }
  body #appHeader .accountData { font-size: 13px; margin: 0; padding: 0; border: 0; }
  /* Abas no rodapé, ao alcance do polegar. */
  body #appHeader nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 10px #17212f14; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); scrollbar-width: none; }
  body #appHeader nav::-webkit-scrollbar { display: none; }
  body #appHeader nav button { flex: 1 0 64px; max-width: 96px; min-height: 52px; padding: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; line-height: 1.15; border: 0; border-radius: 10px; background: transparent; white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; }
  body #appHeader nav button .navIcon { width: 21px; height: 21px; flex: 0 0 21px; }
  body #appHeader nav button.selected { background: #e8f6ef; color: #0b7a4b; font-weight: 600; }
  body #appMain { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body #appMain .title { padding-top: 8px; padding-bottom: 4px; }
  body #appMain .title h1 { font-size: 21px; margin: 0; }
  body #appMain .title p { display: none; }
  /* Filtros: busca em linha inteira e seletores lado a lado. */
  body .toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; align-items: end; }
  body .toolbar > label { min-width: 0; font-size: 11px; margin: 0; }
  body .toolbar > label.search, body .toolbar > label.checkLabel, body .toolbar > #count, body .toolbar > .viewcontrols { grid-column: 1 / -1; }
  body .toolbar select, body .toolbar input { min-height: 40px; padding: 8px 24px 8px 8px; text-overflow: ellipsis; }
  body .toolbar input { padding-right: 8px; }
  body .toolbar > #count { font-size: 12px; text-align: right; }
  /* Cabeçalhos de fila (Viagens e equipes, Compras): título, filtros em linha e ação alinhados. */
  body .purchaseQueueHead { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
  body .purchaseQueueHead h2 { font-size: 18px; margin: 0; }
  body .purchaseQueueHead .tripFilters { display: flex; flex-wrap: wrap; gap: 8px; }
  body .purchaseQueueHead .tripFilters button { flex: 1 1 auto; min-height: 36px; padding: 4px 8px; font-size: 13px; white-space: nowrap; }
  body .purchaseQueueHead > button.primary { align-self: stretch; min-height: 40px; }
  body .tripCard { padding: 8px; gap: 8px; }
  body .tripCard > button { min-height: 40px; }
  /* Pedidos: lista compacta (cliente · equipamento · prazo); tocar expande o cartão completo. */
  body[data-view=orders] .ordersTable tr.orderrow { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px; column-gap: 8px; margin-bottom: 8px; }
  body[data-view=orders] .ordersTable tr.orderrow > td { padding: 4px 2px; min-width: 0; }
  body[data-view=orders] .ordersTable tr.orderrow > td > * { max-width: 100%; }
  body[data-view=orders] .ordersTable tr.orderrow > td::before { font-size: 10px; margin-bottom: 1px; }
  body[data-view=orders] .ordersTable tr.orderrow button { min-height: 32px; padding: 4px 8px; font-size: 12px; margin: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  body[data-view=orders] .ordersTable tr.orderrow td small { font-size: 10.5px; }
  body[data-view=orders] .ordersTable tr.orderrow.expanded > td:nth-child(1), body[data-view=orders] .ordersTable tr.orderrow.expanded > td:nth-child(2) { grid-column: 1 / -1; }
  body[data-view=orders] .ordersTable tr.orderrow > td:nth-child(2)::before { display: none; }
  body[data-view=orders] .ordersTable tr.orderrow > td:nth-child(2) { color: #475467; font-size: 13px; overflow-wrap: anywhere; }
  body[data-view=orders] .ordersTable tr.orderrow.expanded > td:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
  body[data-view=orders] .ordersTable tr.orderrow.expanded > td:last-child::before { display: none; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 4px 12px; cursor: pointer; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(n+4) { display: none; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td::before { display: none; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(1) { grid-column: 1; grid-row: 1; padding-bottom: 0; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(1) small { display: none; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(2) { grid-column: 1; grid-row: 2; padding-top: 0; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
  body[data-view=orders] .ordersTable tr.orderrow:not(.expanded) > td:nth-child(3) > :not(strong) { display: none; }
  body .panoramaAttention .linkish { min-height: 0; padding: 4px 0; margin: 2px 0; overflow-wrap: anywhere; white-space: normal; line-height: 1.3; }
  body #appMain { overflow-wrap: anywhere; }
}

/* Aviso enquanto o servidor da nuvem acorda (app.js: serverWaking). */
#wakingNotice { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 24px); padding: 8px 16px; border-radius: 999px; background: #17212f; color: #fff; font-size: 13px; box-shadow: 0 4px 14px #17212f33; text-align: center; }
#wakingNotice[hidden] { display: none; }
/* Versão nova publicada com formulário aberto (app.js, appUpdate). */
#updateNotice { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 61; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 4px 4px 4px 16px; border-radius: 999px; background: #17212f; color: #fff; font-size: 13px; box-shadow: 0 4px 16px #17212f33; }
#updateNotice button { min-height: 32px; padding: 4px 12px; border-radius: 999px; border-color: #fff; background: #fff; color: #17212f; font-weight: 600; }
/* Carregamento inicial (index.html #bootLoader, removido ao fim do boot em access.js). */
#bootLoader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: #f6f8f7; color: #17212f; text-align: center; }
#bootLoader p { margin: 0; font-size: 16px; font-weight: 600; }
#bootLoader small { max-width: 300px; color: #667085; font-size: 13px; line-height: 1.4; }
.bootSpinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #d7e7de; border-top-color: #0aae65; animation: bootSpin .9s linear infinite; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bootSpinner { animation-duration: 2.5s; } }
.panoramaRunning small { display: block; }
.tripState { font-weight: 600; } .tripState.running { color: #0b7a4b; } .tripState.upcoming { color: #2464c5; }
/* Celular — topo numa linha (logo, + Novo pedido, lupa, menu); Avisos/Pendências só com conteúdo, na linha de baixo. */
#searchToggle { display: none; }
@media (max-width: 600px) {
  body #appHeader { flex-wrap: wrap; gap: 8px; padding: 4px 8px; }
  body #appHeader .brand { flex: 0 0 auto; min-width: 0; }
  body #appHeader .brand img { height: 28px; }
  body #appHeader #new { flex: 0 0 auto; margin-left: auto; padding: 4px 12px; }
  body #appHeader #notificationsButton, body #appHeader #requestsButton { flex: 1 1 40%; order: 5; padding: 4px 8px; font-size: 12px; }
  body #appHeader #notificationsButton:not(.hasNotices), body #appHeader #requestsButton:not(.hasPending) { display: none; }
  body #appHeader #searchToggle { display: inline-flex; align-items: center; justify-content: center; order: 3; min-width: 40px; min-height: 40px; padding: 4px 8px; font-size: 16px; }
  body #appHeader #mobileMenu { order: 4; min-width: 40px; margin-left: 0; padding: 4px 8px; }
  body:not(.searchOpen) .workspace > .toolbar { display: none; }
  /* Indicadores em faixa única que rola para o lado. */
  body #metrics { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  body #metrics::-webkit-scrollbar { display: none; }
  body #metrics > * { flex: 0 0 auto; min-width: 0; min-height: 0; padding: 8px; }
  body #metrics > * strong, body #metrics > * b { font-size: 18px; }
  body #metrics > * span, body #metrics > * small { font-size: 12px; }
}
/* Gestor — Expedição compacta. */
.shipRecent { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 8px 12px; margin-bottom: 8px; display: grid; gap: 8px; }
.shipRecent h3 { margin: 0 0 2px; font-size: 15px; }
.shipRecentRow { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; font-size: 13px; padding: 4px 0; border-top: 1px solid #eef1f4; }
.shipRecentRow > small { grid-column: 2; color: #475467; }
.userRole { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.userRole select { min-height: 32px; }

/* Expedição — entregas nos próximos 30 dias e orçamentos de frete. */
.shipSoon { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.shipSoonHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.shipSoonHead h3 { margin: 0; font-size: 15px; }
.shipSoonHead small { color: var(--muted); font-size: 12px; }
.shipSoonList { display: grid; grid-auto-rows: max-content; gap: 4px; max-height: 340px; overflow-y: auto; }
.shipSoonRow { display: grid; overflow: visible; grid-template-columns: 128px minmax(0, 1fr) minmax(0, 220px); align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; text-align: left; border-color: var(--border); }
.shipSoonDays { display: grid; gap: 0; font-weight: 600; font-size: 13px; color: var(--positive); }
.shipSoonDays small { font-weight: 400; font-size: 12px; color: var(--muted); }
.shipSoonDays.warn { color: var(--warning); }
.shipSoonDays.late { color: #bf2140; }
.shipSoonMain { display: grid; min-width: 0; }
.shipSoonMain strong, .shipSoonMain small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipSoonMain small, .shipSoonState { color: var(--muted); font-size: 12px; }
.shipSoonState { text-align: right; overflow-wrap: anywhere; }
.shipQuotes #shipQuotes { display: grid; gap: 8px; margin-bottom: 8px; }
.shipQuote { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.shipQuote.chosen { border-color: #b8dfc9; background: var(--positive-bg); }
.shipQuoteMain { display: grid; gap: 0; min-width: 0; }
.shipQuoteMain small, .shipQuoteValue small { color: var(--muted); font-size: 12px; }
.shipQuoteValue { display: grid; text-align: right; font-weight: 600; }
.shipQuoteActions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.shipQuoteChosen { color: var(--positive); font-size: 12px; font-weight: 600; }
.shipQuoteAdd { align-items: end; }
.shipQuoteAdd > button { align-self: end; }
#shipQuoteError { color: #bf2140; margin: 4px 0 0; }
@media (max-width: 600px) {
  .shipSoon { padding: 8px; }
  .shipSoonRow { grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .shipSoonState { grid-column: 2; text-align: left; }
  .shipQuote { grid-template-columns: minmax(0, 1fr) auto; }
  .shipQuoteActions { grid-column: 1 / -1; justify-content: flex-start; }
}
/* Projetos — filas limpas ao abrir a aba: filtros, visões e resumo atrás de "Filtros e resumo". */
body[data-view=projects]:not(.projectsToolsOpen):not(.searchOpen) .workspace:has(#projectFocus:not([hidden])) > .toolbar,
body[data-view=projects]:not(.projectsToolsOpen) #projectsPanorama { display: none; }
#projectFocus .projectToolsToggle { margin-left: auto; }
/* Cartão da fila recolhido: posição, filial, prioridade, situação, cliente, equipamento e prazo do projeto. */
.queueCard[data-queue-card] { cursor: pointer; }
.queueCard[data-queue-card]:not(.expanded) .queueCardBody { display: none; }
.queueCard[data-queue-card]:not(.expanded) .projectDue { padding-bottom: 0; }
.queueCard .projectDue { position: relative; padding-right: 24px; }
.queueCardToggle { position: absolute; right: 0; bottom: 0; color: var(--muted); font-size: 16px; line-height: 1; transition: transform var(--duration, .15s) ease; }
.queueCard.expanded .queueCardToggle { transform: rotate(180deg); }
.queueCard[data-queue-card]:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
/* Pedidos de reposição: itens na própria linha, sem poluir. */
.itemsCell .itemsPreview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.itemsCell .itemsMore { min-height: 24px; margin-top: 4px; padding: 0 8px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--positive); background: var(--positive-bg); border-color: #b8dfc9; }
/* Usinagem — lista de corte e usinagem por pedido; botões grandes para uso na fábrica. */
.machiningPanel { display: grid; gap: 12px; }
.machBar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.machSearch { flex: 1 1 260px; font-size: 12px; color: var(--muted); }
.machPick { display: grid; gap: 4px; flex: 0 1 240px; min-width: 0; font-size: 12px; color: var(--muted); }
.machPick select { min-height: 40px; max-width: 100%; }
.machPick[hidden] { display: none; }
.machFilter { display: flex; gap: 4px; }
.machFilter button { min-height: 40px; }
.machBar #machImport { min-height: 40px; margin-left: auto; }
#machLists { display: grid; gap: 12px; }
.machList { border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface); margin: 0; padding: 0; }
.machList.complete { border-left-color: #a7b4c1; }
.machList > summary, .machSummaryRow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(160px, 240px); align-items: center; gap: 12px; padding: 12px 16px; list-style: none; }
.machList > summary::-webkit-details-marker { display: none; }
.machHead { display: grid; min-width: 0; }
.machHead strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machHead small, .machProgress small { color: var(--muted); font-size: 12px; }
.machDue { font-size: 13px; color: var(--muted); white-space: nowrap; }
.machDue.late { color: #bf2140; font-weight: 600; }
.machProgress { display: grid; gap: 4px; }
.machBarTrack { display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; background: #e6ebef; overflow: hidden; -webkit-appearance: none; appearance: none; }
.machBarTrack::-webkit-progress-bar { background: #e6ebef; border-radius: 4px; }
.machBarTrack::-webkit-progress-value { background: var(--brand); border-radius: 4px; }
.machBarTrack::-moz-progress-bar { background: var(--brand); border-radius: 4px; }
/* Resumo por pedido (quem acompanha a Usinagem): percentual, equipamentos iniciados e dias desde a 1ª peça */
.machSumCard { display: grid; gap: 8px; margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface); }
.machSumCard.complete { border-left-color: var(--positive); background: var(--positive-bg); }
.machSumTop { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.machSumPct { flex: none; text-align: right; }
.machSumPct strong { display: block; font-size: 24px; line-height: 1.1; color: var(--ink); }
.machSumPct small { color: var(--muted); font-size: 12px; }
.machSumLine { margin: 0; font-size: 13px; color: var(--muted); }
.machSumLine b { color: var(--ink); }
.machSumEquip summary { cursor: pointer; font-size: 13px; color: #2f5f93; }
.machSumEquip ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.machSumEquip li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0 0; border-top: 1px solid var(--border); }
.machSumEquip li .machBarTrack, .machSumEquip li small { grid-column: 1 / -1; }
.machSumEquip li small { color: var(--muted); font-size: 12px; }
.machSumName { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.machSumEquip li.complete .machSumName::after { content: " ✓"; color: var(--positive); }
.machItems { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 8px; }
.machItem { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd; }
.machItem.s-pronto { background: var(--positive-bg); border-color: #b8dfc9; }
.machItem.s-parcial { background: var(--warning-bg); border-color: #f0d79a; }
/* Seleção em lote: caixa à esquerda da peça e barra "Selecionar todas · Marcar N como prontas" */
.machItem.selectable { grid-template-columns: 32px minmax(0, 1fr) 72px auto; }
.machItem.picked { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.machCheck { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.machCheck input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.machItemCheck { justify-content: center; min-height: 44px; }
.machBulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 8px; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 8px; }
.machBulk button[disabled] { opacity: .55; cursor: default; }
.machInfo { display: grid; gap: 2px; min-width: 0; }
.machInfo strong { font-size: 14px; }
.machInfo span { font-size: 13px; color: #475467; overflow-wrap: anywhere; }
.machCode, .machWho { font-size: 12px; color: var(--muted); }
.machQty { display: grid; text-align: center; }
.machQty strong { font-size: 20px; line-height: 1.1; }
.machQty small { font-size: 12px; color: var(--muted); }
.machState { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.machState button { min-height: 44px; min-width: 88px; }
.machChip { font-size: 12px; font-weight: 600; color: var(--muted); }
.s-pronto .machChip { color: var(--positive); }
.s-parcial .machChip { color: var(--warning); }
.machEdit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.machEdit label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.machEdit input { width: 88px; min-height: 44px; margin: 0; }
.machEdit small { color: var(--muted); }
.machEmpty { padding: 8px 4px; color: var(--muted); font-size: 13px; }
.machRemoved { margin: 0 12px 12px; padding-top: 8px; }
.machRemoved .machItems { padding: 8px 0 0; }
.machPreview { margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd; }
.machPreview p { margin: 0 0 8px; color: var(--ink); }
.machPreview table { font-size: 12px; }
.machPreview .muted { color: var(--muted); }
.machPreview .machWarn { padding: 8px 12px; border-radius: 8px; background: #fff7e6; color: var(--warning); font-weight: 600; }
#machImportDialog label { display: block; margin: 12px 0; }
/* Opções de impressão dos gastos da viagem */
.tripPrintChoice { margin: 12px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.tripPrintChoice legend { padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
#tripPrintDialog .tripPrintChoice label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; margin: 4px 0; font-size: 13px; text-align: left; }
#tripPrintDialog .tripPrintChoice input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.tripPrintChoice small { color: var(--muted); }
#tripPrintError { color: #bf2140; }
/* Planilhas do layout (cadastro completo) e listas de compra (aba Compras) */
.layoutSheets { border-top: 1px solid var(--border); padding-top: 8px; margin: 12px 0; }
.layoutSheets h3 { font-size: 13px; margin: 0 0 4px; }
.layoutSheets > p { margin: 0 0 8px; font-size: 12px; }
.layoutSheetList { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.layoutSheetList li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 8px; background: var(--surface); }
.layoutSheetList li > div { min-width: 0; }
.layoutSheetList strong, .layoutSheetList small { display: block; overflow-wrap: anywhere; }
.layoutSheetList strong { font-size: 13px; }
.layoutSheetList small { color: var(--muted); font-size: 12px; }
.layoutSheetList .layoutPending { border-left-color: #c9a227; background: #fffbea; }
.layoutSheetList .layoutError { border-left-color: var(--negative); background: var(--negative-bg); }
.layoutSheetList .layoutError small { color: #9f1f35; }
.layoutSheetList .linkish.danger { color: var(--negative); }
.layoutAdd { display: block; font-size: 12px; }
.layoutEmpty { color: var(--muted); font-size: 12px; }
/* Lista de liberação: pasta do cliente, nome do equipamento editável, avisos e consulta de corte/laser */
.layoutSheetList li { flex-wrap: wrap; }
.layoutSheetList li > div { flex: 1 1 280px; }
.layoutActions { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.layoutEquip { width: 100%; max-width: 420px; min-height: 32px; padding: 4px 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }
.layoutSheetList small.layoutWarn { margin-top: 4px; color: #8a5a00; }
.layoutSheetList small.layoutWarn::before { content: "⚠ "; }
.layoutAddRow { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.layoutHint { margin: 4px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.layoutIgnored { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.layoutIgnored summary { cursor: pointer; }
.layoutIgnored ul { margin: 4px 0 0; padding-left: 16px; display: grid; gap: 2px; }
.layoutIgnored li { overflow-wrap: anywhere; }
.layoutRef { flex: 1 1 100%; min-width: 0; margin-top: 4px; }
.layoutRef h4 { margin: 8px 0 4px; font-size: 12px; }
.layoutRefBox { margin: 8px 0; font-size: 13px; }
.layoutRefBox > strong { display: block; margin-bottom: 4px; font-size: 13px; }
.layoutRefItem { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 4px 0; border-top: 1px solid var(--border); }
.layoutRefItem small { color: var(--muted); font-size: 12px; }
.buyLists { margin: 0 0 12px; border: 1px solid var(--border); border-left: 4px solid #2f6fb3; border-radius: 10px; background: var(--surface); }
.buyLists > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; }
.buyLists > summary strong, .buyLists > summary small { display: block; }
.buyLists > summary strong { font-size: 14px; color: var(--ink); }
.buyLists > summary small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.buyCount { flex: none; font-size: 12px; font-weight: 600; color: #2f5f93; }
.buyBar { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 16px 8px; }
.buyGroups { display: grid; gap: 8px; padding: 0 16px 16px; }
.buyOrderHead { margin-top: 8px; }
.buyOrderHead strong, .buyOrderHead small { display: block; }
.buyOrderHead small { color: var(--muted); font-size: 12px; }
.buyList { border: 1px solid var(--border); border-radius: 8px; }
.buyList > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; cursor: pointer; }
.buyList > summary small { color: var(--muted); font-size: 12px; }
.buyTable { width: 100%; border-collapse: collapse; font-size: 12px; }
.buyTable th, .buyTable td { padding: 6px 12px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.buyTable th { color: var(--muted); font-weight: 600; background: #f8fafb; }
.buyTable .buyQty, .buyTable td:first-child { white-space: nowrap; }
.buyTable .buyQty { text-align: right; }
.buyBoth { background: #eef4fb; color: #2f5f93; border: 1px solid #c9dbef; white-space: nowrap; }
@media (max-width: 600px) {
  .buyLists > summary, .buyBar, .buyGroups { padding-left: 12px; padding-right: 12px; }
  .layoutSheetList li { align-items: flex-start; flex-direction: column; gap: 4px; }
  .layoutSheetList li > div { flex: none; width: 100%; }  /* em coluna, a base de 280px viraria altura */
}
#machImportError { color: #bf2140; }
@media (max-width: 600px) {
  .machBar { padding: 8px; gap: 8px; }
  .machBar #machImport { width: 100%; margin-left: 0; }
  .machPick { flex: 1 1 100%; }
  .machList > summary, .machSummaryRow { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px; }
  .machItems { padding: 0 8px 8px; }
  .machItem { grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; padding: 8px; }
  .machItem.selectable { grid-template-columns: 32px minmax(0, 1fr) 64px; }
  .machBulk button { width: 100%; }
  .machState { grid-column: 1 / -1; justify-content: stretch; }
  .machState button { flex: 1 1 0; }
  .machChip { flex: 1 0 100%; }
}
/* Usinagem ligada ao pedido: selo na lista de Pedidos, bloco no cadastro/consulta e ações no cartão. */
.machOrderChip { display: flex; width: max-content; max-width: 100%; min-height: 24px; margin-top: 4px; padding: 0 8px; align-items: center; border-radius: 12px; font-size: 12px; font-weight: 600; color: #344054; background: #eef2f6; border-color: #d5dfe8; }
.machOrderChip.complete { color: var(--positive); background: var(--positive-bg); border-color: #b8dfc9; }
.machLink { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
p.machLink { font-size: 13px; margin: 8px 0; }
.machLink .linkish, .machListActions .linkish { display: inline-block; }
.machLink .linkish { margin-left: 8px; }
.machDoneBox { margin: 0 16px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f7fbf8; }
.machDoneBox > summary { padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-strong); }
.machDoneBox > summary small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.machDoneBox .machItems { padding: 0 8px 8px; }
.machListActions { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 16px 8px; }
.machListActions .linkish.danger { color: var(--negative); }
@media (max-width: 600px) { .machListActions { padding: 0 12px 8px; } }
/* Usinagem por equipamento: cabeçalho do pedido com o percentual ponderado e o peso de cada equipamento. */
.machOrderHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 8px; padding: 12px 16px; border-radius: 10px; background: #eef6f1; border: 1px solid #cfe6d8; }
.machOrderHead.complete { background: #f2f4f7; border-color: var(--border); }
.machOrderHead[data-mach-fold] { cursor: pointer; user-select: none; }
.machOrderHead[data-mach-fold]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.machOrderHead > .machHead { flex: 1 1 auto; }
.machFoldIcon { flex: none; width: 16px; color: var(--muted); font-size: 14px; }
.machOrderHead.folded { margin-bottom: 4px; }
#machFoldAll { align-self: center; }
.machOrderHead .late { color: #bf2140; font-weight: 600; }
.machOrderPercent { display: grid; justify-items: end; }
.machOrderPercent strong { font-size: 18px; color: var(--positive); }
.machOrderPercent small { font-size: 12px; color: var(--muted); }
#machLists .machList { margin-left: 12px; }
.machWeight { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.machWeight label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.machWeight input { width: 80px; min-height: 40px; margin: 0; }
.machWeight button { min-height: 40px; }
.machWeight .muted { flex: 1 1 200px; font-size: 12px; }
.machWeightInfo { font-size: 12px; color: var(--muted); }
.machPanelPct { color: var(--warning); }
.machPanelPct.done { color: var(--positive); }
@media (max-width: 600px) {
  .machOrderHead { padding: 8px 12px; }
  .machOrderPercent { justify-items: start; }
  #machLists .machList { margin-left: 0; }
}
/* Estados interativos: aparência em repouso igual; passar o mouse, tocar, foco e desabilitado ficam explícitos. */
:root { --ease: cubic-bezier(.2, 0, 0, 1); --duration: .15s; }
button, summary, a, input, select, textarea, .orderrow { transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), color var(--duration) var(--ease), opacity var(--duration) var(--ease); }
button:not(:disabled) { cursor: pointer; }
button:not(:disabled):not(.selected):active { background-color: #e5efea; border-color: #9fc2b1; }
button.primary:not(:disabled):active { background-color: #006f41; border-color: #006f41; }
button.danger:not(:disabled):active { background-color: #ffe1e7; }
button.primary:disabled, button.primary:disabled:hover { background-color: var(--brand-strong); border-color: var(--brand-strong); }
button:focus-visible, summary:focus-visible, a:focus-visible, .orderrow:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
input:hover:not(:disabled):not(:read-only):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:read-only):not(:focus) { border-color: #a9b8c6; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--brand-strong); box-shadow: 0 0 0 4px #00855024; outline: 0; }
input:disabled, select:disabled, textarea:disabled { background-color: #f2f4f7; color: #526073; -webkit-text-fill-color: #526073; opacity: 1; cursor: not-allowed; }
input[type=checkbox]:not(:disabled), input[type=radio]:not(:disabled), label:has(> input[type=checkbox]:not(:disabled)) { cursor: pointer; }
a:hover { color: #1c4692; }
#appMain summary:hover, dialog summary:hover { color: var(--brand-hover); }
@media (min-width: 1100px) {
  #appHeader nav button { transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease); }
  #appHeader nav button:active { background: #ffffff1f; }
  #appHeader nav button:focus-visible { outline-color: #21d67b; outline-offset: -2px; }
  #appHeader .account button:active { background: #ffffff1f; }
  #appHeader .account button:focus-visible { outline-color: #21d67b; }
}
@media (max-width: 600px) {
  body #appHeader nav button:not(.selected):active { background: #eef5f1; }
  body #appHeader nav button:focus-visible { outline-offset: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
/* Painel · Filial a confirmar: etapas visíveis; a lista "situação a confirmar" ocupa a largura toda, em colunas */
.branchUnknown .trackingOrders { max-height: none; min-height: 0; }
.branchUnknown .trackingOrders > .productionStage.unknown, .branchUnknown .trackingOrders > .stageEmpty { grid-column: 1 / -1; }
.branchUnknown .productionStage.unknown .operationList { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.trackingOrders > .stageEmpty { padding: 12px 0; }

/* Vendas · Orçamentos */
.quotesPanel { display: grid; gap: 12px; }
.quotesPanel #quoteNew { min-height: 40px; margin-left: auto; }
.quoteList { display: grid; gap: 8px; }
.quoteSummary { margin: 0; font-size: 12px; color: var(--muted); }
.quoteCard { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid #c9a227; border-radius: 10px; background: var(--surface); }
.quoteCard.s-done { border-left-color: var(--brand); }
.quoteCard.s-lost { border-left-color: #b9c3cc; opacity: .8; }
.quoteMain { min-width: 0; }
.quoteMain strong, .quoteMain small { display: block; overflow-wrap: anywhere; }
.quoteMain small { color: var(--muted); font-size: 12px; }
.quoteMain p { margin: 4px 0 0; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.quoteMeta { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.quoteMeta small { font-size: 12px; color: var(--muted); }
.quoteActions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#quoteError, #quoteConvertError { color: #bf2140; }
@media (max-width: 700px) {
  .quoteCard { grid-template-columns: minmax(0, 1fr); }
  .quoteMeta { justify-items: start; }
  .quoteActions { justify-content: flex-start; }
  .quotesPanel #quoteNew { width: 100%; margin-left: 0; }
  .quotesPanel .machFilter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}
.quotesPanel .machFilter button { white-space: nowrap; }

/* Projetos · fila por projetista: cada fila em faixa larga com cartões pequenos em colunas (mesma leitura do Painel) */
#board.queueBoard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow: visible; }
#board.queueBoard > .lane { width: auto; min-width: 0; max-width: none; flex: none; margin: 0; }
#board.queueBoard .lanecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; max-height: none; overflow: visible; padding: 8px 12px 12px; }
#board.queueBoard .queueCard { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; margin: 0; padding: 8px 12px; min-width: 0; }
#board.queueBoard .queueCard > .cardmeta { grid-column: 1 / -1; grid-row: 1; flex-wrap: wrap; gap: 4px; }
#board.queueBoard .queueCard > h3 { grid-column: 1; grid-row: 2; margin: 4px 0 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#board.queueBoard .queueCard > .equipment { grid-column: 1; grid-row: 3; margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#board.queueBoard .queueCard > .projectDue { grid-column: 2; grid-row: 2 / 4; text-align: right; padding: 4px 20px 0 0; max-width: 130px; }
#board.queueBoard .queueCard > .projectDue strong { font-size: 16px; }
#board.queueBoard .queueCard > .projectDue small { display: block; font-size: 11px; white-space: normal; line-height: 1.3; }
#board.queueBoard .queueCard > .queueCardBody { grid-column: 1 / -1; grid-row: 4; }
#board.queueBoard .queueCard .queueposition { font-size: 14px; }
#board.queueBoard details.lane > summary { padding: 12px 16px; }

/* Usuários: cadastro em grade, com a descrição do perfil escolhido */
#createUserForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
#createUserForm label { display: grid; gap: 4px; margin: 0; min-width: 0; }
#createUserForm input, #createUserForm select { width: 100%; min-width: 0; }
#createUserForm .roleHint { color: var(--muted); font-size: 12px; min-height: 16px; }
#createUserForm #createUserButton { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 600px) { #createUserForm { grid-template-columns: minmax(0, 1fr); } #createUserForm #createUserButton { justify-self: stretch; } }
/* Fila de Projetos: setas de sequência no próprio cartão (Admin, Gestor de Projetos, Gestor e dono da fila). */
.queueCard .queueMove { display: inline-flex; gap: 4px; }
.queueCard .queueMove button { min-width: 32px; min-height: 28px; padding: 0 8px; border-radius: 6px; font-size: 13px; line-height: 1; }
.queueCard .queueMove button:disabled { opacity: .35; cursor: default; }
/* Projetos: atalho para Melhorias e alterações nos filtros rápidos (no celular o restante fica recolhido). */
#projectFocus .projectImprovements { border-color: #9cc5b0; color: var(--brand-strong); font-weight: 600; }
#improvementBack { margin-left: 0; margin-right: auto; }
.improvementsBar #improvementBack + #improvementNew { margin-left: 0; }
/* Viagens: montador que já voltou aparece riscado; abaixo, quem continua no cliente. */
.tripCard s { color: var(--muted); }
.tripCard .tripField { display: block; margin-top: 2px; color: var(--brand-strong); font-weight: 600; }
@media (max-width: 600px) { #projectFocus .projectImprovements { order: -1; flex: 1 1 100%; } #improvementBack { width: 100%; } }
/* Instalações no celular: a tabela de pedidos rola na horizontal sem espremer o texto letra por letra. */
@media (max-width: 760px) { body[data-view=installations] #tableContainer th, body[data-view=installations] #tableContainer td { min-width: 112px; } body[data-view=installations] #tableContainer th:first-child, body[data-view=installations] #tableContainer td:first-child { min-width: 168px; } }
/* Pendências: grupos das abertas e as resolvidas recolhidas no fim. */
#requestsContent .requestGroup { margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
#requestsContent .requestGroup:first-child { margin-top: 0; }
#requestsContent .requestsDone { margin-top: 12px; }
#requestsContent .requestsDone .requestCard { opacity: .75; }
#quoteTypeOption[hidden], #quoteValidWrap[hidden] { display: none; }
/* Adiantamento: Admin cadastra o montador ali mesmo. */
#advanceAddMember { margin-top: 8px; }
/* Histórico: registros da planilha antiga depois dos do sistema; os sem vínculo confirmado ficam recolhidos. */
#history .legacyDivider { margin: 12px 0 4px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 12px; font-weight: 600; color: var(--muted); }
#history .legacyLoose { margin-top: 12px; }
#history .legacyLoose > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
#history .legacyLoose .event { opacity: .8; }
#history .legacyEvent p { display: inline-block; margin: 2px 16px 2px 0; font-size: 12px; }
#history .legacyEvent > strong { display: block; }
#history .legacyEvent > small { margin-right: 16px; }

/* ---------- Celular e toque: sem cores/contornos presos, cartões legíveis (23/10) ---------- */
/* Toque no iPhone deixa o "passar o mouse" e o foco presos no cartão: blocos cinza e contorno verde por cima das cores. */
.orderrow:focus:not(:focus-visible) { outline: none; }
body[data-view="today"] #productionPanel .operationOrder:focus-within { outline: none; }
body[data-view="today"] #productionPanel .operationOrder > summary:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
@media (hover: none) {
  body[data-view=orders] .orderrow:hover td { background: transparent; }
  body[data-view="today"] #productionPanel .operationOrder:hover { transform: none; box-shadow: 0 1px 3px #1736250d; }
  .trackingOrder:hover { border-color: inherit; }
}
#hoverTip { max-width: min(330px, calc(100vw - 24px)); }

/* Pedidos (cartões no celular): o selo "Usinagem" só no cartão aberto — fechado ele aparecia cortado. */
@media (max-width: 600px) {
  body[data-view=orders] .orderrow:not(.expanded) .equipcell .machOrderChip { display: none; }
}

/* Painel no celular: cartão branco, a cor do prazo só na faixa e na data; letras maiores; nada cortado. */
@media (max-width: 760px) {
  body[data-view="today"] #productionPanel .trackingOrders { max-height: none !important; overflow: visible; }
  body[data-view="today"] #productionPanel .operationOrder,
  body[data-view="today"] #productionPanel .operationOrder.delivery-green,
  body[data-view="today"] #productionPanel .operationOrder.delivery-yellow,
  body[data-view="today"] #productionPanel .operationOrder.delivery-orange,
  body[data-view="today"] #productionPanel .operationOrder.delivery-red,
  body[data-view="today"] #productionPanel .operationOrder.delivery-unknown { background: var(--surface); border-color: var(--border); border-left-width: 5px; }
  body[data-view="today"] #productionPanel .operationOrder.delivery-red { border-left-color: #d42f50; }
  body[data-view="today"] #productionPanel .operationOrder.delivery-orange { border-left-color: #e0862f; }
  body[data-view="today"] #productionPanel .operationOrder.delivery-yellow { border-left-color: #e5ad13; }
  body[data-view="today"] #productionPanel .operationOrder.delivery-green { border-left-color: #0bad61; }
  body[data-view="today"] #productionPanel .operationOrder > summary { padding: 12px; gap: 8px 10px; }
  body[data-view="today"] #productionPanel .opIdentity .orderNumber { font-size: 11px; }
  body[data-view="today"] #productionPanel .opIdentity h3 { font-size: 16px; }
  body[data-view="today"] #productionPanel .opIdentity p { font-size: 13px; color: #4b5d6a; }
  body[data-view="today"] #productionPanel .opExpand { align-self: start; margin-top: 2px; }
  body[data-view="today"] #productionPanel .opDeadline > span { font-size: 12px; }
  body[data-view="today"] #productionPanel .opDeadline > strong { font-size: 17px; }
  body[data-view="today"] #productionPanel .opDeadline .countdown { font-size: 12px; }
  body[data-view="today"] #productionPanel .opSectors { gap: 6px; font-size: 12.5px; }
  body[data-view="today"] #productionPanel .opSectors > span { background: #f4f6f8; border: 0; border-radius: 6px; padding: 4px 8px; color: #4b5d6a; }
  body[data-view="today"] #productionPanel .opSectors .projectState,
  body[data-view="today"] #productionPanel .opSectors .purchase { font-size: 12.5px; }
  .productionStageHeading { display: grid; gap: 2px; }
  .productionStageHeading small { text-align: left; }
}

/* Compras e listas de corte/laser no celular: cada item vira um cartão (item e quantidade em cima, código e processo embaixo). */
@media (max-width: 650px) {
  .buyOrderHead small, .buyList > summary small { overflow-wrap: anywhere; }
  .buyList > summary strong { overflow-wrap: anywhere; }
  .buyTable thead { display: none; }
  .buyTable, .buyTable tbody { display: block; width: 100%; }
  .buyTable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name qty" "name unit" "code code" "size size" "proc proc"; gap: 2px 12px; padding: 10px 12px; border-top: 1px solid var(--border); }
  .buyTable td { display: block; padding: 0; border: 0; white-space: normal; }
  .buyTable td:empty { display: none; }
  .buyTable .bName { grid-area: name; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
  .buyTable .bQty { grid-area: qty; font-size: 16px; font-weight: 700; text-align: right; }
  .buyTable .bUnit { grid-area: unit; font-size: 12px; color: var(--muted); text-align: right; }
  .buyTable .bCode { grid-area: code; font-size: 12px; color: var(--muted); }
  .buyTable .bSize { grid-area: size; font-size: 12px; color: var(--muted); }
  .buyTable .bSize::before { content: "Medida: "; }
  .buyTable .bProc { grid-area: proc; font-size: 12px; color: #4b5d6a; }
}

/* Projetos: o botão "Melhorias e alterações" e os filtros ficam presos no alto ao rolar a fila. */
#projectFocus { position: sticky; top: 0; z-index: 5; }
body[data-view=projects] .workspace { overflow: clip; }  /* "hidden" impedia o sticky; "clip" corta igual sem criar rolagem */
@media (max-width: 600px) {
  #projectFocus { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #projectFocus::-webkit-scrollbar { display: none; }
  #projectFocus button { flex: none; white-space: nowrap; }
  #projectFocus .projectImprovements { order: -1; flex: none; }
}

/* Instalações: pendentes em cartões no topo da aba (inclui expedição programada com instalação a confirmar). */
.installPending { margin: 0 0 16px; padding: 12px 16px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.installPending .purchaseQueueHead { display: grid; gap: 2px; margin-bottom: 12px; }
.installPending h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.installCount { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #fff4e5; color: #9a5b00; font-size: 13px; }
.installGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.installCard { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-left: 5px solid #e0862f; border-radius: 10px; background: var(--surface); }
.installCard.st-set { border-left-color: #2f6fb3; }
.installCard.st-run { border-left-color: var(--positive); }
.installTop { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.installTop strong, .installTop small { display: block; overflow-wrap: anywhere; }
.installTop strong { font-size: 15px; }
.installTop small { color: var(--muted); font-size: 12px; }
.installState { flex: none; padding: 2px 8px; border-radius: 12px; background: #fff4e5; color: #9a5b00; font-size: 12px; font-weight: 600; }
.st-set .installState { background: #eef4fb; color: #2f5f93; }
.st-run .installState { background: var(--positive-bg); color: var(--positive); }
.installFacts, .installHint, .installNote { margin: 0; font-size: 13px; }
.installFacts { color: #4b5d6a; }
.installHint { color: #9a5b00; font-size: 12px; }
.installNote { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.installActions { display: flex; justify-content: flex-end; }
@media (max-width: 600px) { .installPending { padding: 12px; } .installGrid { grid-template-columns: minmax(0, 1fr); } }

/* Aba Indicadores */
.indicatorsPanel { display: grid; gap: 14px; padding: 0 0 24px; }
.indHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.indHead p { margin: 0; font-size: 13px; }
.indFirms { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 3px; gap: 2px; }
.indFirms button { border: 0; border-radius: 999px; background: transparent; padding: 6px 16px; font-weight: 600; color: var(--muted); }
.indFirms button.selected { background: var(--brand); color: #fff; }
.indLegend { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.indLegend i { display: inline-block; width: 18px; border-top: 2px dashed var(--negative); }
.indLine { stroke: var(--negative); stroke-width: 0.6; stroke-dasharray: 1.5 1; vector-effect: non-scaling-stroke; }
.indCol.alert { fill: var(--negative); }
.indAxis li.alert b { color: var(--negative); }
.indTableWrap { overflow-x: auto; }
.indTable { width: 100%; border-collapse: collapse; font-size: 13px; }
.indTable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.indTable td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.indTable td small { display: block; color: var(--muted); font-size: 12px; }
.indTag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--canvas); color: var(--ink); white-space: nowrap; }
.indTag.bad { background: var(--negative-bg); color: var(--negative); }
.indTag.warn { background: var(--warning-bg); color: var(--warning); }
.indTag.good { background: var(--positive-bg); color: var(--positive); }
.indSection { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 12px; }
.indSection > summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; cursor: pointer; list-style: none; }
.indSection > summary::-webkit-details-marker { display: none; }
.indSection > summary h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.indSection > summary h3::before { content: '▸'; color: var(--muted); font-size: 13px; transition: transform var(--duration, .15s); }
.indSection[open] > summary h3::before { transform: rotate(90deg); }
.indSection > summary small { color: var(--muted); }
.indGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; padding: 0 16px 16px; }
.indStats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.indStat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 8px; background: var(--canvas); }
.indStat strong { font-size: 24px; line-height: 1.15; color: var(--ink); }
.indStat span { font-size: 13px; font-weight: 600; color: var(--ink); }
.indStat small { font-size: 12px; color: var(--muted); }
.indStat.t-bad { border-left-color: var(--negative); }
.indStat.t-bad strong { color: var(--negative); }
.indStat.t-warn { border-left-color: #d99a1e; }
.indStat.t-good strong { color: var(--positive); }
.indBlock { min-width: 0; }
.indBlock h4 { margin: 0 0 8px; font-size: 14px; }
.indBlock p { margin: 0 0 8px; font-size: 12px; }
.indWide { grid-column: 1 / -1; }
.indBars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.indBarHead { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.indBarHead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indBar { display: block; width: 100%; height: 8px; margin-top: 3px; }
.indTrack { fill: var(--border); }
.indFill { fill: var(--brand); }
.indBars small { display: block; color: var(--muted); font-size: 12px; }
.indChart svg { display: block; width: 100%; height: 140px; }
.indCol { fill: var(--brand); }
.indCol:hover { fill: var(--brand-strong); }
.indAxis { display: flex; list-style: none; margin: 4px 0 0; padding: 0; }
.indAxis li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.indAxis b { color: var(--ink); font-size: 12px; }
.indAxis span { white-space: nowrap; }
@media (max-width: 650px) {
  .indGrid { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .indStats { grid-template-columns: 1fr 1fr; }
  .indStat strong { font-size: 20px; }
  .indChart svg { height: 110px; }
  .indAxis li { font-size: 9px; }
  .indAxis span { writing-mode: vertical-rl; transform: rotate(180deg); }
  .indTable thead { display: none; }
  .indTable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .indTable td { border: 0; padding: 0; }
  .indTable td:first-child { grid-column: 1 / -1; }
  .indTable td:nth-child(3)::before { content: 'Projeto: '; color: var(--muted); }
  .indTable td:nth-child(4)::before { content: 'Saída prevista: '; color: var(--muted); }
  .indTable td:nth-child(5)::before { content: 'Prazo: '; color: var(--muted); }
  .indTable td:nth-child(6)::before { content: 'Folga: '; color: var(--muted); }
}

/* Indicadores coloridos: cada seção com a sua cor (para quem acompanha de longe) */
.indSection { --accent: var(--brand); --accent-bg: #e9f7ef; border-top: 4px solid var(--accent); }
.indSection.sec-capacidade { --accent: #2458b8; --accent-bg: #eaf1fc; }
.indSection.sec-leadtime { --accent: #7a4fd0; --accent-bg: #f2edfc; }
.indSection.sec-prazos { --accent: #d4710f; --accent-bg: #fdf1e4; }
.indSection.sec-producao { --accent: #009b5a; --accent-bg: #e9f7ef; }
.indSection.sec-pendencias { --accent: #cf304a; --accent-bg: #fff0f3; }
.indSection > summary h3 { color: var(--accent); }
.indSection .indStat { background: var(--accent-bg); border-color: transparent; border-left-color: var(--accent); }
.indSection .indStat.t-bad { background: var(--negative-bg); border-left-color: var(--negative); }
.indSection .indStat.t-warn { background: var(--warning-bg); border-left-color: #d99a1e; }
.indSection .indStat.t-good strong { color: var(--positive); }
.indSection .indFill, .indSection .indCol:not(.alert) { fill: var(--accent); }
.indSection .indCol:not(.alert):hover { opacity: .85; }
.indStat.withRing { display: grid; grid-template-columns: 54px 1fr; column-gap: 10px; align-items: center; }
.indStat.withRing > :not(svg) { grid-column: 2; }
.indRing { grid-row: 1 / span 3; width: 54px; height: 54px; }
.indRingTrack { fill: none; stroke: #ffffffaa; stroke-width: 4; }
.indRingFill { fill: none; stroke-width: 4; stroke-linecap: round; }
.indRing.r-good .indRingFill { stroke: var(--positive); }
.indRing.r-warn .indRingFill { stroke: #d99a1e; }
.indRing.r-bad .indRingFill { stroke: var(--negative); }
.indFirms button.selected { background: var(--sidebar); }

/* Adiantamentos de alimentação: cartões no painel do Financeiro */
.financeAdvances { display: grid; gap: 10px; margin-bottom: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid #d4710f; border-radius: var(--radius); }
.advHead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.advHead h2 { margin: 0 auto 0 0; font-size: 17px; }
.advSum { padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.advSum.wait { background: var(--warning-bg); color: var(--warning); }
.advSum.ok { background: var(--positive-bg); color: var(--positive); }
.advGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.advCard { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-left: 4px solid #d99a1e; border-radius: 8px; background: var(--warning-bg); }
.advCard.late { border-left-color: var(--negative); background: var(--negative-bg); }
.advCard.ok { border-left-color: var(--positive); background: var(--positive-bg); }
.advCard h4 { margin: 0; font-size: 14px; }
.advCard p { margin: 0; font-size: 13px; }
.advTop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.advTop strong { font-size: 18px; }
.advTag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warning-bg); color: var(--warning); }
.advTag.ok { background: var(--positive-bg); color: var(--positive); }
.advCard.late .advTag { background: #fff; color: var(--negative); }
.advCard.ok .advTag { background: #fff; }
.advActions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.advPaid > summary { cursor: pointer; font-weight: 600; color: var(--positive); margin: 4px 0 8px; }
.advanceStatus { display: grid; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.advanceStatus label { display: flex; gap: 6px; align-items: baseline; font-weight: 500; }
@media (max-width: 650px) { .advGrid { grid-template-columns: 1fr; } .financeAdvances { padding: 12px; } }
.advanceFlow { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--warning-bg); color: var(--warning); font-size: 13px; }
.financeDaily { border-top-color: #7a4fd0; }

/* Monitoramento dos usuários (Admin) */
.monitorPanel { display: grid; gap: 14px; padding-bottom: 24px; }
.monBar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.monBar label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.monBar p { margin: 0 0 6px auto; font-size: 13px; }
.monSection { padding: 0 0 4px; }
.monHead { padding: 14px 16px 8px; }
.monHead h3 { margin: 0; font-size: 17px; color: var(--accent); }
.monHead small { color: var(--muted); }
.monUsers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 0 16px 14px; }
.monUser { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--accent-bg); cursor: pointer; }
.monUser.idle { background: var(--canvas); border-left-color: var(--border); opacity: .8; }
.monUser.selected { outline: 2px solid var(--accent); }
.monUser p { margin: 0; font-size: 13px; color: var(--muted); }
.monUser p b { color: var(--ink); font-weight: 600; }
.monUserTop { display: flex; align-items: center; gap: 10px; }
.monUserTop small { display: block; color: var(--muted); font-size: 12px; }
.monAvatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.monUser.idle .monAvatar { background: var(--muted); }
.monCount { margin-left: auto; font-size: 22px; color: var(--accent); }
.monChips { display: flex; flex-wrap: wrap; gap: 4px; }
.monChips.big .monChip { font-size: 13px; padding: 4px 10px; }
.monChip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #eef1f4; color: var(--ink); white-space: nowrap; }
.monChip.a-orders { background: #e6f0fd; color: #1d4f9e; }
.monChip.a-ship { background: #e8f6ee; color: #087c48; }
.monChip.a-trip { background: #fdf1e4; color: #a3530a; }
.monChip.a-buy { background: #f2edfc; color: #5d3aa6; }
.monChip.a-mach { background: #e5f6f6; color: #0f6f73; }
.monChip.a-impr { background: #fdeef6; color: #a3306b; }
.monChip.a-req { background: #fff8e5; color: #93600a; }
.monChip.a-access { background: #eef1f4; color: #4b5b70; }
.monTimeline { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 2px; }
.monDay { margin: 10px 0 4px; font-weight: 700; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.monEvent { display: grid; grid-template-columns: 86px 150px 1fr; gap: 10px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.monEvent time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.monEvent .monChip { justify-self: start; }
.monEvent small { display: block; color: var(--muted); font-size: 12px; }
.monEvent.system { opacity: .7; }
.monTimes { color: var(--accent); }
@media (max-width: 650px) {
  .monEvent { grid-template-columns: 64px 1fr; }
  .monEvent > div { grid-column: 1 / -1; }
  .monUsers { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .monTimeline { padding: 0 12px 12px; }
}

/* Painel do Financeiro unificado */
.finCockpit { display: grid; gap: 12px; margin-bottom: 16px; }
.finTiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.finTile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); border-top: 4px solid var(--brand); background: var(--surface); }
.finTile span { font-size: 13px; font-weight: 600; color: var(--muted); }
.finTile strong { font-size: 24px; line-height: 1.2; color: var(--ink); }
.finTile small { font-size: 12px; color: var(--muted); }
.finTile.t-in { border-top-color: #2458b8; background: #eaf1fc; }
.finTile.t-in strong { color: #1d4f9e; }
.finTile.t-repass { border-top-color: #d4710f; background: #fdf1e4; }
.finTile.t-out { border-top-color: #d99a1e; background: var(--warning-bg); }
.finTile.t-daily { border-top-color: #7a4fd0; background: #f2edfc; }
.finTile.t-late { border-top-color: var(--negative); background: var(--negative-bg); }
.finTile.t-late strong { color: var(--negative); }
.finTile.t-ok { border-top-color: var(--positive); }
.finTile.t-ok strong { color: var(--positive); }
.finTodoHead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.finTodoHead h2 { margin: 0; font-size: 17px; }
.finTodoHead h2 span { display: inline-block; min-width: 24px; padding: 0 8px; margin-left: 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; text-align: center; }
.finGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.finCard { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--border); border-left: 5px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.finCard h4 { margin: 2px 0 0; font-size: 14px; line-height: 1.3; }
.finCard p { margin: 0; font-size: 13px; color: var(--muted); }
.finCard p b { color: var(--ink); }
.finCard .advActions { margin-top: auto; padding-top: 6px; }
.finCardTop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.finCardTop strong { font-size: 18px; white-space: nowrap; }
.finKind { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.finCard.c-pay { border-left-color: #d99a1e; } .finCard.c-pay .finKind { background: var(--warning-bg); color: var(--warning); }
.finCard.c-late { border-left-color: var(--negative); } .finCard.c-late .finKind { background: var(--negative-bg); color: var(--negative); } .finCard.c-late strong { color: var(--negative); }
.finCard.c-daily { border-left-color: #7a4fd0; } .finCard.c-daily .finKind { background: #f2edfc; color: #5d3aa6; }
.finCard.c-repass { border-left-color: #d4710f; } .finCard.c-repass .finKind { background: #fdf1e4; color: #a3530a; }
.finEmpty { padding: 12px; background: var(--positive-bg); color: var(--positive); border-radius: 8px; margin: 0; }
.finPaidList { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.finPaidList li { padding: 6px 10px; border-radius: 6px; background: var(--positive-bg); }
.finOrdersToggle { display: flex; justify-content: flex-end; }
@media (max-width: 650px) { .finTiles { grid-template-columns: 1fr 1fr; } .finTile strong { font-size: 18px; } .finGrid { grid-template-columns: 1fr; } }

/* Comprovantes dos gastos da viagem */
.tripReceipts { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.tripReceipts h3 { margin: 0; }
.receiptAdd { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px; border-radius: 8px; background: var(--canvas); }
.receiptAdd label { display: grid; gap: 2px; font-size: 13px; }
.receiptAdd select { min-width: 220px; max-width: 100%; }
.receiptPick { position: relative; padding: 8px 14px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
.receiptPick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.receiptGroup h4 { margin: 6px 0; font-size: 13px; color: var(--muted); }
.receiptGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.receiptItem { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.receiptItem img, .receiptPdf { display: block; width: 100%; height: 110px; object-fit: cover; }
.receiptPdf { display: grid; place-items: center; background: var(--negative-bg); color: var(--negative); font-weight: 800; font-size: 20px; }
.receiptItem figcaption { display: grid; gap: 2px; padding: 6px; font-size: 12px; }
.receiptItem figcaption a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receiptItem small { color: var(--muted); }
.receiptCount { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--canvas); font-size: 12px; font-weight: 600; color: var(--ink); }
.advPix { justify-self: start; margin-top: 4px; }

/* Painel: seletor de visão e "Mês a mês" */
.productionPanel .panelModeBar { grid-column: 1 / -1; display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.panelModeBar button { border: 0; border-radius: 999px; background: transparent; padding: 7px 18px; font-weight: 700; color: var(--muted); }
.panelModeBar button.selected { background: var(--sidebar); color: #fff; }
.productionPanel.monthMode { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* Fila "Próximos a entrar" (Por filial) aparece inteira, sem rolagem escondida dentro do cartão */
body[data-view=today] .productionStage.next > .operationList { max-height: none; overflow: visible; }
.tlSummary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tlSum { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); }
.tlSum b { font-size: 22px; color: var(--ink); }
.tlSum.s-late { background: var(--negative-bg); border-color: #f3c3cc; } .tlSum.s-late b { color: var(--negative); }
.tlSum.s-now { background: #fdf1e4; border-color: #f2d3ad; } .tlSum.s-now b { color: #a3530a; }
.tlSum.s-run { background: var(--positive-bg); } .tlSum.s-run b { color: var(--positive); }
.tlSum.s-next { background: #eaf1fc; } .tlSum.s-next b { color: #1d4f9e; }
.tlLegend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tlLegend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.tlLegend .lg-ltm { background: var(--brand); } .tlLegend .lg-euro { background: var(--eurocer); margin-left: 6px; }
.tlBoard { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; align-items: start; }
.tlCol { scroll-snap-align: start; display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 12px; background: #eef2f5; border-top: 4px solid #9aa8b8; min-height: 140px; }
.tlCol header h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.tlCol header h3 span { min-width: 28px; padding: 1px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; text-align: center; }
.tlCol header small { color: var(--muted); font-size: 12px; }
.tlCol.col-late { background: #fff1f3; border-top-color: var(--negative); } .tlCol.col-late h3 { color: var(--negative); } .tlCol.col-late h3 span { background: var(--negative); }
.tlCol.col-now { background: #fdf6ec; border-top-color: #d4710f; } .tlCol.col-now h3 span { background: #d4710f; }
.tlCol.col-later, .tlCol.col-none { background: #f4f5f7; }
.tlList { display: grid; gap: 8px; }
.tlEmpty { margin: 0; padding: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.tlCard { display: grid; gap: 3px; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--ltm); box-shadow: 0 1px 2px #17212f0d; cursor: pointer; }
.tlCard:hover, .tlCard:focus-visible { border-color: var(--brand-strong); box-shadow: 0 3px 10px #17212f1a; outline: none; }
.tlCard.tl-euro { border-left-color: var(--eurocer); }
.tlCard.tl-none { border-left-color: #9aa8b8; }
.tlCard.late { background: #fffafb; border-color: #f3c3cc; }
.tlTop { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tlDay { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--muted); text-transform: lowercase; }
.tlDay b { font-size: 20px; color: var(--ink); }
.tlCard.late .tlDay b { color: var(--negative); }
.tlState { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef1f4; color: var(--ink); white-space: nowrap; }
.tlCard.st-run .tlState { background: var(--positive-bg); color: var(--positive); }
.tlCard.st-next .tlState { background: #eaf1fc; color: #1d4f9e; }
.tlCard.st-ready .tlState { background: #f2edfc; color: #5d3aa6; }
.tlClient { font-size: 15px; line-height: 1.25; }
.tlEquip { color: var(--muted); font-size: 12px; line-height: 1.3; }
.tlLate { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--negative); }
.tlSoon { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: #a3530a; }
.tlChips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tlChip { padding: 1px 7px; border-radius: 6px; font-size: 11px; background: #f1f3f6; color: var(--muted); }
.tlChip b { color: var(--ink); font-weight: 600; }
.tlChip.ok { background: var(--positive-bg); } .tlChip.ok b { color: var(--positive); }
.tlChip.warn { background: var(--warning-bg); } .tlChip.warn b { color: var(--warning); }
.tlMeta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.tlUrgent { color: var(--negative); }
@media (max-width: 760px) {
  .tlBoard { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; }
  .tlCol { min-height: 0; }
  .tlCol header { position: sticky; top: 0; z-index: 2; background: inherit; padding-bottom: 4px; }
  .tlLegend { margin-left: 0; width: 100%; }
  .tlSum { padding: 6px 10px; } .tlSum b { font-size: 18px; }
}
.tlScroll { display: inline-flex; gap: 4px; margin-left: auto; }
.tlScroll button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 12px; }
.tlScroll + .tlLegend { margin-left: 8px; }
@media (max-width: 760px) { .tlScroll { display: none; } .tlScroll + .tlLegend { margin-left: 0; } }

/* Painel mês a mês: filial sempre escrita (não só pela cor) */
.tlBranches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tlBranches button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); font-size: 17px; font-weight: 800; color: var(--ink); }
.tlBranches button b { min-width: 34px; padding: 2px 10px; border-radius: 999px; background: #eef1f4; font-size: 15px; text-align: center; }
.tlBranches .b-ltm { border-color: color-mix(in srgb, var(--ltm) 40%, #fff); color: var(--ltm); } .tlBranches .b-ltm b { background: color-mix(in srgb, var(--ltm) 12%, #fff); color: var(--ltm); }
.tlBranches .b-euro { border-color: color-mix(in srgb, var(--eurocer) 40%, #fff); color: var(--eurocer); } .tlBranches .b-euro b { background: color-mix(in srgb, var(--eurocer) 12%, #fff); color: var(--eurocer); }
.tlBranches .b-all.selected { background: var(--sidebar); border-color: var(--sidebar); color: #fff; }
.tlBranches .b-ltm.selected { background: var(--ltm); border-color: var(--ltm); color: #fff; }
.tlBranches .b-euro.selected { background: var(--eurocer); border-color: var(--eurocer); color: #fff; }
.tlBranches button.selected b { background: #ffffff33; color: #fff; }
.tlLane { display: grid; gap: 8px; }
.tlLane + .tlLane { margin-top: 6px; }
.tlLane h4 { margin: 0; display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .03em; }
.tlLane h4 span { padding: 0 8px; border-radius: 999px; background: #ffffff38; font-size: 13px; }
.tlLane.b-ltm h4 { background: var(--ltm); }
.tlLane.b-euro h4 { background: var(--eurocer); }
.tlLane.b-none h4 { background: #8592a3; }
.tlLane .tlEmpty { padding: 4px; }
.tlBranch { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #8592a3; }
.tlBranch.b-ltm { background: var(--ltm); }
.tlBranch.b-euro { background: var(--eurocer); }
.tlTop { flex-wrap: wrap; }
.tlTop .tlDay { margin-right: auto; }
@media (max-width: 760px) { .tlBranches button { padding: 10px; font-size: 14px; flex-direction: column; } }

/* Compras: valor unitário (protótipo) e botão beta */
.buyTable .bPrice { min-width: 120px; text-align: right; white-space: nowrap; }
.buyPrice { width: 110px; text-align: right; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.buyTotal { color: var(--positive); }
.betaButton { opacity: .65; cursor: not-allowed; }
.betaTag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #f2edfc; color: #5d3aa6; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
@media (max-width: 650px) { .buyTable .bPrice { grid-area: auto; text-align: left; } }

/* Clientes: ficha fiscal, pedidos ligados e carga de cada expedição */
.clientsPanel .cliActions { display: flex; gap: 8px; align-items: flex-end; flex: 0 1 auto; }
.cliCard .equipment { overflow-wrap: anywhere; }
.cliOrders { display: grid; gap: 8px; }
.cliOrder { border: 1px solid var(--line, #d7dde3); border-radius: 8px; padding: 8px; display: grid; gap: 4px; }
.cliOrderHead { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; }
.cliOrderHead span { color: #475467; flex: 1 1 160px; }
.cliLoad { display: grid; gap: 2px; font-size: 12px; padding: 4px 0 0; border-top: 1px dashed #eef1f4; }
.cliLoad small { color: #475467; }
#cliForm { display: grid; gap: 8px; }
#cliImportDialog { display: grid; gap: 8px; }
#cliImportDialog:not([open]) { display: none; }
.shipFiscal summary { cursor: pointer; font-weight: 600; width: 100%; }
.shipFiscal div { display: grid; gap: 2px; width: 100%; }
.shipCargo { color: #05603a; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cliOrderHead span, :root:not([data-theme="light"]) .cliLoad small { color: #c9d1d9; }
  :root:not([data-theme="light"]) .shipCargo { color: #6ee7a8; }
}
:root[data-theme="dark"] .cliOrderHead span, :root[data-theme="dark"] .cliLoad small { color: #c9d1d9; }
:root[data-theme="dark"] .shipCargo { color: #6ee7a8; }

/* Painel: cores das filiais escolhidas por cada usuário (guardadas no navegador) e botão Pronto */
.tlColors { position: relative; margin-left: auto; }
.tlColors summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; background: var(--surface); }
.tlColors summary::-webkit-details-marker { display: none; }
.tlColorsBox { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 8px; min-width: 220px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px #17212f26; }
.tlColorsBox label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.tlColorsBox input[type=color] { width: 48px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; }
.panelModeBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tlReady { justify-self: start; margin-top: 4px; min-height: 30px; padding: 4px 12px; font-size: 12px; font-weight: 700; border-radius: 999px; border: 1px solid #05603a; background: #e3f4ea; color: #05603a; cursor: pointer; }
.tlReady:hover { background: #05603a; color: #fff; }
/* Cabeçalho do mês: largura total da coluna, nome e contagem na mesma linha */
.tlCol > header { display: grid !important; gap: 2px; width: auto !important; margin: 0 0 8px !important; padding: 10px 12px !important; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); text-align: left !important; }
.tlCol > header h3 { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 16px; white-space: nowrap; }
.tlCol > header h3 span { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: #17212f; color: #fff; font-size: 12px; text-align: center; }
.tlCol > header small { display: block; font-size: 11px; color: #667085; white-space: normal; }
/* Cores das filiais valem para o sistema inteiro (variáveis --ltm e --eurocer, escolhidas por usuário no Painel) */
.ordercard.branchLtm, .branchLtm.ordercard { border-left-color: var(--ltm) !important; }
.ordercard.branchEuro { border-left-color: var(--eurocer) !important; }
.companychip, .branchLtm .companychip { color: var(--ltm); background: color-mix(in srgb, var(--ltm) 12%, #fff); }
.companychip.eurocer, .branchEuro .companychip { color: var(--eurocer); background: color-mix(in srgb, var(--eurocer) 12%, #fff); }
.branchLtm .branchHeading, .branchLtm > h2 { background: color-mix(in srgb, var(--ltm) 12%, #fff); color: var(--ltm); }
.branchEuro .branchHeading, .branchEuro > h2 { background: color-mix(in srgb, var(--eurocer) 12%, #fff); color: var(--eurocer); }
.branchEuro .branchHeading h2, .branchEuro .eyebrow { color: var(--eurocer); }
.branchLtm .branchHeading h2, .branchLtm .eyebrow { color: var(--ltm); }
.tlLegend .lg-ltm { background: var(--ltm); }
/* Etiquetas de filial em qualquer aba (marcadas por timeline.js pelo texto) */
[data-co="ltm"].companychip { color: var(--ltm); background: color-mix(in srgb, var(--ltm) 12%, #fff); }
[data-co="eurocer"].companychip { color: var(--eurocer); background: color-mix(in srgb, var(--eurocer) 12%, #fff); }
.indFirms button[data-co="ltm"].selected { background: var(--ltm); border-color: var(--ltm); color: #fff; }
.indFirms button[data-co="eurocer"].selected { background: var(--eurocer); border-color: var(--eurocer); color: #fff; }
.indFirms button[data-co="ltm"]:not(.selected) { color: var(--ltm); }
.indFirms button[data-co="eurocer"]:not(.selected) { color: var(--eurocer); }
.indSection.sec-capacidade { --accent: var(--eurocer); --accent-bg: color-mix(in srgb, var(--eurocer) 12%, #fff); }
.productionStage.next .productionStageHeading h3 b { color: var(--eurocer); background: color-mix(in srgb, var(--eurocer) 12%, #fff); }
.branchLtm.ordercard, .ordercard.branchLtm, .productionlane.branchLtm { border-color: var(--ltm); }
.productionlane.branchEuro { border-color: var(--eurocer); }
.projectQueueHead { border-top-color: var(--ltm) !important; }
/* Ata da reunião */
#minutesDialog form { display: grid; gap: 8px; }
.minParts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
@media (max-width: 600px) { .minParts { grid-template-columns: 1fr; } }

/* Ata da reunião: uma folha A4, preto e branco. Mesmas regras na medição (fora da tela) e na impressão. */
.minMeasure { position: absolute; left: -9999px; top: 0; width: 192mm; visibility: hidden; pointer-events: none; }
.minDoc { font: 7.4pt/1.28 Arial, Helvetica, sans-serif !important; color: #000 !important; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.minDoc * { box-sizing: border-box; }
.minDoc .minHead { display: flex !important; align-items: center; gap: 5mm; padding-bottom: 1.6mm !important; border-bottom: .8mm solid #000 !important; }
.minDoc .printLogo { display: block; width: 28mm !important; max-width: 28mm !important; height: auto; filter: grayscale(1); }
.minDoc .minHead span { font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; }
.minDoc .minHead h1 { font-size: 13pt !important; line-height: 1.15 !important; margin: .3mm 0 .6mm !important; color: #000 !important; }
.minDoc .minHead p { margin: 0 !important; font-size: 7.6pt; }
.minDoc .minLegend { margin: 1.2mm 0 0 !important; padding: .8mm 1.5mm !important; border: .25mm solid #000; font-size: 6.6pt !important; line-height: 1.6; }
.minDoc .minSec { margin: 0; break-inside: avoid; }
.minDoc h2 { display: flex !important; justify-content: space-between; align-items: baseline; gap: 2mm; margin: 2.2mm 0 .8mm !important; padding: 0 0 .5mm !important; border: 0 !important; border-bottom: .45mm solid #000 !important; font-size: 8.4pt !important; line-height: 1.2 !important; color: #000 !important; text-transform: uppercase; letter-spacing: .03em; }
.minDoc h2 span, .minDoc h3 span { font-size: 7.4pt; padding: 0 1.4mm; border: .25mm solid #000; border-radius: 1mm; }
.minDoc h3 { display: flex; justify-content: space-between; margin: 1.6mm 0 .5mm !important; padding: 0 0 .3mm !important; border-bottom: .25mm solid #000; font-size: 7.8pt !important; color: #000 !important; }
.minDoc h2.band { padding: .8mm 1.6mm !important; margin-top: 2.4mm !important; }
.minDoc h2.band.ltm { background: #000 !important; color: #fff !important; border: .45mm solid #000 !important; }
.minDoc h2.band.ltm span { border-color: #fff; }
.minDoc h2.band.euro { background: #fff !important; color: #000 !important; border: 1mm double #000 !important; }
.minDoc h2.band.none { background: #fff !important; color: #000 !important; border: .45mm dashed #000 !important; }
.minDoc table { width: 100% !important; border-collapse: collapse !important; table-layout: fixed !important; font-size: 6.9pt !important; margin: 0 0 .6mm !important; }
.minDoc th { padding: .35mm .8mm !important; text-align: left !important; font-size: 6.2pt !important; font-weight: 700 !important; text-transform: uppercase; border-bottom: .3mm solid #000 !important; background: #fff !important; color: #000 !important; }
.minDoc td { padding: .45mm .8mm !important; vertical-align: top !important; border: 0 !important; border-bottom: .15mm solid #9a9a9a !important; overflow-wrap: anywhere; color: #000 !important; }
.minDoc tr.late td { font-weight: 700; }
.minDoc tr.late td:first-child { border-left: .9mm solid #000 !important; }
.minDoc tr.minMore td { font-style: italic; color: #444 !important; border-bottom: 0 !important; }
.minDoc small { font-size: 6.2pt; color: #333; }
.minDoc small.eq { display: block; font-size: 6.1pt; color: #333; }
.minDoc col.w6 { width: 6%; } .minDoc col.w12 { width: 12%; } .minDoc col.w13 { width: 13%; } .minDoc col.w14 { width: 14%; } .minDoc col.w16 { width: 16%; }
.minDoc col.w18 { width: 18%; } .minDoc col.w20 { width: 20%; } .minDoc col.w22 { width: 22%; } .minDoc col.w24 { width: 24%; } .minDoc col.w25 { width: 25%; }
.minDoc col.w26 { width: 26%; } .minDoc col.w30 { width: 30%; } .minDoc col.w36 { width: 36%; } .minDoc col.w40 { width: 40%; } .minDoc col.w43 { width: 43%; }
.minDoc col.w44 { width: 44%; } .minDoc col.w46 { width: 46%; } .minDoc col.w54 { width: 54%; } .minDoc col.w58 { width: 58%; } .minDoc col.w60 { width: 60%; } .minDoc col.w64 { width: 64%; }
.minDoc .mkLtm, .minDoc .mkEuro, .minDoc .mkNone { display: inline-block; padding: 0 .8mm; font-size: 6pt; font-weight: 800; line-height: 1.35; border-radius: .6mm; letter-spacing: .04em; }
.minDoc .mkLtm { background: #000; color: #fff; border: .25mm solid #000; }
.minDoc .mkEuro { background: #fff; color: #000; border: .6mm double #000; }
.minDoc .mkNone { background: #fff; color: #000; border: .25mm dashed #000; }
.minDoc .mk { display: inline-block; min-width: 4.6mm; margin: 0 .35mm .2mm 0; padding: 0 .5mm; font-style: normal; font-size: 6.2pt; font-weight: 700; text-align: center; border: .2mm solid #000; border-radius: .6mm; line-height: 1.35; }
.minDoc .mk.ok { background: #fff; color: #000; }
.minDoc .mk.warn { background: #000; color: #fff; }
.minDoc .mk.off { background: #fff; color: #777; border-color: #aaa; }
.minDoc .minTiles { display: grid; grid-template-columns: repeat(5, 1fr) 1.2fr; gap: 1.2mm; margin: 1.6mm 0 0; }
.minDoc .minTiles span { padding: .7mm 1.2mm; border: .25mm solid #000; font-size: 6.4pt; line-height: 1.2; }
.minDoc .minTiles span b { display: block; font-size: 11pt; }
.minDoc .minTiles span.hot { background: #000; color: #fff; }
.minDoc .minTiles .minSplit { font-size: 6.8pt; line-height: 1.55; }
.minDoc .minCols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4mm; align-items: start; }
.minDoc .minCols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 3mm; }
.minDoc .minAgenda { margin: 0 !important; padding: 0 !important; list-style: none; columns: 2; column-gap: 5mm; }
.minDoc .minAgenda li { padding: .4mm 0; border-bottom: .15mm solid #9a9a9a; break-inside: avoid; font-size: 7.4pt; }
.minDoc .minAgenda li span { font-size: 8pt; margin-right: .5mm; }
.minDoc .minEmpty { margin: 0 0 .8mm !important; font-style: italic; color: #444; }
.minDoc .minNotes { margin: 0 0 .6mm; }
.minDoc .minLine { height: 5mm; border-bottom: .25mm solid #000; }
.minDoc tr.minBlank td { height: 5.6mm; border-bottom: .25mm solid #000 !important; }
.minDoc .minClose { display: grid; grid-template-columns: auto 1fr; gap: 4mm; align-items: end; margin-top: 2.4mm; }
.minDoc .minClose p { margin: 0; font-size: 7.6pt; }
.minDoc .minSigns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6mm 5mm; }
.minDoc .minSign span { display: block; height: 5.5mm; border-bottom: .25mm solid #000; }
.minDoc .minSign small { display: block; margin-top: .3mm; font-size: 6.2pt; }
.minDoc .minFoot { margin-top: 2mm; padding-top: .6mm; border-top: .2mm solid #000; font-size: 6pt; color: #333; }
.minDoc .minTiles { grid-template-columns: repeat(5, 1fr) 1.6fr !important; }
.minDoc .minTiles span strong { display: block; font-size: 10.5pt; line-height: 1.1; }
.minDoc .minTiles .minSplit { display: flex; flex-wrap: wrap; align-items: center; gap: .6mm 1.2mm; }
.minDoc .minTiles .minSplit strong { display: inline; font-size: 9pt; margin-right: 1mm; }
.minDoc .mks { display: flex; flex-wrap: nowrap; gap: .3mm; }
.minDoc .mks .mk { min-width: 0; margin: 0; padding: 0 .35mm; font-size: 5.8pt; }
.minDoc .minLoose { margin: .4mm 0 0 !important; padding: .6mm 1.2mm; border: .25mm dashed #000; font-size: 6.6pt; line-height: 1.35; }
.minDoc small { display: inline; }
.minDoc small.eq { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minDoc td b { white-space: nowrap; }
.minDoc .minSigns { grid-template-columns: repeat(4, 1fr) !important; }
.minDoc .minTiles span { padding: .5mm 1mm !important; font-size: 6pt !important; }
.minDoc .minLegend[hidden] { display: none !important; }
.minDoc .minKey { display: block; margin-bottom: .6mm; font-size: 6.3pt; color: #000; line-height: 1.5; }
.minDoc td { white-space: normal; }
.minDoc .minQueue td:nth-child(3) b, .minDoc .minQueue td:nth-child(2) { white-space: nowrap; }
.minDoc small, .minDoc small.eq { margin: 0 !important; padding: 0 !important; line-height: 1.22 !important; }
.minDoc b, .minDoc strong { line-height: inherit; }
.minDoc .minTiles .minSplit { flex-wrap: nowrap !important; white-space: nowrap; font-size: 6.4pt !important; }
.minDoc .minTiles .minSplit .mkEuro { border-width: .45mm; }
.minDoc td b { white-space: normal; }
.minDoc .minQueue td:nth-child(3) > b { white-space: nowrap; }

/* Pedidos: projetista designado; gasto por cerâmica; primeiro acesso; informações opcionais */
.projOwner { display: block; margin-top: 4px; font-size: 11px; color: #475467; }
.expenseClient { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #e8eefc; color: #1d4f9e; }
.expenseClient.shared { background: #eef1f4; color: #475467; }
.passwordFirstHint { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fff4e5; color: #7a4a00; font-size: 13px; }
.quickOptional { margin: 8px 0; }
.quickOptional[open] { display: grid; gap: 8px; }
.purchaseLinked[data-note], .tlChip[data-note] { cursor: help; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .projOwner { color: #c9d1d9; }
  :root:not([data-theme="light"]) .passwordFirstHint { background: #3b2a0c; color: #ffd89a; }
}
:root[data-theme="dark"] .projOwner { color: #c9d1d9; }
:root[data-theme="dark"] .passwordFirstHint { background: #3b2a0c; color: #ffd89a; }
.projOwner.none { color: #98a2b3; font-style: italic; }
.projOwner b { font-weight: 700; }
#memberDelete, #expenseDelete { margin-top: 8px; width: 100%; }
.saleDue { margin: 4px 0; padding: 4px 8px; border-radius: 6px; background: #eef4ff; color: #1d4f9e; font-size: 12px; }
.saleDue b { font-size: 13px; }
.saleDue.late { background: #fdecec; color: #b42318; }
/* Ata: margens por dentro da folha (não dependem da opção de margem da impressora) e letra maior */
.minMeasure { width: 210mm !important; }
.minDoc { box-sizing: border-box; padding: 11mm 12mm 10mm !important; font-size: 8.2pt !important; }
.minDoc table { font-size: 7.6pt !important; }
.minDoc th { font-size: 6.6pt !important; }
.minDoc small.eq { font-size: 6.6pt; }
.minDoc h2 { font-size: 9pt !important; }
.minDoc .minLoose { font-size: 7pt; }
.minDoc .minKey { display: inline; margin-right: 3mm; }
/* Ata: larguras de coluna de 1% a 100% (o CSP barra style inline) */
.minDoc col.w1 { width: 1%; }
.minDoc col.w2 { width: 2%; }
.minDoc col.w3 { width: 3%; }
.minDoc col.w4 { width: 4%; }
.minDoc col.w5 { width: 5%; }
.minDoc col.w6 { width: 6%; }
.minDoc col.w7 { width: 7%; }
.minDoc col.w8 { width: 8%; }
.minDoc col.w9 { width: 9%; }
.minDoc col.w10 { width: 10%; }
.minDoc col.w11 { width: 11%; }
.minDoc col.w12 { width: 12%; }
.minDoc col.w13 { width: 13%; }
.minDoc col.w14 { width: 14%; }
.minDoc col.w15 { width: 15%; }
.minDoc col.w16 { width: 16%; }
.minDoc col.w17 { width: 17%; }
.minDoc col.w18 { width: 18%; }
.minDoc col.w19 { width: 19%; }
.minDoc col.w20 { width: 20%; }
.minDoc col.w21 { width: 21%; }
.minDoc col.w22 { width: 22%; }
.minDoc col.w23 { width: 23%; }
.minDoc col.w24 { width: 24%; }
.minDoc col.w25 { width: 25%; }
.minDoc col.w26 { width: 26%; }
.minDoc col.w27 { width: 27%; }
.minDoc col.w28 { width: 28%; }
.minDoc col.w29 { width: 29%; }
.minDoc col.w30 { width: 30%; }
.minDoc col.w31 { width: 31%; }
.minDoc col.w32 { width: 32%; }
.minDoc col.w33 { width: 33%; }
.minDoc col.w34 { width: 34%; }
.minDoc col.w35 { width: 35%; }
.minDoc col.w36 { width: 36%; }
.minDoc col.w37 { width: 37%; }
.minDoc col.w38 { width: 38%; }
.minDoc col.w39 { width: 39%; }
.minDoc col.w40 { width: 40%; }
.minDoc col.w41 { width: 41%; }
.minDoc col.w42 { width: 42%; }
.minDoc col.w43 { width: 43%; }
.minDoc col.w44 { width: 44%; }
.minDoc col.w45 { width: 45%; }
.minDoc col.w46 { width: 46%; }
.minDoc col.w47 { width: 47%; }
.minDoc col.w48 { width: 48%; }
.minDoc col.w49 { width: 49%; }
.minDoc col.w50 { width: 50%; }
.minDoc col.w51 { width: 51%; }
.minDoc col.w52 { width: 52%; }
.minDoc col.w53 { width: 53%; }
.minDoc col.w54 { width: 54%; }
.minDoc col.w55 { width: 55%; }
.minDoc col.w56 { width: 56%; }
.minDoc col.w57 { width: 57%; }
.minDoc col.w58 { width: 58%; }
.minDoc col.w59 { width: 59%; }
.minDoc col.w60 { width: 60%; }
.minDoc col.w61 { width: 61%; }
.minDoc col.w62 { width: 62%; }
.minDoc col.w63 { width: 63%; }
.minDoc col.w64 { width: 64%; }
.minDoc col.w65 { width: 65%; }
.minDoc col.w66 { width: 66%; }
.minDoc col.w67 { width: 67%; }
.minDoc col.w68 { width: 68%; }
.minDoc col.w69 { width: 69%; }
.minDoc col.w70 { width: 70%; }
.minDoc col.w71 { width: 71%; }
.minDoc col.w72 { width: 72%; }
.minDoc col.w73 { width: 73%; }
.minDoc col.w74 { width: 74%; }
.minDoc col.w75 { width: 75%; }
.minDoc col.w76 { width: 76%; }
.minDoc col.w77 { width: 77%; }
.minDoc col.w78 { width: 78%; }
.minDoc col.w79 { width: 79%; }
.minDoc col.w80 { width: 80%; }
.minDoc col.w81 { width: 81%; }
.minDoc col.w82 { width: 82%; }
.minDoc col.w83 { width: 83%; }
.minDoc col.w84 { width: 84%; }
.minDoc col.w85 { width: 85%; }
.minDoc col.w86 { width: 86%; }
.minDoc col.w87 { width: 87%; }
.minDoc col.w88 { width: 88%; }
.minDoc col.w89 { width: 89%; }
.minDoc col.w90 { width: 90%; }
.minDoc col.w91 { width: 91%; }
.minDoc col.w92 { width: 92%; }
.minDoc col.w93 { width: 93%; }
.minDoc col.w94 { width: 94%; }
.minDoc col.w95 { width: 95%; }
.minDoc col.w96 { width: 96%; }
.minDoc col.w97 { width: 97%; }
.minDoc col.w98 { width: 98%; }
.minDoc col.w99 { width: 99%; }
.minDoc col.w100 { width: 100%; }
.minDoc td, .minDoc th { text-align: left !important; }
.minDoc h2.band.ltm span { color: #fff !important; border-color: #fff !important; }

/* Ata da reunião (versão de leitura simples): uma folha A4, preto e branco, letra grande, seções numeradas */
.ataSheet { box-sizing: border-box; padding: 12mm 13mm 10mm; font: 10pt/1.35 Arial, Helvetica, sans-serif; color: #000; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ataSheet * { box-sizing: border-box; }
.ataSheet .ataHead { display: flex; align-items: center; gap: 6mm; padding-bottom: 2mm; border-bottom: 1mm solid #000; }
.ataSheet .printLogo { display: block; width: 32mm; height: auto; filter: grayscale(1); }
.ataSheet h1 { margin: 0; font-size: 18pt; line-height: 1.1; color: #000; }
.ataSheet .ataDay { margin: .5mm 0 1mm; font-size: 13pt; font-weight: 700; }
.ataSheet .ataHead p { margin: 0; }
.ataSheet .ataHint { margin: 1.5mm 0 0; font-size: 8.5pt; color: #333; }
.ataSheet .ataSec { margin-top: 4mm; break-inside: avoid; }
.ataSheet h2 { display: flex; align-items: center; gap: 2.5mm; margin: 0 0 1.8mm; padding: 0 0 1mm; border-bottom: .5mm solid #000; font-size: 12pt; line-height: 1.2; color: #000; }
.ataSheet h2 b { display: inline-flex; align-items: center; justify-content: center; min-width: 7mm; height: 7mm; border-radius: 50%; background: #000; color: #fff; font-size: 11pt; }
.ataSheet h2 small { font-size: 9pt; font-weight: 400; }
.ataSheet h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 1mm; padding: 1mm 2mm; font-size: 11pt; color: #000; }
.ataSheet h3 span { font-size: 9pt; font-weight: 400; }
.ataSheet .ataCols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6mm; align-items: start; }
.ataSheet .ataCols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3mm 5mm; }
.ataSheet .ataCols > .ataSec { margin-top: 4mm; }
.ataSheet .ataBox h3 { border-radius: 1mm; }
.ataSheet .ataBox.ltm h3 { background: #000; color: #fff; }
.ataSheet .ataBox.euro h3 { border: 1mm double #000; }
.ataSheet .ataPerson h3 { padding: .5mm 0; border-bottom: .3mm solid #000; }
.ataSheet .ataList { list-style: none; margin: 0; padding: 0; }
.ataSheet .ataList li { display: flex; gap: 2.5mm; align-items: baseline; padding: 1mm 0; border-bottom: .2mm solid #b5b5b5; }
.ataSheet .ataList li > b, .ataSheet .ataList li > small { display: block; }
.ataSheet .ataList.small li, .ataSheet .ataSec > .ataList li:not(:has(.ataDate)) { display: block; }
.ataSheet .ataList small, .ataSheet .ataWhat small { display: block; font-size: 8.5pt; color: #333; }
.ataSheet .ataDate { flex: 0 0 13mm; font-weight: 700; font-size: 10.5pt; }
.ataSheet .ataWhat { flex: 1 1 auto; min-width: 0; }
.ataSheet .ataWhat b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ataSheet .ataState { flex: 0 0 auto; font-size: 8.5pt; text-align: right; }
.ataSheet .ataList li.late { font-weight: 700; }
.ataSheet .ataList li.late .ataState { text-decoration: underline; }
.ataSheet .ataList.notes li { font-size: 9.5pt; }
.ataSheet .ataList.notes i { font-style: normal; font-size: 8.5pt; }
.ataSheet .ataMore, .ataSheet .ataNone { color: #444; font-style: italic; border-bottom: 0 !important; }
.ataSheet .ataNone { display: block; }
.ataSheet .ataCheck { list-style: none; margin: 0; padding: 0; }
.ataSheet .ataCheck li { padding: 1.2mm 0; border-bottom: .2mm solid #b5b5b5; font-size: 10.5pt; }
.ataSheet .ataCheck li span { font-size: 12pt; margin-right: 2mm; }
.ataSheet .ataLine { height: 7mm; border-bottom: .3mm solid #000; }
.ataSheet .ataFoot { margin-top: 3mm; padding-top: 1mm; border-top: .2mm solid #000; font-size: 7.5pt; color: #333; }
.minMeasure .ataSheet { width: 210mm; }
.ataSheet ul, .ataSheet li, .ataSheet p, .ataSheet h1, .ataSheet h2, .ataSheet h3, .ataSheet small, .ataSheet b { margin-top: 0 !important; margin-bottom: 0 !important; }
.ataSheet small { line-height: 1.25 !important; }
.ataSheet .ataList li { padding: .8mm 0 !important; line-height: 1.25; }
.ataSheet .printLogo { width: 26mm !important; }
.ataSheet h1 { font-size: 16pt !important; }
.ataSheet .ataDay { font-size: 12pt !important; }
.ataSheet .ataList.small li, .ataSheet .ataList.notes li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ataSheet .ataList.small li b, .ataSheet .ataList.small li small { display: inline !important; }
.ataSheet .ataList.small li small::before { content: " — "; }
.ataSheet .ataLine { height: 6.5mm !important; }
.ataSheet .ataWhat small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ataSheet .ataList.notes li > b, .ataSheet .ataList.notes li > i { display: inline !important; }
.ataSheet .ataList li > small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ataSheet .ataCols.three { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 2mm 4mm !important; }
.ataSheet .ataPerson h3 { font-size: 10pt !important; }
.ataSheet .ataList.small li { font-size: 9pt; }
.ataSheet h2 { justify-content: flex-start !important; color: #000 !important; border-bottom: .5mm solid #000 !important; text-align: left !important; }
.ataSheet h2 small { margin-left: 1mm; }
.ataSheet .late, .ataSheet .late * { color: #000 !important; }
.ataSheet h1, .ataSheet h3, .ataSheet .ataDay, .ataSheet .ataHead p { color: #000 !important; }
.ataSheet .ataBox.ltm h3, .ataSheet .ataBox.ltm h3 * { color: #fff !important; }
/* Usuários: abas que a pessoa vê (perfil + liberadas pelo Admin) */
.tabGrants { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0; }
.tabGrants legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.tabGrantList { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; margin: 4px 0 8px; }
#createUserForm .tabGrantList label.shipCheck, .tabGrantList label.shipCheck { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 32px; width: auto; min-width: 0; margin: 0; font-size: 13px; font-weight: 500; }
#createUserForm .tabGrantList label.shipCheck input, .tabGrantList label.shipCheck input { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; }
.tabGrantList label.shipCheck small { display: inline; color: var(--muted); font-size: 11px; font-weight: 400; margin: 0; }
.tabGrants > small { display: block; }
@media (max-width: 600px) { .tabGrantList { grid-template-columns: 1fr 1fr; } }
/* Botão "Instalar o app" (pwa.js) e passo a passo do iPhone */
.account .installApp { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.installSteps { margin: 12px 0; padding-left: 22px; line-height: 1.6; }
