/* ==============================================================================
   GASTROMAIS US — PLATAFORMA SAAS
   Super-Admin Console — Dark Mode Design System
   Paleta: Dark Slate / Obsidian / Amber Gold & Emerald Green
   ============================================================================== */

:root {
  /* Mesmo fundo escuro + brilho coral no canto do painel do lojista (admin.css):
     console da plataforma usa a mesma linguagem visual. */
  --sa-bg-darkest: #0e0e0e;
  --sa-bg-main: #0e0e0e;
  --sa-bg-card: #1a1a1a;
  --sa-bg-card-hover: #212121;
  --sa-bg-surface: #222222;
  --sa-bg-glass: rgba(26, 26, 26, 0.92);
  --sa-brand-rgb: 239, 75, 63;
  --sa-bg-gradient:
    radial-gradient(1300px 1050px at 100% 100%, rgba(var(--sa-brand-rgb), 0.38) 0%, rgba(var(--sa-brand-rgb), 0.22) 40%, rgba(var(--sa-brand-rgb), 0.10) 68%, transparent 100%),
    #0e0e0e;

  --sa-border-subtle: #272a33;
  --sa-border-active: #3b3f4d;
  --sa-border-focus: #f59e0b;

  --sa-text-primary: #f8fafc;
  --sa-text-secondary: #94a3b8;
  --sa-text-muted: #64748b;

  --sa-gold: #f59e0b;
  --sa-gold-glow: rgba(245, 158, 11, 0.15);
  --sa-emerald: #10b981;
  --sa-emerald-glow: rgba(16, 185, 129, 0.15);
  --sa-rose: #f43f5e;
  --sa-rose-glow: rgba(244, 63, 94, 0.15);
  --sa-amber: #eab308;
  --sa-amber-glow: rgba(234, 179, 8, 0.15);
  --sa-cyan: #06b6d4;

  --sa-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sa-font-mono: 'JetBrains Mono', monospace;

  --sa-radius-sm: 6px;
  --sa-radius-md: 10px;
  --sa-radius-lg: 14px;

  --sa-shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --sa-shadow-glow: 0 0 25px rgba(245, 158, 11, 0.12);
  --sa-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.super-admin-body {
  font-family: var(--sa-font-sans);
  background: var(--sa-bg-darkest);
  color: var(--sa-text-primary);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* position:fixed (não background-attachment:fixed, que não funciona no Safari/iOS):
   o degradê fica parado no canto enquanto só os cards rolam, igual ao admin.css. */
body.super-admin-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--sa-bg-gradient);
  pointer-events: none;
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  padding: 14px 18px;
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  border-radius: var(--sa-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sa-text-primary);
  font-size: 0.9rem;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.toast-success {
  border-left: 4px solid var(--sa-emerald);
}

.toast.toast-error {
  border-left: 4px solid var(--sa-rose);
}

.toast.toast-warning {
  border-left: 4px solid var(--sa-amber);
}

.toast.toast-info {
  border-left: 4px solid var(--sa-cyan);
}

.toast-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-msg {
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: var(--sa-text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  transition: var(--sa-transition);
}

.toast-close:hover {
  color: var(--sa-text-primary);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==============================================================================
   HEADER DO SUPER-ADMIN
   ============================================================================== */
.sa-header {
  background: var(--sa-bg-main);
  border-bottom: 1px solid var(--sa-border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.sa-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.sa-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sa-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--sa-radius-sm);
  background: var(--sa-bg-surface);
  border: 1px solid var(--sa-border-active);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sa-brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-brand-text .sa-platform-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  background: var(--sa-gold-glow);
  color: var(--sa-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--sa-radius-sm);
}

.sa-brand-text p {
  font-size: 0.8rem;
  color: var(--sa-text-muted);
}

.sa-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sa-operator-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
}

.sa-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--sa-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--sa-emerald);
  animation: pulseLight 2s infinite;
}

