/* Petite Pedidos — design system próprio (v2, 20/11/2026).
   Família sans ÚNICA: Plus Jakarta Sans, servida pelo próprio app (static/fonts, sem Google Fonts: privacidade + CSP).
   Tokens em :root (claro) e .dark (escuro). Sem Tailwind e sem build: funciona offline no balcão/tablet.
   Objetivo da v2: UX fluida, proporcional e com menos toques (ver conhecimento/pedidos/ux_tarefas.md). */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;                 /* fonte variável: um arquivo cobre 400–700 */
  font-display: swap;
  src: url("/static/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  /* marca (verde-água #4BBCBC) e neutros */
  --background: 190 30% 97%; --foreground: 200 28% 15%; --card: 0 0% 100%;
  --primary: 184 48% 48%; --primary-forte: 184 52% 34%; --primary-foreground: 0 0% 100%;
  --secondary: 350 65% 90%; --secondary-foreground: 345 45% 32%;
  --muted: 190 24% 94%; --muted-foreground: 200 10% 42%;
  --accent: 350 70% 85%; --destructive: 358 70% 42%; --warning: 33 92% 42%; --success: 158 58% 29%; --info: 210 75% 42%;
  --border: 195 20% 87%; --input: 195 20% 80%; --ring: 184 48% 44%;
  --sidebar: 0 0% 100%; --sidebar-accent: 184 45% 95%;
  --sombra: 0 4px 16px -8px hsl(200 30% 14% / .14); --sombra-alta: 0 20px 48px -18px hsl(184 45% 30% / .30);
  /* escala tipográfica 12/14/16/20/24/30 */
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-base: 1rem; --fs-lg: 1.25rem; --fs-xl: 1.5rem; --fs-2xl: 1.875rem;
  /* espaçamento 4/8 */
  --e1: .25rem; --e2: .5rem; --e3: .75rem; --e4: 1rem; --e5: 1.5rem; --e6: 2rem;
  --raio: .75rem; --raio-sm: .5rem; --raio-lg: 1rem;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);               /* compat: templates antigos referenciam var(--serif) */
  --mono: "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
.dark {
  --background: 200 28% 9%; --foreground: 190 25% 94%; --card: 200 25% 13%;
  --primary: 184 52% 56%; --primary-forte: 184 58% 66%; --primary-foreground: 200 30% 9%;
  --secondary: 350 30% 28%; --secondary-foreground: 350 55% 86%;
  --muted: 200 20% 18%; --muted-foreground: 190 14% 70%;
  --accent: 350 38% 34%; --destructive: 358 78% 70%; --warning: 33 90% 62%; --success: 158 55% 58%; --info: 210 80% 68%;
  --border: 200 18% 23%; --input: 200 18% 30%; --ring: 184 52% 58%;
  --sidebar: 200 26% 11%; --sidebar-accent: 200 20% 18%;
  --sombra: 0 4px 16px -8px hsl(0 0% 0% / .55); --sombra-alta: 0 20px 48px -18px hsl(184 80% 25% / .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: hsl(var(--background)); color: hsl(var(--foreground));
  font: var(--fs-base)/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: hsl(var(--primary-forte)); }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 650; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: var(--fs-xl); } h2 { font-size: var(--fs-lg); } h3 { font-size: 1.0625rem; } h4 { font-size: var(--fs-base); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 6px; }
::selection { background: hsl(var(--primary) / .25); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -9999px; top: 0; z-index: 99; background: hsl(var(--card)); padding: .5rem 1rem; border-radius: var(--raio-sm); }
.pular:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- layout */
.layout { display: flex; min-height: 100%; }
.menu { width: 244px; flex-shrink: 0; background: hsl(var(--sidebar)); border-right: 1px solid hsl(var(--border));
        display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; transition: width .18s ease; }
.menu-topo { display: flex; align-items: center; gap: .6rem; padding: 1rem 1rem .9rem; text-decoration: none; color: inherit; }
.monograma { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, hsl(184 48% 50%), hsl(184 62% 68%));
             color: #fff; display: grid; place-items: center; font: 700 1.2rem var(--sans); flex-shrink: 0; overflow: hidden; }
