/* Oferta Ativa — regras exclusivas do painel administrativo. */
.app-modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.app-modal-overlay.open { display: flex; }
.app-modal { width: min(100%, 480px); max-height: min(85dvh, 760px); overflow: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.modal-overlay { padding: 20px; }
.modal { width: min(100%, 400px); max-height: min(85dvh, 680px); overflow: auto; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { min-width: 680px; }

@media (max-width: 768px) {
  body { min-width: 0; overflow-x: hidden; }
  header { height: 56px; padding: 0 14px; }
  .logo { font-size: 15px; gap: 7px; }
  .logo-icon { width: 30px; height: 30px; font-size: 14px; }
  .header-right { gap: 6px; }
  .ws-badge { padding: 5px 8px; }
  .ws-badge span { display: none; }
  .header-right a { font-size: 0 !important; padding: 7px 9px !important; }
  .header-right a::before { content: '🎧'; font-size: 14px; }
  .layout { display: block; min-height: calc(100dvh - 56px); }
  .main { padding: 12px; gap: 12px; overflow: visible; }
  .public-welcome { min-height: calc(100dvh - 56px); padding: 12px; }
  .public-welcome > div { padding: 18px; }
  .public-welcome h1 { font-size: clamp(34px, 12vw, 52px); }
  .public-welcome p { margin-top: 12px; font-size: 20px; }
  .public-welcome span { font-size: 15px; }
  .section-card { border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-head { padding: 14px; align-items: flex-start; gap: 10px; flex-direction: column; }
  .section-head h2 { font-size: 14px; }
  .head-actions { width: 100%; flex-wrap: wrap; }
  .head-actions .btn-sm { flex: 1 1 auto; min-height: 36px; }
  .section-card > table { min-width: 680px; }
  .section-card > .section-head, .section-card > #discando-agora, .section-card > #metricas-bar, .section-card > .tabs, .section-card > .progress-bar { min-width: 0; }
  .tabs { padding: 12px 14px 0; overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; padding: 7px 11px; }
  #metricas-bar { padding: 10px 14px 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #metricas-bar > * { min-width: 0; }
  .mini-stats { padding: 8px 14px 0; }
  .actions-cell { flex-wrap: wrap; min-width: 190px; }
  .app-modal-overlay, .modal-overlay { align-items: flex-end; padding: 0; }
  .app-modal { width: 100%; max-height: min(88dvh, 720px); border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .app-modal .modal-actions { position: sticky; bottom: -20px; padding-top: 14px; padding-bottom: 4px; background: var(--surface); }
  .app-modal .na-save-row { flex-direction: column; }
  .app-modal .na-save-row input, .app-modal .na-save-row button { width: 100%; }
  .modal { width: 100%; max-height: min(82dvh, 640px); border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  #modal-settings div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}