@keyframes pulseLight {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.sa-operator-email {
  color: var(--sa-text-primary);
  font-weight: 600;
}

.sa-operator-role {
  color: var(--sa-gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--sa-radius-sm);
  cursor: pointer;
  transition: var(--sa-transition);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
}

.sa-btn-subtle {
  background: var(--sa-bg-card);
  border-color: var(--sa-border-subtle);
  color: var(--sa-text-secondary);
}

.sa-btn-subtle:hover {
  background: var(--sa-bg-surface);
  color: var(--sa-text-primary);
  border-color: var(--sa-border-active);
}

.sa-btn-primary {
  background: var(--sa-gold);
  color: #090a0c;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.sa-btn-primary:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.sa-btn-danger {
  background: var(--sa-rose-glow);
  color: var(--sa-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.sa-btn-danger:hover {
  background: var(--sa-rose);
  color: #ffffff;
}

/* ==============================================================================
   CONTEÚDO PRINCIPAL & METRIC CARDS
   ============================================================================== */
.sa-main {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sa-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.sa-metric-card {
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  border-radius: var(--sa-radius-md);
  padding: 20px;
  box-shadow: var(--sa-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: var(--sa-transition);
}

.sa-metric-card:hover {
  border-color: var(--sa-border-active);
  transform: translateY(-2px);
}

.sa-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--sa-border-active);
}

.sa-metric-card.card-all::before { background: var(--sa-cyan); }
.sa-metric-card.card-active::before { background: var(--sa-emerald); }
.sa-metric-card.card-pending::before { background: var(--sa-amber); }
.sa-metric-card.card-suspended::before { background: var(--sa-rose); }

.sa-metric-label {
  font-size: 0.82rem;
  color: var(--sa-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sa-metric-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sa-text-primary);
}

.sa-metric-sub {
  font-size: 0.78rem;
  color: var(--sa-text-secondary);
}

/* ==============================================================================
   TABELA GERENCIAL & TOOLBAR
   ============================================================================== */
.sa-section-card {
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  border-radius: var(--sa-radius-md);
  box-shadow: var(--sa-shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sa-toolbar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--sa-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--sa-bg-main);
}

.sa-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.sa-search-input {
  width: 100%;
  max-width: 380px;
  background: var(--sa-bg-surface);
  border: 1px solid var(--sa-border-subtle);
  color: var(--sa-text-primary);
  padding: 10px 14px;
  border-radius: var(--sa-radius-sm);
  font-size: 0.88rem;
  outline: none;
  transition: var(--sa-transition);
  font-family: inherit;
}

.sa-search-input:focus {
  border-color: var(--sa-gold);
  box-shadow: 0 0 0 3px var(--sa-gold-glow);
}

.sa-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sa-select-filter {
  background: var(--sa-bg-surface);
  border: 1px solid var(--sa-border-subtle);
  color: var(--sa-text-primary);
  padding: 9px 12px;
  border-radius: var(--sa-radius-sm);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.sa-select-filter:focus {
  border-color: var(--sa-gold);
}

/* Tabela */
.sa-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.sa-table th {
  background: var(--sa-bg-darkest);
  color: var(--sa-text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--sa-border-subtle);
  white-space: nowrap;
}

.sa-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sa-border-subtle);
  vertical-align: middle;
  color: var(--sa-text-secondary);
  transition: var(--sa-transition);
}

.sa-table tbody tr:hover td {
  background: var(--sa-bg-card-hover);
  color: var(--sa-text-primary);
}

.sa-store-id-cell {
  font-family: var(--sa-font-mono);
  font-size: 0.82rem;
  color: var(--sa-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-store-link {
  color: var(--sa-text-muted);
  text-decoration: none;
  transition: var(--sa-transition);
}

.sa-store-link:hover {
  color: var(--sa-gold);
}

.sa-store-name-title {
  color: var(--sa-text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.sa-store-subtitle {
  font-size: 0.78rem;
  color: var(--sa-text-muted);
}

.sa-contact-link {
  color: var(--sa-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--sa-transition);
}

.sa-contact-link:hover {
  color: var(--sa-emerald);
}

/* Status Badges */
.sa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sa-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sa-badge-active {
  background: var(--sa-emerald-glow);
  color: var(--sa-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.sa-badge-active .sa-badge-dot { background: var(--sa-emerald); }

.sa-badge-pending {
  background: var(--sa-amber-glow);
  color: var(--sa-amber);
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.sa-badge-pending .sa-badge-dot { background: var(--sa-amber); }

.sa-badge-trial {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.sa-badge-trial .sa-badge-dot { background: #f59e0b; }

.sa-badge-suspended, .sa-badge-expired {
  background: var(--sa-rose-glow);
  color: var(--sa-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.sa-badge-suspended .sa-badge-dot, .sa-badge-expired .sa-badge-dot { background: var(--sa-rose); }

/* Validade */
.sa-date-val {
  font-weight: 600;
  color: var(--sa-text-primary);
}

.sa-date-sub {
  font-size: 0.75rem;
}

.sa-date-sub.sub-ok { color: var(--sa-emerald); }
.sa-date-sub.sub-warning { color: var(--sa-amber); }
.sa-date-sub.sub-expired { color: var(--sa-rose); }

/* Ações na Tabela */
.sa-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.sa-action-btn {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--sa-radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--sa-transition);
  font-family: inherit;
  white-space: nowrap;
}

.sa-action-renew {
  background: rgba(16, 185, 129, 0.12);
  color: var(--sa-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.sa-action-renew:hover {
  background: var(--sa-emerald);
  color: #090a0c;
  font-weight: 700;
}

.sa-action-suspend {
  background: rgba(244, 63, 94, 0.12);
  color: var(--sa-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.sa-action-suspend:hover {
  background: var(--sa-rose);
  color: #ffffff;
}

.sa-action-date {
  background: var(--sa-bg-surface);
  color: var(--sa-text-secondary);
  border-color: var(--sa-border-subtle);
}

.sa-action-date:hover {
  background: var(--sa-border-active);
  color: var(--sa-text-primary);
}

.sa-action-delete {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.28);
}

.sa-action-delete:hover {
  background: #dc2626;
  color: #ffffff;
}

/* ==============================================================================
   MODAL DE DEFINIÇÃO DE VALIDADE E PLANO
   ============================================================================== */
.sa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--sa-transition);
}

.sa-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sa-modal-card {
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-active);
  border-radius: var(--sa-radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.sa-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--sa-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sa-bg-main);
}

.sa-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sa-text-primary);
}

.sa-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sa-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sa-text-secondary);
}

.sa-form-control {
  background: var(--sa-bg-surface);
  border: 1px solid var(--sa-border-subtle);
  color: var(--sa-text-primary);
  padding: 10px 14px;
  border-radius: var(--sa-radius-sm);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: var(--sa-transition);
}

.sa-form-control:focus {
  border-color: var(--sa-gold);
  box-shadow: 0 0 0 3px var(--sa-gold-glow);
}

.sa-modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--sa-border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--sa-bg-main);
}

/* ==============================================================================
   OVERLAY DE LOGIN DO OPERADOR (SE NÃO AUTENTICADO)
   ============================================================================== */
.sa-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--sa-bg-darkest);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sa-login-card {
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-active);
  border-radius: var(--sa-radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sa-login-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sa-login-brand img {
  width: 52px;
  height: 52px;
  padding: 8px;
  background: var(--sa-bg-surface);
  border: 1px solid var(--sa-border-active);
  border-radius: var(--sa-radius-md);
}

.sa-login-brand h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--sa-text-primary);
}

.sa-login-brand p {
  font-size: 0.85rem;
  color: var(--sa-text-muted);
}

/* ==============================================================================
   ESTADOS DE VAZIO / LOADING
   ============================================================================== */
.sa-empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--sa-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sa-empty-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* Spinner */
.sa-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--sa-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==============================================================================
   RADAR DE COBRANÇA & ABAS DO CONSOLE MASTER
   ============================================================================== */
.sa-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--sa-border-subtle);
  padding-bottom: 12px;
}

.sa-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  border-radius: var(--sa-radius-md);
  color: var(--sa-text-secondary);
  font-family: var(--sa-font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--sa-transition);
}

.sa-tab-btn:hover {
  background: var(--sa-bg-surface);
  color: var(--sa-text-primary);
  border-color: var(--sa-border-active);
}

.sa-tab-btn.active {
  background: var(--sa-bg-surface);
  color: var(--sa-gold);
  border-color: var(--sa-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.sa-tab-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 10px;
  background: var(--sa-rose);
  color: #ffffff;
}

/* Pills de Filtro Rápido */
.sa-filter-pills-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sa-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--sa-bg-card);
  border: 1px solid var(--sa-border-subtle);
  border-radius: 20px;
  color: var(--sa-text-secondary);
  font-family: var(--sa-font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--sa-transition);
}

