:root{
  --bc-yellow:#f5c400;
  --bc-yellow-strong:#ffd84d;
  --bc-yellow-soft:rgba(245,196,0,.14);
  --bc-bg-0:#050608;
  --bc-bg-1:#0b0e14;
  --bc-bg-2:#111722;
  --bc-panel:rgba(14,18,28,.78);
  --bc-panel-strong:rgba(17,23,34,.92);
  --bc-panel-light:rgba(255,255,255,.08);
  --bc-border:rgba(255,255,255,.12);
  --bc-border-yellow:rgba(245,196,0,.42);
  --bc-text:#f7f8fa;
  --bc-text-soft:rgba(247,248,250,.72);
  --bc-text-muted:rgba(247,248,250,.52);
  --bc-danger:#ff5c5c;
  --bc-success:#31d47d;
  --bc-warning:#ffd84d;
  --bc-radius-xl:28px;
  --bc-radius-lg:20px;
  --bc-radius-md:14px;
  --bc-shadow:0 24px 80px rgba(0,0,0,.45);
  --bc-shadow-soft:0 12px 34px rgba(0,0,0,.30);
  --bc-font:'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;}
body.bc-shell{
  min-height:100vh;
  font-family:var(--bc-font);
  color:var(--bc-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(245,196,0,.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255,216,77,.10), transparent 26%),
    radial-gradient(circle at 70% 90%, rgba(245,196,0,.10), transparent 24%),
    linear-gradient(135deg, var(--bc-bg-0) 0%, var(--bc-bg-1) 48%, #12100a 100%);
  overflow-x:hidden;
}
body.bc-shell::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.65), transparent 78%);
  opacity:.45;
}
body.bc-shell::after{
  content:"";
  position:fixed;
  inset:auto -20% -34% -20%;
  height:420px;
  pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(245,196,0,.17), transparent 62%);
  filter:blur(18px);
}

.bc-page{
  position:relative;
  z-index:1;
  width:min(1180px, calc(100vw - 32px));
  margin:0 auto;
  padding:28px 0 42px;
}

.bc-page--center{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px 16px;
}

.bc-glow-card{
  position:relative;
  background:linear-gradient(145deg, rgba(17,23,34,.88), rgba(9,12,18,.82));
  border:1px solid var(--bc-border);
  border-radius:var(--bc-radius-xl);
  box-shadow:var(--bc-shadow);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  overflow:hidden;
}
.bc-glow-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(120deg, rgba(245,196,0,.30), transparent 28%, transparent 70%, rgba(245,196,0,.12)),
    radial-gradient(circle at 24% 0%, rgba(245,196,0,.20), transparent 36%);
  opacity:.8;
}
.bc-glow-card > *{position:relative;z-index:1}

.bc-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
.bc-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.bc-brand-mark{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:linear-gradient(145deg, rgba(245,196,0,.98), rgba(255,226,92,.88));
  box-shadow:0 0 0 1px rgba(255,255,255,.20), 0 16px 34px rgba(245,196,0,.18);
  overflow:hidden;
}
.bc-brand-mark img{width:72%;height:72%;object-fit:contain;}
.bc-brand-text{min-width:0;}
.bc-kicker{
  margin:0 0 5px;
  color:var(--bc-yellow-strong);
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.bc-title{
  margin:0;
  font-size:clamp(1.65rem, 3vw, 2.7rem);
  line-height:1.04;
  font-weight:950;
  letter-spacing:-.05em;
}
.bc-subtitle{
  margin:10px 0 0;
  max-width:760px;
  color:var(--bc-text-soft);
  font-size:1rem;
  line-height:1.5;
  font-weight:650;
}

.bc-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.bc-icon-btn,.bc-pill-btn,.bc-primary-btn,.bc-secondary-btn{
  appearance:none;
  border:none;
  cursor:pointer;
  text-decoration:none;
  font-family:var(--bc-font);
  transition:transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.bc-icon-btn{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:16px;
  color:var(--bc-text);
  background:rgba(255,255,255,.07);
  border:1px solid var(--bc-border);
}
.bc-icon-btn img{width:22px;height:22px;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.28));}
.bc-icon-btn:hover,.bc-pill-btn:hover,.bc-secondary-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(245,196,0,.44);
  box-shadow:0 14px 26px rgba(0,0,0,.24);
}
.bc-icon-btn:active,.bc-pill-btn:active,.bc-primary-btn:active,.bc-secondary-btn:active{transform:translateY(0) scale(.99)}
.bc-pill-btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:46px;
  padding:0 15px;
  border-radius:999px;
  color:var(--bc-text);
  background:rgba(255,255,255,.07);
  border:1px solid var(--bc-border);
  font-weight:850;
}
.bc-primary-btn{
  width:100%;
  min-height:52px;
  border-radius:16px;
  background:linear-gradient(135deg, var(--bc-yellow), var(--bc-yellow-strong));
  color:#111;
  font-size:1.02rem;
  font-weight:950;
  box-shadow:0 18px 36px rgba(245,196,0,.20);
}
.bc-primary-btn:hover{transform:translateY(-1px);box-shadow:0 20px 46px rgba(245,196,0,.26)}
.bc-secondary-btn{
  width:100%;
  min-height:52px;
  border-radius:16px;
  background:rgba(255,255,255,.07);
  border:1px solid var(--bc-border);
  color:var(--bc-text);
  font-size:1.01rem;
  font-weight:900;
}

.bc-hero{
  padding:24px;
  margin-bottom:20px;
}
.bc-hero-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:end;
}
.bc-user-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--bc-border);
  background:rgba(255,255,255,.055);
  border-radius:18px;
  min-width:260px;
}
.bc-avatar{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(245,196,0,.16);
  border:1px solid var(--bc-border-yellow);
  color:var(--bc-yellow-strong);
  font-weight:950;
}
.bc-user-name{font-size:.98rem;font-weight:900;margin:0 0 3px;}
.bc-user-meta{margin:0;color:var(--bc-text-muted);font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}

.bc-module-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
}
.bc-module-card{
  position:relative;
  min-height:152px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:18px;
  border-radius:24px;
  text-decoration:none;
  color:var(--bc-text);
  background:linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  border:1px solid var(--bc-border);
  box-shadow:var(--bc-shadow-soft);
  overflow:hidden;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.bc-module-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:radial-gradient(circle at 20% 0%, rgba(245,196,0,.18), transparent 34%);
  opacity:0;
  transition:opacity .16s ease;
}
.bc-module-card:hover{
  transform:translateY(-4px);
  border-color:rgba(245,196,0,.46);
  box-shadow:0 22px 52px rgba(0,0,0,.34);
  background:linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
}
.bc-module-card:hover::before{opacity:1;}
.bc-module-card > *{position:relative;z-index:1}
.bc-module-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.bc-module-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:16px;
  color:#111;
  background:linear-gradient(135deg, var(--bc-yellow), var(--bc-yellow-strong));
  font-size:1.25rem;
  box-shadow:0 14px 28px rgba(245,196,0,.16);
}
.bc-module-status{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(49,212,125,.10);
  border:1px solid rgba(49,212,125,.25);
  color:#9ff2c5;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.bc-module-title{
  margin:18px 0 5px;
  font-size:1.18rem;
  font-weight:950;
  letter-spacing:-.03em;
}
.bc-module-desc{
  margin:0;
  color:var(--bc-text-muted);
  font-size:.88rem;
  line-height:1.35;
  font-weight:650;
}
.bc-module-card.is-priority{
  background:linear-gradient(145deg, rgba(245,196,0,.22), rgba(255,255,255,.045));
  border-color:rgba(245,196,0,.44);
}
.bc-module-card.is-admin{
  border-style:dashed;
}

.bc-footer-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:18px;
}

