/* Serviços e valores */
.sv-topo-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sv-area { display: flex; flex-direction: column; gap: 18px; padding-top: 18px; }
.sv-barra-filtros { display: flex; flex-direction: column; gap: 14px; }
.sv-filtros { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.sv-filtro { min-width: 0; }
.sv-barra { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.sv-resumo { font-size: .86rem; margin-left: auto; }
.sv-modo { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 99px; padding: 3px; background: var(--surface-2); }
.sv-modo button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: .86rem; }
.sv-modo button[aria-pressed="true"] { background: var(--accent-soft-2); color: var(--accent-ink); font-weight: 500; }
.sv-ordem { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; }
.sv-ordem select { min-height: 38px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--raio-sm); color: var(--text); }
.sv-lista { min-width: 0; }
.sv-grupos { display: flex; flex-direction: column; gap: 14px; }
.sv-grupo h3 { margin: 0; font-family: var(--fonte-corpo); font-size: 1rem; font-weight: 500; }
.sv-grupo-cab { width: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 48px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); color: var(--text); text-align: left; }
.sv-grupo-cab:hover { border-color: var(--accent); background: var(--accent-soft); }
.sv-grupo-cab:focus-visible, .sv-ord:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sv-grupo-cab .icone { width: 18px; height: 18px; color: var(--accent-ink); transition: transform .15s ease; }
.sv-grupo-cab[aria-expanded="false"] .icone { transform: rotate(-90deg); }
.sv-grupo-nome { font-family: var(--fonte-titulo); font-size: 1.3rem; font-weight: 500; }
.sv-grupo-corpo { margin-top: 8px; }
.sv-tabela th, .sv-tabela td { padding: 12px 12px; }
.sv-tabela td strong { font-weight: 500; }
.sv-tabela td small { white-space: normal; max-width: 46ch; }
.sv-tabela td.sv-c-nome { white-space: normal; min-width: 180px; }
.sv-tabela td.sv-c-valor .selo { display: flex; width: fit-content; margin: 4px 0 0 auto; }
.sv-tabela tr.inativo td { opacity: .6; }
.sv-tabela tr.sv-edicao td { background: var(--surface-2); white-space: normal; }
.sv-tabela tr.sv-edicao:hover td { background: var(--surface-2); }
.sv-ord { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sv-ord:hover { color: var(--accent-ink); }
th[aria-sort="ascending"] .sv-ord::after { content: " \2191"; color: var(--accent-ink); }
th[aria-sort="descending"] .sv-ord::after { content: " \2193"; color: var(--accent-ink); }
.sv-acoes-linha { white-space: nowrap; text-align: right; }
.sv-acoes-linha .btn { padding: 0 11px; }
.sv-acoes-linha .btn + .btn { margin-left: 2px; }
.sv-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.sv-form .sv-f-nome { grid-column: span 2; }
.sv-form .sv-f-largo, .sv-form .sv-f-online, .sv-form .erro-form, .sv-form .sv-acoes { grid-column: 1 / -1; }
.sv-form .erro-form:empty { display: none; }
.sv-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.modal.sv-modal { width: min(720px, 100%); }
.modal.sv-modal-largo { width: min(820px, 100%); }
.sv-hist-aba { display: flex; flex-direction: column; gap: 14px; }
.sv-hist .sv-c-alteracao { white-space: normal; min-width: 240px; }
.sv-cat-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sv-cat-linha { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--raio-sm); background: var(--surface-2); }
.sv-cat-nome { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; min-width: 0; }
.sv-cat-nome .muted { font-size: .8rem; }
.sv-cat-botoes { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-cat-nome input, .sv-cat-nova input { min-height: 42px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--raio-sm); color: var(--text); font-size: .95rem; width: 100%; }
.sv-cat-nova { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sv-cat-nova input { flex: 1 1 240px; width: auto; }
.sv-busca input { text-transform: none; }

@media (min-width: 1280px) {
  table.sv-tabela { table-layout: fixed; min-width: 940px; }
  table.sv-tabela.sv-com-categoria { min-width: 1100px; }
  .sv-th-categoria { width: 170px; } .sv-th-duracao { width: 84px; } .sv-th-valor { width: 130px; } .sv-th-online, .sv-th-ativo { width: 80px; } .sv-th-comissao { width: 90px; } .sv-th-acoes { width: 250px; }
  table.sv-hist { min-width: 720px; } .sv-th-h-quando { width: 150px; } .sv-th-h-serviço { width: 28%; } .sv-th-h-quem { width: 140px; }
}
@media (max-width: 1000px) {
  .sv-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-busca { grid-column: 1 / -1; }
}
/* No celular cada linha da tabela vira um cartão, com o nome do campo em cima do valor. */
@media (max-width: 1279px) {
  .sv-resumo { margin-left: 0; width: 100%; }
  table.sv-tabela thead { display: none; }
  table.sv-tabela, table.sv-tabela tbody { display: block; }
  table.sv-tabela tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 14px; padding: 14px; border-top: 1px solid var(--line); }
  table.sv-tabela tr:first-child { border-top: 0; }
  table.sv-tabela td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; text-align: left; }
  table.sv-tabela td.num { text-align: left; }
  table.sv-tabela td::before { content: attr(data-r); display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  table.sv-tabela td.sv-c-nome, table.sv-tabela td.sv-c-acoes, table.sv-tabela td.sv-c-alteracao { grid-column: 1 / -1; }
  table.sv-tabela td.sv-c-nome::before, table.sv-tabela td.sv-c-acoes::before { display: none; }
  table.sv-tabela td.sv-c-nome { min-width: 0; }
  table.sv-tabela td.sv-c-acoes { text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
  table.sv-tabela td.sv-c-acoes .btn + .btn { margin-left: 0; }
  table.sv-tabela tbody tr:hover td { background: transparent; }
  table.sv-tabela tr.sv-edicao { display: block; padding: 12px; }
  table.sv-tabela tr.sv-edicao td { display: block; }
  table.sv-tabela tr.sv-edicao td::before { display: none; }
  .sv-form .sv-f-nome { grid-column: 1 / -1; }
  table.sv-tabela td.sv-c-valor .selo { margin: 4px 0 0; }
}
@media (max-width: 480px) {
  .sv-topo-acoes { width: 100%; }
}
