/* Amigo do Caixa - sistema de design */
:root {
  --tinta: #191D1A;
  --tinta-2: #23281F;
  --verde: #14604A;
  --verde-forte: #0E4A39;
  --verde-fundo: #E7F0EB;
  --verde-noite: #1B2620;
  --verde-noite2: #10170F;
  --verde-borda: #C9DECF;
  --ouro: #B08D46;
  --ouro-fundo: #F4EDDC;
  --fundo: #F4F3EE;
  --card: #FFFFFF;
  --texto: #22271F;
  --texto-suave: #6E7368;
  --borda: #E4E1D6;
  --vermelho: #A63A2E;
  --azul: #2F5D8A;
  --sombra: 0 1px 2px rgba(20, 25, 18, .05), 0 4px 14px rgba(20, 25, 18, .05);
  --sombra-forte: 0 14px 40px rgba(14, 27, 21, .22);
  --raio: 12px;
  --fonte: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--fonte);
  background: var(--fundo); color: var(--texto); line-height: 1.55;
  letter-spacing: .005em;
}
button { font: inherit; cursor: pointer; letter-spacing: inherit; }
input, select, textarea { font: inherit; }
a { color: var(--verde); }
h1, h2, h3 { letter-spacing: -.015em; }

.boot-splash { height: 100vh; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; color: var(--texto-suave); font-size: .95rem; }