.sa-pill-btn:hover {
  background: var(--sa-bg-surface);
  color: var(--sa-text-primary);
  border-color: var(--sa-border-active);
}

.sa-pill-btn.active {
  background: rgba(245, 158, 11, 0.1);
  color: var(--sa-gold);
  border-color: var(--sa-gold);
  font-weight: 700;
}

.sa-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sa-text-primary);
}

.sa-pill-btn.active .sa-pill-count {
  background: var(--sa-gold);
  color: #000000;
}

/* Badges de Status de Fatura */
.sa-badge-paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--sa-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sa-badge-under-review {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.45);
  animation: pulseReview 2s infinite ease-in-out;
}

.sa-badge-overdue {
  background: rgba(244, 63, 94, 0.15);
  color: var(--sa-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

@keyframes pulseReview {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Caixa de Código Zelle */
.sa-zelle-code-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sa-border-active);
  padding: 4px 8px;
  border-radius: var(--sa-radius-sm);
  font-family: var(--sa-font-mono);
  font-size: 0.8rem;
  color: var(--sa-text-primary);
  max-width: 220px;
  word-break: break-all;
}

.sa-zelle-code-box.review-highlight {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* Botões de Ação de Cobrança */
.sa-btn-wa {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.sa-btn-wa:hover {
  background: #059669;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.sa-btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: var(--sa-emerald);
  border-color: rgba(16, 185, 129, 0.4);
}

.sa-btn-approve:hover {
  background: var(--sa-emerald);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
  .sa-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .sa-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .sa-metrics-grid {
    grid-template-columns: 1fr;
  }
  .sa-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .sa-toolbar-left, .sa-search-input {
    max-width: 100%;
  }
}

/* ==============================================================================
   HELPERS PARA ONBOARDING DE NOVO RESTAURANTE
   ============================================================================== */
.sa-slug-status {
  font-size: 0.78rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}
.sa-slug-status.available {
  color: var(--sa-emerald);
}
.sa-slug-status.taken {
  color: var(--sa-rose);
}
.sa-slug-status.invalid {
  color: var(--sa-amber);
}
.sa-slug-status.checking {
  color: var(--sa-text-secondary);
}

.sa-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.sa-password-wrapper input {
  width: 100%;
  padding-right: 42px;
}
.sa-btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--sa-text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color 0.15s;
}
.sa-btn-toggle-pwd:hover {
  color: var(--sa-text-primary);
}

.sa-form-hint {
  font-size: 0.75rem;
  color: var(--sa-text-muted);
  margin-top: 2px;
}

.sa-details-summary {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sa-gold);
  cursor: pointer;
  margin-top: 4px;
  user-select: none;
}
