/* Estilos base da LaFemme. Os componentes (componentes.js) usam estas classes; as telas evitam estilo solto. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--lf-font); background: var(--lf-page); color: var(--lf-text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lf-primary); }
.num { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.muted { color: var(--lf-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lf-primary); outline-offset: 2px; }

/* skeleton (CLAUDE.md §14): silhueta no tamanho real, nunca spinner */
.lafemme-skel { display: inline-block; border-radius: 6px; background: linear-gradient(90deg, #EFE8DA 0%, #F7F2E8 50%, #EFE8DA 100%); background-size: 200% 100%; animation: lf-skel 1.2s ease-in-out infinite; vertical-align: middle; }
@keyframes lf-skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .lafemme-skel { animation: none; } }

/* botões */
.lf-btn { height: 40px; padding: 0 16px; border-radius: var(--lf-radius); border: 1px solid var(--lf-border); background: var(--lf-surface); color: var(--lf-text); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.lf-btn:hover:not(:disabled) { border-color: var(--lf-primary); }
.lf-btn:disabled { opacity: .55; cursor: not-allowed; }
.lf-btn.primario { background: var(--lf-primary); border-color: var(--lf-primary); color: #FFFFFF; font-weight: 700; }
.lf-btn.primario:hover:not(:disabled) { background: var(--lf-primary-hover); border-color: var(--lf-primary-hover); }
.lf-btn.contorno { border-color: var(--lf-primary); color: var(--lf-primary); font-weight: 700; }
.lf-btn.fantasma { border-color: transparent; background: transparent; color: var(--lf-primary); }
.lf-btn.pequeno { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--lf-radius-s); }
.lf-btn.icone { width: 38px; height: 38px; padding: 0; border-radius: var(--lf-radius-s); color: var(--lf-muted); }
.lf-btn.bloco { width: 100%; }

/* campos */
.lf-campo { display: flex; flex-direction: column; gap: 6px; }
.lf-campo > span { font-size: 13px; font-weight: 600; }
.lf-input { height: 44px; padding: 0 12px; border-radius: var(--lf-radius-s); border: 1px solid var(--lf-border); background: var(--lf-surface); outline: 0; width: 100%; }
.lf-input:focus { border-color: var(--lf-primary); box-shadow: 0 0 0 3px rgba(140, 106, 30, .14); }
.lf-input[aria-invalid="true"] { border-color: var(--lf-bad); }
.lf-busca { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--lf-border); border-radius: var(--lf-radius-s); background: var(--lf-surface); color: var(--lf-muted); }
.lf-busca input { border: 0; outline: 0; background: transparent; flex-grow: 1; min-width: 0; color: var(--lf-text); }
.lf-erro-campo { color: var(--lf-bad); font-size: 12px; font-weight: 600; }

/* chips de status */
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.ok { background: var(--lf-ok-bg); color: var(--lf-ok); }
.chip.warn { background: var(--lf-warn-bg); color: var(--lf-warn); }
.chip.bad { background: var(--lf-bad-bg); color: var(--lf-bad); }
.chip.neutro { background: var(--lf-soft); color: var(--lf-primary); }

/* cartões */
.lf-card { background: var(--lf-surface); border: 1px solid var(--lf-border); border-radius: var(--lf-radius-card); box-shadow: var(--lf-shadow); }
.lf-card > h2, .lf-titulo-card { margin: 0; font-size: 16px; font-weight: 800; }

/* aviso */
.lf-aviso { padding: 12px 14px; border-radius: var(--lf-radius-s); font-size: 14px; line-height: 1.4; }
.lf-aviso.bad { background: var(--lf-bad-bg); color: var(--lf-bad); }
.lf-aviso.ok { background: var(--lf-ok-bg); color: var(--lf-ok); }
.lf-aviso.warn { background: var(--lf-warn-bg); color: var(--lf-warn); }

/* filtros */
.lf-filtro { height: 38px; padding: 0 10px; border-radius: var(--lf-radius-s); border: 1px solid var(--lf-border); background: var(--lf-surface); color: var(--lf-text); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lf-filtro.ativo { background: var(--lf-soft); border-color: var(--lf-primary); color: var(--lf-primary); }
.lf-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; max-width: 320px; background: var(--lf-surface); border: 1px solid var(--lf-border); border-radius: var(--lf-radius); box-shadow: var(--lf-shadow-pop); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.lf-pop-lista { max-height: 260px; overflow: auto; display: flex; flex-direction: column; }
.lf-pop-opcao { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.lf-pop-opcao:hover, .lf-pop-opcao[aria-selected="true"] { background: var(--lf-soft); color: var(--lf-primary); }

/* abas */
.lf-abas { display: flex; gap: 4px; border-bottom: 1px solid var(--lf-border); align-items: flex-end; flex-wrap: wrap; }
.lf-aba { height: 40px; padding: 0 14px; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--lf-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.lf-aba[aria-selected="true"] { color: var(--lf-primary); font-weight: 700; border-bottom-color: var(--lf-primary); }
.lf-alternador { display: flex; border: 1px solid var(--lf-border); border-radius: var(--lf-radius-s); overflow: hidden; background: var(--lf-surface); }
.lf-alternador button { height: 32px; padding: 0 12px; border: 0; background: var(--lf-surface); font-size: 13px; font-weight: 600; color: var(--lf-muted); }
.lf-alternador button[aria-pressed="true"] { background: var(--lf-soft); color: var(--lf-primary); font-weight: 700; }

/* tabela paginada (CLAUDE.md §15) */
.lf-tabela-card { background: var(--lf-surface); border: 1px solid var(--lf-border); border-radius: var(--lf-radius-card); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.lf-tabela-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--lf-muted); border-bottom: 1px solid var(--lf-border); }
.lf-tabela-barra strong { color: var(--lf-text); }
.lf-tabela-rolagem { flex-grow: 1; overflow: auto; min-height: 0; }
.lf-tabela { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.lf-tabela thead th { position: sticky; top: 0; z-index: 1; background: var(--lf-page); color: var(--lf-muted); font-size: 12px; font-weight: 700; text-align: left; padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-tabela thead th.ordenavel { cursor: pointer; user-select: none; }
.lf-tabela thead th.ordenavel:hover { color: var(--lf-primary); }
.lf-tabela thead th.num, .lf-tabela td.num { text-align: right; }
.lf-tabela tbody tr { border-top: 1px solid var(--lf-border); }
.lf-tabela tbody tr.clicavel { cursor: pointer; }
.lf-tabela tbody tr.clicavel:hover { background: #FCFAF5; }
.lf-tabela tbody tr.selecionada { background: var(--lf-soft); }
.lf-tabela td { padding: 10px 12px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-tabela tbody.consultando { opacity: .55; transition: opacity .15s; }
.lf-tabela-vazia { padding: 48px 16px; text-align: center; color: var(--lf-muted); }
.lf-paginacao { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--lf-border); font-size: 13px; color: var(--lf-muted); }
.lf-paginacao .paginas { display: flex; gap: 6px; align-items: center; }
.lf-pag-num { width: 32px; height: 32px; border-radius: var(--lf-radius-s); border: 1px solid var(--lf-border); background: var(--lf-surface); color: var(--lf-text); font-size: 13px; }
.lf-pag-num[aria-current="page"] { border-color: var(--lf-primary); background: var(--lf-primary); color: #FFFFFF; font-weight: 700; }
@media (max-width: 767px) {
  .lf-tabela { table-layout: auto; }
  .lf-pag-num, .lf-paginacao .reticencias { display: none; }
}

/* miniatura de foto */
.lf-foto { width: 34px; height: 34px; border-radius: var(--lf-radius-s); background: var(--lf-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.lf-foto img { width: 100%; height: 100%; object-fit: cover; }

/* modal e confirmação */
.lf-veu { position: fixed; inset: 0; background: rgba(43, 33, 24, .42); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.lf-modal { background: var(--lf-surface); border-radius: 14px; box-shadow: var(--lf-shadow-pop); width: 100%; max-width: 480px; padding: 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.lf-modal h2 { margin: 0; font-size: 18px; font-weight: 800; }
.lf-modal .acoes { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* avisos flutuantes */
.lf-toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.lf-toast { min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: var(--lf-radius); box-shadow: var(--lf-shadow-pop); font-size: 14px; font-weight: 600; background: var(--lf-deep); color: var(--lf-on-deep); }
.lf-toast.erro { background: var(--lf-bad); color: #FFFFFF; }
.lf-toast.ok { background: var(--lf-ok); color: #FFFFFF; }
