* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: #f4f6f9; color: #222; }
:root { --empresa-cor: #f97316; --empresa-menu: #1f2937; --empresa-menu-texto: #fff; --empresa-botao-texto: #111; }
header { background: #1f2937; color: #fff; padding: 15px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; border-bottom: 4px solid #f97316; }
.logo-texto { font-size: 22px; font-weight: 900; letter-spacing: -1px; }
.logo-texto .laranja { color: #f97316; }
.logo-texto .branco { color: #fff; }
.slogan { font-size: 11px; letter-spacing: 1px; color: #9ca3af; text-transform: uppercase; margin-top: 2px;}
nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
nav button { background: #374151; color: #e5e7eb; border: 0; padding: 10px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .2s; }
nav button.ativo, nav button:hover { background: #f97316; color: #fff; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
section { display: none; } section.ativo { display: block; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05); margin-bottom: 20px; border: 1px solid #e5e7eb; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { padding: 20px; border-radius: 10px; background: linear-gradient(135deg,#fff,#f9fafb); border-left: 5px solid #f97316; box-shadow: 0 2px 4px rgba(0,0,0,.05); }
.stat .label { font-size: 13px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat .value { font-size: 26px; font-weight: 800; color: #111827; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-size: 12px; text-transform: uppercase; color: #6b7280; font-weight: 700; letter-spacing: .5px; }
tr:hover td { background: #f9fafb; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; transition: border .2s; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--empresa-cor); outline-offset: 1px; }
label { display: block; font-size: 12px; color: #374151; margin-bottom: 6px; font-weight: 600; }
.campo { margin-bottom: 14px; }
button.btn { background: var(--empresa-cor); color: var(--empresa-botao-texto); border: 0; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 14px; transition: .2s; }
button.btn:hover { box-shadow: inset 0 0 0 2px currentColor; }
button.btn.sec { background: #e5e7eb; color: #374151; }
button.btn.sec:hover { background: #d1d5db; box-shadow: none; }
button.btn.danger { background: #ef4444; }
button.btn.danger:hover { background: #dc2626; }
button.btn.mini { padding: 6px 10px; font-size: 12px; }
.foto { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; background: #e5e7eb; border: 1px solid #d1d5db; }
.toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.ativo { display: flex; }
.modal { background: #fff; border-radius: 12px; max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 25px; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1); }
.modal h2 { margin-bottom: 20px; color: #111827; border-bottom: 2px solid var(--empresa-cor); padding-bottom: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.badge.aberto { background: #fef3c7; color: #92400e; }
.badge.fechado { background: #dcfce7; color: #166534; }
.badge.cancelado { background: #fee2e2; color: #991b1b; }
.aviso { padding: 12px 16px; background: #fff7ed; color: #c2410c; border-radius: 6px; margin: 15px 0; font-size: 14px; border-left: 4px solid #f97316; font-weight: 600; }
[hidden] { display: none !important; }
.contador-pedidos-site { display:inline-block; margin-left:auto; border-radius:999px; padding:0 .5em; background:#fdd58b; color:#492900; font-weight:700; }
#atalho-pedidos-site { margin-bottom:.75rem; }
.separacao { margin: 0.7rem 0; }
.separacao h4 { margin: 0 0 0.35rem; }
.grupo-separacao { border-left: 3px solid #f97316; padding: 0.3rem 0.6rem; margin-bottom: 0.35rem; }
.grupo-separacao ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
#pdv-entrega label { display: block; margin-bottom: 0.5rem; }
.top-empresa { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem 1rem; }
.top-empresa label { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.top-empresa select { width: auto; margin: 0; }
.top-empresa #top-date { color: #6b7280; font-size: 13px; }
.saldo-orcamento { grid-column: 1 / -1; color: #4b5563; }
.campos-endereco { margin: 12px 0; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; }
.campos-endereco legend { padding: 0 6px; font-weight: 700; }
.endereco-sugestoes { max-height: 200px; overflow-y: auto; margin-bottom: 6px; background: white; border: 1px solid #d1d5db; border-radius: 6px; }
.endereco-sugestoes button { display: block; width: 100%; text-align: left; padding: 8px 10px; background: white; border: 0; border-bottom: 1px solid #e5e7eb; cursor: pointer; }
.endereco-sugestoes button:is(:hover,:focus-visible) { background: #eef2ff; }
.endereco-sugestoes small { display: block; padding: 5px 10px; text-align: right; white-space: nowrap; color: #374151; }
.endereco-aviso { display: block; color: #4b5563; margin-bottom: 6px; }
.marca-empresa { text-transform: uppercase; overflow-wrap: anywhere; }
.marca-empresa img { display: none; max-width: 100%; max-height: 76px; object-fit: contain; margin-inline: auto; }
.marca-empresa.marca-tem-logo img { display: block; }
.marca-empresa.marca-tem-logo span { display: none; }
#logo-empresa img { max-height: 54px; background: #fff; padding: 4px; border-radius: 4px; }
.identidade-config { border-top: 1px solid #d1d5db; padding-top: 12px; margin: 16px 0; }
.identidade-config legend { padding-right: 8px; font-weight: 700; }
.previa-marca { display: grid; place-items: center; min-height: 92px; padding: 12px; margin: 4px 0 12px; border: 1px solid #e5e7eb; border-radius: 6px; text-align: center; font-size: 22px; font-weight: 900; }
.previa-marca img { max-height: 64px; }
#app .sidebar, #tela-login { background: var(--empresa-menu); }
#app .sidebar, #app .sidebar :is(.nav-item, .nav-group-title, .sidebar-header p, .user-role, .user-name, .senha-btn) { color: var(--empresa-menu-texto); }
#form-empresa input[type=color] { min-height: 44px; padding: 4px; }
.opcoes-cargos { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 4px 14px; margin: 14px 0; }
fieldset { border: 0; min-width: 0; }
.perm-check { display: flex; align-items: flex-start; gap: 8px; }
.perm-check input { flex: 0 0 auto; width: auto; }
button:disabled { cursor: not-allowed; opacity: .55; }
.senha-btn { background: transparent; border: 0; color: #d1d5db; cursor: pointer; font-size: 12px; padding: 5px; }
.card { min-width: 0; overflow-x: auto; }
.pdv-buscas { display: flex; align-items: end; gap: 10px; margin-bottom: 12px; }
.pdv-buscas label { flex: 1; margin: 0; }
.pdv-buscas input, fieldset label input, fieldset label select { margin-top: 5px; }
.pdv-resultados { max-height: 350px; overflow-y: auto; margin-bottom: 10px; }
.produto-pdv { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #e5e7eb; padding: 10px; cursor: pointer; }
.produto-pdv:hover, .produto-pdv:focus-visible { background: #fff7ed; }
.item-pdv { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(64px, 80px) minmax(58px, 70px) auto; align-items: end; gap: 7px; padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
.item-pdv label { margin: 0; }
.item-pdv input { padding: 5px; }
.item-pdv strong, .item-pdv small { display: block; overflow-wrap: anywhere; }
.estoque-disponivel { display: block; color: #6b7280; }
.estado-vazio { padding: 16px; text-align: center; color: #4b5563; }
.ranking-produto { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.qr-pdv { display: block; max-width: 100%; margin: 0 auto 14px; }
.referencia { font-size: 12px; color: #4b5563; overflow-wrap: anywhere; margin-bottom: 12px; }
.btn-link { display: inline-block; padding: 10px 14px; border-radius: 6px; background: #c2410c; color: #fff; text-decoration: none; font-weight: 700; }
#form-prod label { margin-bottom: 12px; }
#form-importar .campo { margin-top: 14px; }
#pdv > .grid { grid-template-columns: minmax(0, 1.35fr) minmax(350px, 1fr) !important; }
@media (max-width: 1000px) {
  #pdv > .grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 760px) {
  #app { flex-direction: column; }
  #app .sidebar { width: 100%; }
  #app .sidebar-header { display: none; }
  #app .sidebar-nav { display: flex; overflow-x: auto; padding: 0; }
  #app .nav-group { display: flex; margin: 0; }
  #app .nav-group-title { display: none; }
  #app .nav-item { padding: 12px 10px; white-space: nowrap; }
  #app .sidebar-footer { padding: 5px 12px; }
  #app .top-bar, #app .banner-motivacional, #app .content-area { padding: 12px; }
  #app .grid { grid-template-columns: minmax(0, 1fr) !important; }
  .row3, .row2 { grid-template-columns: minmax(0, 1fr); }
  .pdv-buscas { align-items: stretch; flex-direction: column; }
  .login-box { margin: 12px; }
}
@media print {
  #app, #tela-login, #modal, #toast-container { display: none !important; }
  body * { visibility: hidden; }
  #areaImpressao, #areaImpressao * { visibility: visible; }
  #areaImpressao { position: absolute; left: 0; top: 0; width: 100%; padding: 0; background: #fff; }
  .no-print { display: none !important; }
}
.plataforma-link:not([hidden]) { display:block; margin:6px 16px; padding:10px; color:var(--empresa-menu-texto); font-size:.83rem; border:1px solid #808080; border-radius:6px; text-decoration:none; }
.plataforma-link:hover { text-decoration:underline; }
.vitrine-opcoes-loja { margin:16px 0; padding:14px; border:1px solid #d5dbe3; border-radius:8px; }
.vitrine-opcoes-loja legend { font-weight:700; padding:0 5px; }
.vitrine-opcoes-loja .row2 { margin:8px 0; }
.vitrine-rolagem { overflow:auto; }
.card code { overflow-wrap:anywhere; }