.monograma img { width: 26px; height: 24px; }
.marca { font: 700 1.2rem var(--sans); white-space: nowrap; letter-spacing: -.02em; }
.marca small { display: block; font: 700 10px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.nav { padding: .25rem .55rem .75rem; display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav-grupo { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: hsl(var(--muted-foreground));
             padding: .85rem .7rem .3rem; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: 9px; color: hsl(var(--foreground));
         text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: hsl(var(--sidebar-accent)); }
.nav a[aria-current="page"] { background: hsl(var(--primary) / .14); color: hsl(var(--primary-forte)); font-weight: 650; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .sep { height: 1px; background: hsl(var(--border)); margin: .5rem .4rem; }
.html-recolhido .menu { width: 66px; }
.html-recolhido .menu .rotulo, .html-recolhido .menu .marca, .html-recolhido .menu .sep, .html-recolhido .menu .nav-grupo { display: none; }
.html-recolhido .nav a { justify-content: center; padding: .5rem; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topo { position: sticky; top: 0; z-index: 20; min-height: 60px; display: flex; align-items: center; gap: .6rem; padding: .5rem 1.25rem;
        background: hsl(var(--background) / .88); backdrop-filter: blur(10px); border-bottom: 1px solid hsl(var(--border)); }
.topo h1 { font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .busca-global { flex: 1; max-width: 420px; }
.topo .acoes { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
main { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.1rem; max-width: 1360px; width: 100%; }
main.estreito { max-width: 760px; }
.fundo-menu { display: none; }
@media (max-width: 900px) {
  .menu { position: fixed; z-index: 40; left: -280px; transition: left .2s; box-shadow: var(--sombra-alta); }
  .menu-aberto .menu { left: 0; }
  .menu-aberto .fundo-menu { display: block; position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .4); }
  .html-recolhido .menu { width: 244px; }
  .html-recolhido .menu .rotulo, .html-recolhido .menu .marca, .html-recolhido .menu .nav-grupo { display: initial; }
  .html-recolhido .nav a { justify-content: flex-start; padding: .5rem .7rem; }
  main { padding: .9rem; } .topo { padding: .5rem .75rem; } .so-desktop { display: none !important; }
  .so-mobile { display: inline-flex !important; }
  .topo .busca-global { display: none; }
  .topo h1 { font-size: var(--fs-base); }
}

/* ---------------------------------------------------------------- cartões, grades, utilitários */
.cartao { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--raio); box-shadow: var(--sombra); padding: 1.1rem 1.15rem; }
.cartao > h2, .cartao > h3 { margin-bottom: .75rem; }
.cartao-titulo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.grade { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col2 { grid-column: span 2; } .col3 { grid-column: span 3; } .colcheia { grid-column: 1 / -1; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .col3 { grid-column: span 2; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .col2, .col3 { grid-column: auto; } }
.linha { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.linha-fim { justify-content: flex-end; } .espaco { flex: 1; }
.coluna { display: flex; flex-direction: column; }
.dir { text-align: right; }
.grade-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; }
.w-full { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------- CRM: funil, oportunidade, calendário */
.barra-acoes { gap: .6rem; }
.bloco-op { border: 1px solid hsl(var(--border)); border-radius: var(--raio); padding: .6rem .8rem 0.8rem; margin: .6rem 0 0; }
.bloco-op legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 .4rem; color: hsl(var(--muted-foreground)); }
.funil { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.funil-col { background: hsl(var(--muted) / .4); border: 1px solid hsl(var(--border)); border-radius: var(--raio); min-width: 220px; }
.funil-col-topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .6rem; font-weight: 600; font-size: var(--fs-sm); border-bottom: 3px solid hsl(var(--border)); border-radius: var(--raio) var(--raio) 0 0; }
.funil-col-corpo { display: flex; flex-direction: column; gap: .5rem; padding: .5rem; min-height: 40px; }
.op-card { position: relative; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--raio); }
.op-card:hover { border-color: hsl(var(--primary) / .6); box-shadow: 0 1px 4px hsl(var(--foreground) / .08); }
.op-card[draggable="true"] { cursor: grab; }
.op-card.arrastando { opacity: .5; }
.op-card-link { display: flex; flex-direction: column; gap: .2rem; padding: .5rem 2rem .5rem .6rem; text-decoration: none; color: inherit; }
.op-card-acoes { position: absolute; top: .25rem; right: .25rem; }
.op-card-acoes .dropdown-menu form button { width: 100%; text-align: left; background: none; border: 0; }
.funil-col-corpo.solta-ok { outline: 2px dashed hsl(var(--primary)); outline-offset: -3px; border-radius: var(--raio); }
.op-card-topo { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.op-card svg { width: 13px; height: 13px; vertical-align: -2px; }
.op-vencida { color: hsl(var(--destructive)); font-weight: 600; }
.op-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.op-grade { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .op-grade { grid-template-columns: 2fr 1fr; } }
.dados-grade { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .8rem; margin: 0; }
.dados-grade dt { color: hsl(var(--muted-foreground)); font-size: var(--fs-sm); } .dados-grade dd { margin: 0; }
.linha-tempo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.linha-tempo li { display: flex; gap: .6rem; align-items: flex-start; }
.lt-marca { width: 10px; height: 10px; border-radius: 999px; margin-top: .35rem; flex: 0 0 auto; background: hsl(var(--muted-foreground)); }
.lt-etapa { background: hsl(var(--info)); } .lt-nota { background: hsl(var(--primary)); }
.lt-ligacao, .lt-mensagem { background: hsl(var(--accent)); } .lt-ganho { background: hsl(var(--success)); }
.lt-perda { background: hsl(var(--destructive)); } .lt-orcamento { background: hsl(var(--warning)); }
/* cores por etapa do funil (barra do topo da coluna e selo da ficha) */
.st-funil-novo_contato { border-bottom-color: hsl(var(--muted-foreground)); }
.st-funil-qualificando { border-bottom-color: hsl(var(--info)); }
.st-funil-orcamento_enviado { border-bottom-color: hsl(var(--warning)); }
.st-funil-negociacao { border-bottom-color: hsl(var(--accent)); }
.st-funil-aguardando_sinal { border-bottom-color: hsl(var(--primary)); }
.st-funil-ganho { border-bottom-color: hsl(var(--success)); }
.st-funil-perdido { border-bottom-color: hsl(var(--destructive)); }
span.st-funil-novo_contato, span.st-funil-qualificando, span.st-funil-orcamento_enviado, span.st-funil-negociacao,
span.st-funil-aguardando_sinal, span.st-funil-ganho, span.st-funil-perdido { background: hsl(var(--muted)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); border-radius: 999px; padding: .14rem .55rem; font-size: var(--fs-xs); }
span.st-funil-ganho { background: hsl(var(--success) / .15); color: hsl(var(--success)); }
span.st-funil-perdido { background: hsl(var(--destructive) / .12); color: hsl(var(--destructive)); }

/* calendário */
.cal-legenda { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.cal-grade, .cal-mes { width: 100%; border-collapse: collapse; }
.cal-grade th, .cal-grade td, .cal-mes th, .cal-mes td { border: 1px solid hsl(var(--border)); vertical-align: top; padding: .3rem; }
.cal-grade th { font-size: var(--fs-sm); text-align: center; }
.cal-amb-col { text-align: left !important; min-width: 9rem; background: hsl(var(--muted) / .4); position: sticky; left: 0; }
.cal-grade td { min-width: 8.5rem; }
.cal-hoje { background: hsl(var(--primary) / .08); }
.cal-fora { background: hsl(var(--muted) / .3); }
.cal-fora .cal-dia-num a { color: hsl(var(--muted-foreground)); }
.cal-mes td { height: 92px; width: 14.28%; }
.cal-dia-num { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: .2rem; }
.cal-dia-num a { text-decoration: none; color: inherit; font-weight: 600; }
.cal-aviso-dia { font-size: var(--fs-xs); color: hsl(var(--warning)); }
.cal-ev { display: flex; gap: .3rem; align-items: baseline; text-decoration: none; color: inherit; font-size: var(--fs-xs);
  padding: .15rem .35rem; margin-bottom: .2rem; border-radius: 6px; border-left: 3px solid; }
.cal-ev .cal-hora { font-weight: 700; } .cal-ev .cal-tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-confirmado { background: hsl(var(--success) / .14); border-color: hsl(var(--success)); }
.cal-opcao { background: hsl(var(--warning) / .14); border-color: hsl(var(--warning)); }
.cal-cl-reserva { border-left-style: dotted; border-left-width: 3px; }
.cal-cl-evento { border-left-style: solid; }

/* painel comercial */
.kpi-sub { display: block; font-size: var(--fs-xs); color: hsl(var(--muted-foreground)); text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; margin-top: .1rem; }
.barra-linha { display: grid; grid-template-columns: 11rem 1fr 2.5rem; gap: .5rem; align-items: center; margin: .3rem 0; font-size: var(--fs-sm); }
.barra-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra { background: hsl(var(--muted)); border-radius: 999px; height: 12px; overflow: hidden; }
.barra-fill { display: block; height: 100%; background: hsl(var(--primary)); border-radius: 999px; min-width: 2px; }
.barra-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.barra-fill.st-funil-novo_contato { background: hsl(var(--muted-foreground)); }
.barra-fill.st-funil-qualificando { background: hsl(var(--info)); }
.barra-fill.st-funil-orcamento_enviado { background: hsl(var(--warning)); }
.barra-fill.st-funil-negociacao { background: hsl(var(--accent)); }
.barra-fill.st-funil-aguardando_sinal { background: hsl(var(--primary)); }
.barra-fill.st-funil-ganho { background: hsl(var(--success)); }
.barra-fill.st-funil-perdido { background: hsl(var(--destructive)); }
.linha-item { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid hsl(var(--border)/.5); text-decoration: none; color: inherit; }
.linha-item:hover { color: hsl(var(--primary)); }
.so-mobile { display: none; }
.mudo { color: hsl(var(--muted-foreground)); } .pequeno { font-size: var(--fs-sm); } .mini { font-size: var(--fs-xs); } .forte { font-weight: 650; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid hsl(var(--border));
       background: hsl(var(--card)); color: hsl(var(--foreground)); border-radius: 9px; padding: .5rem .9rem; font: 550 .9rem var(--sans);
       cursor: pointer; text-decoration: none; min-height: 40px; white-space: nowrap; transition: background .12s, border-color .12s, filter .12s; }
.btn:hover { border-color: hsl(var(--primary)); background: hsl(var(--sidebar-accent)); }
.btn svg { width: 17px; height: 17px; }
.btn-pri { background: hsl(var(--primary-forte)); border-color: hsl(var(--primary-forte)); color: hsl(var(--primary-foreground)); font-weight: 650; }
.btn-pri:hover { filter: brightness(.95); background: hsl(var(--primary-forte)); }
.btn-sec { background: hsl(var(--muted)); border-color: transparent; }
.btn-fantasma { background: transparent; border-color: transparent; }
.btn-fantasma:hover { background: hsl(var(--sidebar-accent)); border-color: transparent; }
.btn-perigo { color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / .5); background: transparent; }
.btn-perigo:hover { background: hsl(var(--destructive) / .1); border-color: hsl(var(--destructive)); }
.btn-pequeno { padding: .3rem .6rem; min-height: 32px; font-size: var(--fs-sm); }
.btn-grande { padding: .7rem 1.2rem; min-height: 48px; font-size: 1.02rem; }
.btn-icone { width: 40px; height: 40px; padding: 0; border-radius: 9px; }
.btn-icone.btn-pequeno { width: 32px; height: 32px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-bloco { width: 100%; }

/* ---------------------------------------------------------------- dropdown / menu "⋯" (CSS + <details>) */
.dropdown { position: relative; display: inline-block; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::marker { content: ""; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 200px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--raio-sm); box-shadow: var(--sombra-alta);
  padding: .3rem; display: flex; flex-direction: column; gap: 1px; }
.dropdown[open] > summary { border-color: hsl(var(--primary)); }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 7px; padding: .5rem .6rem; font: 500 .88rem var(--sans); color: hsl(var(--foreground)); cursor: pointer; text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: hsl(var(--sidebar-accent)); }
.dropdown-menu a svg, .dropdown-menu button svg { width: 16px; height: 16px; color: hsl(var(--muted-foreground)); }
.dropdown-menu .perigo { color: hsl(var(--destructive)); }
.dropdown-menu .sep-menu { height: 1px; background: hsl(var(--border)); margin: .25rem .2rem; }

/* ---------------------------------------------------------------- campos e formulários */
label, .rotulo { display: block; font-size: var(--fs-sm); font-weight: 600; color: hsl(var(--foreground)); margin-bottom: .25rem; }
label .mudo { font-weight: 400; }
input, select, textarea { width: 100%; font: .95rem var(--sans); color: hsl(var(--foreground)); background: hsl(var(--card));
  border: 1px solid hsl(var(--input)); border-radius: 9px; padding: .5rem .7rem; min-height: 40px; }
input[inputmode="numeric"], input[inputmode="decimal"], .num input, input.tnum { font-variant-numeric: tabular-nums; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid hsl(var(--ring) / .4); border-color: hsl(var(--ring)); }
input::placeholder, textarea::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: hsl(var(--primary)); }
.campo { display: flex; flex-direction: column; min-width: 0; }
.ajuda { font-size: var(--fs-xs); color: hsl(var(--muted-foreground)); margin-top: .2rem; }
.erro-campo { font-size: var(--fs-xs); color: hsl(var(--destructive)); margin-top: .2rem; }
fieldset { border: 1px solid hsl(var(--border)); border-radius: 12px; padding: .8rem .9rem; margin: 0; min-width: 0; }
legend { font-size: var(--fs-sm); font-weight: 650; padding: 0 .3rem; }
/* larguras proporcionais ao conteúdo (NCM, CFOP, %, R$, qtd) */
.w-xs { max-width: 6ch; } .w-sm { max-width: 9ch; } .w-md { max-width: 14ch; } .w-lg { max-width: 20ch; }
.w-pct { max-width: 6.5ch; } .w-rs { max-width: 11ch; } .w-qtd { max-width: 7ch; } .w-cfop { max-width: 7ch; } .w-ncm { max-width: 11ch; }
.campo-prefixo { position: relative; display: flex; align-items: center; }
.campo-prefixo .prefixo { position: absolute; left: .6rem; color: hsl(var(--muted-foreground)); font-size: .9rem; pointer-events: none; }
.campo-prefixo input { padding-left: 1.9rem; }

/* input de senha com olhinho */
.campo-senha { position: relative; }
.campo-senha input { padding-right: 2.6rem; }
.olho { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; background: none; color: hsl(var(--muted-foreground)); cursor: pointer; border-radius: 7px; }
.olho:hover { color: hsl(var(--foreground)); background: hsl(var(--sidebar-accent)); }
.olho svg { width: 19px; height: 19px; }

/* interruptor (toggle) no lugar de select Sim/Não */
.switch { position: relative; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; margin: 0; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .trilho { width: 42px; height: 24px; border-radius: 999px; background: hsl(var(--muted-foreground) / .45); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .4); transition: transform .15s; }
.switch input:checked + .trilho { background: hsl(var(--primary-forte)); }
.switch input:checked + .trilho::after { transform: translateX(18px); }
.switch { min-height: 32px; }
.switch input:focus-visible + .trilho { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

.segmentado { display: inline-flex; border: 1px solid hsl(var(--input)); border-radius: 9px; overflow: hidden; }
.segmentado label { margin: 0; padding: .5rem .9rem; cursor: pointer; font-size: .9rem; color: hsl(var(--foreground)); font-weight: 500; }
.segmentado input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmentado input:checked + span { color: hsl(var(--primary-forte)); font-weight: 700; }
.segmentado label:has(input:checked) { background: hsl(var(--primary) / .15); }
.segmentado label:has(input:focus-visible) { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }

/* medidor de força de senha */
.forca { height: 6px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; margin-top: .4rem; }
.forca > i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; border-radius: 999px; }
.forca.f1 > i { width: 25%; background: hsl(var(--destructive)); } .forca.f2 > i { width: 50%; background: hsl(var(--warning)); }
.forca.f3 > i { width: 75%; background: hsl(var(--info)); } .forca.f4 > i { width: 100%; background: hsl(var(--success)); }

/* ---------------------------------------------------------------- tabelas */
.tabela-rolagem { overflow-x: auto; border-radius: var(--raio-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { position: sticky; top: 0; background: hsl(var(--card)); z-index: 1; }
th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: hsl(var(--muted-foreground));
     font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid hsl(var(--border)); white-space: nowrap; }
td { padding: .55rem .6rem; border-bottom: 1px solid hsl(var(--border) / .7); vertical-align: middle; }
tbody tr:hover { background: hsl(var(--muted) / .5); }
tr.linha-link, tr[data-href] { cursor: pointer; }
tfoot td { font-weight: 650; }
.tabela-compacta td, .tabela-compacta th { padding: .4rem .55rem; }

/* ---------------------------------------------------------------- selos de status */
.selo { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem; border-radius: 999px; font-size: var(--fs-xs);
        font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.st-novo, .st-agendado { background: hsl(var(--info) / .14); color: hsl(210 70% 40%); }
.st-em_producao { background: hsl(var(--warning) / .18); color: hsl(30 80% 34%); }
.st-pronto { background: hsl(var(--primary) / .18); color: hsl(var(--primary-forte)); }
.st-concluido { background: hsl(var(--success) / .15); color: hsl(var(--success)); }
.st-cancelado { background: hsl(var(--destructive) / .12); color: hsl(var(--destructive)); text-decoration: line-through; }
.dark .st-novo, .dark .st-agendado { color: hsl(210 80% 72%); } .dark .st-em_producao { color: hsl(35 92% 65%); }
.selo-saldo { background: hsl(var(--destructive) / .1); color: hsl(var(--destructive)); }
.selo-quitado { background: hsl(var(--success) / .12); color: hsl(var(--success)); }
.selo-neutro { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.selo-ok { background: hsl(var(--success) / .14); color: hsl(var(--success)); }
.selo-aviso { background: hsl(var(--warning) / .16); color: hsl(30 80% 34%); } .dark .selo-aviso { color: hsl(35 92% 65%); }

/* ---------------------------------------------------------------- alertas */
.alerta { padding: .65rem .85rem; border-radius: 10px; border: 1px solid; font-size: .9rem; display: flex; gap: .5rem; align-items: flex-start; }
.alerta-erro { background: hsl(var(--destructive) / .08); border-color: hsl(var(--destructive) / .35); color: hsl(var(--destructive)); }
.alerta-ok { background: hsl(var(--success) / .08); border-color: hsl(var(--success) / .35); color: hsl(var(--success)); }
.alerta-aviso { background: hsl(var(--warning) / .1); border-color: hsl(var(--warning) / .4); color: hsl(30 80% 34%); }
.alerta-info { background: hsl(var(--info) / .08); border-color: hsl(var(--info) / .35); color: hsl(210 70% 42%); }
.dark .alerta-aviso { color: hsl(35 92% 65%); } .dark .alerta-info { color: hsl(210 80% 72%); }

/* indicadores compactos */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 12px; padding: .7rem .9rem; }
.kpi span { display: block; font-size: var(--fs-xs); color: hsl(var(--muted-foreground)); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { font: 700 var(--fs-xl) var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* estado vazio com ação */
.vazio { padding: 2rem 1.25rem; text-align: center; color: hsl(var(--muted-foreground)); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.vazio svg { width: 40px; height: 40px; opacity: .5; }

/* ---------------------------------------------------------------- gaveta lateral e modal */
.gaveta-fundo, .modal-fundo { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .45); display: none; }
.gaveta-fundo.aberta, .modal-fundo.aberta { display: block; }
.gaveta { position: fixed; top: 0; right: 0; height: 100%; width: min(480px, 100%); z-index: 61; background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border)); box-shadow: var(--sombra-alta); transform: translateX(100%); transition: transform .2s ease;
  display: flex; flex-direction: column; }
.gaveta.aberta { transform: none; }
.gaveta-cabeca, .modal-cabeca { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.1rem; border-bottom: 1px solid hsl(var(--border)); }
.gaveta-corpo { padding: 1.1rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: .9rem; }
.gaveta-rodape, .modal-rodape { padding: .85rem 1.1rem; border-top: 1px solid hsl(var(--border)); display: flex; gap: .5rem; justify-content: flex-end; }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 2rem));
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--raio-lg); box-shadow: var(--sombra-alta); display: none; flex-direction: column; }
.modal.aberta { display: flex; }
.modal-corpo { padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 80; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; max-width: min(360px, calc(100% - 2rem)); }
.toast { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-left: 4px solid hsl(var(--success)); border-radius: 10px;
  box-shadow: var(--sombra-alta); padding: .7rem .9rem; font-size: .9rem; display: flex; gap: .5rem; align-items: center; animation: toast-ent .18s ease; }
.toast.erro { border-left-color: hsl(var(--destructive)); } .toast.aviso { border-left-color: hsl(var(--warning)); }
.toast.saindo { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes toast-ent { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- novo pedido (balcão) */
.pedido-form { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .pedido-form { grid-template-columns: minmax(0, 1fr); } }
.resumo { position: sticky; top: 76px; }
@media (max-width: 1100px) { .resumo { position: sticky; bottom: 0; top: auto; z-index: 15; } }
.resumo dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; margin: 0; font-variant-numeric: tabular-nums; }
.resumo dt { color: hsl(var(--muted-foreground)); } .resumo dd { margin: 0; text-align: right; }
.resumo .total { font: 700 1.6rem var(--sans); letter-spacing: -.02em; } .resumo .saldo { color: hsl(var(--destructive)); font-weight: 700; }
.busca-resultados { border: 1px solid hsl(var(--border)); border-radius: 10px; margin-top: .3rem; max-height: 300px; overflow-y: auto; background: hsl(var(--card)); box-shadow: var(--sombra); }
.busca-resultados button { display: flex; width: 100%; justify-content: space-between; gap: .5rem; text-align: left; border: 0; background: none;
  padding: .55rem .7rem; font: .92rem var(--sans); color: inherit; cursor: pointer; border-bottom: 1px solid hsl(var(--border) / .6); }
.busca-resultados button:hover { background: hsl(var(--primary) / .1); }
.busca-resultados button:focus-visible { background: hsl(var(--primary) / .1); outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }
.item-carrinho { border: 1px solid hsl(var(--border)); border-radius: 12px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .5rem; }
.item-carrinho .cabeca { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.item-carrinho .cabeca strong { flex: 1; min-width: 160px; }
.qtd { width: 84px; } .grupo-comp { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.grupo-comp label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; color: hsl(var(--foreground)); margin: 0; font-size: .88rem; }
.grupo-comp .qtd-comp { width: 64px; min-height: 32px; padding: .2rem .4rem; }
.chip { display: inline-flex; padding: .1rem .5rem; border-radius: 999px; background: hsl(var(--muted)); font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- agenda / quadro */
.agenda { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: .6rem; overflow-x: auto; }
.agenda-dia { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 12px; min-height: 140px; display: flex; flex-direction: column; }
.agenda-dia > header { padding: .45rem .6rem; border-bottom: 1px solid hsl(var(--border)); font-weight: 650; font-size: .86rem; display: flex; justify-content: space-between; }
.agenda-dia.hoje > header { background: hsl(var(--primary) / .12); color: hsl(var(--primary-forte)); }
.agenda-dia .lista { padding: .45rem; display: flex; flex-direction: column; gap: .4rem; }
.cartao-pedido { display: block; text-decoration: none; color: inherit; border: 1px solid hsl(var(--border)); border-left: 4px solid hsl(var(--primary));
  border-radius: 10px; padding: .45rem .55rem; font-size: .84rem; background: hsl(var(--background)); }
.cartao-pedido:hover { box-shadow: var(--sombra); }
.cartao-pedido.com-saldo { border-left-color: hsl(var(--destructive)); }
.cartao-pedido.st-cancelado { opacity: .6; }
.quadro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 1100px) { .quadro { grid-template-columns: repeat(2, minmax(0, 1fr)); } .agenda { grid-template-columns: repeat(7, 170px); } }
@media (max-width: 640px) { .quadro { grid-template-columns: minmax(0, 1fr); } }

.paginacao { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; margin-top: .6rem; }
.htmx-indicator { opacity: 0; transition: opacity .2s; } .htmx-request .htmx-indicator { opacity: 1; }

/* abas */
.abas { display: flex; gap: .2rem; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 1rem; overflow-x: auto; }
.abas a { padding: .6rem .9rem; text-decoration: none; color: hsl(var(--muted-foreground)); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.abas a:hover { color: hsl(var(--foreground)); }
.abas a[aria-current="page"] { color: hsl(var(--primary-forte)); border-bottom-color: hsl(var(--primary)); }

/* ---------------------------------------------------------------- login e páginas de conta sem menu */
.tela-auth { min-height: 100%; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(155deg, hsl(190 35% 96%) 0%, hsl(350 65% 95%) 55%, hsl(184 48% 90%) 100%); }
.dark .tela-auth { background: linear-gradient(155deg, hsl(200 28% 9%) 0%, hsl(200 28% 13%) 55%, hsl(184 40% 16%) 100%); }
.tela-auth .cartao { width: 100%; max-width: 400px; padding: 1.8rem; box-shadow: var(--sombra-alta); }
.auth-marca { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.3rem; text-align: center; }
.auth-marca .monograma { width: 52px; height: 52px; border-radius: 16px; }
.auth-marca .monograma img { width: 34px; height: 32px; }
.auth-marca h1 { font-size: var(--fs-lg); } .auth-marca .mudo { font-size: var(--fs-sm); }
.auth-link { text-align: center; margin-top: 1rem; font-size: .9rem; }

/* ---------------------------------------------------------------- impressão (comanda 80 mm e A4) */
.folha { background: #fff; color: #000; margin: 0 auto; font: 13px/1.35 var(--mono); }
.folha-80 { width: 80mm; padding: 3mm; }
.folha-a4 { width: 190mm; padding: 10mm; font-family: var(--sans); font-size: 12px; }
.folha h1 { font: 700 16px var(--sans); text-align: center; margin: 0 0 2mm; }
.folha .grande { font-size: 18px; font-weight: 700; }
.folha hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.folha table { font-size: inherit; } .folha td, .folha th { border: 0; padding: .5mm 0; color: #000; }
.folha .comp { padding-left: 4mm; } .folha .obs { font-weight: 700; }
.barra-impressao { display: flex; gap: .5rem; justify-content: center; padding: .75rem; }
@media print {
  .barra-impressao, .nao-imprimir { display: none !important; }
  body { background: #fff; }
  @page { margin: 0; }
  .folha-a4 { padding: 12mm; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* alvos de toque confortáveis em telas de toque (WCAG 2.5.5): ≥ 44px nas ações principais */
@media (pointer: coarse) {
  .btn, .btn-icone, input, select, .olho, .abas a { min-height: 44px; }
  .btn-icone { min-width: 44px; }
  .btn-pequeno { min-height: 40px; }
  .nav a { min-height: 44px; }
  .switch { min-height: 44px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
}
