:root {
  --gold: #d6a83d;
  --gold-dark: #9a6d15;
  --black: #151515;
  --soft: #f8f2e5;
  --line: #eadfca;
  --green: #15945a;
  --red: #c93434;
  --yellow: #f2b84b;
  --muted: #777;
  --ice: #fffdf8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214,168,61,.25), transparent 32%),
    linear-gradient(135deg, #fffdf8 0%, #f7f1e7 100%);
  color: var(--black);
  overflow-x: hidden;
}
.app-shell { min-height: 100vh; padding: 20px; }
.topbar {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  padding: 18px 20px; background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: 26px; box-shadow: 0 18px 55px rgba(50,38,12,.09); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 68px; height: 68px; object-fit: contain; border-radius: 20px; background: #fff; padding: 7px; box-shadow: 0 10px 24px rgba(0,0,0,.06); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; letter-spacing: -.7px; }
h2 { font-size: 21px; letter-spacing: -.35px; }
h3 { margin: 16px 0 10px; font-size: 16px; }
p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.eyebrow { font-size: 11px; text-transform: uppercase; color: var(--gold-dark); font-weight: 950; letter-spacing: .1em; }
.top-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 9px; align-items: stretch; }
.stat-card, .status-pill {
  min-width: 104px; border-radius: 18px; border: 1px solid var(--line); background: #fff; padding: 10px 12px; text-align: center;
}
.stat-card strong { display: block; font-size: 24px; line-height: 1; }
.stat-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.status-pill { display: flex; align-items: center; justify-content: center; color: var(--gold-dark); font-weight: 900; }
.bling-config {
  display: grid; grid-template-columns: 1fr minmax(260px, 390px) auto auto; gap: 10px; align-items: center;
  margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.72);
}
input {
  width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; font-size: 15px;
  outline: none; background: #fff;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214,168,61,.16); }
button {
  border: 0; border-radius: 14px; padding: 13px 16px; background: linear-gradient(135deg, #e8c267, #b98520);
  color: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 10px 25px rgba(166,123,31,.22); transition: .16s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.02); }
button.ghost { background: #fff; color: var(--black); border: 1px solid var(--line); box-shadow: none; }
button.dark { background: var(--black); box-shadow: none; }
button.success { background: linear-gradient(135deg, #25b66f, #0b7d45); }
.dashboard { display: grid; grid-template-columns: 350px minmax(420px, 1fr) 430px; gap: 18px; margin-top: 18px; }
.panel {
  background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 26px; padding: 18px;
  min-height: calc(100vh - 188px); box-shadow: 0 18px 55px rgba(50,38,12,.07); overflow: hidden;
}
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.search-row, .scan-box, .actions { display: flex; gap: 8px; margin-bottom: 14px; }
.quick-filters { display: flex; gap: 8px; margin: 0 0 14px; }
.filter-chip { padding: 9px 12px; border-radius: 999px; background: #fff; color: #333; border: 1px solid var(--line); box-shadow: none; font-size: 12px; }
.filter-chip.active { background: var(--black); color: #fff; border-color: var(--black); }
.orders-list, .items-list, .scanned-list { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 325px); overflow: auto; padding-right: 2px; }
.items-list { max-height: calc(100vh - 330px); }
.scanned-list { max-height: 240px; }
.order-card, .item-card, .scan-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: #fff; transition: .15s;
}
.order-card { cursor: pointer; position: relative; overflow: hidden; }
.order-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gold); opacity: .65; }
.order-card.urgent::before { background: var(--red); }
.order-card:hover, .order-card.active { border-color: var(--gold); box-shadow: 0 12px 28px rgba(214,168,61,.16); transform: translateY(-1px); }
.order-card strong { font-size: 18px; }
.order-card .client { margin-top: 6px; font-weight: 700; color: #333; }
.meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12px; }
.meta span { background: #faf7f0; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 950; }
.badge.neutral { background: #f2f2f2; color: #555; }
.badge.ok { background: #dff8ec; color: var(--green); }
.badge.warn { background: #fff1d6; color: #9b6500; }
.badge.error { background: #ffe1e1; color: var(--red); }
.progress-area { background: var(--ice); border: 1px solid var(--line); border-radius: 20px; padding: 13px; margin-bottom: 14px; }
.progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.progress-info strong { font-size: 22px; }
.progress-info span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.progress-bar { height: 13px; border-radius: 999px; background: #eee1ca; overflow: hidden; }
.progress-bar div { width: 0%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #23ad69); transition: width .25s ease; }
.item-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; }
.item-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 950; color: var(--gold-dark); }
.item-card.ok { border-color: rgba(23,155,89,.45); background: #f4fff9; }
.item-card.pending { border-color: rgba(242,184,75,.45); }
.item-card.error { border-color: rgba(201,52,52,.55); background: #fff6f6; animation: shake .22s linear 1; }
.code { font-family: Consolas, monospace; color: #555; font-size: 12px; margin-top: 5px; }
.qty { font-weight: 950; font-size: 21px; }
.premium-scan { padding: 10px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg, #fff, #fff7e6); }
.scan-box input { font-size: 25px; font-weight: 900; letter-spacing: .04em; border-width: 2px; }
.alert-box { border-radius: 18px; padding: 14px; margin-bottom: 14px; font-weight: 950; min-height: 48px; display: flex; align-items: center; }
.alert-box.muted { background: #f3f3f3; color: #666; }
.alert-box.ok { background: #dff8ec; color: var(--green); }
.alert-box.warn { background: #fff1d6; color: #946100; }
.alert-box.error { background: #ffe1e1; color: var(--red); animation: shake .22s linear 1; }
.product-preview { display: grid; grid-template-columns: 66px 1fr; gap: 12px; align-items: center; background: #171717; color: #fff; border-radius: 22px; padding: 14px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(214,168,61,.28); }
.preview-icon { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #e8c267, #9b6c16); font-size: 32px; font-weight: 950; }
.product-preview span { color: #d9bd75; font-size: 11px; text-transform: uppercase; font-weight: 950; letter-spacing: .08em; }
.product-preview strong { display: block; margin: 4px 0; font-size: 18px; }
.product-preview p { color: #ddd; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.summary-grid div { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; }
.summary-grid strong { display: block; font-size: 26px; }
.summary-grid span { font-size: 10px; color: var(--muted); font-weight: 900; text-transform: uppercase; }
.empty-state { color: #888; background: #faf8f3; border: 1px dashed var(--line); border-radius: 18px; padding: 18px; }
.scan-card { display: flex; justify-content: space-between; align-items: center; }
.scan-card.error { border-color: var(--red); background: #fff4f4; }
.screen-flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 50; transition: opacity .22s; }
.screen-flash.ok { background: rgba(21,148,90,.18); opacity: 1; }
.screen-flash.error { background: rgba(201,52,52,.2); opacity: 1; }
@keyframes shake { 0%,100%{ transform: translateX(0)} 35%{ transform: translateX(-5px)} 70%{ transform: translateX(5px)} }
@media (max-width: 1280px) { .dashboard { grid-template-columns: 330px 1fr; } .scan-panel { grid-column: 1 / -1; } }
@media (max-width: 920px) {
  .topbar, .bling-config, .dashboard { grid-template-columns: 1fr; }
  .top-stats { grid-template-columns: repeat(2, 1fr); }
  .panel { min-height: auto; }
  .orders-list, .items-list, .scanned-list { max-height: none; }
}

/* V2 OAuth + conferência lado a lado */
.bling-config { grid-template-columns: 1fr 2fr auto; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); gap: 8px; }
.config-actions { display: grid; grid-template-columns: repeat(2, minmax(130px, auto)); gap: 8px; }
.bling-config small { grid-column: 1 / -1; color: var(--muted); font-weight: 800; padding-left: 4px; }
.dashboard { grid-template-columns: 350px minmax(720px, 1fr); align-items: stretch; }
.work-area { min-width: 0; }
.items-panel { min-height: calc(100vh - 238px); }
.conference-grid { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(350px, 430px); gap: 16px; align-items: start; }
.expected-column, .scan-column { min-width: 0; }
.scan-column { border: 1px solid var(--line); border-radius: 24px; padding: 14px; background: linear-gradient(145deg, #fffdfa, #fff6e5); position: sticky; top: 18px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-title h3 { margin: 0; }
.section-title span { color: var(--gold-dark); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.items-list { max-height: calc(100vh - 405px); }
.scanned-list { max-height: 185px; }
.item-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 13px; }
.item-row.done { background: #f4fff9; border-color: rgba(21,148,90,.4); }
.item-row.partial { background: #fffbef; border-color: rgba(242,184,75,.55); }
.item-row.pending { background: #fff; }
.item-main strong { display: block; font-size: 15px; }
.item-main span { display: block; margin-top: 5px; color: #555; font-family: Consolas, monospace; font-size: 12px; }
.item-main small { display: inline-block; margin-top: 7px; color: var(--gold-dark); background: #fff7e6; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-weight: 850; }
.qty-box { min-width: 82px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); padding: 9px 10px; text-align: center; }
.qty-box span { display: block; font-size: 22px; font-weight: 950; line-height: 1; }
.qty-box b { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.scanned-row { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 9px; }
.scanned-row strong { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); }
.scanned-row.ok strong { color: var(--green); }
.scanned-row.error { background: #fff4f4; border-color: rgba(201,52,52,.45); }
.scanned-row.error strong { color: var(--red); }
.success-badge { background: #dff8ec; color: var(--green); }
.warn-badge { background: #fff1d6; color: #9b6500; }
.preview-icon.good { background: linear-gradient(135deg, #25b66f, #0b7d45); }
.preview-icon.bad { background: linear-gradient(135deg, #e35252, #a81919); }
.scanned-title { margin-top: 10px; }

@media (max-width: 1360px) {
  .conference-grid { grid-template-columns: 1fr; }
  .scan-column { position: static; }
  .items-list { max-height: none; }
}
@media (max-width: 980px) {
  .bling-config, .dashboard, .config-grid, .config-actions { grid-template-columns: 1fr; }
}

/* Ajuste pedido pelo Gilson: configuração Bling oculta em modal e fila compacta */
.top-stats { align-items: center; }
.top-connect {
  min-width: 142px;
  height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--black);
  color: #fff;
  box-shadow: none;
  white-space: nowrap;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(12, 12, 12, .45);
  backdrop-filter: blur(6px);
}
.modal-backdrop.open { display: grid; }
.modal-card.bling-config {
  width: min(860px, 96vw);
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0,0,0,.22);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-head strong { font-size: 20px; }
.modal-head p { margin-top: 5px; color: var(--muted); font-weight: 700; }
.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--black);
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
}
.orders-panel { padding: 18px 14px; }
.orders-list {
  gap: 6px;
  max-height: calc(100vh - 292px);
  padding-right: 6px;
}
.order-card.compact {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px 9px 16px;
  border-radius: 15px;
}
.order-card.compact::before { width: 4px; }
.order-card.compact strong {
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}
.order-card.compact .client {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
  color: #3b3b3b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-card.compact:hover,
.order-card.compact.active {
  transform: none;
  box-shadow: 0 8px 20px rgba(214,168,61,.13);
}
@media (max-width: 980px) {
  .top-connect { width: 100%; }
  .modal-card.bling-config, .config-grid, .config-actions { grid-template-columns: 1fr; }
  .order-card.compact { grid-template-columns: 78px 1fr; }
}

/* Ajuste V2.1 - barra premium compacta + conferência 50/50 */
.app-shell { padding: 14px; }
.topbar {
  min-height: 76px;
  padding: 10px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 236, 178, .78);
  background:
    linear-gradient(135deg, #f7dfa0 0%, #d6a83d 42%, #a97818 100%);
  box-shadow: 0 16px 42px rgba(118, 81, 9, .22);
}
.brand { gap: 12px; }
.brand img {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 20px rgba(40, 25, 2, .18);
}
.topbar .eyebrow { color: #4f3505; letter-spacing: .12em; }
.topbar h1 { font-size: 23px; color: #111; }
.topbar p { display: none; }
.top-stats {
  grid-template-columns: repeat(3, auto) auto;
  gap: 7px;
  align-items: center;
}
.top-stats .stat-card {
  min-width: 84px;
  padding: 7px 10px;
  border-radius: 15px;
  background: rgba(255,255,255,.84);
  border-color: rgba(255,255,255,.55);
  box-shadow: 0 8px 18px rgba(60, 38, 3, .12);
}
.top-stats .stat-card strong { font-size: 19px; }
.top-stats .stat-card span { font-size: 9px; margin-top: 3px; color: #4d3a13; }
.status-pill { display: none !important; }
.top-connect {
  min-width: 146px;
  height: 42px;
  border-radius: 15px;
  background: #111;
  color: #f8d975;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}
.dashboard {
  grid-template-columns: 315px minmax(720px, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.panel {
  border-radius: 22px;
  min-height: calc(100vh - 120px);
}
.orders-panel { padding: 14px 12px; }
.orders-panel .panel-header { margin-bottom: 10px; align-items: center; }
.orders-panel .panel-header h2 { font-size: 19px; }
.orders-panel .panel-header button { padding: 11px 13px; border-radius: 13px; }
.search-row { margin-bottom: 10px; }
.quick-filters { margin-bottom: 10px; }
.orders-list {
  gap: 5px;
  max-height: calc(100vh - 255px);
}
.order-card.compact {
  min-height: 38px;
  padding: 7px 10px 7px 14px;
  grid-template-columns: 76px 1fr;
  border-radius: 13px;
}
.order-card.compact strong { font-size: 14px; }
.order-card.compact .client { font-size: 12px; }
.items-panel { min-height: calc(100vh - 120px); padding: 14px; }
.items-panel .panel-header { margin-bottom: 10px; }
.progress-area {
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 15px;
}
.progress-info { margin-bottom: 5px; }
.progress-info strong { font-size: 17px; }
.progress-info span { font-size: 10px; }
.progress-bar { height: 7px; }
.conference-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.expected-column,
.scan-column {
  min-width: 0;
}
.scan-column {
  position: static;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 12px;
}
.items-list {
  max-height: calc(100vh - 300px);
  gap: 7px;
}
.item-row {
  padding: 9px 10px;
  border-radius: 14px;
}
.item-main strong { font-size: 13px; }
.item-main span { font-size: 11px; margin-top: 3px; }
.item-main small { margin-top: 5px; padding: 3px 7px; font-size: 10px; }
.qty-box { min-width: 68px; padding: 7px 8px; border-radius: 13px; }
.qty-box span { font-size: 18px; }
.qty-box b { font-size: 9px; }
.premium-scan { padding: 8px; border-radius: 18px; }
.scan-box { margin-bottom: 9px; }
.scan-box input { font-size: 19px; padding: 11px 12px; }
.alert-box { padding: 10px 12px; min-height: 40px; margin-bottom: 9px; border-radius: 14px; }
.product-preview {
  grid-template-columns: 48px 1fr;
  gap: 9px;
  padding: 10px;
  border-radius: 17px;
  margin-bottom: 9px;
}
.preview-icon { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
.product-preview strong { font-size: 14px; }
.product-preview p { font-size: 12px; }
.summary-grid { gap: 6px; margin-bottom: 9px; }
.summary-grid div { padding: 8px 5px; border-radius: 14px; }
.summary-grid strong { font-size: 20px; }
.actions { margin-bottom: 8px; }
.scanned-title { margin: 6px 0 8px; }
.scanned-list {
  flex: 1;
  max-height: calc(100vh - 520px);
  min-height: 170px;
  gap: 6px;
}
.scanned-row { padding: 7px; border-radius: 12px; }
.scanned-row strong { width: 30px; height: 30px; border-radius: 10px; }

@media (max-width: 1360px) {
  .conference-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .items-list { max-height: calc(100vh - 300px); }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr; }
  .top-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard, .conference-grid { grid-template-columns: 1fr; }
  .top-connect { width: 100%; }
  .items-list, .scanned-list { max-height: none; }
}


/* Ajuste solicitado: botão Bling dourado, status visual forte nas linhas e título de pedido conferido */
.top-connect,
#connectBlingBtn.dark {
  background: linear-gradient(135deg, #f7d979 0%, #d7a83f 45%, #b98216 100%) !important;
  color: #1b1306 !important;
  border: 1px solid rgba(126, 83, 8, .45) !important;
  box-shadow: 0 10px 24px rgba(190, 136, 28, .32), inset 0 1px 0 rgba(255,255,255,.45) !important;
  font-weight: 950;
}

.top-connect:hover,
#connectBlingBtn.dark:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.item-row.done {
  background: linear-gradient(90deg, rgba(37, 180, 103, .24), rgba(37, 180, 103, .12)) !important;
  border-color: rgba(21, 148, 90, .78) !important;
  box-shadow: inset 5px 0 0 #15945a, 0 8px 18px rgba(21, 148, 90, .10);
}

.item-row.done .qty-box {
  background: #15945a !important;
  color: #fff !important;
  border-color: #15945a !important;
}

.item-row.partial {
  background: linear-gradient(90deg, rgba(242, 184, 75, .32), rgba(255, 247, 221, .92)) !important;
  border-color: rgba(211, 151, 28, .78) !important;
  box-shadow: inset 5px 0 0 #d7a83f, 0 8px 18px rgba(190, 136, 28, .10);
}

.item-row.partial .qty-box {
  background: #fff2c8 !important;
  border-color: rgba(190, 136, 28, .65) !important;
  color: #3a2606 !important;
}

.order-title-complete {
  color: #15945a !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.order-title-complete::after {
  content: '✓';
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #15945a;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(21, 148, 90, .24);
}

.success-badge {
  background: #15945a !important;
  color: #fff !important;
  border-color: #15945a !important;
}

/* Modal operacional de divergência/conclusão */
.conference-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(8, 8, 10, .68);
  backdrop-filter: blur(7px);
}
.conference-modal-backdrop.open { display: grid; }
.conference-modal-card {
  width: min(520px, 96vw);
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 56%, #fff8e8 100%);
  border: 1px solid rgba(218, 165, 32, .38);
  box-shadow: 0 30px 90px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9);
  border-radius: 28px;
  padding: 28px;
  text-align: center;
  animation: modalPop .18s ease-out;
}
.conference-modal-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 44px;
  font-weight: 1000;
  color: #fff;
  background: var(--red);
  box-shadow: 0 18px 38px rgba(207, 45, 45, .28);
}
.conference-modal-backdrop.success .conference-modal-icon {
  background: var(--green);
  box-shadow: 0 18px 38px rgba(22, 130, 78, .28);
}
.conference-modal-content strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  color: #111;
  margin-bottom: 10px;
}
.conference-modal-content p {
  color: #4b4b4b;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.45;
  margin: 0 0 22px;
}
.btn.full { width: 100%; justify-content: center; }
@keyframes modalPop {
  from { transform: scale(.96) translateY(8px); opacity: .2; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Ajuste V2.5 - filtro discreto dos pedidos */
.compact-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
  position: relative;
}
.compact-controls .quick-filters {
  margin: 0;
  flex: 1;
  gap: 8px;
}
.filter-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filter-icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #d7a842, #f3d37c);
  color: #171717;
  border: 1px solid rgba(165, 114, 20, .35);
  box-shadow: 0 8px 22px rgba(173, 122, 31, .22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-icon-btn:hover { transform: translateY(-1px); }
.filter-lines,
.filter-lines::before,
.filter-lines::after {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #171717;
  content: "";
}
.filter-lines { width: 20px; position: relative; }
.filter-lines::before { width: 15px; position: absolute; top: -7px; right: 0; }
.filter-lines::after { width: 10px; position: absolute; top: 7px; right: 0; }
.filter-popover {
  position: absolute;
  right: 0;
  top: 50px;
  z-index: 50;
  width: 255px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(214, 170, 78, .42);
  background: rgba(255, 252, 245, .98);
  box-shadow: 0 18px 50px rgba(44, 33, 13, .18);
  display: none;
}
.filter-popover.open { display: block; }
.filter-popover-head { margin-bottom: 12px; }
.filter-popover-head strong {
  display: block;
  font-size: 16px;
  color: #151515;
}
.filter-popover-head small {
  display: block;
  margin-top: 2px;
  color: #7f725a;
  font-size: 11px;
}
.filter-field { display: grid; gap: 6px; margin-bottom: 10px; }
.filter-field span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: #9b6d12;
}
.filter-field select,
.filter-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(214, 170, 78, .45);
  background: #fff;
  padding: 11px 12px;
  font-weight: 800;
  color: #171717;
  outline: none;
}

.filter-popover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.filter-popover-actions button {
  min-height: 38px;
  border-radius: 13px;
  border: 1px solid rgba(214, 170, 78, .38);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.filter-popover-actions .dark {
  background: linear-gradient(135deg, #191919, #3a2b0f);
  color: #f3d377;
}
.filter-popover-actions .ghost {
  background: #fff;
  color: #6e551b;
}

.filter-popover p {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #8a7a5d;
}
@media (max-width: 900px) {
  .filter-popover { right: auto; left: -210px; }
}

/* Ajuste V2.6 - modal de divergência com foto do bipado x esperado */
.conference-modal-card {
  width: min(760px, 96vw) !important;
}

.conference-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  margin: 18px 0 22px;
  text-align: left;
}

.conference-compare[aria-hidden="true"] {
  display: none;
}

.modal-product-card {
  border-radius: 22px;
  border: 1px solid rgba(220, 190, 132, .75);
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
}

.modal-product-card.bad {
  border-color: rgba(207, 45, 45, .45);
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
}

.modal-product-card.good {
  border-color: rgba(22, 130, 78, .42);
  background: linear-gradient(180deg, #f2fff8 0%, #fff 100%);
}

.modal-product-label {
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a6a12;
  margin: 0 0 8px;
}

.modal-product-body {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: center;
}

.modal-product-photo {
  width: 94px;
  height: 94px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff8e7;
  border: 1px solid rgba(218, 165, 32, .32);
  color: #9b7a38;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.modal-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.modal-product-photo.no-photo {
  background: #f6f1e7;
}

.modal-product-info strong {
  display: block;
  color: #111;
  font-size: 15px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.modal-product-info span,
.modal-product-info small {
  display: block;
  color: #5d5d5d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.modal-product-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  color: #c18b25;
  font-size: 24px;
  font-weight: 1000;
}

.modal-product-empty {
  min-height: 94px;
  display: grid;
  place-items: center;
  color: #777;
  font-weight: 850;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 720px) {
  .conference-compare {
    grid-template-columns: 1fr;
  }
  .modal-product-arrow {
    width: 100%;
    transform: rotate(90deg);
  }
}

/* Ajuste V3.0 - rolagem na lista de produtos esperados no modal */
.conference-modal-card {
  max-height: calc(100vh - 34px) !important;
  overflow: hidden;
}

.conference-modal-content {
  min-height: 0;
}

.modal-products-stack {
  display: grid;
  gap: 12px;
  max-height: min(46vh, 430px);
  overflow-y: auto;
  padding-right: 8px;
  overscroll-behavior: contain;
}

.modal-products-stack::-webkit-scrollbar {
  width: 8px;
}

.modal-products-stack::-webkit-scrollbar-track {
  background: #f4ead4;
  border-radius: 999px;
}

.modal-products-stack::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e4bf5b, #b98518);
  border-radius: 999px;
}

@media (max-width: 720px) {
  .modal-products-stack {
    max-height: 36vh;
  }
}

/* Ajuste V3.1 - carregando divergência antes de exibir fotos */
.conference-modal-backdrop.loading .conference-modal-icon {
  background: linear-gradient(135deg, #d9a63c, #f3d274);
  box-shadow: 0 18px 38px rgba(201, 145, 32, .28);
}

.modal-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, .55);
  border-top-color: #171717;
  display: inline-block;
  animation: modalSpin .8s linear infinite;
}

.modal-spinner.big {
  width: 48px;
  height: 48px;
  border-color: rgba(201, 145, 32, .22);
  border-top-color: #c28b22;
}

.divergence-loading-box {
  grid-column: 1 / -1;
  min-height: 190px;
  border-radius: 24px;
  border: 1px dashed rgba(201, 145, 32, .45);
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: 26px;
}

.divergence-loading-box strong {
  font-size: 18px;
  color: #151515;
  margin: 0;
}

.divergence-loading-box span {
  max-width: 460px;
  color: #6e6250;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.btn.disabled,
.btn:disabled {
  opacity: .72;
  cursor: not-allowed;
  transform: none !important;
}

@keyframes modalSpin {
  to { transform: rotate(360deg); }
}


/* V3.3 - Botão de foto no item do pedido */
.item-main small { display: none !important; }
.item-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(190, 139, 31, .35);
  background: linear-gradient(135deg, #fff8e8, #f4d37a);
  color: #8b5c00;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(190, 139, 31, .12);
}
.item-photo-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.item-photo-btn:active { transform: translateY(0); }


/* V3.4 - Ícone de foto ao lado do nome + modal próprio de foto */
.item-photo-btn { display: none !important; }
.item-title-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  max-width: 100%;
}
.item-title-line strong {
  min-width: 0;
  line-height: 1.18;
  flex: 0 1 auto;
}
.item-photo-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(190, 139, 31, .42);
  background: linear-gradient(135deg, #fffaf0, #f0cf70 60%, #c89222);
  color: #3a2500;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(190, 139, 31, .16);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  flex: 0 0 24px;
  padding: 0;
}
.item-photo-icon-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}
.item-photo-icon-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 8px 18px rgba(190, 139, 31, .22);
}
.item-photo-icon-btn:active { transform: translateY(0); }

.item-photo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(17, 17, 17, .58);
  backdrop-filter: blur(7px);
}
.item-photo-modal-backdrop.show { display: flex; }
.item-photo-modal-card {
  width: min(620px, calc(100vw - 30px));
  max-height: calc(100vh - 34px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(218, 181, 94, .72);
  background:
    radial-gradient(circle at 18% 0%, rgba(226, 181, 69, .16), transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #fff9ed 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.85);
  padding: 18px;
}
.item-photo-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(218, 181, 94, .32);
}
.item-photo-modal-head span {
  display: block;
  color: #9a6708;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 950;
}
.item-photo-modal-head strong {
  display: block;
  margin-top: 5px;
  color: #111;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.08;
}
.item-photo-modal-head small {
  display: block;
  margin-top: 8px;
  color: #5d5548;
  font-family: Consolas, monospace;
  font-weight: 800;
}
.item-photo-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(190, 139, 31, .35);
  background: #fff6df;
  color: #8b5c00;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.item-photo-modal-body {
  padding: 18px 8px 16px;
}
.item-photo-modal-image {
  min-height: min(52vh, 440px);
  border-radius: 24px;
  border: 1px solid rgba(218, 181, 94, .42);
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,247,230,.9));
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.item-photo-modal-image img {
  width: 100%;
  height: min(52vh, 440px);
  object-fit: contain;
  padding: 18px;
}
.item-photo-modal-image span {
  color: #9a6708;
  font-weight: 950;
  background: #fff7df;
  border: 1px solid rgba(218, 181, 94, .42);
  border-radius: 18px;
  padding: 18px 22px;
}
.item-photo-modal-image.no-photo {
  background: repeating-linear-gradient(45deg, #fff9ec, #fff9ec 10px, #fff3d8 10px, #fff3d8 20px);
}

.item-photo-modal-image.loading-photo {
  background: linear-gradient(135deg, #fffdf7, #fff3d5);
}
.item-photo-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #8b5c00;
  text-align: center;
  padding: 26px;
}
.item-photo-loading strong {
  font-size: 20px;
  font-weight: 950;
  color: #111;
}
.item-photo-loading small {
  font-weight: 800;
  color: #6b5a35;
}

/* Busca manual no campo de bipagem */
.scan-box { position: relative; }
.manual-search-panel {
  display: none;
  width: 100%;
  margin: -3px 0 10px;
  border: 1px solid rgba(190, 146, 52, .32);
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 16px 38px rgba(34, 24, 8, .14);
  overflow: hidden;
  max-height: 270px;
  overflow-y: auto;
  position: relative;
  z-index: 20;
}
.manual-search-panel.open { display: block; }
.manual-search-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(214, 176, 94, .22);
  background: linear-gradient(90deg, #fffdf8, #fff8e9);
  padding: 11px 13px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
  transition: .15s ease;
}
.manual-search-item:hover {
  background: linear-gradient(90deg, #fff4d7, #fffaf0);
  transform: translateX(2px);
}
.manual-search-item:last-child { border-bottom: 0; }
.manual-search-name {
  font-size: 13px;
  font-weight: 900;
  color: #171717;
  line-height: 1.2;
}
.manual-search-meta {
  font-size: 11px;
  font-weight: 800;
  color: #9a6a08;
}
.manual-search-empty {
  padding: 12px 13px;
  font-size: 12px;
  font-weight: 800;
  color: #8b7750;
  background: #fffaf0;
}

/* V3.8 - Busca manual integrada à Bling */
.manual-search-section-title {
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a6a08;
  background: linear-gradient(90deg, #fff7e3, #fffdf8);
  border-bottom: 1px solid rgba(214, 176, 94, .18);
}
.manual-search-item {
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
}
.manual-search-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.manual-search-thumb {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(214, 176, 94, .35);
  background: #fff8e7;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #a9780f;
  font-weight: 950;
}
.manual-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.manual-search-thumb.no-photo {
  font-size: 18px;
}
.manual-search-item.bling-result {
  background: linear-gradient(90deg, #fffefb, #f7fffb);
}
.manual-search-loading {
  padding: 13px;
  font-size: 12px;
  font-weight: 900;
  color: #7a5a13;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffaf0;
}
.mini-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(194, 145, 28, .25);
  border-top-color: #c2911c;
  animation: spin .75s linear infinite;
}

/* Ajuste V4.0 - quantidade ao selecionar item na busca manual */
.manual-qty-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 20, 20, .48);
  backdrop-filter: blur(6px);
}
.manual-qty-backdrop.show { display: flex; }
.manual-qty-card {
  width: min(520px, 96vw);
  border-radius: 28px;
  border: 1px solid rgba(218, 165, 32, .42);
  background: linear-gradient(180deg, #fffaf1 0%, #ffffff 100%);
  box-shadow: 0 26px 80px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9);
  padding: 26px;
  position: relative;
}
.manual-qty-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.manual-qty-head span {
  display: block;
  color: #a97712;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.manual-qty-head strong {
  display: block;
  color: #111;
  font-size: 23px;
  line-height: 1.15;
  padding-right: 40px;
}
.manual-qty-head small {
  display: block;
  margin-top: 8px;
  color: #5d5d5d;
  font-size: 13px;
  font-weight: 850;
}
.manual-qty-body {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 12px;
  align-items: center;
  margin: 24px 0 18px;
}
.manual-qty-step {
  height: 62px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #f1cf6d, #c58b18);
  color: #111;
  font-size: 34px;
  line-height: 1;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(190, 134, 24, .24);
}
.manual-qty-input {
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(218, 165, 32, .45);
  background: #fff;
  color: #111;
  font-size: 30px;
  font-weight: 1000;
  text-align: center;
  outline: none;
}
.manual-qty-input:focus {
  border-color: #c58b18;
  box-shadow: 0 0 0 4px rgba(218, 165, 32, .18);
}
.manual-qty-confirm {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #f1cf6d, #c58b18);
  color: #fff;
  font-size: 15px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(190, 134, 24, .25);
}
.manual-qty-confirm:hover,
.manual-qty-step:hover { filter: brightness(1.03); transform: translateY(-1px); }

/* Ajuste V4.2 - carregamento de pedido com layout próprio */
.conference-modal-backdrop.order-loading {
  background: radial-gradient(circle at 50% 40%, rgba(218,165,32,.18), rgba(8,8,10,.72) 56%);
}

.conference-modal-backdrop.order-loading .conference-modal-card {
  width: min(560px, 96vw);
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(145deg, #111 0%, #1f1b12 48%, #fff7df 49%, #ffffff 100%);
  border: 1px solid rgba(218,165,32,.65);
  box-shadow: 0 34px 95px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.16) inset;
  overflow: hidden;
}

.conference-modal-backdrop.order-loading .conference-modal-icon {
  background: linear-gradient(135deg, #d9a63c, #f6d777, #b57a17);
  color: #111;
  width: 72px;
  height: 72px;
  box-shadow: 0 18px 40px rgba(218,165,32,.35);
}

.order-loading-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 3px solid rgba(17,17,17,.78);
  display: grid;
  place-items: center;
  position: relative;
  animation: orderMarkFloat 1.15s ease-in-out infinite;
}
.order-loading-mark span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #111;
  border-left-color: transparent;
  display: block;
  animation: modalSpin .8s linear infinite;
}

.conference-modal-backdrop.order-loading .conference-modal-content strong {
  color: #111;
}

.conference-modal-backdrop.order-loading .conference-modal-content p {
  color: #4a4030;
  margin-bottom: 16px;
}

.conference-modal-backdrop.order-loading #conferenceCompare {
  display: block;
}

.order-loading-panel {
  width: 100%;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), #fff6df);
  border: 1px solid rgba(218,165,32,.44);
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  display: grid;
  gap: 14px;
  text-align: center;
}

.order-loading-card-mini {
  width: 122px;
  height: 86px;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(218,165,32,.55);
  box-shadow: 0 14px 30px rgba(0,0,0,.10);
  display: grid;
  place-items: center;
}

.order-loading-lines {
  display: grid;
  gap: 8px;
  width: 78%;
}
.order-loading-lines i {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(218,165,32,.25), #d9a63c, rgba(218,165,32,.25));
  background-size: 220% 100%;
  animation: orderLineLoad 1s linear infinite;
}
.order-loading-lines i:nth-child(2) { width: 72%; animation-delay: .12s; }
.order-loading-lines i:nth-child(3) { width: 48%; animation-delay: .24s; }

.order-loading-copy strong {
  display: block;
  font-size: 18px;
  color: #141414;
  margin: 0 0 6px;
}
.order-loading-copy span,
.order-loading-panel em {
  color: #6d5a34;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  font-style: normal;
}

.order-loading-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(218,165,32,.18);
  border: 1px solid rgba(218,165,32,.25);
}
.order-loading-progress span {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b77b17, #f2cf67, #b77b17);
  animation: orderProgress 1.25s ease-in-out infinite;
}

@keyframes orderProgress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
@keyframes orderLineLoad {
  0% { background-position: 0 0; opacity: .65; }
  100% { background-position: 220% 0; opacity: 1; }
}
@keyframes orderMarkFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Ajuste V4.3 - loading de pedido minimalista: mostrar somente o miolo */
.conference-modal-backdrop.order-loading {
  background: rgba(0,0,0,.42) !important;
  backdrop-filter: blur(6px);
}

.conference-modal-backdrop.order-loading .conference-modal-card {
  width: min(360px, 90vw) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.conference-modal-backdrop.order-loading .conference-modal-icon,
.conference-modal-backdrop.order-loading .conference-modal-content > strong,
.conference-modal-backdrop.order-loading .conference-modal-content > p {
  display: none !important;
}

.conference-modal-backdrop.order-loading #conferenceCompare {
  display: block !important;
  margin: 0 !important;
}

.conference-modal-backdrop.order-loading .conference-modal-actions {
  display: none !important;
}

.order-loading-panel {
  width: min(360px, 90vw) !important;
  padding: 24px 22px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), #fff7e5) !important;
  border: 1px solid rgba(218,165,32,.52) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.order-loading-card-mini {
  width: 96px !important;
  height: 68px !important;
  border-radius: 18px !important;
}

.order-loading-copy strong {
  font-size: 18px !important;
}

.order-loading-copy span,
.order-loading-panel em {
  font-size: 12px !important;
}

/* V4.4 - Foto do produto sem esticar imagem pequena */
.item-photo-modal-card {
  width: min(720px, calc(100vw - 34px));
}
.item-photo-modal-body {
  padding: 14px 8px 16px;
}
.item-photo-modal-image {
  min-height: 280px;
  max-height: 70vh;
  padding: 18px;
  align-items: center;
  justify-items: center;
}
.item-photo-modal-image img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 66vh;
  padding: 0 !important;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.item-photo-modal-image img[src=""],
.item-photo-modal-image.no-photo img {
  display: none;
}

/* V4.6 - Controle local de pedidos conferidos */
.completed-orders-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #efc85a, #bd8414) !important;
  color: #111 !important;
  border: 1px solid rgba(128, 82, 0, .24) !important;
  box-shadow: 0 10px 22px rgba(189, 132, 20, .22);
}
.completed-orders-btn strong {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  font-size: 12px;
}
.completed-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.56);
  backdrop-filter: blur(7px);
}
.completed-modal-backdrop.show { display: flex; }
.completed-modal-card {
  width: min(780px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(202, 149, 43, .55);
  background: linear-gradient(145deg, #fffdf8, #fff8e9);
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
  padding: 20px;
}
.completed-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 4px 16px;
  border-bottom: 1px solid rgba(202, 149, 43, .28);
}
.completed-modal-head h2 {
  margin: 4px 0 4px;
  font-size: 28px;
  color: #111;
}
.completed-modal-head p {
  margin: 0;
  color: #6b5a39;
  font-weight: 700;
  font-size: 13px;
}
.completed-orders-list {
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 14px 4px 4px;
  display: grid;
  gap: 10px;
}
.completed-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(202, 149, 43, .28);
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 24px rgba(0,0,0,.045);
}
.completed-order-card strong {
  display: block;
  font-size: 18px;
  color: #111;
}
.completed-order-card span {
  display: block;
  margin-top: 3px;
  color: #222;
  font-weight: 800;
}
.completed-order-card small {
  display: block;
  margin-top: 4px;
  color: #7b6a46;
  font-weight: 700;
}
.reopen-order-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(202, 149, 43, .42);
  background: #fff9e8;
  color: #9a6500;
  font-weight: 900;
  cursor: pointer;
}
.reopen-order-btn:hover {
  background: linear-gradient(135deg, #efc85a, #bd8414);
  color: #111;
}

/* V4.8 - Cabeçalho unificado na mesma linha */
.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  min-height: 76px !important;
  padding: 12px 16px !important;
  background: linear-gradient(135deg, #fff8e8 0%, #f4d178 48%, #bb8217 100%) !important;
  border: 1px solid rgba(142, 96, 14, .38) !important;
  box-shadow: 0 14px 38px rgba(111, 72, 6, .18) !important;
}
.topbar .brand {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  gap: 12px !important;
}
.topbar .brand img {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  flex: 0 0 auto !important;
}
.topbar .brand > div {
  min-width: 0 !important;
}
.topbar .eyebrow {
  color: #4b3105 !important;
  font-size: 10px !important;
}
.topbar h1 {
  font-size: 22px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.topbar p { display: none !important; }
.top-stats {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
}
.top-stats .stat-card,
.top-stats .status-pill,
.top-stats .top-connect,
.top-stats .completed-orders-btn {
  height: 48px !important;
  min-width: 92px !important;
  border-radius: 15px !important;
  padding: 7px 10px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  white-space: nowrap !important;
}
.top-stats .stat-card strong { font-size: 18px !important; line-height: 1 !important; }
.top-stats .stat-card span { font-size: 8.5px !important; margin-top: 3px !important; }
.top-stats .top-connect,
.top-stats .completed-orders-btn {
  flex-direction: row !important;
  min-width: 116px !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  background: linear-gradient(135deg, #fff0b5, #d6a83d 48%, #a56f0e) !important;
  color: #151515 !important;
  border: 1px solid rgba(91, 58, 2, .26) !important;
  box-shadow: 0 10px 22px rgba(93, 62, 8, .18) !important;
}
.top-stats .completed-orders-btn strong {
  min-width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
  margin-left: 2px !important;
}
.top-stats .status-pill { display: none !important; }

@media (max-width: 980px) {
  .topbar { overflow-x: auto !important; }
  .top-stats { flex-shrink: 0 !important; }
}

/* V4.9 - Header premium: ações à esquerda dos contadores */
.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
  min-height: 82px !important;
  padding: 14px 18px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.28) 26%, transparent 42%),
    linear-gradient(135deg, #fff9ec 0%, #f6dea0 36%, #d7a43a 70%, #9c6811 100%) !important;
  border: 1px solid rgba(130, 84, 12, .28) !important;
  border-radius: 26px !important;
  box-shadow:
    0 16px 42px rgba(84, 56, 9, .20),
    inset 0 1px 0 rgba(255,255,255,.82),
    inset 0 -1px 0 rgba(115, 70, 5, .18) !important;
  position: relative !important;
  overflow: hidden !important;
}
.topbar::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, rgba(255,255,255,.35), transparent 36%, rgba(255,255,255,.12)) !important;
  pointer-events: none !important;
}
.topbar .brand,
.topbar .top-stats { position: relative !important; z-index: 1 !important; }
.topbar .brand {
  flex: 1 1 auto !important;
  min-width: 250px !important;
  gap: 13px !important;
}
.topbar .brand img {
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  padding: 7px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 10px 24px rgba(70,45,7,.16) !important;
}
.topbar .eyebrow {
  color: #5d3b05 !important;
  font-size: 10px !important;
  letter-spacing: .16em !important;
  font-weight: 950 !important;
}
.topbar h1 {
  color: #111 !important;
  font-size: 23px !important;
  line-height: 1.08 !important;
  font-weight: 950 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.4) !important;
}
.topbar p { display: none !important; }
.top-stats {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 9px !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
}
.top-stats .status-pill { display: none !important; }
.top-stats .completed-orders-btn { order: 1 !important; }
.top-stats #openBlingModalBtn,
.top-stats .top-connect:not(.completed-orders-btn) { order: 2 !important; }
.top-stats .stat-card:nth-of-type(1) { order: 3 !important; }
.top-stats .stat-card:nth-of-type(2) { order: 4 !important; }
.top-stats .stat-card:nth-of-type(3) { order: 5 !important; }
.top-stats .completed-orders-btn,
.top-stats #openBlingModalBtn,
.top-stats .top-connect:not(.completed-orders-btn) {
  height: 50px !important;
  min-width: 134px !important;
  padding: 0 18px !important;
  border-radius: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: -.02em !important;
  color: #16110a !important;
  background: linear-gradient(135deg, #fff3bc 0%, #e7bd4a 44%, #b77b13 100%) !important;
  border: 1px solid rgba(102, 66, 8, .30) !important;
  box-shadow: 0 11px 23px rgba(89, 57, 7, .20), inset 0 1px 0 rgba(255,255,255,.62) !important;
}
.top-stats .completed-orders-btn:hover,
.top-stats #openBlingModalBtn:hover,
.top-stats .top-connect:not(.completed-orders-btn):hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.03) !important;
}
.top-stats .completed-orders-btn strong {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 23px !important;
  height: 23px !important;
  margin-left: 3px !important;
  border-radius: 999px !important;
  color: #7a4b00 !important;
  background: rgba(255,255,255,.82) !important;
  font-size: 12px !important;
  box-shadow: inset 0 0 0 1px rgba(142,91,8,.12) !important;
}
.top-stats .stat-card {
  order: 3 !important;
  width: 98px !important;
  min-width: 98px !important;
  height: 50px !important;
  padding: 6px 8px !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(255,255,255,.70) !important;
  box-shadow: 0 10px 22px rgba(85,54,5,.13), inset 0 1px 0 rgba(255,255,255,.82) !important;
}
.top-stats .stat-card strong {
  color: #151515 !important;
  font-size: 19px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}
.top-stats .stat-card span {
  color: #5a4219 !important;
  font-size: 8.5px !important;
  margin-top: 4px !important;
  letter-spacing: .02em !important;
}
@media (max-width: 1150px) {
  .topbar { overflow-x: auto !important; }
  .topbar .brand { min-width: 230px !important; }
  .top-stats { flex-shrink: 0 !important; }
}

/* V5.1 - Header pastel premium: menos cartonizado, mais suave */
.app-shell {
  padding: 18px;
  background: radial-gradient(circle at 8% 0%, rgba(231, 198, 129, .20), transparent 34%), #fffdf9;
}
.topbar {
  min-height: 94px;
  grid-template-columns: minmax(360px, 1fr) auto;
  padding: 16px 20px;
  border-radius: 24px;
  border: 1px solid rgba(214, 168, 61, .34);
  background:
    linear-gradient(100deg, rgba(255,255,255,.96) 0%, rgba(255,250,239,.92) 35%, rgba(248,224,168,.55) 70%, rgba(244,205,119,.34) 100%);
  box-shadow: 0 18px 46px rgba(116, 82, 20, .10), inset 0 1px 0 rgba(255,255,255,.86);
  overflow: hidden;
  position: relative;
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 42% -70%, rgba(255,255,255,.75), transparent 42%);
  pointer-events: none;
}
.topbar > * { position: relative; z-index: 1; }
.brand { gap: 14px; min-width: 0; }
.brand img {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  padding: 7px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 12px 28px rgba(88, 58, 7, .10);
}
.eyebrow {
  color: #9b6d16;
  letter-spacing: .13em;
  font-size: 10px;
}
h1 { font-size: 24px; letter-spacing: -.55px; }
.top-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-connect,
.status-pill,
.stat-card {
  height: 50px;
  border-radius: 18px;
  border: 1px solid rgba(214,168,61,.28);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(116,82,20,.08), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}
.top-connect,
.status-pill {
  min-width: 132px;
  padding: 0 16px;
  color: #80570f;
  background: rgba(255,255,255,.62);
  border-color: rgba(203, 151, 48, .35);
  font-size: 13px;
  font-weight: 900;
}
.status-pill:first-child,
#showConferidosBtn,
button.top-connect:first-of-type {
  background: linear-gradient(135deg, rgba(238,205,129,.84), rgba(205,147,30,.78));
  color: #19150e;
  border-color: rgba(176, 119, 20, .28);
  box-shadow: 0 12px 28px rgba(173,123,28,.14), inset 0 1px 0 rgba(255,255,255,.55);
}
.status-pill .pill-count,
.status-pill b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #9b6d16;
  box-shadow: inset 0 0 0 1px rgba(214,168,61,.18);
}
.stat-card {
  min-width: 92px;
  padding: 8px 12px;
  text-align: center;
}
.stat-card strong { font-size: 21px; line-height: 1.02; color: #151515; }
.stat-card span { font-size: 9px; margin-top: 4px; color: #6f665b; }
@media (max-width: 1050px) {
  .topbar { grid-template-columns: 1fr; }
  .top-stats { flex-wrap: wrap; justify-content: flex-start; }
}

/* V5.3 - Header original premium: volta ao padrão do primeiro botão Conferidos */
.app-shell {
  padding: 18px;
}
.topbar {
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) auto !important;
  align-items: center !important;
  gap: 22px !important;
  min-height: 92px !important;
  padding: 16px 18px !important;
  background: linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(255,252,244,.96) 52%, rgba(250,239,214,.94) 100%) !important;
  border: 0 !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 42px rgba(36, 30, 18, .08), inset 0 1px 0 rgba(255,255,255,.9) !important;
  overflow: hidden !important;
}
.topbar::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, transparent, #d4a23a, #b98520, transparent) !important;
  opacity: .9 !important;
}
.topbar::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at 15% 0%, rgba(214,168,61,.12), transparent 34%) !important;
  pointer-events: none !important;
}
.brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}
.brand img {
  width: 58px !important;
  height: 58px !important;
  border-radius: 18px !important;
  padding: 7px !important;
  background: rgba(255,255,255,.96) !important;
  border: 1px solid rgba(214,168,61,.14) !important;
  box-shadow: 0 12px 28px rgba(36,30,18,.08) !important;
}
.brand p {
  display: none !important;
}
.eyebrow {
  display: block !important;
  margin-bottom: 3px !important;
  color: #9a6d15 !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .14em !important;
}
h1 {
  font-size: 25px !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -.65px !important;
  color: #141414 !important;
}
.top-stats {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 9px !important;
  min-width: 0 !important;
}
.completed-orders-btn,
#completedOrdersBtn,
.top-connect,
.status-pill,
.stat-card {
  height: 48px !important;
  border-radius: 17px !important;
  transform: none !important;
}
.completed-orders-btn,
#completedOrdersBtn {
  min-width: 132px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(152, 104, 18, .22) !important;
  background: linear-gradient(135deg, #f0c96d 0%, #d6a137 54%, #b98219 100%) !important;
  color: #17120a !important;
  box-shadow: 0 12px 26px rgba(183, 128, 29, .22), inset 0 1px 0 rgba(255,255,255,.45) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}
.completed-orders-btn strong,
#completedOrdersBtn strong {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 22px !important;
  height: 22px !important;
  margin-left: 8px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.92) !important;
  color: #9a6d15 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  box-shadow: inset 0 0 0 1px rgba(154,109,21,.12) !important;
}
#openBlingModalBtn.top-connect,
button#openBlingModalBtn {
  min-width: 142px !important;
  padding: 0 16px !important;
  color: #8b6114 !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(185,133,32,.34) !important;
  box-shadow: 0 10px 24px rgba(36,30,18,.06), inset 0 1px 0 rgba(255,255,255,.9) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}
#blingStatus.status-pill {
  display: none !important;
}
.stat-card {
  min-width: 84px !important;
  padding: 7px 10px !important;
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(214,168,61,.18) !important;
  box-shadow: 0 10px 24px rgba(36,30,18,.055), inset 0 1px 0 rgba(255,255,255,.95) !important;
  text-align: center !important;
}
.stat-card strong {
  display: block !important;
  font-size: 21px !important;
  line-height: 1 !important;
  color: #141414 !important;
  font-weight: 950 !important;
}
.stat-card span {
  display: block !important;
  margin-top: 4px !important;
  color: #766955 !important;
  font-size: 8.8px !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}
.top-connect:hover,
.completed-orders-btn:hover,
#completedOrdersBtn:hover {
  filter: brightness(1.015) !important;
  transform: translateY(-1px) !important;
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr !important; }
  .top-stats { justify-content: flex-start !important; flex-wrap: wrap !important; }
}

/* V5.4 - Header dourado original StarNails */
.topbar {
  position: relative !important;
  background: linear-gradient(135deg, #d9ad4f 0%, #c89429 45%, #a86f13 100%) !important;
  border: 0 !important;
  box-shadow: 0 18px 44px rgba(107, 72, 13, .22), inset 0 1px 0 rgba(255,255,255,.34) !important;
}
.topbar::before {
  height: 1px !important;
  background: rgba(255,255,255,.46) !important;
  opacity: 1 !important;
}
.topbar::after {
  background: radial-gradient(circle at 8% 0%, rgba(255,255,255,.28), transparent 34%), linear-gradient(90deg, rgba(255,255,255,.12), transparent 42%) !important;
}
.topbar .eyebrow {
  color: rgba(255,255,255,.78) !important;
}
.topbar h1 {
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(80,48,5,.18) !important;
}
.topbar .brand img {
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(255,255,255,.46) !important;
  box-shadow: 0 12px 28px rgba(75, 49, 8, .18) !important;
}
#openBlingModalBtn.top-connect,
button#openBlingModalBtn {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.38) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px rgba(80,48,5,.12) !important;
}
.completed-orders-btn,
#completedOrdersBtn {
  background: rgba(255,255,255,.92) !important;
  color: #8f6012 !important;
  border: 1px solid rgba(255,255,255,.58) !important;
  box-shadow: 0 10px 24px rgba(80,48,5,.16), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
.completed-orders-btn strong,
#completedOrdersBtn strong {
  background: linear-gradient(135deg, #d6a137, #a86f13) !important;
  color: #fff !important;
}
.topbar .stat-card {
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(255,255,255,.52) !important;
  box-shadow: 0 10px 24px rgba(80,48,5,.14), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
.topbar .stat-card strong {
  color: #16120b !important;
}
.topbar .stat-card span {
  color: #8a7044 !important;
}

/* V6.2 - Header dourado alinhado: título preto e botões brancos uniformes */
.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
  min-height: 76px !important;
  padding: 12px 18px !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, #f2ce73 0%, #d7a23c 48%, #b77a12 100%) !important;
  border: 1px solid rgba(116, 73, 5, .25) !important;
  box-shadow: 0 10px 28px rgba(95, 62, 10, .16) !important;
  overflow: hidden !important;
}
.topbar::before { display: none !important; }
.topbar .brand {
  flex: 1 1 auto !important;
  min-width: 280px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.topbar .brand img {
  width: 54px !important;
  height: 54px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 8px 18px rgba(56, 37, 5, .14) !important;
}
.topbar .eyebrow {
  color: #fff7df !important;
  font-size: 10px !important;
  letter-spacing: .13em !important;
  font-weight: 950 !important;
  text-shadow: none !important;
}
.topbar h1,
.topbar .brand h1 {
  color: #111 !important;
  font-size: 24px !important;
  line-height: 1.04 !important;
  font-weight: 950 !important;
  text-shadow: none !important;
  white-space: nowrap !important;
}
.topbar p { display: none !important; }
.top-stats {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
.top-stats .status-pill { display: none !important; }
.top-stats .completed-orders-btn,
.top-stats #openBlingModalBtn,
.top-stats .top-connect:not(.completed-orders-btn),
.top-stats .stat-card {
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  border-radius: 15px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 8px 18px rgba(73, 47, 6, .13), inset 0 1px 0 rgba(255,255,255,.90) !important;
  color: #151515 !important;
}
.top-stats .completed-orders-btn,
.top-stats #openBlingModalBtn,
.top-stats .top-connect:not(.completed-orders-btn) {
  min-width: 126px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}
.top-stats .completed-orders-btn strong {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  margin-left: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #e8bd51, #b77a12) !important;
  color: #fff !important;
  font-size: 12px !important;
}
.top-stats .stat-card {
  width: 98px !important;
  min-width: 98px !important;
  padding: 6px 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
}
.top-stats .stat-card strong {
  color: #111 !important;
  font-size: 19px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}
.top-stats .stat-card span {
  color: #6d501a !important;
  font-size: 8.5px !important;
  margin-top: 4px !important;
  font-weight: 950 !important;
}
@media (max-width: 1150px) {
  .topbar { overflow-x: auto !important; }
  .topbar .brand { min-width: 250px !important; }
  .top-stats { flex-shrink: 0 !important; }
}

/* V6.3 - Fontes suaves no cabeçalho */
.topbar .eyebrow {
  color: #3f3522 !important;
  font-weight: 800 !important;
  letter-spacing: .13em !important;
}

.topbar h1,
.topbar .brand h1 {
  color: #1f1f1f !important;
  font-weight: 850 !important;
  letter-spacing: -0.03em !important;
}

/* V6.9 - Pedido urgente por transportador Uber */
.order-card.uber-order::before,
.order-card.urgent.uber-order::before {
  background: #111 !important;
  opacity: .95;
}
.order-customer-name {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.uber-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 5px;
  background: #050505;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.6px;
  vertical-align: middle;
  box-shadow: 0 2px 5px rgba(0,0,0,.16);
}


/* V7.2 - Urgência só aparece quando houver pedido Uber sem conferência */
.filter-chip[data-filter="urgent"] {
  background: #fff !important;
  color: #333 !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}
.filter-chip[data-filter="urgent"].has-urgent {
  background: linear-gradient(135deg, #ef4444, #c81e1e) !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 10px 20px rgba(220, 38, 38, .18) !important;
}
.filter-chip[data-filter="urgent"].active:not(.has-urgent) {
  background: var(--black) !important;
  color: #fff !important;
  border-color: var(--black) !important;
}
.filter-chip[data-filter="urgent"].active.has-urgent {
  background: linear-gradient(135deg, #ef4444, #c81e1e) !important;
  color: #fff !important;
  border-color: #dc2626 !important;
}
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #c81e1e;
  font-size: 11px;
  font-weight: 950;
}
.order-card.urgent.uber-order,
.order-card.urgent {
  border-color: #ef4444 !important;
  background: linear-gradient(135deg, #fff7f7, #fff) !important;
}
.order-card.urgent.uber-order::before,
.order-card.urgent::before {
  background: #ef4444 !important;
  opacity: 1 !important;
}


/* V7.3 - Card urgente premium + Uber antes do nome + títulos sem contador */
.filter-chip[data-filter="urgent"] .filter-count{ display:none !important; }
.order-customer-name{
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-width:0 !important;
  overflow:hidden !important;
}
.order-customer-name span{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  min-width:0 !important;
}
.uber-mini-badge{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  border-radius:4px !important;
  font-size:9px !important;
  margin-right:1px !important;
  transform: translateY(-.5px);
}
.order-card.urgent.uber-order,
.order-card.urgent{
  border-color:#ef4444 !important;
  background:linear-gradient(135deg, #fff3f3 0%, #fffafa 52%, #fff 100%) !important;
  box-shadow:0 8px 18px rgba(239,68,68,.10), inset 0 0 0 1px rgba(239,68,68,.04) !important;
}
.order-card.urgent.uber-order::before,
.order-card.urgent::before{
  background:#ef4444 !important;
  opacity:1 !important;
}
.filter-chip[data-filter="urgent"]{
  min-width:auto !important;
}

/* V7.4 - botão para sair da divergência e evitar travamento */
.conference-modal-card{
  position: relative !important;
}
.conference-modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #5c4030;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.conference-modal-close:hover{
  transform: scale(1.04);
  background: #fff2f2;
  color: #b42323;
}
.conference-modal-backdrop.success .conference-modal-close,
.conference-modal-backdrop.order-loading .conference-modal-close{
  display: none !important;
}
.conference-modal-backdrop.loading .conference-modal-close,
.conference-modal-backdrop.error .conference-modal-close{
  display: grid !important;
}

/* V7.7 - Resumo final de conferência */
.conference-modal-backdrop.success .conference-modal-card{
  max-width: 760px;
}
.completion-summary{
  width: 100%;
  margin-top: 14px;
}
.completion-summary-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.completion-summary-grid > div{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(196, 150, 73, .18);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(70, 50, 20, .06);
}
.completion-summary-grid span{
  display: block;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a7a62;
  margin-bottom: 4px;
}
.completion-summary-grid strong{
  display: block;
  color: #24211d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.completion-items-list{
  max-height: 230px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(196, 150, 73, .16);
  background: rgba(255,255,255,.55);
}
.completion-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(196, 150, 73, .12);
  color: #2f2a24;
  font-size: 13px;
}
.completion-item:last-child{ border-bottom: 0; }
.completion-item span{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.completion-item strong{
  flex: 0 0 auto;
  color: #146c43;
  font-weight: 800;
}
@media (max-width: 720px){
  .completion-summary-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* V7.9 - Modal próprio para resumo final da conferência */
.final-summary-backdrop{
  position:fixed;
  inset:0;
  display:none;
  place-items:center;
  background:rgba(18,16,12,.38);
  backdrop-filter:blur(8px);
  z-index:9999;
  padding:24px;
}
.final-summary-backdrop.show{display:grid;}
.final-summary-card{
  width:min(760px,96vw);
  max-height:92vh;
  overflow:auto;
  background:#fffaf2;
  border-radius:24px;
  box-shadow:0 28px 80px rgba(28,22,12,.28);
  padding:24px;
  border:1px solid rgba(191,143,45,.28);
}
.final-summary-head{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}
.final-summary-check{
  width:50px;
  height:50px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#c89935,#f5d98b);
  color:#fff;
  font-weight:900;
  font-size:26px;
  box-shadow:0 12px 24px rgba(190,138,32,.24);
}
.final-summary-head span{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1.4px;
  color:#9b7328;
  font-weight:800;
}
.final-summary-head strong{
  display:block;
  font-size:23px;
  color:#25211b;
  line-height:1.15;
}
.final-summary-head small{
  display:block;
  color:#756b5c;
  margin-top:3px;
}
.final-summary-body .completion-summary{
  background:#fff;
  border:1px solid rgba(191,143,45,.18);
  border-radius:20px;
  padding:16px;
}
.final-summary-card .btn.full{
  margin-top:16px;
  height:48px;
  border-radius:16px;
  font-weight:800;
}

.final-summary-enter-hint{
  margin: 10px 0 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #7a6a3a;
  background: rgba(214, 180, 92, .12);
  border-radius: 999px;
  padding: 8px 12px;
}
