/* Painel novo "Serviço de redes sociais" (vendedor). Usa só as variáveis do tema (claro/escuro). */
.sm2 { display: block; color: var(--ink); }
.sm2 .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sm2-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.sm2-main { display: grid; gap: 16px; min-width: 0; }
.sm2-side { min-width: 0; }
.sm2-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.sm2-card h2 { margin: 2px 0 10px; font-size: 1.12rem; line-height: 1.25; }
.sm2-card.is-off { opacity: .55; }
.sm2-muted { color: var(--muted); font-size: .86rem; line-height: 1.5; margin: 4px 0; }
.sm2-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--brand-pale); color: var(--brand-dark, var(--brand)); font-size: .72rem; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.sm2-link { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-size: .86rem; cursor: pointer; text-decoration: underline; }
.sm2-link:disabled { opacity: .5; cursor: default; }

/* Plataforma */
.sm2-nets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sm2-net { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 2px solid var(--line); border-radius: 14px; background: var(--mist); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.sm2-net:hover:not(:disabled) { border-color: var(--brand); }
.sm2-net.is-on { border-color: var(--brand); background: var(--brand-pale); }
.sm2-net:disabled { cursor: default; opacity: .7; }
.sm2-net:focus-visible, .sm2-cat:focus-visible, .sm2-x:focus-visible, .sm2-link:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.sm2-net__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; }
.sm2-net__icon svg { width: 24px; height: 24px; }
.sm2-net__icon--instagram { background: linear-gradient(45deg, #f9a43a, #e1306c 55%, #6a3fd1); }
.sm2-net__icon--facebook { background: #1877f2; }
.sm2-net__icon--tiktok { background: #14161a; }
.sm2-net b { font-size: .92rem; font-weight: 600; }

/* Categorias */
.sm2-search input { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); color: var(--ink); font: inherit; margin-bottom: 10px; }
.sm2-search input:focus { outline: 3px solid var(--brand-pale); border-color: var(--brand); }
.sm2-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sm2-cat { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.sm2-cat:hover { border-color: var(--brand); background: var(--brand-pale); }
.sm2-cat span { font-weight: 600; font-size: .9rem; }
.sm2-cat small { color: var(--muted); white-space: nowrap; }

/* Pacotes */
.sm2-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; background: var(--mist); }
.sm2-row__head { display: flex; align-items: center; gap: 6px; }
.sm2-row__head .sm2-link { margin-left: auto; }
.sm2-row__service { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 8px 0 0; font-weight: 600; font-size: .92rem; }
.sm2-row__meta { margin-top: 2px; }
.sm2-row__fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 10px; }
.sm2-field { display: grid; gap: 5px; font-size: .84rem; font-weight: 600; color: var(--ink-soft); min-width: 0; }
.sm2-field input, .sm2-field textarea { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 400; }
.sm2-field input:focus, .sm2-field textarea:focus { outline: 3px solid var(--brand-pale); border-color: var(--brand); }
.sm2-field small { color: var(--brand); font-weight: 600; min-height: 1em; }
.sm2-hint { margin: 10px 0 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.5; min-height: 1.2em; }
.sm2-hint.is-bad { color: #c0392b; }
.sm2-add { margin-top: 6px; }

/* Anúncio e capa */
.sm2-cover { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 12px; }
.sm2-cover__img, .sm2-preview__img { aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--mist); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.sm2-cover__img img, .sm2-preview__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm2-upload { cursor: pointer; display: inline-flex; }
.sm2-rules { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: .88rem; line-height: 1.6; }

/* Resumo */
.sm2-summary { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.sm2-summary h3 { margin: 0 0 10px; font-size: 1rem; }
.sm2-sum { margin: 0; display: grid; gap: 6px; }
.sm2-sum div { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.sm2-sum dt { color: var(--muted); }
.sm2-sum dd { margin: 0; font-weight: 600; }
.sm2-sumlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sm2-sumlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 11px; border-radius: 11px; background: var(--mist); font-size: .84rem; }
.sm2-sumlist li b { font-weight: 600; overflow-wrap: anywhere; }
.sm2-sumlist li span { font-weight: 700; }
.sm2-sumlist li small { grid-column: 1 / -1; color: var(--muted); }
.sm2-sum__note { margin-top: 12px; }

/* Navegação e revisão */
.sm2-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.sm2-review { display: grid; gap: 16px; max-width: 920px; }
.sm2-preview { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.sm2-preview h3 { margin: 6px 0 4px; font-size: 1.1rem; }
.sm2-preview p { margin: 0 0 6px; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.sm2-scroll { overflow-x: auto; }
.sm2-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.sm2-table th, .sm2-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sm2-table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.sm2-done { max-width: 640px; }

/* Pop-up de serviços */
.sm2-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.sm2-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, .55); }
.sm2-modal__panel { position: relative; width: min(680px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); outline: none; }
.sm2-modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sm2-modal__head h2 { margin: 2px 0 10px; font-size: 1.1rem; }
.sm2-x { border: 0; background: var(--mist); color: var(--ink); width: 36px; height: 36px; border-radius: 10px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.sm2-svcs { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 8px; }
.sm2-svc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.sm2-svc b { font-size: .92rem; overflow-wrap: anywhere; }
.sm2-svc p { margin: 4px 0 0; }

/* Telas largas: formulário + resumo fixo ao lado */
@media (min-width: 980px) {
  .sm2-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .sm2-side { position: sticky; top: 90px; }
}
/* Celular */
@media (max-width: 640px) {
  .sm2-card, .sm2-summary { padding: 14px; border-radius: 14px; }
  .sm2-nets { gap: 8px; }
  .sm2-net { padding: 12px 4px; }
  .sm2-cover { grid-template-columns: 1fr; }
  .sm2-preview { grid-template-columns: 1fr; }
  .sm2-svc { grid-template-columns: 1fr; }
  .sm2-svc .button { width: 100%; }
  .sm2-nav { justify-content: stretch; }
  .sm2-nav .button { flex: 1 1 100%; text-align: center; }
  .sm2-modal { padding: 0; align-items: end; }
  .sm2-modal__panel { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
}
html[data-theme="dark"] .sm2-hint.is-bad { color: #ff8a7a; }