.bc-login-wrap{
  width:min(980px, 100%);
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:18px;
  align-items:stretch;
}
.bc-login-visual{
  min-height:560px;
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.bc-login-logo{
  width:min(360px, 86%);
  height:auto;
  filter:drop-shadow(0 14px 30px rgba(0,0,0,.28));
}
.bc-login-metrics{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
  margin-top:26px;
}
.bc-metric{
  padding:13px;
  border-radius:18px;
  border:1px solid var(--bc-border);
  background:rgba(255,255,255,.055);
}
.bc-metric strong{display:block;font-size:1.18rem;color:var(--bc-yellow-strong);}
.bc-metric span{display:block;margin-top:3px;font-size:.74rem;color:var(--bc-text-muted);font-weight:800;text-transform:uppercase;letter-spacing:.05em;}
.bc-login-panel{
  padding:30px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.bc-form-title{margin:0;font-size:2.1rem;font-weight:950;letter-spacing:-.055em;}
.bc-form-sub{margin:8px 0 24px;color:var(--bc-text-soft);font-weight:700;line-height:1.45;}
.bc-field{margin-bottom:14px;text-align:left;}
.bc-field label{display:block;margin:0 0 8px;color:var(--bc-text-soft);font-size:.82rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;}
.bc-input{
  width:100%;
  height:52px;
  border-radius:16px;
  border:1px solid var(--bc-border);
  background:rgba(255,255,255,.075);
  color:var(--bc-text);
  padding:0 15px;
  outline:none;
  font-size:1rem;
  font-weight:750;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.bc-input::placeholder{color:rgba(247,248,250,.35);}
.bc-input:focus{
  border-color:rgba(245,196,0,.62);
  box-shadow:0 0 0 4px rgba(245,196,0,.12);
  background:rgba(255,255,255,.105);
}
.bc-message{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:16px;
  font-weight:850;
  line-height:1.35;
  border:1px solid var(--bc-border);
  background:rgba(255,255,255,.07);
}
.bc-message.danger,.bc-message.erro{color:#ffd0d0;background:rgba(255,92,92,.12);border-color:rgba(255,92,92,.24)}
.bc-message.success,.bc-message.sucesso{color:#bcffd8;background:rgba(49,212,125,.12);border-color:rgba(49,212,125,.24)}
.bc-message.warning,.bc-message.warn{color:#fff0b8;background:rgba(245,196,0,.13);border-color:rgba(245,196,0,.25)}

.bc-empty{
  margin-top:16px;
  padding:18px;
  border-radius:20px;
  border:1px dashed var(--bc-border);
  background:rgba(255,255,255,.045);
  color:var(--bc-text-soft);
  font-weight:750;
  text-align:center;
}

@media (max-width:920px){
  .bc-module-grid{grid-template-columns:repeat(2, minmax(0,1fr));}
  .bc-login-wrap{grid-template-columns:1fr;}
  .bc-login-visual{min-height:360px;}
}
@media (max-width:680px){
  .bc-page{width:min(100vw - 20px, 1180px);padding:14px 0 24px;}
  .bc-topbar{align-items:flex-start;}
  .bc-actions{gap:8px;}
  .bc-pill-btn span{display:none;}
  .bc-hero{padding:18px;}
  .bc-hero-grid{grid-template-columns:1fr;}
  .bc-user-card{min-width:0;width:100%;}
  .bc-module-grid{grid-template-columns:1fr;gap:12px;}
  .bc-module-card{min-height:132px;border-radius:20px;}
  .bc-footer-actions{grid-template-columns:1fr;}
  .bc-login-panel,.bc-login-visual{padding:22px;}
  .bc-login-visual{min-height:280px;}
  .bc-login-metrics{grid-template-columns:1fr;}
  .bc-form-title{font-size:1.85rem;}
}

/* =========================================================
   SISTEMA BC - PADRÃO GLOBAL DE LAYOUT
   Baseado no home.html. Usar gradualmente nos templates.
   ========================================================= */

body.bc-shell.theme-light, body.theme-light{
  --bc-bg-0:#f3f5f8;
  --bc-bg-1:#eef1f5;
  --bc-bg-2:#ffffff;
  --bc-panel:rgba(255,255,255,.86);
  --bc-panel-strong:rgba(255,255,255,.96);
  --bc-panel-light:rgba(15,23,42,.045);
  --bc-border:rgba(15,23,42,.12);
  --bc-border-yellow:rgba(180,132,0,.35);
  --bc-text:#171a21;
  --bc-text-soft:rgba(23,26,33,.72);
  --bc-text-muted:rgba(23,26,33,.58);
  color:var(--bc-text);
  background:
    radial-gradient(circle at 10% 8%, rgba(245,193,0,.16), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(15,23,42,.06), transparent 30%),
    linear-gradient(135deg, #f6f7f9 0%, #eef1f5 52%, #e4e8ee 100%);
}

body.bc-shell.theme-light::before, body.theme-light::before{
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  opacity:.45;
}

.bc-page-wide{width:min(1440px, calc(100vw - 32px));}
.bc-page-full{width:calc(100vw - 32px);max-width:none;}
.bc-card,.bc-panel{
  position:relative;
  border:1px solid var(--bc-border);
  background:linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.032));
  border-radius:var(--bc-radius-lg);
  box-shadow:var(--bc-shadow-soft);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.bc-card{padding:18px;}
.bc-panel{padding:22px;}
.bc-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:0 0 16px;
}
.bc-toolbar-left,.bc-toolbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.bc-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.bc-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.bc-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.bc-grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
.bc-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--bc-border);
  border-radius:18px;
  background:rgba(255,255,255,.045);
}
.bc-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px;}
.bc-table th,.bc-table td{padding:12px 14px;border-bottom:1px solid var(--bc-border);text-align:left;}
.bc-table th{font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:var(--bc-text-soft);font-weight:950;background:rgba(255,255,255,.055);position:sticky;top:0;z-index:2;}
.bc-table td{font-weight:700;color:var(--bc-text);}
.bc-table tr:last-child td{border-bottom:0;}
.bc-table tr:hover td{background:rgba(245,196,0,.07);}
.bc-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--bc-border);background:rgba(255,255,255,.06);font-size:.75rem;font-weight:950;text-transform:uppercase;letter-spacing:.05em;}
.bc-badge-warning{border-color:rgba(245,196,0,.30);background:rgba(245,196,0,.13);color:var(--bc-yellow-strong);}
.bc-badge-success{border-color:rgba(49,212,125,.28);background:rgba(49,212,125,.12);color:#9ff2c5;}
.bc-badge-danger{border-color:rgba(255,92,92,.28);background:rgba(255,92,92,.12);color:#ffd0d0;}

/* Compatibilidade com o padrão atual do home.html */
body.bc-shell .page{position:relative;z-index:1;width:min(1180px, calc(100vw - 32px));margin:0 auto;padding:26px 0 44px;}
body.bc-shell .topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px;}
body.bc-shell .brand-header{display:flex;align-items:center;gap:16px;min-width:0;}
body.bc-shell .brand-logo{display:flex;align-items:center;justify-content:center;width:320px;max-width:42vw;min-height:68px;padding:13px 18px;border-radius:22px;background:rgba(255,255,255,.97);border:1px solid rgba(0,0,0,.10);box-shadow:0 18px 42px rgba(0,0,0,.24);}
body.bc-shell .brand-logo img{display:block;width:100%;height:auto;max-height:54px;object-fit:contain;}
body.bc-shell .brand-title-block{min-width:0;}
body.bc-shell .kicker{margin:0 0 6px;color:var(--bc-yellow-strong);font-size:.72rem;line-height:1;font-weight:950;letter-spacing:.18em;text-transform:uppercase;}
body.bc-shell .main-title{margin:0;font-size:clamp(1.45rem, 2.6vw, 2.45rem);line-height:1.04;letter-spacing:-.04em;font-weight:950;white-space:nowrap;}
body.bc-shell .actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
body.bc-shell .icon-btn,body.bc-shell .pill-btn,body.bc-shell .logout-icon,body.bc-shell .admin-link{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;border-radius:15px;border:1px solid var(--bc-border);background:rgba(255,255,255,.07);color:var(--bc-text);text-decoration:none;font-family:var(--bc-font);font-weight:850;cursor:pointer;transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease;}
body.bc-shell .icon-btn,body.bc-shell .logout-icon{width:44px;padding:0;}
body.bc-shell .pill-btn,body.bc-shell .admin-link{padding:0 15px;}
body.bc-shell .icon-btn:hover,body.bc-shell .pill-btn:hover,body.bc-shell .logout-icon:hover,body.bc-shell .admin-link:hover{transform:translateY(-1px);border-color:var(--bc-border-yellow);background:rgba(255,255,255,.11);box-shadow:0 14px 30px rgba(0,0,0,.24);}
body.bc-shell .icon-btn img,body.bc-shell .logout-icon img{width:21px;height:21px;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.28));}
body.bc-shell .hero{position:relative;overflow:hidden;border-radius:28px;padding:24px;border:1px solid rgba(255,255,255,.12);background:linear-gradient(135deg, rgba(245,193,0,.13), rgba(255,255,255,.045)),rgba(19,22,29,.82);box-shadow:0 24px 70px rgba(0,0,0,.30);margin-bottom:20px;}
body.bc-shell .hero::after{content:"";position:absolute;right:-95px;bottom:-150px;width:360px;height:360px;border-radius:50%;border:56px solid rgba(245,193,0,.07);}
body.bc-shell .hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;}
body.bc-shell .hero h1{margin:0;font-size:clamp(1.9rem, 3.7vw, 3.2rem);line-height:1.02;letter-spacing:-.055em;font-weight:950;}
body.bc-shell .user-card{min-width:260px;border-radius:20px;padding:14px;background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.13);}
body.bc-shell .user-line{display:flex;align-items:center;gap:12px;}
body.bc-shell .avatar{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,var(--bc-yellow),var(--bc-yellow-strong));color:#111;font-weight:950;box-shadow:0 12px 26px rgba(245,193,0,.18);}
body.bc-shell .user-name{margin:0 0 4px;font-weight:950;line-height:1.1;}
body.bc-shell .user-sector{margin:0;color:var(--bc-text-muted);font-size:.82rem;font-weight:800;text-transform:uppercase;}
body.bc-shell .module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;}
body.bc-shell .module-card{position:relative;min-height:142px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;padding:20px;border-radius:22px;color:var(--bc-text);text-decoration:none;border:1px solid var(--bc-border);background:linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.032)),rgba(20,23,30,.78);box-shadow:0 15px 34px rgba(0,0,0,.20);overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;}
body.bc-shell .module-card::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 14% 12%, rgba(245,193,0,.15), transparent 33%);opacity:.75;}
body.bc-shell .module-card>*{position:relative;z-index:1;}
body.bc-shell .module-card:hover{transform:translateY(-2px);border-color:rgba(245,193,0,.56);box-shadow:0 20px 48px rgba(0,0,0,.30);background:linear-gradient(145deg, rgba(245,193,0,.12), rgba(255,255,255,.042)),rgba(23,26,33,.92);}
body.bc-shell .module-card.featured{border-color:rgba(245,193,0,.64);background:linear-gradient(145deg, rgba(245,193,0,.18), rgba(255,255,255,.035)),rgba(20,23,30,.90);}
body.bc-shell .module-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
body.bc-shell .module-icon{width:47px;height:47px;border-radius:16px;display:grid;place-items:center;color:#111;background:linear-gradient(135deg,var(--bc-yellow),var(--bc-yellow-strong));box-shadow:0 14px 30px rgba(245,193,0,.16);font-size:1.33rem;}
body.bc-shell .module-status{padding:7px 10px;border-radius:999px;background:rgba(245,193,0,.10);border:1px solid rgba(245,193,0,.30);color:#ffe67a;font-size:.67rem;line-height:1;font-weight:950;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;}
body.bc-shell .module-title{margin:0 0 7px;font-size:1.12rem;line-height:1.12;font-weight:950;letter-spacing:-.02em;}
body.bc-shell .module-desc{margin:0;color:var(--bc-text-muted);font-size:.88rem;line-height:1.34;font-weight:700;}
body.bc-shell .admin-row{margin-top:18px;display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
body.bc-shell .admin-link{background:linear-gradient(135deg,var(--bc-yellow),var(--bc-yellow-strong));color:#111;border-color:rgba(0,0,0,.10);box-shadow:0 16px 34px rgba(245,193,0,.15);}
body.bc-shell .logout-form{margin:0;}
body.bc-shell .theme-toggle{min-width:112px;}

body.bc-shell.theme-light .kicker{color:#9a7100;}
body.bc-shell.theme-light .main-title,body.bc-shell.theme-light .hero h1,body.bc-shell.theme-light .module-title,body.bc-shell.theme-light .user-name{color:#171a21;}
body.bc-shell.theme-light .hero{border-color:rgba(15,23,42,.10);background:linear-gradient(135deg, rgba(245,193,0,.12), rgba(255,255,255,.80)),#fff;box-shadow:0 20px 50px rgba(15,23,42,.10);}
body.bc-shell.theme-light .hero::after{border-color:rgba(245,193,0,.13);}
body.bc-shell.theme-light .user-card{background:rgba(255,255,255,.72);border-color:rgba(15,23,42,.10);box-shadow:0 12px 28px rgba(15,23,42,.08);}
body.bc-shell.theme-light .module-card{color:#171a21;border-color:rgba(15,23,42,.10);background:linear-gradient(145deg, rgba(255,255,255,.96), rgba(247,248,250,.92)),#fff;box-shadow:0 14px 32px rgba(15,23,42,.10);}
body.bc-shell.theme-light .module-card:hover{border-color:rgba(180,132,0,.44);box-shadow:0 18px 42px rgba(15,23,42,.14);background:linear-gradient(145deg, rgba(255,255,255,1), rgba(250,248,237,.92)),#fff;}
body.bc-shell.theme-light .module-card.featured{border-color:rgba(180,132,0,.45);background:linear-gradient(145deg, rgba(245,193,0,.16), rgba(255,255,255,.94)),#fff;}
body.bc-shell.theme-light .module-status{background:rgba(245,193,0,.14);border-color:rgba(180,132,0,.28);color:#7a5900;}
body.bc-shell.theme-light .icon-btn,body.bc-shell.theme-light .pill-btn,body.bc-shell.theme-light .logout-icon{background:rgba(255,255,255,.84);border-color:rgba(15,23,42,.12);color:#171a21;box-shadow:0 10px 24px rgba(15,23,42,.08);}
body.bc-shell.theme-light .icon-btn:hover,body.bc-shell.theme-light .pill-btn:hover,body.bc-shell.theme-light .logout-icon:hover{background:#fff;border-color:rgba(180,132,0,.36);box-shadow:0 14px 30px rgba(15,23,42,.12);}

@media (max-width:1050px){.bc-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.bc-grid-4,.bc-grid-3{grid-template-columns:repeat(2,minmax(0,1fr));}body.bc-shell .module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}body.bc-shell .hero-grid{grid-template-columns:1fr;}body.bc-shell .user-card{min-width:0;width:100%;max-width:420px;}body.bc-shell .main-title{white-space:normal;}}
@media (max-width:760px){.bc-page,.bc-page-wide,.bc-page-full{width:min(100vw - 22px, 620px);padding-top:18px;}.bc-form-grid,.bc-grid-4,.bc-grid-3,.bc-grid-2{grid-template-columns:1fr;}body.bc-shell .page{width:min(100vw - 22px, 620px);padding-top:18px;}body.bc-shell .topbar{align-items:flex-start;flex-direction:column;}body.bc-shell .brand-header{width:100%;align-items:flex-start;flex-direction:column;gap:12px;}body.bc-shell .brand-logo{width:100%;max-width:420px;min-height:64px;border-radius:20px;}body.bc-shell .actions{width:100%;justify-content:flex-start;}body.bc-shell .hero{padding:22px;border-radius:24px;}body.bc-shell .module-grid{grid-template-columns:1fr;gap:13px;}body.bc-shell .module-card{min-height:132px;padding:19px;}.bc-toolbar{align-items:stretch;}.bc-toolbar-left,.bc-toolbar-right{width:100%;}.bc-toolbar .bc-primary-btn,.bc-toolbar .bc-secondary-btn{width:100%;}}
@media (max-width:420px){body.bc-shell .brand-logo{padding:12px 16px;}body.bc-shell .hero h1{font-size:1.85rem;}body.bc-shell .pill-btn{width:100%;}.bc-table{min-width:680px;}}


/* =========================================================
   PATCH FINAL 2026-06-24 - Tema global sem quebrar kiosk
   - Corrige dock/ícones nas telas gerais de usuário/senha/config.
   - Aplica o tema salvo nas telas de etiquetas mantendo layout mobile/kiosk.
   ========================================================= */

/* Variáveis do tema para páginas legadas gerais e etiquetas */
html[data-bc-theme="dark"] body.bc-module-geral,
body.bc-module-geral.theme-dark,
html[data-bc-theme="dark"] body.bc-login-legacy,
body.bc-login-legacy.theme-dark,
html[data-bc-theme="dark"] body.bc-etiqueta-page,
body.bc-etiqueta-page.theme-dark{
  --legacy-card:rgba(17,23,34,.92);
  --legacy-card-soft:rgba(255,255,255,.07);
  --legacy-input:rgba(255,255,255,.075);
  --legacy-input-focus:rgba(255,255,255,.11);
  --legacy-border:rgba(255,255,255,.13);
  --legacy-border-strong:rgba(255,255,255,.22);
  --legacy-text:#f7f8fa;
  --legacy-text-soft:rgba(247,248,250,.76);
  --legacy-text-muted:rgba(247,248,250,.58);
  --legacy-shadow:0 24px 80px rgba(0,0,0,.45);
  color:var(--legacy-text) !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(245,196,0,.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255,216,77,.10), transparent 26%),
    radial-gradient(circle at 70% 90%, rgba(245,196,0,.10), transparent 24%),
    linear-gradient(135deg, #050608 0%, #0b0e14 48%, #12100a 100%) !important;
  color-scheme:dark;
}

html[data-bc-theme="light"] body.bc-module-geral,
body.bc-module-geral.theme-light,
html[data-bc-theme="light"] body.bc-login-legacy,
body.bc-login-legacy.theme-light,
html[data-bc-theme="light"] body.bc-etiqueta-page,
body.bc-etiqueta-page.theme-light{
  --legacy-card:rgba(255,255,255,.94);
  --legacy-card-soft:rgba(15,23,42,.045);
  --legacy-input:#fff;
  --legacy-input-focus:#fff;
  --legacy-border:rgba(15,23,42,.12);
  --legacy-border-strong:rgba(15,23,42,.18);
  --legacy-text:#171a21;
  --legacy-text-soft:rgba(23,26,33,.72);
  --legacy-text-muted:rgba(23,26,33,.58);
  --legacy-shadow:0 20px 52px rgba(15,23,42,.12);
  color:var(--legacy-text) !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(245,193,0,.16), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(15,23,42,.06), transparent 30%),
    linear-gradient(135deg, #f6f7f9 0%, #eef1f5 52%, #e4e8ee 100%) !important;
  color-scheme:light;
}

html[data-bc-theme] body.bc-module-geral::before,
html[data-bc-theme] body.bc-login-legacy::before,
html[data-bc-theme] body.bc-etiqueta-page::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(currentColor 1px, transparent 1px),
    linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size:44px 44px;
  opacity:.035;
  z-index:0;
}
body.bc-module-geral > *,
body.bc-login-legacy > *,
body.bc-etiqueta-page > *{
  position:relative;
  z-index:1;
}

/* Dock do tema: canto superior direito, sem empurrar layout e sem ficar no meio da tela */
body.bc-module-geral .bc-theme-dock,
body.bc-login-legacy .bc-theme-dock,
body.bc-etiqueta-page .bc-theme-dock{
  position:fixed !important;
  top:12px !important;
  right:16px !important;
  left:auto !important;
  transform:none !important;
  z-index:1200 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  pointer-events:none !important;
}
body.bc-module-geral .bc-theme-dock-btn,
body.bc-login-legacy .bc-theme-dock-btn,
body.bc-etiqueta-page .bc-theme-dock-btn{
  pointer-events:auto !important;
  appearance:none !important;
  min-height:38px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  border:1px solid var(--legacy-border) !important;
  background:rgba(17,23,34,.86) !important;
  color:#f7f8fa !important;
  box-shadow:0 14px 28px rgba(0,0,0,.24) !important;
  backdrop-filter:blur(14px) !important;
  -webkit-backdrop-filter:blur(14px) !important;
  font-family:var(--bc-font,'Segoe UI',Arial,sans-serif) !important;
  font-weight:950 !important;
  font-size:.84rem !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  cursor:pointer !important;
}
html[data-bc-theme="light"] body.bc-module-geral .bc-theme-dock-btn,
html[data-bc-theme="light"] body.bc-login-legacy .bc-theme-dock-btn,
html[data-bc-theme="light"] body.bc-etiqueta-page .bc-theme-dock-btn{
  background:rgba(255,255,255,.90) !important;
  color:#171a21 !important;
  box-shadow:0 12px 26px rgba(15,23,42,.12) !important;
}

/* Telas gerais: home à esquerda, sair à direita antes do botão de tema. */
body.bc-module-geral .home-container,
body.bc-module-geral .logout-container{
  position:fixed !important;
  top:12px !important;
  z-index:1100 !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}
body.bc-module-geral .home-container{left:16px !important;right:auto !important;}
body.bc-module-geral .logout-container{right:136px !important;left:auto !important;}
body.bc-module-geral .home-btn,
body.bc-module-geral .logout-btn,
body.bc-module-geral .top-icon,
body.bc-etiqueta-page .top-icon{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:14px !important;
  background:var(--legacy-card-soft) !important;
  border:1px solid var(--legacy-border) !important;
  color:var(--legacy-text) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-shadow:0 12px 26px rgba(0,0,0,.16) !important;
  padding:0 !important;
}
html[data-bc-theme="light"] body.bc-module-geral .home-btn,
html[data-bc-theme="light"] body.bc-module-geral .logout-btn,
html[data-bc-theme="light"] body.bc-module-geral .top-icon,
html[data-bc-theme="light"] body.bc-etiqueta-page .top-icon{
  background:rgba(255,255,255,.90) !important;
  box-shadow:0 12px 26px rgba(15,23,42,.10) !important;
}
body.bc-module-geral .home-btn img,
body.bc-module-geral .logout-btn img,
body.bc-module-geral .top-icon img,
body.bc-etiqueta-page .top-icon img{
  width:22px !important;
  height:22px !important;
  border-radius:0 !important;
  filter:invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.22)) !important;
}
html[data-bc-theme="light"] body.bc-module-geral .home-btn img,
html[data-bc-theme="light"] body.bc-module-geral .logout-btn img,
html[data-bc-theme="light"] body.bc-module-geral .top-icon img,
html[data-bc-theme="light"] body.bc-etiqueta-page .top-icon img{
  filter:brightness(0) drop-shadow(0 3px 8px rgba(0,0,0,.14)) !important;
}

/* Cards e formulários das telas gerais */
body.bc-module-geral .form-box,
body.bc-module-geral .config-box,
body.bc-module-geral .container,
body.bc-login-legacy .container{
  background:var(--legacy-card) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
  box-shadow:var(--legacy-shadow) !important;
}
body.bc-module-geral h1,
body.bc-module-geral h2,
body.bc-module-geral h3,
body.bc-module-geral label,
body.bc-module-geral .mods-title,
body.bc-module-geral .mod-label,
body.bc-login-legacy h1,
body.bc-login-legacy label,
body.bc-etiqueta-page h1{
  color:var(--legacy-text) !important;
}
body.bc-module-geral .sub,
body.bc-module-geral .mod-sub,
body.bc-module-geral .pwd-tips,
body.bc-module-geral .pwd-label,
body.bc-module-geral .pw-row,
body.bc-module-geral .pw-hint,
body.bc-login-legacy .sub,
body.bc-etiqueta-page .desc,
body.bc-etiqueta-page .scan-hint,
body.bc-etiqueta-page .timer-info{
  color:var(--legacy-text-muted) !important;
}
body.bc-module-geral .header-logo img,
body.bc-login-legacy .brand-card img,
body.bc-etiqueta-page .logo-wrap img{
  background:rgba(255,255,255,.94) !important;
  border:1px solid rgba(15,23,42,.10) !important;
  border-radius:18px !important;
  padding:8px 14px !important;
  box-shadow:0 16px 34px rgba(0,0,0,.18) !important;
}

body.bc-module-geral input[type="text"],
body.bc-module-geral input[type="password"],
body.bc-module-geral input[type="number"],
body.bc-module-geral input[type="email"],
body.bc-module-geral select,
body.bc-module-geral textarea,
body.bc-login-legacy input[type="text"],
body.bc-login-legacy input[type="password"],
body.bc-etiqueta-page input[type="text"],
body.bc-etiqueta-page input[type="password"],
body.bc-etiqueta-page select{
  background:var(--legacy-input) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border-strong) !important;
  caret-color:var(--bc-yellow,#f5c400) !important;
}
body.bc-module-geral input::placeholder,
body.bc-module-geral textarea::placeholder,
body.bc-login-legacy input::placeholder,
body.bc-etiqueta-page input::placeholder{
  color:var(--legacy-text-muted) !important;
}
body.bc-module-geral input:focus,
body.bc-module-geral select:focus,
body.bc-module-geral textarea:focus,
body.bc-login-legacy input:focus,
body.bc-etiqueta-page input:focus,
body.bc-etiqueta-page select:focus{
  background:var(--legacy-input-focus) !important;
  border-color:rgba(245,196,0,.64) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.14) !important;
  outline:none !important;
}
body.bc-module-geral select option,
body.bc-etiqueta-page select option{
  background:var(--legacy-card) !important;
  color:var(--legacy-text) !important;
}
body.bc-module-geral input:disabled,
body.bc-module-geral select:disabled,
body.bc-module-geral textarea:disabled{
  opacity:.72 !important;
  cursor:not-allowed !important;
}
body.bc-module-geral .mods-box,
body.bc-module-geral .pwd-check,
body.bc-module-geral .security-option,
body.bc-module-geral .pw-pill,
body.bc-module-geral .pw-meter,
body.bc-module-geral .pwd-bar,
body.bc-etiqueta-page .alerta,
body.bc-etiqueta-page .box,
body.bc-etiqueta-page .cpf-box,
body.bc-etiqueta-page .confirm-box,
body.bc-etiqueta-page .info-block,
body.bc-etiqueta-page .historico,
body.bc-etiqueta-page ul{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
}
body.bc-module-geral .mod-item,
body.bc-module-geral .saldo-operador-row{
  background:rgba(255,255,255,.055) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
}
html[data-bc-theme="light"] body.bc-module-geral .mod-item,
html[data-bc-theme="light"] body.bc-module-geral .saldo-operador-row{
  background:#fff !important;
}
body.bc-module-geral input[type="checkbox"]{
  accent-color:var(--bc-yellow,#f5c400) !important;
}

/* Botões */
body.bc-module-geral button[type="submit"],
body.bc-module-geral a.button,
body.bc-module-geral button.button,
body.bc-login-legacy .submit-btn,
body.bc-etiqueta-page input[type="submit"],
body.bc-etiqueta-page .btn,
body.bc-etiqueta-page .btn-ok,
body.bc-etiqueta-page .botao,
body.bc-etiqueta-page .admin-actions a{
  background:linear-gradient(135deg, var(--bc-yellow,#f5c400), var(--bc-yellow-strong,#ffd84d)) !important;
  color:#111 !important;
  border:1px solid rgba(0,0,0,.10) !important;
  box-shadow:0 16px 34px rgba(245,196,0,.16) !important;
}
body.bc-module-geral .btn-voltar,
body.bc-module-geral .voltar-btn,
body.bc-etiqueta-page .cancelar,
body.bc-etiqueta-page .voltar,
body.bc-etiqueta-page .reimpressao-rapida-btn{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border:1px solid var(--legacy-border) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.12) !important;
}
html[data-bc-theme="light"] body.bc-module-geral .btn-voltar,
html[data-bc-theme="light"] body.bc-module-geral .voltar-btn,
html[data-bc-theme="light"] body.bc-etiqueta-page .cancelar,
html[data-bc-theme="light"] body.bc-etiqueta-page .voltar,
html[data-bc-theme="light"] body.bc-etiqueta-page .reimpressao-rapida-btn{
  background:#fff !important;
  color:#171a21 !important;
}

/* Mensagens */
body.bc-module-geral .mensagem,
body.bc-module-geral .flash,
body.bc-login-legacy .mensagem,
body.bc-etiqueta-page .mensagem{
  border-color:var(--legacy-border) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.10) !important;
}
body.bc-module-geral .mensagem.success,
body.bc-module-geral .mensagem.sucesso,
body.bc-module-geral .flash.success,
body.bc-module-geral .flash.sucesso,
body.bc-login-legacy .mensagem.success,
body.bc-login-legacy .mensagem.sucesso,
body.bc-etiqueta-page .mensagem.success,
body.bc-etiqueta-page .mensagem.sucesso{
  color:#bcffd8 !important;
  background:rgba(49,212,125,.13) !important;
  border-color:rgba(49,212,125,.28) !important;
}
body.bc-module-geral .mensagem.danger,
body.bc-module-geral .mensagem.erro,
body.bc-module-geral .flash.danger,
body.bc-module-geral .flash.erro,
body.bc-login-legacy .mensagem.danger,
body.bc-login-legacy .mensagem.erro,
body.bc-etiqueta-page .mensagem.danger,
body.bc-etiqueta-page .mensagem.erro{
  color:#ffd0d0 !important;
  background:rgba(255,92,92,.13) !important;
  border-color:rgba(255,92,92,.28) !important;
}
html[data-bc-theme="light"] body.bc-module-geral .mensagem.success,
html[data-bc-theme="light"] body.bc-module-geral .mensagem.sucesso,
html[data-bc-theme="light"] body.bc-module-geral .flash.success,
html[data-bc-theme="light"] body.bc-module-geral .flash.sucesso,
html[data-bc-theme="light"] body.bc-login-legacy .mensagem.success,
html[data-bc-theme="light"] body.bc-login-legacy .mensagem.sucesso,
html[data-bc-theme="light"] body.bc-etiqueta-page .mensagem.success,
html[data-bc-theme="light"] body.bc-etiqueta-page .mensagem.sucesso{
  color:#0f6a1c !important;
  background:rgba(19,182,38,.16) !important;
}
html[data-bc-theme="light"] body.bc-module-geral .mensagem.danger,
html[data-bc-theme="light"] body.bc-module-geral .mensagem.erro,
html[data-bc-theme="light"] body.bc-module-geral .flash.danger,
html[data-bc-theme="light"] body.bc-module-geral .flash.erro,
html[data-bc-theme="light"] body.bc-login-legacy .mensagem.danger,
html[data-bc-theme="light"] body.bc-login-legacy .mensagem.erro,
html[data-bc-theme="light"] body.bc-etiqueta-page .mensagem.danger,
html[data-bc-theme="light"] body.bc-etiqueta-page .mensagem.erro{
  color:#8f0e0e !important;
  background:rgba(214,40,40,.14) !important;
}

/* Etiquetas: tema sem mexer no layout kiosk/mobile */
body.bc-etiqueta-page .container{
  background:var(--legacy-card) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
  box-shadow:var(--legacy-shadow) !important;
}
body.bc-etiqueta-page .scan-btn{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border:1px solid var(--legacy-border) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.16) !important;
}
body.bc-etiqueta-page #scanner{
  border-color:var(--legacy-border) !important;
  background:#080b10 !important;
  color:#fff !important;
}
body.bc-etiqueta-page #loading-overlay{
  background:rgba(5,6,8,.72) !important;
  backdrop-filter:blur(5px) !important;
  -webkit-backdrop-filter:blur(5px) !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page #loading-overlay{
  background:rgba(255,255,255,.82) !important;
}
body.bc-etiqueta-page .spinner{
  border-color:rgba(255,255,255,.24) !important;
  border-top-color:var(--bc-yellow,#f5c400) !important;
}
body.bc-etiqueta-page .loading-text{
  color:var(--legacy-text) !important;
}
body.bc-etiqueta-page .cpf-label,
body.bc-etiqueta-page .cpf-valor,
body.bc-etiqueta-page .info-label,
body.bc-etiqueta-page .box p,
body.bc-etiqueta-page ul,
body.bc-etiqueta-page li,
body.bc-etiqueta-page .titulo{
  color:var(--legacy-text) !important;
}
body.bc-etiqueta-page .mensagem,
body.bc-etiqueta-page .warn,
body.bc-etiqueta-page .alerta h1{
  color:var(--legacy-text) !important;
}
body.bc-etiqueta-page .nivel-info{
  color:var(--bc-success,#31d47d) !important;
}

/* Anexar NF-e: correção específica de contraste do input de arquivo e labels. */
body.bc-etiqueta-page label{
  color:var(--bc-yellow,#f5c400) !important;
  -webkit-text-fill-color:var(--bc-yellow,#f5c400) !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page label{
  color:#171a21 !important;
  -webkit-text-fill-color:#171a21 !important;
}
body.bc-etiqueta-page input[type="file"]{
  background:var(--legacy-input) !important;
  color:var(--legacy-text) !important;
  -webkit-text-fill-color:var(--legacy-text) !important;
  border:1px solid rgba(245,196,0,.64) !important;
  border-radius:10px !important;
  font-weight:800 !important;
}
body.bc-etiqueta-page input[type="file"]::file-selector-button{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  -webkit-text-fill-color:var(--legacy-text) !important;
  border:1px solid var(--legacy-border) !important;
  border-radius:8px !important;
  padding:7px 10px !important;
  margin-right:8px !important;
  font-weight:900 !important;
  cursor:pointer !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page input[type="file"]::file-selector-button{
  background:#f3f4f6 !important;
  color:#171a21 !important;
  -webkit-text-fill-color:#171a21 !important;
}
body.bc-etiqueta-page .btn-secondary{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  -webkit-text-fill-color:var(--legacy-text) !important;
  border:1px solid var(--legacy-border) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.12) !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page .btn-secondary{
  background:#fff !important;
  color:#171a21 !important;
  -webkit-text-fill-color:#171a21 !important;
  border-color:#d6ad00 !important;
}
body.bc-etiqueta-page .preview,
body.bc-etiqueta-page .preview h2,
body.bc-etiqueta-page .preview .row,
body.bc-etiqueta-page .preview .row b{
  color:var(--legacy-text) !important;
  -webkit-text-fill-color:var(--legacy-text) !important;
}

@media (max-width:700px){
  body.bc-module-geral .bc-theme-dock,
  body.bc-login-legacy .bc-theme-dock{
    right:12px !important;
    top:8px !important;
  }
  body.bc-module-geral .bc-theme-dock-text,
  body.bc-login-legacy .bc-theme-dock-text{
    display:none !important;
  }
  body.bc-module-geral .bc-theme-dock-btn,
  body.bc-login-legacy .bc-theme-dock-btn{
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    padding:0 !important;
  }
  body.bc-module-geral .home-container{left:12px !important;top:8px !important;}
  body.bc-module-geral .logout-container{right:62px !important;top:8px !important;}
  body.bc-module-geral .header-logo{margin-top:58px !important;}
}

/* Kiosk/coletor: não exibe botão flutuante de tema para não sobrepor topbar nem scanner. */
@media (max-width:520px), (max-height:760px){
  body.bc-etiqueta-page .bc-theme-dock{
    display:none !important;
  }
}

/* =========================================================
   PATCH 2026-06-24 - Ecommerce + Etiquetas mobile
   - Ecommerce obedece tema claro/escuro como o Home.
   - Botão de tema das etiquetas fica dentro da topbar, sem flutuante.
   - Remove regra que colocava etiqueta em tela cheia por altura baixa.
   ========================================================= */

/* Ecommerce: variáveis por tema, sem depender do amarelo fixo dos templates */
html[data-bc-theme="dark"] body.bc-module-ecommerce,
body.bc-module-ecommerce.theme-dark{
  --bg:#050608;
  --bg2:#0b0e14;
  --ink:#f7f8fa;
  --ink2:#f7f8fa;
  --text:#f7f8fa;
  --muted:rgba(247,248,250,.64);
  --panel:rgba(17,23,34,.92);
  --card:rgba(17,23,34,.92);
  --line:rgba(255,255,255,.13);
  --dark:#f5c400;
  --dark2:#ffd84d;
  --shadow:0 24px 80px rgba(0,0,0,.46);
  --soft-shadow:0 14px 34px rgba(0,0,0,.30);
  --soft:0 14px 34px rgba(0,0,0,.30);
  color:#f7f8fa !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(245,196,0,.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255,216,77,.10), transparent 26%),
    radial-gradient(circle at 70% 90%, rgba(245,196,0,.10), transparent 24%),
    linear-gradient(135deg, #050608 0%, #0b0e14 48%, #12100a 100%) !important;
  color-scheme:dark;
}
html[data-bc-theme="light"] body.bc-module-ecommerce,
body.bc-module-ecommerce.theme-light{
  --bg:#f6f7f9;
  --bg2:#eef1f5;
  --ink:#171a21;
  --ink2:#24272d;
  --text:#171a21;
  --muted:rgba(23,26,33,.62);
  --panel:rgba(255,255,255,.94);
  --card:rgba(255,255,255,.94);
  --line:rgba(15,23,42,.12);
  --dark:#101214;
  --dark2:#1f242b;
  --shadow:0 20px 52px rgba(15,23,42,.12);
  --soft-shadow:0 10px 26px rgba(15,23,42,.10);
  --soft:0 10px 26px rgba(15,23,42,.10);
  color:#171a21 !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(245,193,0,.16), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(15,23,42,.06), transparent 30%),
    linear-gradient(135deg, #f6f7f9 0%, #eef1f5 52%, #e4e8ee 100%) !important;
  color-scheme:light;
}
html[data-bc-theme] body.bc-module-ecommerce::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(currentColor 1px, transparent 1px),
    linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size:44px 44px;
  opacity:.035;
  z-index:0;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.72), transparent 82%);
}
body.bc-module-ecommerce > *{position:relative;z-index:1;}

/* Dock do tema nas telas ecommerce: canto superior direito real, não no fluxo da página */
body.bc-module-ecommerce .bc-theme-dock{
  position:fixed !important;
  top:12px !important;
  right:16px !important;
  left:auto !important;
  transform:none !important;
  z-index:1200 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  pointer-events:none !important;
}
body.bc-module-ecommerce .bc-theme-dock-btn{
  pointer-events:auto !important;
  appearance:none !important;
  min-height:38px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  background:rgba(17,23,34,.86) !important;
  color:#f7f8fa !important;
  box-shadow:0 14px 28px rgba(0,0,0,.24) !important;
  backdrop-filter:blur(14px) !important;
  -webkit-backdrop-filter:blur(14px) !important;
  font-family:var(--bc-font,'Segoe UI',Arial,sans-serif) !important;
  font-weight:950 !important;
  font-size:.84rem !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  cursor:pointer !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce .bc-theme-dock-btn{
  background:rgba(255,255,255,.92) !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.12) !important;
  box-shadow:0 12px 26px rgba(15,23,42,.12) !important;
}
@media(max-width:700px){
  body.bc-module-ecommerce .bc-theme-dock{right:10px !important;top:8px !important;}
  body.bc-module-ecommerce .bc-theme-dock-text{display:none !important;}
  body.bc-module-ecommerce .bc-theme-dock-btn{width:42px !important;min-width:42px !important;height:42px !important;padding:0 !important;}
}

/* Estrutura visual ecommerce */
body.bc-module-ecommerce .wrap,
body.bc-module-ecommerce .page,
body.bc-module-ecommerce .content{color:var(--ink) !important;}
body.bc-module-ecommerce .container,
body.bc-module-ecommerce .panel,
body.bc-module-ecommerce .card,
body.bc-module-ecommerce .search-card,
body.bc-module-ecommerce .status-card,
body.bc-module-ecommerce .metric,
body.bc-module-ecommerce .kpi,
body.bc-module-ecommerce .result-card,
body.bc-module-ecommerce .data-box,
body.bc-module-ecommerce .flow-item,
body.bc-module-ecommerce .empty,
body.bc-module-ecommerce .box,
body.bc-module-ecommerce .detail-content,
body.bc-module-ecommerce .detail-section,
body.bc-module-ecommerce .detail-kpi,
body.bc-module-ecommerce .detail-info,
body.bc-module-ecommerce .sku-card,
body.bc-module-ecommerce .sku-list-row,
body.bc-module-ecommerce .call-panel,
body.bc-module-ecommerce .call-queue-item,
body.bc-module-ecommerce .price-panel,
body.bc-module-ecommerce .price-input-card,
body.bc-module-ecommerce .plan-card,
body.bc-module-ecommerce .exec-card,
body.bc-module-ecommerce .process-panel,
body.bc-module-ecommerce .table-card,
body.bc-module-ecommerce .readonly-note,
body.bc-module-ecommerce .help-strip,
body.bc-module-ecommerce .notice{
  background:var(--panel) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
  box-shadow:var(--shadow) !important;
}
body.bc-module-ecommerce .hero,
body.bc-module-ecommerce .hero-main,
body.bc-module-ecommerce .hero-side,
body.bc-module-ecommerce .system-status,
body.bc-module-ecommerce .status-operacional{
  background:linear-gradient(145deg, rgba(17,23,34,.92), rgba(9,12,18,.88)) !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.13) !important;
  box-shadow:var(--shadow) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce .hero,
html[data-bc-theme="light"] body.bc-module-ecommerce .hero-main,
html[data-bc-theme="light"] body.bc-module-ecommerce .hero-side,
html[data-bc-theme="light"] body.bc-module-ecommerce .system-status,
html[data-bc-theme="light"] body.bc-module-ecommerce .status-operacional{
  background:linear-gradient(135deg,#101214 0%,#24272d 100%) !important;
  color:#fff !important;
}
body.bc-module-ecommerce h1,
body.bc-module-ecommerce h2,
body.bc-module-ecommerce h3,
body.bc-module-ecommerce h4,
body.bc-module-ecommerce label,
body.bc-module-ecommerce .label,
body.bc-module-ecommerce .action-title,
body.bc-module-ecommerce .metric-title,
body.bc-module-ecommerce .table-title,
body.bc-module-ecommerce .detail-section-title,
body.bc-module-ecommerce .sku-card-title,
body.bc-module-ecommerce .call-title,
body.bc-module-ecommerce .side-title{
  color:var(--ink) !important;
}
body.bc-module-ecommerce .hero h1,
body.bc-module-ecommerce .hero h2,
body.bc-module-ecommerce .hero h3,
body.bc-module-ecommerce .hero .muted,
body.bc-module-ecommerce .hero .sub,
body.bc-module-ecommerce .hero p,
body.bc-module-ecommerce .hero-main h1,
body.bc-module-ecommerce .hero-main p,
body.bc-module-ecommerce .hero-side h1,
body.bc-module-ecommerce .hero-side p{
  color:inherit !important;
}
body.bc-module-ecommerce .muted,
body.bc-module-ecommerce .sub,
body.bc-module-ecommerce .desc,
body.bc-module-ecommerce .hint,
body.bc-module-ecommerce .small,
body.bc-module-ecommerce .metric-note,
body.bc-module-ecommerce .action-desc,
body.bc-module-ecommerce .status-sub,
body.bc-module-ecommerce .detail-title-sub,
body.bc-module-ecommerce .detail-meta,
body.bc-module-ecommerce .sku-tags,
body.bc-module-ecommerce .call-product,
body.bc-module-ecommerce .job-meta{
  color:var(--muted) !important;
}
body.bc-module-ecommerce .top,
body.bc-module-ecommerce .top-bar{
  position:relative;
  z-index:2;
}
body.bc-module-ecommerce .icon,
body.bc-module-ecommerce .icon-btn,
body.bc-module-ecommerce .logo-wrap,
body.bc-module-ecommerce .logo{
  color:var(--ink) !important;
}
body.bc-module-ecommerce .icon,
body.bc-module-ecommerce .icon-btn{
  background:rgba(255,255,255,.08) !important;
  border-color:var(--line) !important;
  box-shadow:var(--soft) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce .icon,
html[data-bc-theme="light"] body.bc-module-ecommerce .icon-btn{
  background:rgba(255,255,255,.86) !important;
}
body.bc-module-ecommerce .logo img,
body.bc-module-ecommerce .logo-wrap img{
  background:rgba(255,255,255,.94) !important;
  border:1px solid rgba(15,23,42,.10) !important;
  border-radius:16px !important;
  padding:7px 12px !important;
  box-shadow:0 14px 28px rgba(0,0,0,.14) !important;
}
body.bc-module-ecommerce .input,
body.bc-module-ecommerce .select,
body.bc-module-ecommerce input[type="text"],
body.bc-module-ecommerce input[type="number"],
body.bc-module-ecommerce input[type="search"],
body.bc-module-ecommerce input[type="file"],
body.bc-module-ecommerce select,
body.bc-module-ecommerce textarea{
  background:rgba(255,255,255,.075) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
  caret-color:#f5c400 !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce .input,
html[data-bc-theme="light"] body.bc-module-ecommerce .select,
html[data-bc-theme="light"] body.bc-module-ecommerce input[type="text"],
html[data-bc-theme="light"] body.bc-module-ecommerce input[type="number"],
html[data-bc-theme="light"] body.bc-module-ecommerce input[type="search"],
html[data-bc-theme="light"] body.bc-module-ecommerce input[type="file"],
html[data-bc-theme="light"] body.bc-module-ecommerce select,
html[data-bc-theme="light"] body.bc-module-ecommerce textarea{
  background:#fff !important;
  color:#171a21 !important;
}
body.bc-module-ecommerce .input:focus,
body.bc-module-ecommerce .select:focus,
body.bc-module-ecommerce input:focus,
body.bc-module-ecommerce select:focus,
body.bc-module-ecommerce textarea:focus{
  border-color:rgba(245,196,0,.64) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.14) !important;
  outline:none !important;
}
body.bc-module-ecommerce input::placeholder,
body.bc-module-ecommerce textarea::placeholder{color:var(--muted) !important;}
body.bc-module-ecommerce select option{background:var(--panel) !important;color:var(--ink) !important;}
body.bc-module-ecommerce .btn,
body.bc-module-ecommerce button.btn,
body.bc-module-ecommerce a.btn,
body.bc-module-ecommerce .primary-action{
  border-color:rgba(245,196,0,.28) !important;
}
body.bc-module-ecommerce .btn.secondary,
body.bc-module-ecommerce .secondary,
body.bc-module-ecommerce .btn-mini,
body.bc-module-ecommerce .mini-btn{
  background:rgba(255,255,255,.075) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce .btn.secondary,
html[data-bc-theme="light"] body.bc-module-ecommerce .secondary,
html[data-bc-theme="light"] body.bc-module-ecommerce .btn-mini,
html[data-bc-theme="light"] body.bc-module-ecommerce .mini-btn{
  background:#fff !important;
  color:#171a21 !important;
}
body.bc-module-ecommerce .table-wrap,
body.bc-module-ecommerce .preview-wrap{
  background:var(--panel) !important;
  border-color:var(--line) !important;
}
body.bc-module-ecommerce table{color:var(--ink) !important;}
body.bc-module-ecommerce th{
  background:rgba(255,255,255,.07) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
body.bc-module-ecommerce td{
  background:var(--panel) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
body.bc-module-ecommerce tr:hover td{background:rgba(245,196,0,.10) !important;}
body.bc-module-ecommerce .modal{background:var(--panel) !important;color:var(--ink) !important;}
body.bc-module-ecommerce .modal-backdrop{background:rgba(0,0,0,.64) !important;}
body.bc-module-ecommerce .toast{background:#101214 !important;color:#fff !important;border:1px solid rgba(255,255,255,.14) !important;}
body.bc-module-ecommerce .chip,
body.bc-module-ecommerce .pill,
body.bc-module-ecommerce .op-chip,
body.bc-module-ecommerce .summary-chip,
body.bc-module-ecommerce .warnpill,
body.bc-module-ecommerce .rec{
  border-color:var(--line) !important;
}
body.bc-module-ecommerce pre,
body.bc-module-ecommerce .json-box{
  background:#0f172a !important;
  color:#e5edf8 !important;
  border-color:rgba(255,255,255,.14) !important;
}

/* Etiquetas: o seletor de tema agora é um botão da topbar, não um dock flutuante. */
body.bc-etiqueta-page .bc-theme-dock{display:none !important;}
body.bc-etiqueta-page .theme-top-icon{
  font-size:1.05rem !important;
  line-height:1 !important;
  color:var(--legacy-text,#171a21) !important;
}
body.bc-etiqueta-page .theme-top-icon [data-bc-theme-icon]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
@media(max-width:520px){
  body.bc-etiqueta-page .theme-top-icon{display:inline-flex !important;}
}

/* =========================================================
   PATCH 2026-06-24 - Tema consistente: E-commerce, Compras e Marketing
   - Remove amarelo fixo quando o tema escuro estiver ativo.
   - Mantém os templates legados sem reescrever a lógica.
   ========================================================= */
html[data-bc-theme="dark"] body.bc-commerce-page,
body.bc-commerce-page.theme-dark{
  --bg:#050608;
  --bg2:#0b0e14;
  --card:rgba(17,23,34,.92);
  --panel:rgba(17,23,34,.92);
  --soft:rgba(255,255,255,.06);
  --text:#f7f8fa;
  --ink:#f7f8fa;
  --ink2:#f7f8fa;
  --muted:rgba(247,248,250,.66);
  --line:rgba(255,255,255,.13);
  --dark:#f5c400;
  --dark2:#ffd84d;
  --ok:#31d47d;
  --warn:#ffd84d;
  --danger:#ff7a7a;
  --legacy-card:rgba(17,23,34,.92);
  --legacy-card-soft:rgba(255,255,255,.07);
  --legacy-text:#f7f8fa;
  --legacy-muted:rgba(247,248,250,.66);
  --legacy-border:rgba(255,255,255,.13);
  --legacy-shadow:0 24px 80px rgba(0,0,0,.46);
  color:#f7f8fa !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(245,196,0,.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255,216,77,.10), transparent 26%),
    radial-gradient(circle at 70% 90%, rgba(245,196,0,.10), transparent 24%),
    linear-gradient(135deg, #050608 0%, #0b0e14 48%, #12100a 100%) !important;
  color-scheme:dark;
}
html[data-bc-theme="light"] body.bc-commerce-page,
body.bc-commerce-page.theme-light{
  --bg:#f6f7f9;
  --bg2:#eef1f5;
  --card:rgba(255,255,255,.94);
  --panel:rgba(255,255,255,.94);
  --soft:#fffbe6;
  --text:#171a21;
  --ink:#171a21;
  --ink2:#24272d;
  --muted:rgba(23,26,33,.64);
  --line:rgba(15,23,42,.12);
  --dark:#101214;
  --dark2:#1f242b;
  --ok:#147a3d;
  --warn:#a86400;
  --danger:#b42318;
  --legacy-card:rgba(255,255,255,.94);
  --legacy-card-soft:rgba(255,255,255,.78);
  --legacy-text:#171a21;
  --legacy-muted:rgba(23,26,33,.64);
  --legacy-border:rgba(15,23,42,.12);
  --legacy-shadow:0 20px 52px rgba(15,23,42,.12);
  color:#171a21 !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(245,193,0,.16), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(15,23,42,.06), transparent 30%),
    linear-gradient(135deg, #f6f7f9 0%, #eef1f5 52%, #e4e8ee 100%) !important;
  color-scheme:light;
}
html[data-bc-theme] body.bc-commerce-page::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(currentColor 1px, transparent 1px),
    linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size:44px 44px;
  opacity:.035;
  z-index:0;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.72), transparent 82%);
}
body.bc-commerce-page > *{position:relative;z-index:1;}

/* Dock de tema para módulos legados de negócio */
body.bc-commerce-page .bc-theme-dock{
  position:fixed !important;
  top:12px !important;
  right:16px !important;
  left:auto !important;
  transform:none !important;
  z-index:1200 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  pointer-events:none !important;
}
body.bc-commerce-page .bc-theme-dock-btn{
  pointer-events:auto !important;
  appearance:none !important;
  min-height:38px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  background:rgba(17,23,34,.86) !important;
  color:#f7f8fa !important;
  box-shadow:0 14px 28px rgba(0,0,0,.24) !important;
  backdrop-filter:blur(14px) !important;
  -webkit-backdrop-filter:blur(14px) !important;
  font-family:var(--bc-font,'Segoe UI',Arial,sans-serif) !important;
  font-weight:950 !important;
  font-size:.84rem !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  cursor:pointer !important;
}
html[data-bc-theme="light"] body.bc-commerce-page .bc-theme-dock-btn{
  background:rgba(255,255,255,.92) !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.12) !important;
  box-shadow:0 12px 26px rgba(15,23,42,.12) !important;
}
@media(max-width:700px){
  body.bc-commerce-page .bc-theme-dock{right:10px !important;top:8px !important;}
  body.bc-commerce-page .bc-theme-dock-text{display:none !important;}
  body.bc-commerce-page .bc-theme-dock-btn{width:42px !important;min-width:42px !important;height:42px !important;padding:0 !important;}
}

/* Cards, campos e listas dos módulos Compras/Marketing */
body.bc-module-compras .container,
body.bc-module-marketing .container,
body.bc-module-compras .card,
body.bc-module-marketing .card,
body.bc-module-compras .result-card,
body.bc-module-marketing .result-card,
body.bc-module-compras .secao-avancado,
body.bc-module-marketing .secao-avancado,
body.bc-module-compras .product-live-box,
body.bc-module-marketing .product-live-box,
body.bc-module-compras .product-live-list,
body.bc-module-marketing .product-live-list,
body.bc-module-compras .product-live-item,
body.bc-module-marketing .product-live-item,
body.bc-module-compras .product-live-loading,
body.bc-module-marketing .product-live-loading,
body.bc-module-compras .attr,
body.bc-module-marketing .attr,
body.bc-module-compras .pic-card,
body.bc-module-marketing .pic-card,
body.bc-module-compras .data-box,
body.bc-module-marketing .data-box{
  background:var(--legacy-card) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
  box-shadow:var(--legacy-shadow) !important;
}
body.bc-module-compras h1,
body.bc-module-compras h2,
body.bc-module-compras h3,
body.bc-module-compras label,
body.bc-module-compras .label,
body.bc-module-compras .val,
body.bc-module-marketing h1,
body.bc-module-marketing h2,
body.bc-module-marketing h3,
body.bc-module-marketing label,
body.bc-module-marketing .label,
body.bc-module-marketing .val,
body.bc-module-marketing .tag,
body.bc-module-marketing .pic a{
  color:var(--legacy-text) !important;
}
body.bc-module-compras .desc,
body.bc-module-compras .hint,
body.bc-module-compras .muted,
body.bc-module-compras .secao-avancado-toggle,
body.bc-module-compras .product-live-sub,
body.bc-module-compras .product-live-meta,
body.bc-module-compras .product-live-footer,
body.bc-module-marketing .desc,
body.bc-module-marketing .sub,
body.bc-module-marketing .muted,
body.bc-module-marketing .tag small,
body.bc-module-marketing .pic-cap,
body.bc-module-marketing .attr .v,
body.bc-module-marketing .product-live-sub,
body.bc-module-marketing .product-live-meta,
body.bc-module-marketing .product-live-footer{
  color:var(--legacy-muted) !important;
}
body.bc-module-compras input[type="text"],
body.bc-module-compras input[type="number"],
body.bc-module-compras input[type="file"],
body.bc-module-compras select,
body.bc-module-compras textarea,
body.bc-module-marketing input[type="text"],
body.bc-module-marketing input[type="number"],
body.bc-module-marketing input[type="search"],
body.bc-module-marketing input[type="file"],
body.bc-module-marketing select,
body.bc-module-marketing textarea,
body.bc-module-marketing .input{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
  caret-color:#f5c400 !important;
}
html[data-bc-theme="light"] body.bc-module-compras input,
html[data-bc-theme="light"] body.bc-module-compras select,
html[data-bc-theme="light"] body.bc-module-compras textarea,
html[data-bc-theme="light"] body.bc-module-marketing input,
html[data-bc-theme="light"] body.bc-module-marketing select,
html[data-bc-theme="light"] body.bc-module-marketing textarea,
html[data-bc-theme="light"] body.bc-module-marketing .input{
  background:#fff !important;
  color:#171a21 !important;
}
body.bc-module-compras input:focus,
body.bc-module-compras select:focus,
body.bc-module-compras textarea:focus,
body.bc-module-marketing input:focus,
body.bc-module-marketing select:focus,
body.bc-module-marketing textarea:focus,
body.bc-module-marketing .input:focus{
  border-color:rgba(245,196,0,.72) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.16) !important;
  outline:none !important;
}
body.bc-module-compras input::placeholder,
body.bc-module-compras textarea::placeholder,
body.bc-module-marketing input::placeholder,
body.bc-module-marketing textarea::placeholder{color:var(--legacy-muted) !important;}
body.bc-module-compras select option,
body.bc-module-marketing select option{background:var(--legacy-card) !important;color:var(--legacy-text) !important;}
body.bc-module-compras .top-icon,
body.bc-module-marketing .icon-btn,
body.bc-module-marketing .top-icon{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.12) !important;
}
body.bc-module-compras .top-icon img,
body.bc-module-marketing .icon-btn img,
body.bc-module-marketing .top-icon img{
  filter:var(--legacy-icon-filter, invert(1) brightness(1.8)) !important;
}
html[data-bc-theme="light"] body.bc-module-compras .top-icon img,
html[data-bc-theme="light"] body.bc-module-marketing .icon-btn img,
html[data-bc-theme="light"] body.bc-module-marketing .top-icon img{
  filter:brightness(0) !important;
}
body.bc-module-compras input[type="submit"],
body.bc-module-compras button[type="submit"],
body.bc-module-compras .btn,
body.bc-module-marketing .btn,
body.bc-module-marketing button[type="submit"]{
  background:linear-gradient(135deg, #f5c400, #ffd84d) !important;
  color:#111 !important;
  border-color:rgba(245,196,0,.36) !important;
  box-shadow:0 18px 36px rgba(245,196,0,.18) !important;
}
body.bc-module-compras .btn-secondary,
body.bc-module-compras .button-sec,
body.bc-module-marketing .btn-secondary,
body.bc-module-marketing .button-sec{
  background:var(--legacy-card-soft) !important;
  color:var(--legacy-text) !important;
  border-color:var(--legacy-border) !important;
}
body.bc-module-compras .mensagem,
body.bc-module-compras .flash,
body.bc-module-marketing .mensagem,
body.bc-module-marketing .flash{
  border-color:var(--legacy-border) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.10) !important;
}

/* Ecommerce index: página não pode virar card; só os componentes internos mudam de tema. */
body.bc-index-ecommerce .container{
  background:transparent !important;
  box-shadow:none !important;
  border-color:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
body.bc-index-ecommerce .hero{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  color:var(--ink) !important;
}
body.bc-index-ecommerce .hero::after{display:none !important;}
body.bc-index-ecommerce .hero-main{
  background:linear-gradient(135deg,#101214 0%,#24272d 100%) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.12) !important;
}
body.bc-index-ecommerce .hero-side,
body.bc-index-ecommerce .action-card,
body.bc-index-ecommerce .metric,
body.bc-index-ecommerce .panel,
body.bc-index-ecommerce .result-card,
body.bc-index-ecommerce .data-box,
body.bc-index-ecommerce .status-row,
body.bc-index-ecommerce .search-card,
body.bc-index-ecommerce .product-live-box,
body.bc-index-ecommerce .product-live-list,
body.bc-index-ecommerce .product-live-item,
body.bc-index-ecommerce .product-live-loading,
body.bc-index-ecommerce .attr,
body.bc-index-ecommerce .pic-card,
body.bc-index-ecommerce .seller-box,
body.bc-index-ecommerce .modal{
  background:var(--panel) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
  box-shadow:var(--shadow) !important;
}
body.bc-index-ecommerce .action-card.primary{
  background:linear-gradient(135deg,#101214,#262b33) !important;
  color:#fff !important;
}
body.bc-index-ecommerce .action-card.primary .action-desc{color:rgba(255,255,255,.72) !important;}
body.bc-index-ecommerce .top-bar .logo-wrap{
  background:var(--panel) !important;
  border-color:var(--line) !important;
  box-shadow:var(--soft-shadow) !important;
}
body.bc-index-ecommerce .logo-wrap img{
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  box-shadow:none !important;
}
body.bc-index-ecommerce .status-row small,
body.bc-index-ecommerce .metric-note,
body.bc-index-ecommerce .action-desc,
body.bc-index-ecommerce .label,
body.bc-index-ecommerce .hint,
body.bc-index-ecommerce .muted,
body.bc-index-ecommerce .product-live-sub,
body.bc-index-ecommerce .product-live-meta,
body.bc-index-ecommerce .product-live-footer,
body.bc-index-ecommerce .attr .v,
body.bc-index-ecommerce .pic-cap,
body.bc-index-ecommerce .seller-k{
  color:var(--muted) !important;
}
body.bc-index-ecommerce .action-title,
body.bc-index-ecommerce .metric-title,
body.bc-index-ecommerce .metric-value,
body.bc-index-ecommerce .panel h2,
body.bc-index-ecommerce .result-card h3,
body.bc-index-ecommerce .val,
body.bc-index-ecommerce .product-live-title,
body.bc-index-ecommerce .attr .k,
body.bc-index-ecommerce .seller-v{
  color:var(--ink) !important;
}
body.bc-index-ecommerce .chip.light,
body.bc-index-ecommerce .pill,
body.bc-index-ecommerce .action-label,
body.bc-index-ecommerce .btn-mini{
  background:var(--legacy-card-soft) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
body.bc-index-ecommerce .chip.ok,
body.bc-index-ecommerce .pill.ok{background:rgba(49,212,125,.13) !important;color:#9ff2c5 !important;border-color:rgba(49,212,125,.28) !important;}
body.bc-index-ecommerce .chip.warn,
body.bc-index-ecommerce .pill.warn{background:rgba(245,196,0,.13) !important;color:#ffd84d !important;border-color:rgba(245,196,0,.30) !important;}
body.bc-index-ecommerce .chip.bad,
body.bc-index-ecommerce .pill.danger{background:rgba(255,92,92,.13) !important;color:#ffd0d0 !important;border-color:rgba(255,92,92,.28) !important;}
html[data-bc-theme="light"] body.bc-index-ecommerce .chip.ok,
html[data-bc-theme="light"] body.bc-index-ecommerce .pill.ok{color:#147a3d !important;}
html[data-bc-theme="light"] body.bc-index-ecommerce .chip.warn,
html[data-bc-theme="light"] body.bc-index-ecommerce .pill.warn{color:#a86400 !important;}
html[data-bc-theme="light"] body.bc-index-ecommerce .chip.bad,
html[data-bc-theme="light"] body.bc-index-ecommerce .pill.danger{color:#b42318 !important;}

/* =========================================================
   PATCH 2026-06-24 v2 - Ecommerce: contraste final por tema
   - Corrige logo escura em fundo escuro.
   - Corrige cards/steps/tabelas do Publicador ML com texto branco em fundo claro.
   - Reforça campos, botões, chips e modais em todas as telas ecommerce.
   - Mantém Compras/Marketing usando as mesmas variáveis bc-commerce-page.
   ========================================================= */

/* Logo sempre em base clara: a marca original é escura e precisa de contraste. */
body.bc-module-ecommerce.bc-commerce-page .top .logo,
body.bc-module-ecommerce.bc-commerce-page .top .brand,
body.bc-module-ecommerce.bc-commerce-page .top-bar .logo-wrap,
body.bc-module-ecommerce.bc-commerce-page .brand,
body.bc-module-compras.bc-commerce-page .top .logo,
body.bc-module-compras.bc-commerce-page .top .brand,
body.bc-module-compras.bc-commerce-page .logo-wrap,
body.bc-module-marketing.bc-commerce-page .top .logo,
body.bc-module-marketing.bc-commerce-page .top .brand,
body.bc-module-marketing.bc-commerce-page .logo-wrap{
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.96) !important;
  border:1px solid rgba(15,23,42,.12) !important;
  border-radius:18px !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16) !important;
  padding:7px 14px !important;
  overflow:hidden !important;
}
body.bc-module-ecommerce.bc-commerce-page .top .logo img,
body.bc-module-ecommerce.bc-commerce-page .top .brand img,
body.bc-module-ecommerce.bc-commerce-page .top-bar .logo-wrap img,
body.bc-module-ecommerce.bc-commerce-page .brand img,
body.bc-module-compras.bc-commerce-page .top .logo img,
body.bc-module-compras.bc-commerce-page .top .brand img,
body.bc-module-compras.bc-commerce-page .logo-wrap img,
body.bc-module-marketing.bc-commerce-page .top .logo img,
body.bc-module-marketing.bc-commerce-page .top .brand img,
body.bc-module-marketing.bc-commerce-page .logo-wrap img{
  display:block !important;
  width:auto !important;
  max-width:min(420px,72vw) !important;
  max-height:38px !important;
  object-fit:contain !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  box-shadow:none !important;
  filter:none !important;
  opacity:1 !important;
}

/* Ícones de navegação com contraste previsível. */
body.bc-module-ecommerce.bc-commerce-page .icon,
body.bc-module-ecommerce.bc-commerce-page .icon-btn,
body.bc-module-compras.bc-commerce-page .icon,
body.bc-module-compras.bc-commerce-page .icon-btn,
body.bc-module-compras.bc-commerce-page .top-icon,
body.bc-module-marketing.bc-commerce-page .icon,
body.bc-module-marketing.bc-commerce-page .icon-btn,
body.bc-module-marketing.bc-commerce-page .top-icon{
  background:rgba(255,255,255,.92) !important;
  color:#101214 !important;
  border-color:rgba(15,23,42,.12) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.14) !important;
}
body.bc-module-ecommerce.bc-commerce-page .icon img,
body.bc-module-ecommerce.bc-commerce-page .icon-btn img,
body.bc-module-compras.bc-commerce-page .icon img,
body.bc-module-compras.bc-commerce-page .icon-btn img,
body.bc-module-compras.bc-commerce-page .top-icon img,
body.bc-module-marketing.bc-commerce-page .icon img,
body.bc-module-marketing.bc-commerce-page .icon-btn img,
body.bc-module-marketing.bc-commerce-page .top-icon img{
  filter:brightness(0) !important;
  opacity:1 !important;
}

/* Paleta final dos módulos de negócio. */
html[data-bc-theme="dark"] body.bc-commerce-page{
  --bc-business-panel:rgba(17,23,34,.92);
  --bc-business-panel-2:rgba(13,18,27,.94);
  --bc-business-panel-3:rgba(255,255,255,.075);
  --bc-business-input:rgba(255,255,255,.085);
  --bc-business-input-focus:rgba(255,255,255,.12);
  --bc-business-border:rgba(255,255,255,.14);
  --bc-business-border-strong:rgba(255,255,255,.22);
  --bc-business-text:#f7f8fa;
  --bc-business-soft:rgba(247,248,250,.72);
  --bc-business-muted:rgba(247,248,250,.56);
  --bc-business-shadow:0 24px 70px rgba(0,0,0,.38);
}
html[data-bc-theme="light"] body.bc-commerce-page{
  --bc-business-panel:rgba(255,255,255,.94);
  --bc-business-panel-2:rgba(255,255,255,.98);
  --bc-business-panel-3:rgba(15,23,42,.045);
  --bc-business-input:#fff;
  --bc-business-input-focus:#fff;
  --bc-business-border:rgba(15,23,42,.12);
  --bc-business-border-strong:rgba(15,23,42,.20);
  --bc-business-text:#171a21;
  --bc-business-soft:rgba(23,26,33,.72);
  --bc-business-muted:rgba(23,26,33,.58);
  --bc-business-shadow:0 18px 42px rgba(15,23,42,.11);
}

/* Containers e cards: cobre Publicador, Inteligência, Produto 360, Preço, Agenda, Batch e Radar. */
body.bc-module-ecommerce.bc-commerce-page .card,
body.bc-module-ecommerce.bc-commerce-page .panel,
body.bc-module-ecommerce.bc-commerce-page .metric,
body.bc-module-ecommerce.bc-commerce-page .kpi,
body.bc-module-ecommerce.bc-commerce-page .step,
body.bc-module-ecommerce.bc-commerce-page .flow-item,
body.bc-module-ecommerce.bc-commerce-page .status-row,
body.bc-module-ecommerce.bc-commerce-page .status-card,
body.bc-module-ecommerce.bc-commerce-page .search-card,
body.bc-module-ecommerce.bc-commerce-page .table-card,
body.bc-module-ecommerce.bc-commerce-page .result-card,
body.bc-module-ecommerce.bc-commerce-page .data-box,
body.bc-module-ecommerce.bc-commerce-page .readonly-note,
body.bc-module-ecommerce.bc-commerce-page .help-strip,
body.bc-module-ecommerce.bc-commerce-page .notice,
body.bc-module-ecommerce.bc-commerce-page .hint,
body.bc-module-ecommerce.bc-commerce-page .empty,
body.bc-module-ecommerce.bc-commerce-page .empty-state,
body.bc-module-ecommerce.bc-commerce-page .plan-card,
body.bc-module-ecommerce.bc-commerce-page .plan-mini,
body.bc-module-ecommerce.bc-commerce-page .exec-card,
body.bc-module-ecommerce.bc-commerce-page .process-panel,
body.bc-module-ecommerce.bc-commerce-page .mini,
body.bc-module-ecommerce.bc-commerce-page .attr,
body.bc-module-ecommerce.bc-commerce-page .sku-card,
body.bc-module-ecommerce.bc-commerce-page .sku-list-row,
body.bc-module-ecommerce.bc-commerce-page .call-panel,
body.bc-module-ecommerce.bc-commerce-page .call-queue-item,
body.bc-module-ecommerce.bc-commerce-page .price-panel,
body.bc-module-ecommerce.bc-commerce-page .price-input-card,
body.bc-module-ecommerce.bc-commerce-page .seller-box,
body.bc-module-ecommerce.bc-commerce-page .product-live-box,
body.bc-module-ecommerce.bc-commerce-page .product-live-list,
body.bc-module-ecommerce.bc-commerce-page .product-live-item,
body.bc-module-ecommerce.bc-commerce-page .product-live-loading,
body.bc-module-ecommerce.bc-commerce-page .pic-card,
body.bc-module-ecommerce.bc-commerce-page .detail,
body.bc-module-ecommerce.bc-commerce-page .detail-content,
body.bc-module-ecommerce.bc-commerce-page .detail-section,
body.bc-module-ecommerce.bc-commerce-page .detail-kpi,
body.bc-module-ecommerce.bc-commerce-page .detail-info,
body.bc-module-ecommerce.bc-commerce-page .editor-section,
body.bc-module-ecommerce.bc-commerce-page .editor-sidebar,
body.bc-module-ecommerce.bc-commerce-page .editor-summary,
body.bc-module-ecommerce.bc-commerce-page .pub-plan-card,
body.bc-module-ecommerce.bc-commerce-page .filebox,
body.bc-module-ecommerce.bc-commerce-page .modal{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:var(--bc-business-shadow) !important;
}

html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .notice,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .hint{
  background:rgba(255,249,216,.72) !important;
}
html[data-bc-theme="dark"] body.bc-module-ecommerce.bc-commerce-page .notice{
  background:rgba(23,92,211,.14) !important;
  color:#d8e7ff !important;
  border-color:rgba(74,144,255,.30) !important;
}
html[data-bc-theme="dark"] body.bc-module-ecommerce.bc-commerce-page .hint{
  background:rgba(245,196,0,.13) !important;
  color:#ffeaa6 !important;
  border-color:rgba(245,196,0,.30) !important;
}

/* Títulos, labels e textos auxiliares. */
body.bc-module-ecommerce.bc-commerce-page h1,
body.bc-module-ecommerce.bc-commerce-page h2,
body.bc-module-ecommerce.bc-commerce-page h3,
body.bc-module-ecommerce.bc-commerce-page h4,
body.bc-module-ecommerce.bc-commerce-page label,
body.bc-module-ecommerce.bc-commerce-page .label,
body.bc-module-ecommerce.bc-commerce-page .action-title,
body.bc-module-ecommerce.bc-commerce-page .metric-title,
body.bc-module-ecommerce.bc-commerce-page .metric-value,
body.bc-module-ecommerce.bc-commerce-page .table-title,
body.bc-module-ecommerce.bc-commerce-page .detail-title-main,
body.bc-module-ecommerce.bc-commerce-page .detail-section-title,
body.bc-module-ecommerce.bc-commerce-page .sku-card-title,
body.bc-module-ecommerce.bc-commerce-page .call-title,
body.bc-module-ecommerce.bc-commerce-page .side-title,
body.bc-module-ecommerce.bc-commerce-page .step b,
body.bc-module-ecommerce.bc-commerce-page .metric b,
body.bc-module-ecommerce.bc-commerce-page .kpi b,
body.bc-module-ecommerce.bc-commerce-page .mini b,
body.bc-module-ecommerce.bc-commerce-page .mini-count,
body.bc-module-ecommerce.bc-commerce-page .brand-chip,
body.bc-module-ecommerce.bc-commerce-page .switch,
body.bc-module-ecommerce.bc-commerce-page .kv span,
body.bc-module-ecommerce.bc-commerce-page .attr span,
body.bc-module-ecommerce.bc-commerce-page .attr b,
body.bc-module-ecommerce.bc-commerce-page .seller-v,
body.bc-module-ecommerce.bc-commerce-page .product-live-title{
  color:var(--bc-business-text) !important;
}
body.bc-module-ecommerce.bc-commerce-page .muted,
body.bc-module-ecommerce.bc-commerce-page .sub,
body.bc-module-ecommerce.bc-commerce-page .desc,
body.bc-module-ecommerce.bc-commerce-page .hint p,
body.bc-module-ecommerce.bc-commerce-page .small,
body.bc-module-ecommerce.bc-commerce-page .subtle,
body.bc-module-ecommerce.bc-commerce-page .metric-note,
body.bc-module-ecommerce.bc-commerce-page .step span,
body.bc-module-ecommerce.bc-commerce-page .action-desc,
body.bc-module-ecommerce.bc-commerce-page .status-sub,
body.bc-module-ecommerce.bc-commerce-page .detail-title-sub,
body.bc-module-ecommerce.bc-commerce-page .detail-meta,
body.bc-module-ecommerce.bc-commerce-page .sku-tags,
body.bc-module-ecommerce.bc-commerce-page .call-product,
body.bc-module-ecommerce.bc-commerce-page .job-meta,
body.bc-module-ecommerce.bc-commerce-page .brand-ean-cell small,
body.bc-module-ecommerce.bc-commerce-page .status-cell small,
body.bc-module-ecommerce.bc-commerce-page .margin-cell small,
body.bc-module-ecommerce.bc-commerce-page .seller-k,
body.bc-module-ecommerce.bc-commerce-page .product-live-sub,
body.bc-module-ecommerce.bc-commerce-page .product-live-meta,
body.bc-module-ecommerce.bc-commerce-page .product-live-footer,
body.bc-module-ecommerce.bc-commerce-page .pic-cap{
  color:var(--bc-business-muted) !important;
}

/* Hero escuro com texto claro; index, publicador e páginas core ficam consistentes. */
body.bc-module-ecommerce.bc-commerce-page .hero,
body.bc-module-ecommerce.bc-commerce-page .hero-main,
body.bc-module-ecommerce.bc-commerce-page .hero-side,
body.bc-module-ecommerce.bc-commerce-page .system-status,
body.bc-module-ecommerce.bc-commerce-page .status-operacional{
  background:linear-gradient(145deg, rgba(17,23,34,.96), rgba(9,12,18,.92)) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.14) !important;
  box-shadow:var(--bc-business-shadow) !important;
}
body.bc-module-ecommerce.bc-commerce-page .hero h1,
body.bc-module-ecommerce.bc-commerce-page .hero h2,
body.bc-module-ecommerce.bc-commerce-page .hero h3,
body.bc-module-ecommerce.bc-commerce-page .hero p,
body.bc-module-ecommerce.bc-commerce-page .hero .muted,
body.bc-module-ecommerce.bc-commerce-page .hero .sub,
body.bc-module-ecommerce.bc-commerce-page .hero-main h1,
body.bc-module-ecommerce.bc-commerce-page .hero-main p,
body.bc-module-ecommerce.bc-commerce-page .hero-side h1,
body.bc-module-ecommerce.bc-commerce-page .hero-side p{
  color:#fff !important;
}
body.bc-module-ecommerce.bc-commerce-page .hero p,
body.bc-module-ecommerce.bc-commerce-page .hero .muted,
body.bc-module-ecommerce.bc-commerce-page .hero .sub,
body.bc-module-ecommerce.bc-commerce-page .hero-main p,
body.bc-module-ecommerce.bc-commerce-page .hero-side p{
  color:rgba(255,255,255,.74) !important;
}
body.bc-module-ecommerce.bc-commerce-page .hero .chip,
body.bc-module-ecommerce.bc-commerce-page .hero-main .chip,
body.bc-module-ecommerce.bc-commerce-page .hero-side .chip{
  border-color:rgba(255,255,255,.18) !important;
}

/* Fields e selects sem branco estourado no modo escuro. */
body.bc-module-ecommerce.bc-commerce-page input[type="text"],
body.bc-module-ecommerce.bc-commerce-page input[type="number"],
body.bc-module-ecommerce.bc-commerce-page input[type="search"],
body.bc-module-ecommerce.bc-commerce-page input[type="file"],
body.bc-module-ecommerce.bc-commerce-page input[type="email"],
body.bc-module-ecommerce.bc-commerce-page input[type="password"],
body.bc-module-ecommerce.bc-commerce-page select,
body.bc-module-ecommerce.bc-commerce-page textarea,
body.bc-module-ecommerce.bc-commerce-page .input,
body.bc-module-ecommerce.bc-commerce-page .select,
body.bc-module-ecommerce.bc-commerce-page .textarea{
  background:var(--bc-business-input) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border-strong) !important;
  caret-color:#f5c400 !important;
  box-shadow:none !important;
}
body.bc-module-ecommerce.bc-commerce-page input::placeholder,
body.bc-module-ecommerce.bc-commerce-page textarea::placeholder{
  color:var(--bc-business-muted) !important;
}
body.bc-module-ecommerce.bc-commerce-page input:focus,
body.bc-module-ecommerce.bc-commerce-page select:focus,
body.bc-module-ecommerce.bc-commerce-page textarea:focus,
body.bc-module-ecommerce.bc-commerce-page .input:focus,
body.bc-module-ecommerce.bc-commerce-page .select:focus,
body.bc-module-ecommerce.bc-commerce-page .textarea:focus{
  background:var(--bc-business-input-focus) !important;
  border-color:rgba(245,196,0,.70) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.16) !important;
  outline:none !important;
}
body.bc-module-ecommerce.bc-commerce-page select option{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
}
body.bc-module-ecommerce.bc-commerce-page input[type="checkbox"]{
  accent-color:#f5c400 !important;
}

/* Botões e abas. */
body.bc-module-ecommerce.bc-commerce-page .btn,
body.bc-module-ecommerce.bc-commerce-page button,
body.bc-module-ecommerce.bc-commerce-page a.btn,
body.bc-module-ecommerce.bc-commerce-page .primary-action{
  border:1px solid rgba(245,196,0,.28) !important;
}
body.bc-module-ecommerce.bc-commerce-page .btn:not(.secondary):not(.warn):not(.danger):not(.info),
body.bc-module-ecommerce.bc-commerce-page button:not(.secondary):not(.warn):not(.danger):not(.info),
body.bc-module-ecommerce.bc-commerce-page .primary-action{
  background:linear-gradient(135deg,#f5c400,#ffd84d) !important;
  color:#111 !important;
  box-shadow:0 16px 34px rgba(245,196,0,.16) !important;
}
body.bc-module-ecommerce.bc-commerce-page .secondary,
body.bc-module-ecommerce.bc-commerce-page .btn.secondary,
body.bc-module-ecommerce.bc-commerce-page button.secondary,
body.bc-module-ecommerce.bc-commerce-page .mini-btn,
body.bc-module-ecommerce.bc-commerce-page .btn-mini,
body.bc-module-ecommerce.bc-commerce-page .tab,
body.bc-module-ecommerce.bc-commerce-page .chip.light,
body.bc-module-ecommerce.bc-commerce-page .summary-chip,
body.bc-module-ecommerce.bc-commerce-page .brand-chip,
body.bc-module-ecommerce.bc-commerce-page .mini-count,
body.bc-module-ecommerce.bc-commerce-page .switch{
  background:var(--bc-business-panel-3) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:none !important;
}
body.bc-module-ecommerce.bc-commerce-page .tab.active{
  background:linear-gradient(135deg,#f5c400,#ffd84d) !important;
  color:#111 !important;
  border-color:rgba(245,196,0,.36) !important;
}
body.bc-module-ecommerce.bc-commerce-page .btn.warn,
body.bc-module-ecommerce.bc-commerce-page button.warn,
body.bc-module-ecommerce.bc-commerce-page .warnpill,
body.bc-module-ecommerce.bc-commerce-page .chip.warn,
body.bc-module-ecommerce.bc-commerce-page .pill.warn{
  background:rgba(245,196,0,.13) !important;
  color:#ffd84d !important;
  border-color:rgba(245,196,0,.30) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .btn.warn,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page button.warn,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .warnpill,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .chip.warn,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .pill.warn{
  color:#8a5a00 !important;
}
body.bc-module-ecommerce.bc-commerce-page .btn.danger,
body.bc-module-ecommerce.bc-commerce-page button.danger,
body.bc-module-ecommerce.bc-commerce-page .bad,
body.bc-module-ecommerce.bc-commerce-page .chip.bad,
body.bc-module-ecommerce.bc-commerce-page .pill.danger,
body.bc-module-ecommerce.bc-commerce-page .pill.bad{
  background:rgba(255,92,92,.13) !important;
  color:#ffd0d0 !important;
  border-color:rgba(255,92,92,.30) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .btn.danger,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page button.danger,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .bad,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .chip.bad,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .pill.danger,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .pill.bad{
  color:#b42318 !important;
}
body.bc-module-ecommerce.bc-commerce-page .ok,
body.bc-module-ecommerce.bc-commerce-page .chip.ok,
body.bc-module-ecommerce.bc-commerce-page .pill.ok{
  background:rgba(49,212,125,.13) !important;
  color:#9ff2c5 !important;
  border-color:rgba(49,212,125,.30) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .ok,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .chip.ok,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .pill.ok{
  color:#147a3d !important;
}
body.bc-module-ecommerce.bc-commerce-page .info,
body.bc-module-ecommerce.bc-commerce-page .chip.info,
body.bc-module-ecommerce.bc-commerce-page .pill.info{
  background:rgba(74,144,255,.13) !important;
  color:#d8e7ff !important;
  border-color:rgba(74,144,255,.30) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .info,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .chip.info,
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .pill.info{
  color:#175cd3 !important;
}
body.bc-module-ecommerce.bc-commerce-page button:disabled,
body.bc-module-ecommerce.bc-commerce-page .btn:disabled{
  opacity:.55 !important;
  cursor:not-allowed !important;
}

/* Tabelas e listas grandes. */
body.bc-module-ecommerce.bc-commerce-page .table-wrap,
body.bc-module-ecommerce.bc-commerce-page .preview-wrap,
body.bc-module-ecommerce.bc-commerce-page .mini-table{
  background:var(--bc-business-panel) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:var(--bc-business-shadow) !important;
}
body.bc-module-ecommerce.bc-commerce-page table{
  color:var(--bc-business-text) !important;
}
body.bc-module-ecommerce.bc-commerce-page th{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-soft) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-module-ecommerce.bc-commerce-page td{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-module-ecommerce.bc-commerce-page tr:hover td{
  background:rgba(245,196,0,.10) !important;
}
body.bc-module-ecommerce.bc-commerce-page .row-selected td{
  background:rgba(245,196,0,.18) !important;
}
html[data-bc-theme="light"] body.bc-module-ecommerce.bc-commerce-page .row-selected td{
  background:#fff4bf !important;
}

/* Detalhe/editor do Publicador ML. */
body.bc-module-ecommerce.bc-commerce-page .detail-head{
  background:linear-gradient(135deg,#101214,#24272d) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.14) !important;
}
body.bc-module-ecommerce.bc-commerce-page .detail-head strong,
body.bc-module-ecommerce.bc-commerce-page .detail-head .secondary{
  color:#fff !important;
}
body.bc-module-ecommerce.bc-commerce-page .detail-body,
body.bc-module-ecommerce.bc-commerce-page .editor-layout,
body.bc-module-ecommerce.bc-commerce-page .editor-main,
body.bc-module-ecommerce.bc-commerce-page .editor-fields,
body.bc-module-ecommerce.bc-commerce-page .photos-box,
body.bc-module-ecommerce.bc-commerce-page .description-box,
body.bc-module-ecommerce.bc-commerce-page .unit-preview{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-module-ecommerce.bc-commerce-page .pre,
body.bc-module-ecommerce.bc-commerce-page pre,
body.bc-module-ecommerce.bc-commerce-page .json-box,
body.bc-module-ecommerce.bc-commerce-page .json-dual{
  background:#0f172a !important;
  color:#e5edf8 !important;
  border-color:rgba(255,255,255,.14) !important;
}
body.bc-module-ecommerce.bc-commerce-page .pics img,
body.bc-module-ecommerce.bc-commerce-page .thumb,
body.bc-module-ecommerce.bc-commerce-page .pic-thumb{
  background:#fff !important;
  border-color:rgba(15,23,42,.12) !important;
}

/* Processo/alerta do Publicador. */
html[data-bc-theme="dark"] body.bc-module-ecommerce.bc-commerce-page .process-panel.running{
  background:rgba(23,92,211,.12) !important;
  border-color:rgba(74,144,255,.30) !important;
}
html[data-bc-theme="dark"] body.bc-module-ecommerce.bc-commerce-page .process-panel.done{
  background:rgba(49,212,125,.12) !important;
  border-color:rgba(49,212,125,.28) !important;
}
html[data-bc-theme="dark"] body.bc-module-ecommerce.bc-commerce-page .process-panel.error{
  background:rgba(255,92,92,.12) !important;
  border-color:rgba(255,92,92,.28) !important;
}
body.bc-module-ecommerce.bc-commerce-page .progress-track,
body.bc-module-ecommerce.bc-commerce-page .bar{
  background:rgba(255,255,255,.10) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-module-ecommerce.bc-commerce-page .progress-bar,
body.bc-module-ecommerce.bc-commerce-page .bar > div{
  background:linear-gradient(135deg,#f5c400,#ffd84d) !important;
}

/* Compra e Marketing: reforço contra campos/cards amarelos ou brancos com texto incorreto. */
body.bc-module-compras.bc-commerce-page .container,
body.bc-module-compras.bc-commerce-page .card,
body.bc-module-compras.bc-commerce-page .result-card,
body.bc-module-compras.bc-commerce-page .secao-avancado,
body.bc-module-compras.bc-commerce-page .product-live-box,
body.bc-module-compras.bc-commerce-page .product-live-list,
body.bc-module-compras.bc-commerce-page .product-live-item,
body.bc-module-compras.bc-commerce-page .product-live-loading,
body.bc-module-marketing.bc-commerce-page .container,
body.bc-module-marketing.bc-commerce-page .card,
body.bc-module-marketing.bc-commerce-page .result-card,
body.bc-module-marketing.bc-commerce-page .secao-avancado,
body.bc-module-marketing.bc-commerce-page .product-live-box,
body.bc-module-marketing.bc-commerce-page .product-live-list,
body.bc-module-marketing.bc-commerce-page .product-live-item,
body.bc-module-marketing.bc-commerce-page .product-live-loading,
body.bc-module-marketing.bc-commerce-page .attr,
body.bc-module-marketing.bc-commerce-page .pic-card,
body.bc-module-marketing.bc-commerce-page .data-box{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:var(--bc-business-shadow) !important;
}
body.bc-module-compras.bc-commerce-page h1,
body.bc-module-compras.bc-commerce-page h2,
body.bc-module-compras.bc-commerce-page h3,
body.bc-module-compras.bc-commerce-page label,
body.bc-module-compras.bc-commerce-page .label,
body.bc-module-marketing.bc-commerce-page h1,
body.bc-module-marketing.bc-commerce-page h2,
body.bc-module-marketing.bc-commerce-page h3,
body.bc-module-marketing.bc-commerce-page label,
body.bc-module-marketing.bc-commerce-page .label{
  color:var(--bc-business-text) !important;
}
body.bc-module-compras.bc-commerce-page .desc,
body.bc-module-compras.bc-commerce-page .hint,
body.bc-module-compras.bc-commerce-page .muted,
body.bc-module-compras.bc-commerce-page .secao-avancado-toggle,
body.bc-module-marketing.bc-commerce-page .desc,
body.bc-module-marketing.bc-commerce-page .sub,
body.bc-module-marketing.bc-commerce-page .muted,
body.bc-module-marketing.bc-commerce-page .pic-cap{
  color:var(--bc-business-muted) !important;
}
body.bc-module-compras.bc-commerce-page input,
body.bc-module-compras.bc-commerce-page select,
body.bc-module-compras.bc-commerce-page textarea,
body.bc-module-marketing.bc-commerce-page input,
body.bc-module-marketing.bc-commerce-page select,
body.bc-module-marketing.bc-commerce-page textarea,
body.bc-module-marketing.bc-commerce-page .input{
  background:var(--bc-business-input) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border-strong) !important;
}
body.bc-module-compras.bc-commerce-page input::placeholder,
body.bc-module-marketing.bc-commerce-page input::placeholder{
  color:var(--bc-business-muted) !important;
}

@media(max-width:680px){
  body.bc-module-ecommerce.bc-commerce-page .top .logo,
  body.bc-module-ecommerce.bc-commerce-page .top .brand,
  body.bc-module-ecommerce.bc-commerce-page .top-bar .logo-wrap,
  body.bc-module-compras.bc-commerce-page .top .logo,
  body.bc-module-compras.bc-commerce-page .top .brand,
  body.bc-module-marketing.bc-commerce-page .top .logo,
  body.bc-module-marketing.bc-commerce-page .top .brand{
    min-height:44px !important;
    border-radius:14px !important;
    padding:6px 10px !important;
  }
  body.bc-module-ecommerce.bc-commerce-page .top .logo img,
  body.bc-module-ecommerce.bc-commerce-page .top .brand img,
  body.bc-module-ecommerce.bc-commerce-page .top-bar .logo-wrap img,
  body.bc-module-compras.bc-commerce-page .top .logo img,
  body.bc-module-compras.bc-commerce-page .top .brand img,
  body.bc-module-marketing.bc-commerce-page .top .logo img,
  body.bc-module-marketing.bc-commerce-page .top .brand img{
    max-height:31px !important;
    max-width:66vw !important;
  }
}

/* =========================================================
   PATCH 2026-06-24 v3 - Revisão final campos/templates
   Escopo: E-commerce, Publicador ML, Compras e Marketing.
   Corrige input sem type, inputs dinâmicos do JS, disabled/read-only,
   logo sobre fundo escuro e cards internos sem contraste.
   ========================================================= */

/* Fundo real por tema nos módulos comerciais. */
html[data-bc-theme="dark"] body.bc-commerce-page{
  color:#f7f8fa !important;
  background:
    radial-gradient(circle at 12% 12%, rgba(245,196,0,.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(255,216,77,.08), transparent 26%),
    linear-gradient(135deg,#050608 0%,#0b0e14 52%,#151207 100%) !important;
}
html[data-bc-theme="light"] body.bc-commerce-page{
  color:#171a21 !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(245,196,0,.18), transparent 30%),
    linear-gradient(135deg,#f8fafc 0%,#e9edf3 100%) !important;
}

/* A marca é imagem escura; por isso o berço da logo precisa continuar claro em qualquer tema. */
body.bc-commerce-page .top .brand,
body.bc-commerce-page .top .logo,
body.bc-commerce-page .top-bar .logo-wrap,
body.bc-commerce-page .logo-wrap,
body.bc-commerce-page .brand-logo{
  background:rgba(255,255,255,.96) !important;
  border:1px solid rgba(15,23,42,.14) !important;
  border-radius:18px !important;
  box-shadow:0 12px 30px rgba(0,0,0,.16) !important;
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:7px 14px !important;
  overflow:hidden !important;
}
body.bc-commerce-page .top .brand img,
body.bc-commerce-page .top .logo img,
body.bc-commerce-page .top-bar .logo-wrap img,
body.bc-commerce-page .logo-wrap img,
body.bc-commerce-page .brand-logo img{
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  box-shadow:none !important;
  filter:none !important;
  opacity:1 !important;
  max-height:38px !important;
  max-width:min(420px,72vw) !important;
  width:auto !important;
  object-fit:contain !important;
}

/* Inputs: vários templates usam <input> sem type. input[type=text] não pega esses casos. */
body.bc-commerce-page input:not([type]),
body.bc-commerce-page input[type="text"],
body.bc-commerce-page input[type="number"],
body.bc-commerce-page input[type="search"],
body.bc-commerce-page input[type="email"],
body.bc-commerce-page input[type="password"],
body.bc-commerce-page input[type="url"],
body.bc-commerce-page input[type="tel"],
body.bc-commerce-page input[type="date"],
body.bc-commerce-page input[type="time"],
body.bc-commerce-page input[type="datetime-local"],
body.bc-commerce-page input[type="month"],
body.bc-commerce-page input[type="week"],
body.bc-commerce-page input[type="file"],
body.bc-commerce-page select,
body.bc-commerce-page textarea,
body.bc-commerce-page .input,
body.bc-commerce-page .select,
body.bc-commerce-page .textarea,
body.bc-commerce-page .form-control{
  background:var(--bc-business-input) !important;
  color:var(--bc-business-text) !important;
  border:1px solid var(--bc-business-border-strong) !important;
  box-shadow:none !important;
  outline:none !important;
  caret-color:#f5c400 !important;
}
body.bc-commerce-page input:not([type])::placeholder,
body.bc-commerce-page input[type="text"]::placeholder,
body.bc-commerce-page input[type="number"]::placeholder,
body.bc-commerce-page input[type="search"]::placeholder,
body.bc-commerce-page input[type="email"]::placeholder,
body.bc-commerce-page input[type="password"]::placeholder,
body.bc-commerce-page input[type="url"]::placeholder,
body.bc-commerce-page input[type="tel"]::placeholder,
body.bc-commerce-page input[type="date"]::placeholder,
body.bc-commerce-page input[type="time"]::placeholder,
body.bc-commerce-page textarea::placeholder,
body.bc-commerce-page .input::placeholder,
body.bc-commerce-page .textarea::placeholder{
  color:var(--bc-business-muted) !important;
  opacity:1 !important;
}
body.bc-commerce-page input:not([type]):focus,
body.bc-commerce-page input[type="text"]:focus,
body.bc-commerce-page input[type="number"]:focus,
body.bc-commerce-page input[type="search"]:focus,
body.bc-commerce-page input[type="email"]:focus,
body.bc-commerce-page input[type="password"]:focus,
body.bc-commerce-page input[type="url"]:focus,
body.bc-commerce-page input[type="tel"]:focus,
body.bc-commerce-page input[type="date"]:focus,
body.bc-commerce-page input[type="time"]:focus,
body.bc-commerce-page input[type="datetime-local"]:focus,
body.bc-commerce-page input[type="month"]:focus,
body.bc-commerce-page input[type="week"]:focus,
body.bc-commerce-page select:focus,
body.bc-commerce-page textarea:focus,
body.bc-commerce-page .input:focus,
body.bc-commerce-page .select:focus,
body.bc-commerce-page .textarea:focus,
body.bc-commerce-page .form-control:focus{
  background:var(--bc-business-input-focus) !important;
  border-color:rgba(245,196,0,.72) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.16) !important;
}
body.bc-commerce-page input[readonly],
body.bc-commerce-page textarea[readonly],
body.bc-commerce-page input:disabled,
body.bc-commerce-page select:disabled,
body.bc-commerce-page textarea:disabled,
body.bc-commerce-page .input.disabled,
body.bc-commerce-page .select.disabled{
  opacity:1 !important;
  background:var(--bc-business-panel-3) !important;
  color:var(--bc-business-soft) !important;
  -webkit-text-fill-color:var(--bc-business-soft) !important;
}
body.bc-commerce-page input:-webkit-autofill,
body.bc-commerce-page input:-webkit-autofill:hover,
body.bc-commerce-page input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--bc-business-text) !important;
  box-shadow:0 0 0 1000px var(--bc-business-input) inset !important;
  transition:background-color 9999s ease-out 0s !important;
}
body.bc-commerce-page select option{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
}

/* Checkboxes/radios continuam compactos, sem virar input grande. */
body.bc-commerce-page input[type="checkbox"],
body.bc-commerce-page input[type="radio"]{
  width:auto !important;
  min-height:auto !important;
  height:auto !important;
  padding:0 !important;
  background:transparent !important;
  border-color:var(--bc-business-border-strong) !important;
  accent-color:#f5c400 !important;
  box-shadow:none !important;
}

/* Labels e textos auxiliares dos filtros/editor. */
body.bc-commerce-page label,
body.bc-commerce-page .label,
body.bc-commerce-page .field label,
body.bc-commerce-page .filter-grid label,
body.bc-commerce-page .search-grid label,
body.bc-commerce-page .req-field label,
body.bc-commerce-page .form-label,
body.bc-commerce-page th{
  color:var(--bc-business-soft) !important;
}
body.bc-commerce-page h1,
body.bc-commerce-page h2,
body.bc-commerce-page h3,
body.bc-commerce-page h4,
body.bc-commerce-page .title,
body.bc-commerce-page .action-title,
body.bc-commerce-page .metric-value,
body.bc-commerce-page .metric b,
body.bc-commerce-page .kpi b,
body.bc-commerce-page .val,
body.bc-commerce-page strong,
body.bc-commerce-page b{
  color:var(--bc-business-text) !important;
}
body.bc-commerce-page .muted,
body.bc-commerce-page .desc,
body.bc-commerce-page .hint,
body.bc-commerce-page .small,
body.bc-commerce-page small,
body.bc-commerce-page .metric-note,
body.bc-commerce-page .action-desc,
body.bc-commerce-page .status-sub,
body.bc-commerce-page .detail-meta,
body.bc-commerce-page .help-text,
body.bc-commerce-page .secondary-text{
  color:var(--bc-business-muted) !important;
}

/* Cards internos e elementos dinâmicos criados por JS no Publicador/Produto 360/Inteligência. */
body.bc-commerce-page .card,
body.bc-commerce-page .panel,
body.bc-commerce-page .metric,
body.bc-commerce-page .kpi,
body.bc-commerce-page .step,
body.bc-commerce-page .flow-item,
body.bc-commerce-page .status-row,
body.bc-commerce-page .status-card,
body.bc-commerce-page .search-card,
body.bc-commerce-page .table-card,
body.bc-commerce-page .result-card,
body.bc-commerce-page .data-box,
body.bc-commerce-page .empty,
body.bc-commerce-page .mini,
body.bc-commerce-page .plan-mini,
body.bc-commerce-page .attr,
body.bc-commerce-page .req-field,
body.bc-commerce-page .price-input-card,
body.bc-commerce-page .editor-section,
body.bc-commerce-page .editor-layout,
body.bc-commerce-page .editor-main,
body.bc-commerce-page .editor-fields,
body.bc-commerce-page .photos-box,
body.bc-commerce-page .description-box,
body.bc-commerce-page .unit-preview,
body.bc-commerce-page .switch,
body.bc-commerce-page .modal,
body.bc-commerce-page .modal-card,
body.bc-commerce-page .detail,
body.bc-commerce-page .detail-body,
body.bc-commerce-page .filter-box,
body.bc-commerce-page .filter-card,
body.bc-commerce-page .product-live-box,
body.bc-commerce-page .product-live-list,
body.bc-commerce-page .product-live-item,
body.bc-commerce-page .product-live-loading{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:var(--bc-business-shadow) !important;
}
body.bc-commerce-page .table-wrap,
body.bc-commerce-page .preview-wrap,
body.bc-commerce-page .mini-table,
body.bc-commerce-page table{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-commerce-page td{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-commerce-page tr:hover td{
  background:rgba(245,196,0,.10) !important;
}
html[data-bc-theme="light"] body.bc-commerce-page tr:hover td{
  background:#fff8d7 !important;
}

/* Botões secundários/desabilitados não podem ficar branco com texto branco. */
body.bc-commerce-page button.secondary,
body.bc-commerce-page .btn.secondary,
body.bc-commerce-page .button.secondary,
body.bc-commerce-page .mini-btn,
body.bc-commerce-page .btn-mini,
body.bc-commerce-page .tab:not(.active){
  background:var(--bc-business-panel-3) !important;
  color:var(--bc-business-text) !important;
  border:1px solid var(--bc-business-border-strong) !important;
}
body.bc-commerce-page button:disabled,
body.bc-commerce-page .btn:disabled,
body.bc-commerce-page .button:disabled,
body.bc-commerce-page .mini-btn:disabled,
body.bc-commerce-page .btn-mini:disabled{
  opacity:1 !important;
  background:rgba(255,255,255,.06) !important;
  color:var(--bc-business-muted) !important;
  border-color:var(--bc-business-border) !important;
  cursor:not-allowed !important;
}
html[data-bc-theme="light"] body.bc-commerce-page button:disabled,
html[data-bc-theme="light"] body.bc-commerce-page .btn:disabled,
html[data-bc-theme="light"] body.bc-commerce-page .button:disabled,
html[data-bc-theme="light"] body.bc-commerce-page .mini-btn:disabled,
html[data-bc-theme="light"] body.bc-commerce-page .btn-mini:disabled{
  background:#f2f4f7 !important;
  color:#667085 !important;
}

/* Alertas e progresso mantendo contraste. */
body.bc-commerce-page .notice,
body.bc-commerce-page .hint,
body.bc-commerce-page .process-panel,
body.bc-commerce-page .selection-bar,
body.bc-commerce-page .mini-count{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-commerce-page .process-panel.done{
  background:rgba(49,212,125,.12) !important;
  border-color:rgba(49,212,125,.30) !important;
}
body.bc-commerce-page .process-panel.running{
  background:rgba(74,144,255,.12) !important;
  border-color:rgba(74,144,255,.30) !important;
}
body.bc-commerce-page .process-panel.error{
  background:rgba(255,92,92,.12) !important;
  border-color:rgba(255,92,92,.30) !important;
}

@media(max-width:680px){
  body.bc-commerce-page .top .brand,
  body.bc-commerce-page .top .logo,
  body.bc-commerce-page .top-bar .logo-wrap,
  body.bc-commerce-page .logo-wrap,
  body.bc-commerce-page .brand-logo{
    min-height:44px !important;
    border-radius:14px !important;
    padding:6px 10px !important;
  }
  body.bc-commerce-page .top .brand img,
  body.bc-commerce-page .top .logo img,
  body.bc-commerce-page .top-bar .logo-wrap img,
  body.bc-commerce-page .logo-wrap img,
  body.bc-commerce-page .brand-logo img{
    max-height:31px !important;
    max-width:66vw !important;
  }
}

/* ===== PATCH 2026-06-24: popups/modais Compras e Etiquetas =====
   Corrige overlay que aparecia no meio da página quando havia scroll,
   centralização em mobile e contraste no tema claro/escuro.
   Somente CSS. Não altera rotas, scanner, impressão, cálculos ou backend. */
body.bc-module-compras .modal-overlay,
body.bc-module-compras.bc-commerce-page .modal-overlay{
  position:fixed !important;
  inset:0 !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  min-height:100vh !important;
  margin:0 !important;
  padding:clamp(12px, 3vw, 28px) !important;
  display:none;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(0,0,0,.70) !important;
  z-index:2147483000 !important;
  overflow:auto !important;
  overscroll-behavior:contain !important;
  backdrop-filter:blur(3px) !important;
  -webkit-backdrop-filter:blur(3px) !important;
}
body.bc-module-compras .modal-overlay[style*="display:flex"],
body.bc-module-compras.bc-commerce-page .modal-overlay[style*="display:flex"]{
  display:flex !important;
}
html[data-bc-theme="light"] body.bc-module-compras .modal-overlay,
html[data-bc-theme="light"] body.bc-module-compras.bc-commerce-page .modal-overlay{
  background:rgba(15,23,42,.52) !important;
}
body.bc-module-compras .modal-card,
body.bc-module-compras.bc-commerce-page .modal-card{
  position:relative !important;
  margin:auto !important;
  width:min(520px, calc(100vw - 28px)) !important;
  max-width:520px !important;
  max-height:calc(100dvh - 32px) !important;
  overflow:auto !important;
  transform:none !important;
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border:1px solid var(--bc-business-border-strong, var(--bc-business-border)) !important;
  box-shadow:0 28px 90px rgba(0,0,0,.55) !important;
  border-radius:18px !important;
  -webkit-overflow-scrolling:touch !important;
}
html[data-bc-theme="light"] body.bc-module-compras .modal-card,
html[data-bc-theme="light"] body.bc-module-compras.bc-commerce-page .modal-card{
  background:#fffbe8 !important;
  color:#171a21 !important;
  border-color:rgba(245,196,0,.55) !important;
  box-shadow:0 24px 80px rgba(15,23,42,.24) !important;
}
body.bc-module-compras .modal-header,
body.bc-module-compras .modal-section-title,
body.bc-module-compras .resultado-bloco,
body.bc-module-compras .resultado-bloco p,
body.bc-module-compras .valor{
  color:inherit !important;
}
body.bc-module-compras .modal-footer{
  position:sticky !important;
  bottom:0 !important;
  padding-top:10px !important;
  background:linear-gradient(to top, var(--bc-business-panel) 68%, transparent) !important;
}
html[data-bc-theme="light"] body.bc-module-compras .modal-footer{
  background:linear-gradient(to top, #fffbe8 68%, transparent) !important;
}
body.bc-module-compras .btn-ok{
  background:linear-gradient(135deg, #f5c400, #ffd84d) !important;
  color:#111 !important;
  border:1px solid rgba(245,196,0,.38) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.22) !important;
}

body.bc-etiqueta-page #loading-overlay,
body.bc-etiqueta-page .loading-overlay,
body.bc-etiqueta-page .overlay.fullscreen,
body.bc-etiqueta-page .modal-overlay{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  min-height:100vh !important;
  margin:0 !important;
  padding:clamp(14px, 4vw, 28px) !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  z-index:2147483000 !important;
  overflow:auto !important;
  overscroll-behavior:contain !important;
  background:rgba(0,0,0,.72) !important;
  backdrop-filter:blur(3px) !important;
  -webkit-backdrop-filter:blur(3px) !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page #loading-overlay,
html[data-bc-theme="light"] body.bc-etiqueta-page .loading-overlay,
html[data-bc-theme="light"] body.bc-etiqueta-page .overlay.fullscreen,
html[data-bc-theme="light"] body.bc-etiqueta-page .modal-overlay{
  background:rgba(255,255,255,.82) !important;
}
body.bc-etiqueta-page #loading-overlay .loading-text,
body.bc-etiqueta-page .loading-overlay .loading-text{
  display:block !important;
  max-width:min(560px, 92vw) !important;
  color:var(--bc-text) !important;
  font-weight:950 !important;
  line-height:1.35 !important;
  text-align:center !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page #loading-overlay .loading-text,
html[data-bc-theme="light"] body.bc-etiqueta-page .loading-overlay .loading-text{
  color:#171a21 !important;
}
body.bc-etiqueta-page .spinner{
  flex:0 0 auto !important;
  border-color:rgba(255,255,255,.18) !important;
  border-top-color:#f5c400 !important;
}
html[data-bc-theme="light"] body.bc-etiqueta-page .spinner{
  border-color:rgba(15,23,42,.12) !important;
  border-top-color:#f5c400 !important;
}
body.bc-etiqueta-page .box,
body.bc-etiqueta-page .modal-card{
  max-width:min(560px, calc(100vw - 28px)) !important;
  max-height:calc(100dvh - 32px) !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}
@media(max-width:560px){
  body.bc-module-compras .modal-overlay,
  body.bc-module-compras.bc-commerce-page .modal-overlay,
  body.bc-etiqueta-page #loading-overlay,
  body.bc-etiqueta-page .loading-overlay,
  body.bc-etiqueta-page .modal-overlay{
    align-items:center !important;
    padding:12px !important;
  }
  body.bc-module-compras .modal-card,
  body.bc-module-compras.bc-commerce-page .modal-card,
  body.bc-etiqueta-page .box,
  body.bc-etiqueta-page .modal-card{
    width:calc(100vw - 24px) !important;
    max-height:calc(100dvh - 24px) !important;
    border-radius:16px !important;
  }
}

/* =========================================================
   PATCH 2026-06-24 v5 - Tema comercial: campos + dock
   Escopo visual apenas: Ecommerce, Compras e Marketing.
   - Corrige campos brancos remanescentes no tema escuro.
   - Posiciona o seletor de tema dentro da área útil da tela,
     seguindo o padrão do Inventário, sem ficar perdido no canto.
   ========================================================= */

/* Dock de tema para páginas comerciais/legadas: dentro da largura útil, não colado no canto da janela. */
body.bc-commerce-page .bc-theme-dock{
  position:fixed !important;
  top:22px !important;
  right:max(18px, calc((100vw - 1180px) / 2 + 8px)) !important;
  left:auto !important;
  transform:none !important;
  z-index:1800 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  width:auto !important;
  height:auto !important;
  margin:0 !important;
  pointer-events:none !important;
}
body.bc-commerce-page .bc-theme-dock-btn{
  pointer-events:auto !important;
  appearance:none !important;
  min-height:44px !important;
  height:44px !important;
  padding:0 18px !important;
  border-radius:999px !important;
  border:1px solid var(--bc-business-border) !important;
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
  box-shadow:0 14px 32px rgba(0,0,0,.20) !important;
  backdrop-filter:blur(14px) !important;
  -webkit-backdrop-filter:blur(14px) !important;
  font-family:var(--bc-font,'Segoe UI',Arial,sans-serif) !important;
  font-weight:950 !important;
  font-size:.88rem !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  cursor:pointer !important;
  white-space:nowrap !important;
}
html[data-bc-theme="light"] body.bc-commerce-page .bc-theme-dock-btn{
  background:rgba(255,255,255,.92) !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.12) !important;
  box-shadow:0 12px 28px rgba(15,23,42,.12) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page .bc-theme-dock-btn{
  background:rgba(17,23,34,.92) !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.16) !important;
}
body.bc-commerce-page .bc-theme-dock-btn:hover{
  border-color:rgba(245,196,0,.60) !important;
  box-shadow:0 16px 38px rgba(0,0,0,.26) !important;
}

/* Em telas pequenas o dock entra na mesma região visual dos atalhos, sem cortar conteúdo. */
@media(max-width:760px){
  body.bc-commerce-page .bc-theme-dock{
    top:12px !important;
    right:12px !important;
  }
  body.bc-commerce-page .bc-theme-dock-btn{
    min-height:40px !important;
    height:40px !important;
    padding:0 12px !important;
    font-size:.80rem !important;
  }
}

/* Campos remanescentes: alguns templates/JS usam classes próprias ou input sem type.
   O escopo é somente tema escuro para não descaracterizar o tema claro. */
html[data-bc-theme="dark"] body.bc-commerce-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
html[data-bc-theme="dark"] body.bc-commerce-page select,
html[data-bc-theme="dark"] body.bc-commerce-page textarea,
html[data-bc-theme="dark"] body.bc-commerce-page .form-control,
html[data-bc-theme="dark"] body.bc-commerce-page .form-select,
html[data-bc-theme="dark"] body.bc-commerce-page .input,
html[data-bc-theme="dark"] body.bc-commerce-page .select,
html[data-bc-theme="dark"] body.bc-commerce-page .textarea,
html[data-bc-theme="dark"] body.bc-commerce-page .filter-input,
html[data-bc-theme="dark"] body.bc-commerce-page .search-input,
html[data-bc-theme="dark"] body.bc-commerce-page .sku-input,
html[data-bc-theme="dark"] body.bc-commerce-page .ml-input,
html[data-bc-theme="dark"] body.bc-commerce-page .field-input,
html[data-bc-theme="dark"] body.bc-commerce-page .inline-input,
html[data-bc-theme="dark"] body.bc-commerce-page .fake-input,
html[data-bc-theme="dark"] body.bc-commerce-page .fake-select,
html[data-bc-theme="dark"] body.bc-commerce-page .choices__inner,
html[data-bc-theme="dark"] body.bc-commerce-page .select2-selection,
html[data-bc-theme="dark"] body.bc-commerce-page [contenteditable="true"]{
  background:#232832 !important;
  background-color:#232832 !important;
  color:#f7f8fa !important;
  -webkit-text-fill-color:#f7f8fa !important;
  border-color:rgba(255,255,255,.24) !important;
  box-shadow:none !important;
  text-shadow:none !important;
  caret-color:#f5c400 !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus,
html[data-bc-theme="dark"] body.bc-commerce-page select:focus,
html[data-bc-theme="dark"] body.bc-commerce-page textarea:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .form-control:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .form-select:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .select:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .textarea:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .filter-input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .search-input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .sku-input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .ml-input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .field-input:focus,
html[data-bc-theme="dark"] body.bc-commerce-page .inline-input:focus{
  background:#2a303b !important;
  background-color:#2a303b !important;
  border-color:rgba(245,196,0,.78) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.16) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page input::placeholder,
html[data-bc-theme="dark"] body.bc-commerce-page textarea::placeholder,
html[data-bc-theme="dark"] body.bc-commerce-page .input::placeholder,
html[data-bc-theme="dark"] body.bc-commerce-page .textarea::placeholder{
  color:rgba(247,248,250,.58) !important;
  -webkit-text-fill-color:rgba(247,248,250,.58) !important;
  opacity:1 !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page input[readonly],
html[data-bc-theme="dark"] body.bc-commerce-page textarea[readonly],
html[data-bc-theme="dark"] body.bc-commerce-page input:disabled,
html[data-bc-theme="dark"] body.bc-commerce-page select:disabled,
html[data-bc-theme="dark"] body.bc-commerce-page textarea:disabled{
  background:rgba(255,255,255,.055) !important;
  background-color:rgba(255,255,255,.055) !important;
  color:rgba(247,248,250,.56) !important;
  -webkit-text-fill-color:rgba(247,248,250,.56) !important;
  border-color:rgba(255,255,255,.13) !important;
}

/* Botões que estavam brancos no escuro, especialmente em Compras/Marketing. */
html[data-bc-theme="dark"] body.bc-commerce-page button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]),
html[data-bc-theme="dark"] body.bc-commerce-page .btn:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]),
html[data-bc-theme="dark"] body.bc-commerce-page .button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]){
  background:#232832 !important;
  background-color:#232832 !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.20) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]):hover,
html[data-bc-theme="dark"] body.bc-commerce-page .btn:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]):hover,
html[data-bc-theme="dark"] body.bc-commerce-page .button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]):hover{
  border-color:rgba(245,196,0,.50) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page button:disabled,
html[data-bc-theme="dark"] body.bc-commerce-page .btn:disabled,
html[data-bc-theme="dark"] body.bc-commerce-page .button:disabled{
  background:rgba(255,255,255,.055) !important;
  background-color:rgba(255,255,255,.055) !important;
  color:rgba(247,248,250,.46) !important;
  border-color:rgba(255,255,255,.10) !important;
}

/* Blocos brancos remanescentes em popups, resultados e detalhes comerciais. */
html[data-bc-theme="dark"] body.bc-commerce-page .modal-content,
html[data-bc-theme="dark"] body.bc-commerce-page .popup,
html[data-bc-theme="dark"] body.bc-commerce-page .popup-card,
html[data-bc-theme="dark"] body.bc-commerce-page .dropdown-menu,
html[data-bc-theme="dark"] body.bc-commerce-page .result,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado-card,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado-bloco,
html[data-bc-theme="dark"] body.bc-commerce-page .summary,
html[data-bc-theme="dark"] body.bc-commerce-page .box,
html[data-bc-theme="dark"] body.bc-commerce-page .white-card,
html[data-bc-theme="dark"] body.bc-commerce-page .content-card{
  background:rgba(17,23,34,.94) !important;
  background-color:rgba(17,23,34,.94) !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.14) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page .modal-content *,
html[data-bc-theme="dark"] body.bc-commerce-page .popup *,
html[data-bc-theme="dark"] body.bc-commerce-page .popup-card *,
html[data-bc-theme="dark"] body.bc-commerce-page .result *,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado *,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado-card *,
html[data-bc-theme="dark"] body.bc-commerce-page .resultado-bloco *{
  color:inherit;
}

/* No tema claro, preserva o padrão limpo, mas evita botão branco sem borda/contraste. */
html[data-bc-theme="light"] body.bc-commerce-page button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]),
html[data-bc-theme="light"] body.bc-commerce-page .btn:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]),
html[data-bc-theme="light"] body.bc-commerce-page .button:not(.bc-theme-dock-btn):not(.bc-primary-btn):not(.primary):not(.active):not([class*="yellow"]):not([class*="warning"]){
  background:#fff !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.16) !important;
}

/* =========================================================
   PATCH 2026-06-24 v6 - Padronização visual por referência do Inventário
   Escopo: E-commerce, Compras, Marketing, Consulta Produto e Conciliador.
   - Move o tema para a topbar existente via bc-theme.js.
   - Padroniza Home, Voltar, Sair e Tema com os ícones do projeto.
   - Corrige chips/cards genéricos brancos no tema escuro.
   - Aplica a mesma camada de tema aos módulos Consulta e Conciliador.
   ========================================================= */

html[data-bc-theme="dark"] body.bc-module-consulta,
html[data-bc-theme="dark"] body.bc-module-conciliador,
body.bc-module-consulta.theme-dark,
body.bc-module-conciliador.theme-dark{
  --bc-business-panel:rgba(17,23,34,.92);
  --bc-business-panel-2:rgba(13,18,27,.96);
  --bc-business-panel-3:rgba(255,255,255,.075);
  --bc-business-input:#232832;
  --bc-business-input-focus:#2a303b;
  --bc-business-border:rgba(255,255,255,.14);
  --bc-business-border-strong:rgba(255,255,255,.24);
  --bc-business-text:#f7f8fa;
  --bc-business-soft:rgba(247,248,250,.72);
  --bc-business-muted:rgba(247,248,250,.56);
  --bc-business-shadow:0 24px 70px rgba(0,0,0,.38);
  --bg:#050608;
  --card:rgba(17,23,34,.92);
  --soft:rgba(255,255,255,.075);
  --text:#f7f8fa;
  --muted:rgba(247,248,250,.62);
  --line:rgba(255,255,255,.14);
  color:#f7f8fa !important;
  background:
    radial-gradient(circle at 12% 12%, rgba(245,196,0,.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(255,216,77,.08), transparent 26%),
    linear-gradient(135deg,#050608 0%,#0b0e14 52%,#151207 100%) !important;
  color-scheme:dark;
}

html[data-bc-theme="light"] body.bc-module-consulta,
html[data-bc-theme="light"] body.bc-module-conciliador,
body.bc-module-consulta.theme-light,
body.bc-module-conciliador.theme-light{
  --bc-business-panel:rgba(255,255,255,.94);
  --bc-business-panel-2:rgba(255,255,255,.98);
  --bc-business-panel-3:rgba(15,23,42,.045);
  --bc-business-input:#fff;
  --bc-business-input-focus:#fff;
  --bc-business-border:rgba(15,23,42,.12);
  --bc-business-border-strong:rgba(15,23,42,.20);
  --bc-business-text:#171a21;
  --bc-business-soft:rgba(23,26,33,.72);
  --bc-business-muted:rgba(23,26,33,.58);
  --bc-business-shadow:0 18px 42px rgba(15,23,42,.11);
  --bg:#f8fafc;
  --card:rgba(255,255,255,.94);
  --soft:#fff8dc;
  --text:#171a21;
  --muted:rgba(23,26,33,.62);
  --line:rgba(15,23,42,.12);
  color:#171a21 !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(245,196,0,.18), transparent 30%),
    linear-gradient(135deg,#f8fafc 0%,#e9edf3 100%) !important;
  color-scheme:light;
}

html[data-bc-theme] body.bc-module-consulta::before,
html[data-bc-theme] body.bc-module-conciliador::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(currentColor 1px, transparent 1px),
    linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size:44px 44px;
  opacity:.035;
  z-index:0;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.72), transparent 82%);
}
body.bc-module-consulta > *,
body.bc-module-conciliador > *{position:relative;z-index:1;}

/* Topbar única para módulos comerciais/operacionais, seguindo o Inventário. */
body.bc-commerce-page .bc-business-topbar-legacy{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  width:100% !important;
  max-width:100% !important;
  min-height:62px !important;
  margin:0 0 18px !important;
  padding:0 !important;
  position:relative !important;
  z-index:60 !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > .top-spacer,
body.bc-commerce-page .bc-business-topbar-legacy > .spacer,
body.bc-commerce-page .bc-business-topbar-legacy > span:empty,
body.bc-commerce-page .bc-business-topbar-legacy > div:empty{
  display:none !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > .logo-wrap,
body.bc-commerce-page .bc-business-topbar-legacy > .brand,
body.bc-commerce-page .bc-business-topbar-legacy > .logo,
body.bc-commerce-page .bc-business-topbar-legacy > .bc-business-brand-legacy{
  order:1 !important;
  flex:1 1 auto !important;
  min-width:220px !important;
  min-height:58px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  background:rgba(255,255,255,.96) !important;
  border:1px solid rgba(15,23,42,.12) !important;
  border-radius:22px !important;
  box-shadow:0 14px 32px rgba(0,0,0,.16) !important;
  padding:8px 18px !important;
  overflow:hidden !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > .logo-wrap img,
body.bc-commerce-page .bc-business-topbar-legacy > .brand img,
body.bc-commerce-page .bc-business-topbar-legacy > .logo img,
body.bc-commerce-page .bc-business-topbar-legacy > .bc-business-brand-legacy img{
  display:block !important;
  width:auto !important;
  max-width:min(360px, 56vw) !important;
  max-height:42px !important;
  object-fit:contain !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  filter:none !important;
  padding:0 !important;
  opacity:1 !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > a,
body.bc-commerce-page .bc-business-topbar-legacy > button,
body.bc-commerce-page .bc-business-topbar-legacy > form > button,
body.bc-commerce-page .bc-business-topbar-legacy > form .icon-btn,
body.bc-commerce-page .bc-business-topbar-legacy > form .top-icon,
body.bc-commerce-page .bc-business-topbar-legacy > form .icon{
  order:2 !important;
  flex:0 0 50px !important;
  width:50px !important;
  height:50px !important;
  min-width:50px !important;
  min-height:50px !important;
  border-radius:16px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  background:rgba(255,255,255,.92) !important;
  color:#101214 !important;
  border:1px solid rgba(15,23,42,.12) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.14) !important;
  text-decoration:none !important;
  cursor:pointer !important;
  line-height:1 !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > form{
  order:2 !important;
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 !important;
  padding:0 !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > a:hover,
body.bc-commerce-page .bc-business-topbar-legacy > button:hover,
body.bc-commerce-page .bc-business-topbar-legacy > form > button:hover{
  transform:translateY(-1px) !important;
  border-color:rgba(245,196,0,.55) !important;
  box-shadow:0 16px 34px rgba(0,0,0,.18) !important;
}
body.bc-commerce-page .bc-business-topbar-legacy > a img,
body.bc-commerce-page .bc-business-topbar-legacy > button img,
body.bc-commerce-page .bc-business-topbar-legacy > form > button img,
body.bc-commerce-page .bc-business-topbar-legacy > form .icon-btn img,
body.bc-commerce-page .bc-business-topbar-legacy > form .top-icon img,
body.bc-commerce-page .bc-business-topbar-legacy > form .icon img{
  width:23px !important;
  height:23px !important;
  object-fit:contain !important;
  filter:brightness(0) !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  border-radius:0 !important;
}
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock,
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock--inline{
  order:2 !important;
  position:static !important;
  inset:auto !important;
  top:auto !important;
  right:auto !important;
  left:auto !important;
  transform:none !important;
  z-index:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  height:auto !important;
  margin:0 !important;
  pointer-events:auto !important;
}
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock-btn{
  pointer-events:auto !important;
  min-height:50px !important;
  height:50px !important;
  padding:0 18px !important;
  border-radius:999px !important;
  border:1px solid var(--bc-business-border, rgba(255,255,255,.14)) !important;
  background:var(--bc-business-panel-2, rgba(17,23,34,.92)) !important;
  color:var(--bc-business-text, #f7f8fa) !important;
  box-shadow:0 14px 32px rgba(0,0,0,.18) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  font-family:var(--bc-font,'Segoe UI',Arial,sans-serif) !important;
  font-weight:950 !important;
  white-space:nowrap !important;
}
html[data-bc-theme="light"] body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock-btn{
  background:rgba(255,255,255,.92) !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.12) !important;
}
html[data-bc-theme="dark"] body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock-btn{
  background:rgba(17,23,34,.92) !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.16) !important;
}
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock-btn:hover{
  border-color:rgba(245,196,0,.60) !important;
}

/* Fallback: se o JS ainda não moveu o dock, não deixe ele cobrir conteúdo. */
body.bc-commerce-page > .bc-theme-dock:not(.bc-theme-dock--inline){
  position:fixed !important;
  top:18px !important;
  right:max(18px, calc((100vw - 1180px) / 2 + 8px)) !important;
  z-index:1000 !important;
}

/* Cards e campos dos módulos adicionados à camada global. */
body.bc-module-consulta .container,
body.bc-module-consulta .card,
body.bc-module-consulta .field,
body.bc-module-consulta .attr,
body.bc-module-consulta .result-card,
body.bc-module-consulta .empty,
body.bc-module-consulta .pic-card,
body.bc-module-consulta #liveBox,
body.bc-module-consulta .live-list,
body.bc-module-consulta .live-item,
body.bc-module-consulta .live-loading,
body.bc-module-conciliador .container,
body.bc-module-conciliador .wrap,
body.bc-module-conciliador .shell,
body.bc-module-conciliador .card,
body.bc-module-conciliador .step,
body.bc-module-conciliador .metric,
body.bc-module-conciliador .recent-item,
body.bc-module-conciliador .smallbox,
body.bc-module-conciliador .note,
body.bc-module-conciliador .summary,
body.bc-module-conciliador .result,
body.bc-module-conciliador .box,
body.bc-module-conciliador .panel,
body.bc-module-conciliador .filters,
body.bc-module-conciliador .table-wrap{
  background:var(--bc-business-panel) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:var(--bc-business-shadow) !important;
}
body.bc-module-consulta .card.soft,
body.bc-module-consulta .pill,
body.bc-module-conciliador .pill,
body.bc-module-conciliador .btn-white,
body.bc-module-conciliador .btn-sec,
body.bc-module-conciliador .btn-secondary{
  background:var(--bc-business-panel-3) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
}
body.bc-module-consulta h1,
body.bc-module-consulta h2,
body.bc-module-consulta h3,
body.bc-module-consulta strong,
body.bc-module-consulta .val,
body.bc-module-consulta .result-desc,
body.bc-module-consulta .live-title,
body.bc-module-conciliador h1,
body.bc-module-conciliador h2,
body.bc-module-conciliador h3,
body.bc-module-conciliador strong,
body.bc-module-conciliador .v,
body.bc-module-conciliador .recent-title,
body.bc-module-conciliador .metric .v{
  color:var(--bc-business-text) !important;
}
body.bc-module-consulta .sub,
body.bc-module-consulta .hint,
body.bc-module-consulta .label,
body.bc-module-consulta .attr .v,
body.bc-module-consulta .result-meta,
body.bc-module-consulta .live-subtitle,
body.bc-module-consulta .live-meta,
body.bc-module-consulta .live-score,
body.bc-module-consulta .live-footer,
body.bc-module-consulta .pic-cap,
body.bc-module-conciliador p,
body.bc-module-conciliador .muted,
body.bc-module-conciliador .recent-sub,
body.bc-module-conciliador .metric .k,
body.bc-module-conciliador .smallbox .k,
body.bc-module-conciliador label,
body.bc-module-conciliador .note,
body.bc-module-conciliador .overlay-sub{
  color:var(--bc-business-muted) !important;
}
body.bc-module-consulta input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
body.bc-module-consulta select,
body.bc-module-consulta textarea,
body.bc-module-consulta .input,
body.bc-module-conciliador input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
body.bc-module-conciliador select,
body.bc-module-conciliador textarea,
body.bc-module-conciliador .input{
  background:var(--bc-business-input) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border-strong) !important;
  caret-color:#f5c400 !important;
  -webkit-text-fill-color:var(--bc-business-text) !important;
}
body.bc-module-consulta input::placeholder,
body.bc-module-consulta textarea::placeholder,
body.bc-module-conciliador input::placeholder,
body.bc-module-conciliador textarea::placeholder{
  color:var(--bc-business-muted) !important;
  -webkit-text-fill-color:var(--bc-business-muted) !important;
  opacity:1 !important;
}
body.bc-module-consulta input:focus,
body.bc-module-consulta select:focus,
body.bc-module-consulta textarea:focus,
body.bc-module-conciliador input:focus,
body.bc-module-conciliador select:focus,
body.bc-module-conciliador textarea:focus{
  background:var(--bc-business-input-focus) !important;
  border-color:rgba(245,196,0,.72) !important;
  box-shadow:0 0 0 4px rgba(245,196,0,.16) !important;
  outline:none !important;
}
body.bc-module-consulta select option,
body.bc-module-conciliador select option{
  background:var(--bc-business-panel-2) !important;
  color:var(--bc-business-text) !important;
}
body.bc-module-consulta .btn,
body.bc-module-consulta button.btn,
body.bc-module-conciliador .btn,
body.bc-module-conciliador button.btn,
body.bc-module-conciliador .btn-primary{
  background:linear-gradient(135deg,#f5c400,#ffd84d) !important;
  color:#111 !important;
  border:1px solid rgba(245,196,0,.38) !important;
  box-shadow:0 16px 34px rgba(245,196,0,.16) !important;
}
body.bc-module-consulta .btn-sec,
body.bc-module-consulta button.btn-sec,
body.bc-module-conciliador .btn-sec,
body.bc-module-conciliador .btn-white,
body.bc-module-conciliador .btn-secondary{
  background:var(--bc-business-panel-3) !important;
  color:var(--bc-business-text) !important;
  border-color:var(--bc-business-border) !important;
  box-shadow:none !important;
}

/* Chips e badges genéricos: corrige "Seleção por marca/SKU" e "Sem marca" no escuro. */
html[data-bc-theme="dark"] body.bc-commerce-page .chip:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="dark"] body.bc-commerce-page .pill:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="dark"] body.bc-commerce-page .badge:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="dark"] body.bc-commerce-page .brand-chip,
html[data-bc-theme="dark"] body.bc-commerce-page .tag:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="dark"] body.bc-commerce-page .mini-count,
html[data-bc-theme="dark"] body.bc-commerce-page .summary-chip{
  background:rgba(255,255,255,.075) !important;
  background-color:rgba(255,255,255,.075) !important;
  color:#f7f8fa !important;
  border-color:rgba(255,255,255,.18) !important;
  box-shadow:none !important;
}
html[data-bc-theme="light"] body.bc-commerce-page .chip:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="light"] body.bc-commerce-page .pill:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="light"] body.bc-commerce-page .badge:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="light"] body.bc-commerce-page .brand-chip,
html[data-bc-theme="light"] body.bc-commerce-page .tag:not(.ok):not(.warn):not(.bad):not(.danger):not(.info),
html[data-bc-theme="light"] body.bc-commerce-page .mini-count,
html[data-bc-theme="light"] body.bc-commerce-page .summary-chip{
  background:rgba(255,255,255,.92) !important;
  color:#171a21 !important;
  border-color:rgba(15,23,42,.12) !important;
}

/* Modais/popups com OK sempre acessível e sem branco estourado. */
body.bc-commerce-page .modal-overlay,
body.bc-commerce-page .modal-backdrop,
body.bc-commerce-page .overlay,
body.bc-commerce-page #overlay{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  z-index:2147482000 !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:auto !important;
  padding:clamp(14px,4vw,28px) !important;
  background:rgba(0,0,0,.72) !important;
  backdrop-filter:blur(4px) !important;
  -webkit-backdrop-filter:blur(4px) !important;
}
html[data-bc-theme="light"] body.bc-commerce-page .modal-overlay,
html[data-bc-theme="light"] body.bc-commerce-page .modal-backdrop,
html[data-bc-theme="light"] body.bc-commerce-page .overlay,
html[data-bc-theme="light"] body.bc-commerce-page #overlay{
  background:rgba(255,255,255,.82) !important;
}
body.bc-commerce-page .modal,
body.bc-commerce-page .modal-card,
body.bc-commerce-page .modal-content,
body.bc-commerce-page .popup,
body.bc-commerce-page .popup-card{
  max-width:min(760px, calc(100vw - 28px)) !important;
  max-height:calc(100dvh - 32px) !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
  background:var(--bc-business-panel, rgba(17,23,34,.94)) !important;
  color:var(--bc-business-text, #f7f8fa) !important;
  border:1px solid var(--bc-business-border, rgba(255,255,255,.14)) !important;
}
body.bc-commerce-page .modal-footer,
body.bc-commerce-page .popup-footer{
  position:sticky !important;
  bottom:0 !important;
  z-index:2 !important;
  background:linear-gradient(to top, var(--bc-business-panel, rgba(17,23,34,.94)) 72%, transparent) !important;
}

@media(max-width:760px){
  body.bc-commerce-page .bc-business-topbar-legacy{
    gap:7px !important;
    min-height:0 !important;
    margin-bottom:10px !important;
    flex-wrap:wrap !important;
  }
  body.bc-commerce-page .bc-business-topbar-legacy > .logo-wrap,
  body.bc-commerce-page .bc-business-topbar-legacy > .brand,
  body.bc-commerce-page .bc-business-topbar-legacy > .logo,
  body.bc-commerce-page .bc-business-topbar-legacy > .bc-business-brand-legacy{
    order:1 !important;
    flex:1 1 100% !important;
    min-width:0 !important;
    min-height:46px !important;
    border-radius:16px !important;
    justify-content:center !important;
    padding:7px 12px !important;
  }
  body.bc-commerce-page .bc-business-topbar-legacy > .logo-wrap img,
  body.bc-commerce-page .bc-business-topbar-legacy > .brand img,
  body.bc-commerce-page .bc-business-topbar-legacy > .logo img,
  body.bc-commerce-page .bc-business-topbar-legacy > .bc-business-brand-legacy img{
    max-height:32px !important;
    max-width:72vw !important;
  }
  body.bc-commerce-page .bc-business-topbar-legacy > a,
  body.bc-commerce-page .bc-business-topbar-legacy > button,
  body.bc-commerce-page .bc-business-topbar-legacy > form > button{
    flex:0 0 42px !important;
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
    min-height:42px !important;
    border-radius:14px !important;
  }
  body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock-btn{
    min-height:42px !important;
    height:42px !important;
    padding:0 12px !important;
    font-size:.80rem !important;
  }
}

/* Ordem padrão dos atalhos no cabeçalho: Home, Voltar, Tema, Sair. */
body.bc-commerce-page .bc-business-topbar-legacy > .bc-nav-home{order:2 !important;}
body.bc-commerce-page .bc-business-topbar-legacy > .bc-nav-back{order:3 !important;}
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock,
body.bc-commerce-page .bc-business-topbar-legacy .bc-theme-dock--inline{order:4 !important;}
body.bc-commerce-page .bc-business-topbar-legacy > form.bc-nav-logout,
body.bc-commerce-page .bc-business-topbar-legacy > .bc-nav-logout{order:5 !important;}

/* =========================================================
   COMPRAS - PADRÃO INVENTÁRIO
   Layout dedicado para /compras/ usando base_sistema.html.
   Sem alterar backend, rotas, cálculos ou regras.
   ========================================================= */
.bc-compras-page .bc-page{
    width:min(1380px, calc(100vw - 32px));
  }

  .compras-hero{
    margin-bottom:16px;
    border-radius:28px;
    border:1px solid rgba(245,196,0,.22);
    background:
      linear-gradient(135deg, rgba(245,196,0,.15) 0%, rgba(245,196,0,.06) 25%, rgba(255,255,255,.045) 100%);
    box-shadow:0 18px 48px rgba(0,0,0,.18);
    padding:24px;
    overflow:hidden;
  }

  .compras-hero-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(260px, 380px);
    gap:18px;
    align-items:center;
  }

  .compras-hero h2{
    margin:0;
    font-size:clamp(2rem, 4vw, 3.35rem);
    line-height:1;
    font-weight:950;
    letter-spacing:-.055em;
    color:var(--bc-text);
  }

  .compras-hero p{
    margin:12px 0 0;
    max-width:920px;
    color:var(--bc-text-soft);
    font-weight:800;
    line-height:1.48;
  }

  .compras-hero-panel{
    border-radius:22px;
    border:1px solid var(--bc-border);
    background:rgba(255,255,255,.055);
    padding:16px;
    display:grid;
    gap:10px;
  }

  .compras-hero-panel strong{
    display:block;
    color:var(--bc-yellow-strong);
    font-size:.78rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    margin-bottom:2px;
  }

  .compras-hero-panel span{
    color:var(--bc-text-soft);
    font-size:.92rem;
    font-weight:800;
    line-height:1.35;
  }

  .compras-layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 360px;
    gap:16px;
    align-items:start;
  }

  .compras-card,
  .compras-side-card{
    border-radius:28px;
    border:1px solid var(--bc-border);
    background:
      linear-gradient(145deg, rgba(255,255,255,.072), rgba(255,255,255,.036)),
      rgba(18,22,30,.72);
    box-shadow:var(--bc-shadow-soft);
    padding:20px;
    overflow:visible;
  }

  .compras-side{
    display:grid;
    gap:16px;
    position:sticky;
    top:18px;
  }

  .compras-card-head,
  .compras-side-title{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin:0 0 16px;
  }

  .compras-card-head h3,
  .compras-side-title h3{
    margin:0;
    color:var(--bc-text);
    font-size:1.22rem;
    font-weight:950;
    letter-spacing:-.03em;
  }

  .compras-card-head p,
  .compras-side-title p{
    margin:5px 0 0;
    color:var(--bc-text-muted);
    font-size:.9rem;
    font-weight:800;
    line-height:1.35;
  }

  .compras-dot{
    width:12px;
    height:12px;
    margin-top:6px;
    flex:0 0 auto;
    border-radius:999px;
    background:var(--bc-yellow);
    box-shadow:0 0 0 6px rgba(245,196,0,.12);
  }

  .bc-compras-page form{
    margin:0;
    text-align:left;
  }

  .bc-compras-page label{
    display:block;
    margin:10px 0 6px;
    color:var(--bc-text);
    font-weight:900;
    font-size:.92rem;
  }

  .bc-compras-page input[type="text"],
  .bc-compras-page input[type="number"],
  .bc-compras-page select,
  .bc-compras-page textarea{
    width:100%;
    min-height:48px;
    border-radius:16px;
    border:1px solid var(--bc-border);
    background:rgba(255,255,255,.075);
    color:var(--bc-text);
    padding:0 14px;
    outline:none;
    font-family:var(--bc-font);
    font-size:1rem;
    font-weight:800;
    transition:border-color .14s ease, box-shadow .14s ease, background .14s ease;
  }

  .bc-compras-page input::placeholder,
  .bc-compras-page textarea::placeholder{
    color:var(--bc-text-muted);
  }

  .bc-compras-page input[type="text"]:focus,
  .bc-compras-page input[type="number"]:focus,
  .bc-compras-page select:focus,
  .bc-compras-page textarea:focus{
    border-color:rgba(245,196,0,.62);
    box-shadow:0 0 0 4px rgba(245,196,0,.12);
    background:rgba(255,255,255,.105);
  }

  .bc-compras-page select option{
    background:#111722;
    color:#f7f8fa;
  }

  .bc-compras-page input.is-disabled,
  .bc-compras-page input:disabled{
    background:rgba(255,255,255,.045);
    color:var(--bc-text-muted);
    cursor:not-allowed;
  }

  .grid-2{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:10px 14px;
  }

  .muted-note,
  .field-note,
  .legacy-note,
  .hint{
    color:var(--bc-text-muted);
    font-size:.84rem;
    line-height:1.35;
    font-weight:800;
  }

  .field-note strong{color:var(--bc-yellow-strong);}

  .secao-avancado-toggle{
    margin-top:13px;
    color:var(--bc-text-soft);
    font-weight:900;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    user-select:none;
  }

  .secao-avancado{
    display:none;
    margin-top:11px;
    padding:16px;
    border-radius:20px;
    border:1px dashed rgba(245,196,0,.35);
    background:rgba(245,196,0,.075);
  }

  .secao-avancado.aberta{display:block;}
  .secao-avancado h3{
    margin:10px 0 6px;
    color:var(--bc-text);
    font-size:1rem;
    font-weight:950;
  }

  .rule-box{
    margin:9px 0;
    padding:12px 14px;
    border-radius:16px;
    border:1px solid rgba(245,196,0,.25);
    background:rgba(245,196,0,.09);
  }
  .rule-box p{
    margin:4px 0;
    color:var(--bc-text-soft);
    font-size:.88rem;
    line-height:1.35;
    font-weight:800;
  }

  .mensagem{
    margin:14px 0 0;
    padding:13px 15px;
    border-radius:17px;
    border:1px solid var(--bc-border);
    background:rgba(255,255,255,.07);
    color:var(--bc-text);
    font-weight:900;
    text-align:center;
  }
  .mensagem.success{color:#bcffd8;background:rgba(49,212,125,.12);border-color:rgba(49,212,125,.24);}
  .mensagem.danger{color:#ffd0d0;background:rgba(255,92,92,.12);border-color:rgba(255,92,92,.24);}
  .mensagem.info{color:#cde0ff;background:rgba(13,110,253,.13);border-color:rgba(13,110,253,.25);}

  .compras-submit,
  .bc-compras-page input[type="submit"]{
    width:100%;
    min-height:54px;
    appearance:none;
    border:none;
    border-radius:17px;
    margin-top:14px;
    padding:13px 14px;
    background:linear-gradient(135deg, var(--bc-yellow), var(--bc-yellow-strong));
    color:#111;
    box-shadow:0 18px 36px rgba(245,196,0,.18);
    cursor:pointer;
    font-family:var(--bc-font);
    font-size:1.03rem;
    font-weight:950;
    transition:transform .12s ease, box-shadow .12s ease;
  }
  .compras-submit:hover,
  .bc-compras-page input[type="submit"]:hover{
    transform:translateY(-1px);
    box-shadow:0 20px 44px rgba(245,196,0,.24);
  }

  .import-lote{
    display:grid;
    gap:10px;
  }
  .import-lote-title{
    color:var(--bc-text);
    font-size:1.08rem;
    font-weight:950;
    letter-spacing:-.02em;
  }
  .import-lote-desc{
    color:var(--bc-text-muted);
    font-weight:800;
    line-height:1.35;
  }
  .import-buttons{
    display:grid;
    gap:9px;
  }
  .btn-import{
    min-height:46px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:11px 12px;
    text-align:center;
    text-decoration:none;
    font-weight:950;
    box-shadow:0 14px 28px rgba(0,0,0,.18);
    transition:transform .12s ease, box-shadow .12s ease;
  }
  .btn-import:hover{transform:translateY(-1px);box-shadow:0 18px 34px rgba(0,0,0,.22);}
  .btn-import.ml{background:#101214;color:#fff;}
  .btn-import.sh{background:linear-gradient(135deg,#f06700,#ff8a2b);color:#fff;}

  .compras-checklist{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:9px;
  }
  .compras-checklist li{
    display:flex;
    gap:9px;
    color:var(--bc-text-soft);
    font-weight:850;
    line-height:1.35;
  }
  .compras-checklist li::before{
    content:"";
    width:9px;
    height:9px;
    margin-top:6px;
    border-radius:999px;
    flex:0 0 auto;
    background:var(--bc-yellow);
    box-shadow:0 0 0 4px rgba(245,196,0,.10);
  }

  /* Popup de busca de produto */
  .product-search{position:relative;min-width:0;width:100%;}
  .product-live-box{
    display:none;
    position:absolute;
    z-index:60;
    left:0;
    right:0;
    top:calc(100% + 8px);
    border:1px solid var(--bc-border);
    border-radius:20px;
    background:var(--bc-panel-strong);
    overflow:hidden;
    box-shadow:var(--bc-shadow);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
  }
  .product-live-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:12px 14px;
    background:rgba(245,196,0,.12);
    color:var(--bc-text);
    font-weight:950;
  }
  .product-live-sub{font-size:.78rem;color:var(--bc-text-muted);font-weight:850;margin-top:2px;}
  .product-live-count{display:inline-flex;border-radius:999px;padding:5px 9px;border:1px solid rgba(245,196,0,.25);background:rgba(245,196,0,.12);font-weight:950;font-size:.78rem;color:var(--bc-yellow-strong);white-space:nowrap;}
  .product-live-list{max-height:360px;overflow:auto;padding:6px;background:rgba(255,255,255,.025);}
  .product-live-item{width:100%;border:1px solid transparent;border-radius:16px;background:rgba(255,255,255,.055);padding:11px 12px;text-align:left;cursor:pointer;display:grid;gap:7px;margin-bottom:6px;transition:background .12s ease,border-color .12s ease,transform .08s ease,box-shadow .12s ease;}
  .product-live-item:hover,.product-live-item.active{background:rgba(245,196,0,.12);border-color:rgba(245,196,0,.42);box-shadow:0 10px 22px rgba(0,0,0,.18);transform:translateY(-1px);}
  .product-live-title{font-weight:950;font-size:1rem;line-height:1.2rem;color:var(--bc-text);}
  .product-live-meta{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;font-size:.84rem;color:var(--bc-text-soft);font-weight:850;}
  .product-live-meta b{color:var(--bc-yellow-strong);}
  .product-live-loading{padding:16px 14px;font-weight:900;color:var(--bc-text-soft);background:transparent;}
  .product-live-footer{padding:9px 12px;background:rgba(255,255,255,.04);color:var(--bc-text-muted);font-size:.78rem;font-weight:850;display:flex;justify-content:space-between;gap:8px;}
  .product-live-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;background:rgba(245,196,0,.18);color:var(--bc-yellow-strong);font-size:.72rem;font-weight:950;white-space:nowrap;}

  /* Modal de resultado */
  .modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.66);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:10000;
    padding:16px;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
  }
  .modal-card{
    width:min(760px, 94vw);
    max-height:86vh;
    overflow:auto;
    border-radius:24px;
    border:1px solid var(--bc-border);
    background:var(--bc-panel-strong);
    color:var(--bc-text);
    box-shadow:var(--bc-shadow);
    padding:20px;
    text-align:left;
  }
  .modal-header{font-size:1.18rem;font-weight:950;margin-bottom:10px;color:var(--bc-text);}
  .modal-section-title{font-size:1rem;font-weight:950;margin:14px 0 7px;color:var(--bc-yellow-strong);}
  .resultado-bloco p{margin:4px 0;font-size:.96rem;color:var(--bc-text-soft);font-weight:800;line-height:1.35;}
  .valor{font-weight:950;color:var(--bc-text);}
  .pill{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:.74rem;font-weight:950;border:1px solid var(--bc-border);background:rgba(255,255,255,.06);margin-left:8px;}
  .pill.sku{background:rgba(13,110,253,.14);border-color:rgba(13,110,253,.28);color:#cde0ff;}
  .pill.calc{background:rgba(49,212,125,.12);border-color:rgba(49,212,125,.26);color:#bcffd8;}
  .modal-footer{margin-top:16px;text-align:right;position:sticky;bottom:-20px;padding-top:10px;background:linear-gradient(to top, var(--bc-panel-strong) 72%, transparent);}
  .btn-ok{min-height:44px;border:none;border-radius:15px;padding:0 24px;background:linear-gradient(135deg,var(--bc-yellow),var(--bc-yellow-strong));color:#111;font-weight:950;cursor:pointer;box-shadow:0 14px 28px rgba(245,196,0,.18);}

  body.theme-light .compras-hero{
    background:linear-gradient(135deg, rgba(245,193,0,.16) 0%, rgba(255,221,63,.07) 24%, rgba(255,255,255,.95) 100%);
    border-color:rgba(245,193,0,.24);
    box-shadow:0 16px 38px rgba(15,23,42,.08);
  }
  body.theme-light .compras-card,
  body.theme-light .compras-side-card,
  body.theme-light .compras-hero-panel{
    background:rgba(255,255,255,.84);
    border-color:rgba(15,23,42,.10);
    box-shadow:0 14px 32px rgba(15,23,42,.08);
  }
  body.theme-light .bc-compras-page input[type="text"],
  body.theme-light .bc-compras-page input[type="number"],
  body.theme-light .bc-compras-page select,
  body.theme-light .bc-compras-page textarea{
    background:#fff;
    color:#171a21;
    border-color:rgba(15,23,42,.12);
  }
  body.theme-light .bc-compras-page select option{background:#fff;color:#171a21;}
  body.theme-light .secao-avancado,
  body.theme-light .rule-box{background:rgba(245,193,0,.10);border-color:rgba(180,132,0,.24);}
  body.theme-light .modal-card,
  body.theme-light .product-live-box{background:rgba(255,255,255,.96);color:#171a21;border-color:rgba(15,23,42,.12);}
  body.theme-light .product-live-list{background:rgba(15,23,42,.025);}
  body.theme-light .product-live-item{background:#fff;}
  body.theme-light .product-live-item:hover,
  body.theme-light .product-live-item.active{background:#fffbe6;}
  body.theme-light .btn-import.ml{background:#181818;color:#fff;}

  @media(max-width:980px){
    .compras-hero-grid,
    .compras-layout{grid-template-columns:1fr;}
    .compras-side{position:static;}
  }

  @media(max-width:680px){
    .bc-compras-page .bc-page{width:100%;padding:14px 8px 24px;}
    .compras-hero,.compras-card,.compras-side-card{border-radius:22px;padding:16px;}
    .grid-2{grid-template-columns:1fr;}
    .product-live-meta{grid-template-columns:1fr;}
    .product-live-list{max-height:330px;}
    .product-live-footer{display:none;}
  }

  @media(max-width:420px){
    .compras-hero,.compras-card,.compras-side-card{padding:12px;border-radius:18px;}
    .compras-hero h2{font-size:1.75rem;}
    .bc-compras-page input[type="text"],
    .bc-compras-page input[type="number"],
    .bc-compras-page select,
    .bc-compras-page textarea{min-height:46px;font-size:.94rem;border-radius:14px;}
  }

/* =========================================================
   Compras V12 - card único de ações laterais
   ========================================================= */
.compras-side-card-unico{
  display:grid;
  gap:18px;
}
.compras-rule-inline{
  margin-top:2px;
  padding-top:16px;
  border-top:1px solid var(--bc-border);
}
.compras-side-title.compact{
  margin-bottom:12px;
}
.compras-side-title.compact h3{
  font-size:1.06rem;
}
.compras-side-title.compact p{
  font-size:.86rem;
}

/* V2 - Compras: card único para processamento em lote */
.bc-compras-page .compras-batch-card{
  position:relative;
  overflow:hidden;
}
.bc-compras-page .import-lote-single{
  padding:14px;
  border:1px solid var(--bc-border);
  border-radius:18px;
  background:rgba(255,255,255,.045);
}
html[data-bc-theme="light"] .bc-compras-page .import-lote-single{
  background:rgba(255,255,255,.72);
}
.bc-compras-page .btn-import.batch{
  margin-top:6px;
  background:linear-gradient(135deg,var(--bc-yellow),var(--bc-yellow-strong));
  color:#111827;
  border:1px solid rgba(0,0,0,.16);
  min-height:52px;
}
.bc-compras-page .btn-import.batch::before{
  content:"📥";
  margin-right:8px;
}