/* ---------- telas publicas ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side {
  background: linear-gradient(160deg, var(--verde-noite2) 0%, var(--verde-noite) 55%, var(--verde-forte) 100%);
  color: #EDE8DA; padding: 56px 54px;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.auth-side img { width: 76px; height: 76px; }
.auth-side h1 { font-size: 2.3rem; line-height: 1.15; color: #fff; font-weight: 800; }
.auth-side p { color: #BCC9BC; max-width: 440px; font-size: 1.02rem; }
.auth-side ul { list-style: none; display: flex; flex-direction: column; gap: 12px; color: #D6DFD2; font-size: .98rem; }
.auth-side li { display: flex; align-items: center; gap: 12px; }
.auth-side li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ouro); flex: none; }
.auth-card { display: flex; align-items: center; justify-content: center; padding: 36px; }
.auth-form { background: var(--card); border: 1px solid var(--borda); border-radius: 18px; padding: 38px; width: 100%; max-width: 420px; box-shadow: var(--sombra); }
.auth-form h2 { font-size: 1.45rem; margin-bottom: 4px; font-weight: 800; }
.auth-form .sub { color: var(--texto-suave); margin-bottom: 24px; font-size: .95rem; }
.auth-links { margin-top: 18px; text-align: center; font-size: .92rem; color: var(--texto-suave); }

.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-pick label {
  border: 1.5px solid var(--borda); border-radius: 12px; padding: 14px 12px; cursor: pointer;
  font-size: .86rem; font-weight: 600; line-height: 1.35; background: #FBFAF6; transition: all .15s;
}
.mode-pick input { display: none; }
.mode-pick label:has(input:checked) { border-color: var(--verde); background: var(--verde-fundo); box-shadow: 0 0 0 1px var(--verde) inset; }
.mode-pick .mt { display: block; font-size: .95rem; font-weight: 800; margin-bottom: 4px; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 36px 28px; gap: 16px; }
  .auth-side h1 { font-size: 1.6rem; }
}

/* ---------- estrutura do app ---------- */
.layout { min-height: 100vh; }
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 95;
  background: var(--verde-noite2); color: #C9D4C6; display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--sombra-forte);
}
.drawer.open { transform: translateX(0); }
.drawer .brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px; color: #fff; font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.drawer .brand img { width: 36px; height: 36px; }
.drawer nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.drawer nav .sec { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: #5E7163; padding: 16px 12px 7px; font-weight: 700; }
.drawer nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
  color: #C9D4C6; text-decoration: none; font-size: .93rem; font-weight: 600; margin-bottom: 1px;
}
.drawer nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.drawer nav a.active { background: var(--verde); color: #fff; }
.drawer nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.drawer .foot { padding: 16px 22px; font-size: .8rem; color: #5E7163; border-top: 1px solid rgba(255, 255, 255, .07); }
.backdrop { position: fixed; inset: 0; background: rgba(10, 15, 12, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px); }
.backdrop.show { opacity: 1; pointer-events: auto; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: linear-gradient(180deg, var(--verde-noite) 0%, var(--verde-noite2) 100%);
  border-bottom: 1px solid #060B08;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 10px rgba(10, 16, 12, .25);
  display: flex; align-items: center; gap: 14px; padding: 10px 24px; position: sticky; top: 0; z-index: 30;
}
.topbar .mini-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: .98rem; color: #EDE8DA; letter-spacing: .01em; padding: 7px 16px; margin: 0 6px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.topbar .mini-brand:hover { background: rgba(255,255,255,.14); }
.topbar .mini-brand img { width: 28px; height: 28px; }
.topbar .search { flex: 1; max-width: 500px; position: relative; }
.topbar .search input { width: 100%; padding: 9px 14px 9px 38px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.07); font-size: .92rem; color: #EDE8DA; }
.topbar .search input:focus { outline: 2px solid var(--ouro); outline-offset: -1px; background: rgba(255,255,255,.12); } .topbar .search input::placeholder { color: #7E8C7B; }
.topbar .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #7E8C7B; }
.topbar .company { font-weight: 700; font-size: .92rem; color: #C9D4C6; }
.topbar .spacer { flex: 1; }
.bell { position: relative; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; color: #C9D4C6; }
.bell .badge { position: absolute; top: -4px; right: -4px; background: var(--vermelho); color: #fff; font-size: .66rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 8px; background: var(--ouro); color: #241C08; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.hamb { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.07); color: #EDE8DA; }
.hamb svg { width: 18px; height: 18px; }

.content { padding: 26px 24px 72px; max-width: 1120px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.34rem; font-weight: 800; }
.page-head .sub { color: var(--texto-suave); font-size: .92rem; margin-top: 2px; }

/* ---------- componentes ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 17px; font-weight: 700; font-size: .9rem; background: var(--verde); color: #fff; text-decoration: none;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.sec { background: var(--card); color: var(--texto); border-color: var(--borda); }
.btn.danger { background: var(--vermelho); }
.btn.ghost { background: transparent; color: var(--verde); border-color: transparent; }
.btn.sm { padding: 6px 13px; font-size: .84rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1000px) { .grid.c4, .grid.c6 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4, .grid.c6 { grid-template-columns: 1fr; } }

.stat { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px 20px; box-shadow: var(--sombra); }
.stat .label { color: var(--texto-suave); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.42rem; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }
.stat .hint { font-size: .8rem; color: var(--texto-suave); margin-top: 4px; }
.stat.accent { border-left: 3px solid var(--verde); }
.stat.warn { border-left: 3px solid var(--ouro); }
.stat.crit { border-left: 3px solid var(--vermelho); }

table.tbl { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--raio); overflow: hidden; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--texto-suave); padding: 10px 14px; border-bottom: 1px solid var(--borda); background: #FAF9F4; font-weight: 700; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--borda); font-size: .9rem; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td, .tbl tr:hover td { background: #F1F5EF; }
.tbl tr:nth-child(even) td { background: rgba(20, 25, 18, .018); }
.tbl tr:nth-child(even):hover td { background: #F1F5EF; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.devedor td { background: #FBEEEA; }
.tbl tr.devedor:nth-child(even) td { background: #F8E7E1; }
.tbl tr.devedor:hover td { background: #F5DFD8; }
.tbl tr.devedor td:first-child { border-left: 3px solid var(--vermelho); }
.tbl tr.tbl-foot td { background: var(--tinta); color: #EDE8DA; border-bottom: none; font-size: .88rem; }
.tbl tr.tbl-foot td b { color: #F2D98D; }

.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.tag.verde { background: #E2EFE7; color: #0F5233; }
.tag.ambar { background: #F4EDDC; color: #7C5E22; }
.tag.vermelho { background: #F6E3DF; color: #8C3126; }
.tag.cinza { background: #EEEDE6; color: #5B6055; }
.tag.azul { background: #E4EBF3; color: #2A5177; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 700; }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1px solid var(--borda); border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--verde); outline-offset: -1px; }
.field .help { font-size: .78rem; color: var(--texto-suave); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

.modal-back { position: fixed; inset: 0; background: rgba(14, 20, 15, .5); display: grid; place-items: center; z-index: 100; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 28px; box-shadow: var(--sombra-forte); }
.modal h3 { margin-bottom: 18px; font-size: 1.2rem; font-weight: 800; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--tinta); color: #F1EDE2; padding: 12px 20px; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: 0 6px 22px rgba(0, 0, 0, .3); }
.toast.erro { background: var(--vermelho); color: #fff; }

.empty { text-align: center; padding: 40px 20px; color: var(--texto-suave); }
.empty .big { font-size: 1.05rem; color: var(--texto); font-weight: 700; margin-bottom: 6px; }

/* ---------- alertas ---------- */
.alert-item { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--borda); border-left-width: 3px; border-radius: var(--raio); padding: 15px 17px; margin-bottom: 10px; box-shadow: var(--sombra); }
.alert-item.critico { border-left-color: var(--vermelho); }
.alert-item.atencao { border-left-color: var(--ouro); }
.alert-item.info { border-left-color: var(--azul); }
.alert-item.sucesso { border-left-color: var(--verde); }
.alert-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.alert-item.critico .dot { background: var(--vermelho); }
.alert-item.atencao .dot { background: var(--ouro); }
.alert-item.info .dot { background: var(--azul); }
.alert-item.sucesso .dot { background: var(--verde); }
.alert-item .body { flex: 1; }
.alert-item .t { font-weight: 800; font-size: .95rem; }
.alert-item .m { color: var(--texto-suave); font-size: .9rem; margin-top: 2px; }
.alert-item .meta { font-size: .76rem; color: var(--texto-suave); margin-top: 6px; }

/* ---------- barra de progresso ---------- */
.meter { background: #EAE8DE; border-radius: 999px; height: 9px; overflow: hidden; }
.meter > div { height: 100%; background: var(--verde); border-radius: 999px; transition: width .4s; }
.meter.warn > div { background: var(--ouro); }
.meter.crit > div { background: var(--vermelho); }
.meter-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--texto-suave); margin-top: 6px; }

/* ---------- grafico de barras ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--verde); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; opacity: .88; }
.bars .bar:hover { opacity: 1; background: var(--verde-forte); }
.bars .bar .tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--tinta); color: #F1EDE2; font-size: .72rem; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.bars .bar:hover .tip { display: block; }

/* ---------- tela inicial (estilo celular simples) ---------- */
.home-greet { margin-bottom: 22px; }
.home-greet h1 { font-size: 1.7rem; font-weight: 800; }
.home-greet .sub { color: var(--texto-suave); font-size: .95rem; margin-top: 3px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; gap: 12px; } }
.tile {
  background: var(--card); border: 1px solid var(--borda); border-radius: 18px; padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--texto);
  box-shadow: var(--sombra); transition: transform .12s, box-shadow .2s; min-height: 148px;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20, 25, 18, .1); }
.tile .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--verde-fundo); color: var(--verde); }
.tile .ic svg { width: 24px; height: 24px; }
.tile .t { font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; }
.tile .s { font-size: .85rem; color: var(--texto-suave); }
.tile.primary { background: linear-gradient(150deg, var(--verde), var(--verde-forte)); color: #fff; border: none; }
.tile.primary .ic { background: rgba(255, 255, 255, .14); color: #fff; }
.tile.primary .s { color: #BFD4C6; }
.tile.gold .ic { background: var(--ouro-fundo); color: var(--ouro); }
.ask-strip {
  margin-top: 16px; background: var(--card); border: 1px solid var(--borda); border-radius: 18px;
  padding: 16px 20px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sombra);
}
.ask-strip .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--tinta); color: #EDE8DA; display: grid; place-items: center; flex: none; }
.ask-strip .ic svg { width: 20px; height: 20px; }
.ask-strip form { flex: 1; display: flex; gap: 10px; }
.ask-strip input { flex: 1; padding: 12px 16px; border: 1px solid var(--borda); border-radius: 999px; font-size: .98rem; background: var(--fundo); }
.ask-strip input:focus { outline: 2px solid var(--verde); outline-offset: -1px; background: #fff; }
.home-minis { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.home-minis a { font-size: .9rem; font-weight: 700; color: var(--texto-suave); text-decoration: none; }
.home-minis a b { color: var(--tinta); font-weight: 800; }
.home-minis a:hover { color: var(--verde); }

/* ---------- bot ---------- */
.bot-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  background: var(--tinta); color: #F1EDE2; border: none; border-radius: 999px;
  padding: 14px 22px; font-weight: 700; font-size: .95rem; display: flex; gap: 9px; align-items: center;
  box-shadow: 0 8px 26px rgba(14, 20, 15, .35);
}
.bot-fab svg { width: 20px; height: 20px; }
.bot-panel {
  position: fixed; right: 22px; bottom: 86px; z-index: 200; width: 410px; max-width: calc(100vw - 32px);
  height: 580px; max-height: calc(100vh - 120px); background: #fff; border-radius: 20px;
  box-shadow: var(--sombra-forte); display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--borda);
}
.bot-head { background: linear-gradient(140deg, var(--verde-noite2), var(--verde-noite)); color: #fff; padding: 15px 18px; display: flex; align-items: center; gap: 11px; }
.bot-head img { width: 30px; height: 30px; }
.bot-head .n { font-weight: 800; font-size: .98rem; }
.bot-head .s { font-size: .74rem; color: #9FB3A3; }
.bot-head .x { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.25rem; }
.bot-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #F7F6F1; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: .92rem; white-space: pre-line; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--verde); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--borda); border-bottom-left-radius: 5px; box-shadow: var(--sombra); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-self: flex-start; max-width: 96%; }
.chip { background: #fff; color: var(--tinta-2); border: 1px solid var(--borda); border-radius: 999px; padding: 7px 13px; font-size: .82rem; font-weight: 700; }
.chip:hover { border-color: var(--verde); color: var(--verde); }
.chip.nav { background: var(--tinta); color: #F1EDE2; border-color: var(--tinta); }
.bot-input { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--borda); background: #fff; }
.bot-input input { flex: 1; padding: 12px 16px; border: 1px solid var(--borda); border-radius: 999px; }
.bot-input input:focus { outline: 2px solid var(--verde); outline-offset: -1px; }
.bot-input button { background: var(--verde); color: #fff; border: none; border-radius: 999px; padding: 0 20px; font-weight: 700; }
.typing { display: inline-flex; gap: 4px; padding: 13px 16px; }
.typing i { width: 7px; height: 7px; background: #A9B1A5; border-radius: 50%; animation: tp 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* ---------- PDV ---------- */
.pdv { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .pdv { grid-template-columns: 1fr; } }
.pdv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; margin-top: 12px; max-height: 56vh; overflow-y: auto; }
.pdv-prod { background: var(--verde-fundo); border: 1.5px solid var(--verde); border-radius: 11px; padding: 11px 9px; text-align: center; transition: border-color .12s, transform .05s; }
.pdv-prod:hover { border-color: var(--verde-forte); background: var(--verde-borda); }
.pdv-prod:active { transform: scale(.98); }
.pdv-prod .n { font-size: .84rem; font-weight: 700; min-height: 2.4em; line-height: 1.25; }
.pdv-prod .p { color: var(--verde); font-weight: 800; margin-top: 5px; }
.pdv-prod .s { font-size: .72rem; color: var(--texto-suave); margin-top: 2px; }
.pdv-cart { background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 18px; position: sticky; top: 76px; box-shadow: var(--sombra); }
.pdv-cart .line { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px dashed var(--borda); font-size: .9rem; gap: 2px; }
.pdv-cart .line .l1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pdv-cart .line .l1 .nm { font-weight: 600; flex: 1; min-width: 0; }
.pdv-cart .line .l2 { display: flex; justify-content: space-between; align-items: center; }
.pdv-cart .line .l2 small { color: var(--texto-suave); font-size: .74rem; }
.neg { color: var(--vermelho); }
.mini-disc { border: none; background: none; color: var(--azul); font-size: .72rem; font-weight: 700; text-decoration: underline; padding: 0; }
.pdv-cart .line .l3 { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--texto-suave); margin-top: 3px; }
.pdv-cart .line .l3 input { width: 92px; padding: 5px 8px; border: 1px solid var(--borda); border-radius: 7px; font-size: .85rem; text-align: right; }
.pdv-cart .line .qty { display: flex; align-items: center; gap: 7px; }
.pdv-cart .line .qty button { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--borda); background: var(--fundo); font-weight: 700; }
.tot-block { background: var(--fundo); border: 1px solid var(--borda); border-radius: 12px; padding: 11px 14px; margin: 12px 0; }
.tot-block .tb-line { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; padding: 2px 0; }
.tot-block .tb-line .muted { color: var(--texto-suave); font-size: .78rem; font-weight: 600; }
.tot-block .tb-line.desc b { color: var(--vermelho); }
.tot-block .tb-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--borda); margin-top: 7px; padding-top: 9px; }
.tot-block .tb-total span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-suave); }
.tot-block .tb-total b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.after-sale { background: var(--verde-fundo); border: 1px solid var(--verde-borda); border-radius: 12px; padding: 11px 14px; display: flex; flex-direction: column; gap: 9px; }
.after-sale .ok { font-weight: 700; font-size: .88rem; color: var(--verde-forte); }
.after-sale .pr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.after-sale .vias { display: flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; color: var(--texto-suave); margin-right: auto; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pay-methods button { border: 1px solid var(--borda); background: #fff; border-radius: 10px; padding: 11px 6px; font-size: .85rem; font-weight: 700; }
.pay-methods button.sel { border-color: var(--verde); background: var(--verde-fundo); color: var(--verde-forte); box-shadow: 0 0 0 1px var(--verde) inset; }
.troco-row { background: var(--fundo); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.troco-row .row { display: flex; gap: 10px; align-items: center; }
.troco-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 9px; font-size: 1.05rem; font-weight: 700; }
.troco-row .out { font-size: 1.15rem; font-weight: 800; color: var(--verde-forte); text-align: right; }
.daylog { margin-top: 16px; border-top: 1px dashed var(--borda); padding-top: 12px; }
.daylog .h { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); margin-bottom: 8px; }
.daylog .item { display: flex; justify-content: space-between; font-size: .88rem; padding: 6px 0; border-bottom: 1px dashed var(--borda); }
.daylog .item small { color: var(--texto-suave); }
.daylog .item .qtyv { display: flex; align-items: baseline; gap: 7px; }
.daylog .item.tot { border-top: 1px solid var(--borda); border-bottom: none; margin-top: 5px; padding-top: 8px; }
.daylog .item.tot span { font-weight: 700; }
.daylog .item.tot b { font-size: .98rem; }

/* modal de alerta tributario (exige Ok) */
.tax-modal-back { position: fixed; inset: 0; background: rgba(14, 20, 16, .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 400; padding: 18px; }
.tax-modal { background: #fff; border-radius: 18px; max-width: 500px; width: 100%; max-height: 86vh; overflow: auto; box-shadow: 0 24px 60px rgba(10, 18, 14, .35); border-top: 5px solid var(--ouro); animation: tmin .18s ease; }
@keyframes tmin { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.tm-head { display: flex; gap: 12px; align-items: center; padding: 18px 20px 4px; }
.tm-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--ouro-fundo); color: var(--ouro); display: grid; place-items: center; flex: none; }
.tm-title { font-size: 1.12rem; font-weight: 800; }
.tm-sub { font-size: .82rem; color: var(--texto-suave); }
.tm-list { padding: 10px 20px; display: flex; flex-direction: column; gap: 10px; }
.tm-item { border: 1px solid var(--borda); border-left: 4px solid var(--ouro); border-radius: 10px; padding: 10px 12px; background: #FFFDF7; }
.tm-item.critico { border-left-color: var(--vermelho); background: #FDF6F4; }
.tm-pr { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ouro); }
.tm-item.critico .tm-pr { color: var(--vermelho); }
.tm-t { font-weight: 800; font-size: .92rem; margin: 3px 0 2px; }
.tm-m { font-size: .84rem; color: var(--texto); line-height: 1.45; }
.tm-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 20px 18px; flex-wrap: wrap; }
.mode-note { display: flex; align-items: center; gap: 10px; background: var(--ouro-fundo); border: 1px solid #E4D5B5; color: #6B551F; border-radius: 12px; padding: 10px 16px; font-size: .86rem; font-weight: 600; margin-bottom: 16px; }

/* ---------- impostos ---------- */
.tax-hero { background: linear-gradient(140deg, var(--verde-noite2), var(--verde-noite)); color: #fff; border-radius: 18px; padding: 26px; }
.tax-hero .reg { font-size: .78rem; color: #9FB3A3; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.tax-hero .big { font-size: 2.1rem; font-weight: 800; margin: 5px 0; letter-spacing: -.02em; }
.tax-hero .small { color: #BCC9BC; font-size: .88rem; }
.dicas li { margin-bottom: 10px; padding-left: 4px; }
.dicas li::marker { color: var(--ouro); }
.sim-result { background: var(--verde-fundo); border: 1px solid var(--verde-borda); border-radius: 12px; padding: 16px; margin-top: 14px; }

/* ---------- notinha (impressao) ---------- */
.receipt { display: none; }
@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt {
    display: block; position: absolute; left: 0; top: 0; width: 72mm;
    font-family: "Courier New", monospace; font-size: 11px; color: #000; padding: 4mm;
  }
  .receipt h2 { font-size: 13px; text-align: center; margin-bottom: 2px; }
  .receipt .c { text-align: center; }
  .receipt hr { border: none; border-top: 1px dashed #000; margin: 5px 0; }
  .receipt table { width: 100%; border-collapse: collapse; }
  .receipt td { padding: 1px 0; }
  .receipt .r { text-align: right; }
  .receipt .tot { font-size: 13px; font-weight: bold; }
}

/* ---------- responsivo geral ---------- */
@media (max-width: 640px) {
  .content { padding: 18px 14px 90px; }
  .topbar { padding: 8px 12px; gap: 9px; }
  .topbar .search { display: none; }
  .bot-panel { right: 10px; bottom: 76px; height: 72vh; }
  .page-head h1 { font-size: 1.25rem; }
  .home-greet h1 { font-size: 1.4rem; }
}
.offline-bar { background: var(--ouro); color: #3E2F0E; text-align: center; font-size: .84rem; padding: 7px; font-weight: 700; }

/* ================= barra de status (cara de programa) ================= */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 30px; z-index: 28;
  background: linear-gradient(180deg, var(--verde-noite) 0%, var(--verde-noite2) 100%);
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 18px; padding: 0 16px;
  color: #8FA391; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
}
.statusbar .sb-strong { color: #D8DFD2; }
.statusbar .sb-spacer { flex: 1; }
.statusbar .sb-ver { color: #6B7C6A; text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; }
.statusbar #sbClock { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .statusbar { display: none; } .content { padding-bottom: 40px; } }

/* ================= detalhes de painel estilo software ================= */
.pdv-hints { text-align: center; font-size: .72rem; color: var(--texto-suave); margin-top: 8px; letter-spacing: .04em; }
@media (pointer: coarse) { .pdv-hints { display: none; } }
.check-line { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 600; margin-top: 6px; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--vermelho); }
.stat .value, .tb-total b, #cartTotal, .tot-block b { font-variant-numeric: tabular-nums; }

/* ================= novidades v9 ================= */
/* marca clicavel (botao para a pagina inicial) */
.drawer .brand a.brand-link { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.08rem; }
a.mini-brand { text-decoration: none; cursor: pointer; }
a.mini-brand:hover span { text-decoration: underline; }
/* setas de voltar e avancar (estilo navegador) */
.navbtn {
  width: 34px; height: 34px; border: none; border-radius: 8px; display: grid; place-items: center;
  background: transparent; color: #B9C7B4; transition: background .15s, color .15s;
}
.navbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.navbtn svg { width: 20px; height: 20px; }
/* sino de alertas: caixa que abre para baixo, estilo e-mail */
.bell-wrap { position: relative; }
.bell-panel {
  position: absolute; top: 44px; right: 0; width: 320px; max-width: 84vw; max-height: 68vh; overflow-y: auto; z-index: 60;
  background: var(--card); border: 1px solid var(--borda); border-radius: 12px;
  box-shadow: var(--sombra-forte); color: var(--texto);
}
.bell-panel .bp-head { padding: 10px 13px; font-weight: 800; font-size: .84rem; border-bottom: 1px solid var(--borda); }
.bell-panel .bp-item { padding: 8px 13px; border-bottom: 1px dashed var(--borda); }
.bell-panel .bp-item.critico { border-left: 3px solid var(--vermelho); }
.bell-panel .bp-item.atencao { border-left: 3px solid var(--ouro); }
.bell-panel .bp-item.info, .bell-panel .bp-item.sucesso { border-left: 3px solid var(--verde); }
.bell-panel .bp-t { font-weight: 700; font-size: .8rem; }
.bell-panel .bp-m { font-size: .75rem; color: var(--texto-suave); }
.bell-panel .bp-d { font-size: .66rem; color: var(--texto-suave); margin-top: 2px; }
.bell-panel .bp-empty, .bell-panel .bp-loading { padding: 14px 13px; font-size: .8rem; color: var(--texto-suave); text-align: center; }
.bell-panel .bp-more { display: block; width: calc(100% - 20px); margin: 10px; justify-content: center; }
/* lixeira vermelha de contorno (excluir nas tabelas) */
.btn-trash {
  display: inline-grid; place-items: center; width: 32px; height: 32px; vertical-align: middle;
  background: transparent; border: 1.5px solid var(--vermelho); border-radius: 8px; color: var(--vermelho);
  transition: background .15s, color .15s;
}
.btn-trash svg { width: 16px; height: 16px; }
.btn-trash:hover { background: var(--vermelho); color: #fff; }
/* seletor de modo de exibicao (icones pequenos / grandes / planilha) */
.view-switch { display: inline-flex; gap: 0; margin: 4px 0 12px; border: 1.5px solid var(--borda); border-radius: 10px; overflow: hidden; background: var(--card); }
.view-switch button { border: none; background: transparent; padding: 8px 14px; font-size: .84rem; font-weight: 700; color: var(--texto-suave); }
.view-switch button.sel { background: var(--verde); color: #fff; }
/* PDV: icones grandes */
.pdv-grid.large { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pdv-grid.large .pdv-prod { padding: 20px 16px; min-height: 110px; }
.pdv-grid.large .pdv-prod .n { font-size: 1.06rem; }
.pdv-grid.large .pdv-prod .p { font-size: 1.2rem; }
/* PDV: planilha */
.pdv-list { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); overflow: auto; }
/* estoque em cartoes */
.stock-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stock-cards.large { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stock-card { background: var(--verde-fundo); border: 1.5px solid var(--verde); border-radius: var(--raio); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.stock-cards.large .stock-card { padding: 20px; }
.stock-cards.large .sc-n { font-size: 1.05rem; }
.stock-cards.large .sc-q { font-size: 1.5rem; }
.stock-card .sc-n { font-weight: 800; font-size: .92rem; line-height: 1.3; }
.stock-card .sc-q { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stock-card .sc-q small { font-size: .74rem; font-weight: 600; color: var(--texto-suave); }
.stock-card .sc-a { display: flex; gap: 8px; align-items: center; margin-top: auto; }
/* telefone com DDI e documento CPF/CNPJ */
.phone-row { display: flex; gap: 8px; }
.phone-row select { max-width: 150px; }
.phone-row input { flex: 1; }
.docpick { display: inline-flex; border: 1.5px solid var(--borda); border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.docpick button { border: none; background: transparent; padding: 6px 16px; font-size: .82rem; font-weight: 800; color: var(--texto-suave); }
.docpick button.sel { background: var(--verde); color: #fff; }
/* dicas vivas de imposto */
.tip-card { display: flex; flex-direction: column; }
.tip-stage { min-height: 96px; display: flex; align-items: flex-start; }
.tip-slide { font-size: .94rem; line-height: 1.55; animation: tipIn .4s ease; }
@keyframes tipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tip-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.tip-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--borda); background: var(--card); color: var(--verde); font-size: 1.1rem; line-height: 1; }
.tip-arrow:hover { border-color: var(--verde); }
.tip-dots { display: flex; gap: 6px; }
.tip-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--borda); cursor: pointer; }
.tip-dots i.on { background: var(--verde); }
/* perfil */
.pf-head { display: flex; gap: 16px; align-items: center; }
.pf-avatar { width: 84px; height: 84px; border-radius: 16px; background: var(--ouro); color: #241C08; display: grid; place-items: center; font-size: 2rem; font-weight: 800; overflow: hidden; flex: none; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-crop { position: relative; width: 260px; height: 260px; margin: 0 auto; overflow: hidden; border-radius: 14px; border: 1.5px solid var(--verde); background: #101410; touch-action: none; cursor: grab; }
.pf-crop img { position: absolute; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.user-chip .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
a.user-chip { text-decoration: none; cursor: pointer; }
a.user-chip:hover .avatar { outline: 2px solid #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--borda); border-radius: 10px; background: var(--card); padding: 9px 14px; font-size: .86rem; font-weight: 700; }
.swatch .dot { width: 18px; height: 18px; border-radius: 50%; }
.swatch.sel { border-color: var(--verde); box-shadow: 0 0 0 1px var(--verde) inset; }
@media (max-width: 640px) { .bell-panel { position: fixed; right: 10px; top: 56px; } }
