/* ============================================================
   ImobiP — Estilos por página (FASE 5.19 D-15)
   Consolidado de blocks <style> que estavam inline em templates.
   Cada seção é scoped por seletores específicos da página, então
   não há colisões. Dividir em arquivos separados é trade-off ruim
   (cache miss extra, complexidade no layout).
   ============================================================ */

/* ─── DASHBOARD (dashboard.html) ─── */
.kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }
    .kpi-card {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      box-shadow: var(--shadow-sm);
    }
    .kpi-label {
      font-size: 12px; font-weight: 600;
      color: var(--color-text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }
    .kpi-value {
      font-family: var(--font-display);
      font-size: 28px; font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--color-text);
    }
    .kpi-icon {
      width: 36px; height: 36px;
      border-radius: 10px;
      display: inline-flex; align-items: center; justify-content: center;
      font-size: 18px;
      margin-bottom: 10px;
    }
    .kpi-icon.is-brand { background: var(--color-brand-soft); color: var(--color-brand); }
    .kpi-icon.is-info  { background: var(--color-info-soft);  color: var(--color-info); }
    .kpi-icon.is-pink  { background: var(--color-instagram-soft, #fde8f0); color: var(--color-instagram); }
    .kpi-icon.is-success { background: var(--color-success-soft); color: var(--color-success); }

    .dash-row {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 16px;
      margin-bottom: 16px;
    }
    @media (max-width: 1024px) { .dash-row { grid-template-columns: 1fr; } }

    .top-post {
      display: grid;
      grid-template-columns: 36px 50px 1fr auto;
      gap: 12px; align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--color-border-soft);
    }
    .top-post:last-child { border-bottom: none; }
    .top-post-rank {
      width: 28px; height: 28px;
      border-radius: 50%;
      background: var(--color-brand-soft);
      color: var(--color-brand);
      display: inline-flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: 13px;
    }
    /* Cores escurecidas pra atingir contraste AA (D-6 / FASE 5.19). */
    .top-post-rank.is-1 { background: linear-gradient(135deg, #b88600, #8a6300); color: #fff; }
    .top-post-rank.is-2 { background: linear-gradient(135deg, #707070, #555555); color: #fff; }
    .top-post-rank.is-3 { background: linear-gradient(135deg, #8a4f1c, #663713); color: #fff; }
    .top-post-thumb {
      width: 50px; height: 50px;
      border-radius: var(--radius-sm);
      background: #ddd;
      background-size: cover; background-position: center;
    }
    .top-post-meta { font-size: 13px; }
    .top-post-ref { font-weight: 700; }
    .top-post-stats { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
    .top-post-score {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 16px;
      color: var(--color-brand);
    }

    .upcoming-row {
      display: grid;
      grid-template-columns: 40px 1fr auto;
      gap: 10px; align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid var(--color-border-soft);
    }
    .upcoming-row:last-child { border-bottom: none; }
    .upcoming-thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); background: #ddd; background-size: cover; background-position: center; }

    .plan-bar {
      height: 8px;
      background: var(--color-surface-2);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 8px;
    }
    .plan-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--color-brand), var(--color-info));
      border-radius: 4px;
      transition: width .4s ease;
    }
    .plan-bar-fill.is-warning { background: var(--color-warning); }
    .plan-bar-fill.is-danger  { background: var(--color-danger); }

    #engagement-chart { max-height: 240px; }

/* ─── LISTINGS (listings.html) ─── */
/* ─── Barra de filtros: label + select agrupados ─── */
    .filter-group {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .filter-label {
      font-size: 12px;
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--color-text-soft, #64748b);
      white-space: nowrap;
    }
    .filter-check {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 12px;
      border: 1px solid var(--color-border, #d8dde6);
      border-radius: 8px;
      background: var(--color-surface, #fff);
      cursor: pointer;
      user-select: none;
      font-size: 14px;
      color: var(--color-text, #1a1a1a);
      transition: border-color .15s, background .15s;
    }
    .filter-check:hover { border-color: var(--color-brand, #0b4881); }
    .filter-check input[type="checkbox"] {
      appearance: auto;
      width: 16px;
      height: 16px;
      accent-color: var(--color-brand, #0b4881);
      cursor: pointer;
      margin: 0;
    }
    .filter-check:has(input:checked) {
      border-color: var(--color-brand, #0b4881);
      background: color-mix(in srgb, var(--color-brand, #0b4881) 6%, transparent);
    }

/* ─── Grid responsivo de cards 4:5 ─── */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
    }

    .listing-card {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .12s, box-shadow .15s;
    }
    .listing-card:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow);
    }

    .listing-photo {
      aspect-ratio: 4/5;
      background: var(--color-surface-2);
      position: relative;
      overflow: hidden;
    }
    .listing-photo img {
      width: 100%; height: 100%;
      object-fit: cover;
      display: block;
    }
    .listing-photo .freshness {
      position: absolute;
      top: 10px; left: 10px;
      backdrop-filter: blur(6px);
      background: rgba(255,255,255,.85);
    }
    :root[data-theme="dark"] .listing-photo .freshness {
      background: rgba(20,30,42,.85);
      color: var(--color-text);
    }

    .listing-body {
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .listing-meta {
      font-size: 12px;
      color: var(--color-text-soft);
      letter-spacing: 0.02em;
      text-transform: uppercase;
      font-weight: 600;
    }
    .listing-price {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--color-text);
    }
    .listing-title {
      font-size: 13px;
      color: var(--color-text-muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .listing-actions {
      display: flex;
      gap: 4px;
      padding: 0 10px 10px;
    }
    .listing-actions .btn {
      flex: 1;
      padding: 6px 0;
      font-size: 12px;
    }

    /* Chip "stale" ativo */
    label.badge:has(input:checked) {
      background: var(--color-brand-soft);
      color: var(--color-brand);
      border-color: var(--color-brand);
    }

/* ─── LISTING DETAIL (listing_detail.html) ─── */
.ld-shell { max-width: 1200px; margin: 0 auto; padding: 24px; }
  .ld-back  { display:inline-flex; gap:6px; align-items:center; color:var(--color-text-muted);
              font-size: 13px; text-decoration: none; margin-bottom: 16px; }
  .ld-back:hover { color: var(--color-brand); }
  .ld-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items:start; }
  @media (max-width: 900px) { .ld-grid { grid-template-columns: 1fr; } }

  .ld-photo  { aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--color-surface-2);
               box-shadow: 0 8px 24px rgba(15,30,60,.10); }
  .ld-photo img { width: 100%; height: 100%; object-fit: cover; display:block; }
  .ld-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
  .ld-thumb  { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; opacity:.65; transition: opacity 120ms; }
  .ld-thumb.is-active, .ld-thumb:hover { opacity: 1; }
  .ld-thumb img { width:100%; height:100%; object-fit:cover; }

  .ld-info { background: var(--color-surface); border:1px solid var(--color-border);
             border-radius: 12px; padding: 24px; box-shadow: var(--shadow-sm); }
  .ld-headline { font-family: var(--font-display); font-size: 28px; font-weight: 700;
                 letter-spacing: -.01em; margin-bottom: 4px; }
  .ld-loc      { color: var(--color-text-muted); font-size: 15px; margin-bottom: 16px; }
  .ld-price    { font-family: var(--font-display); font-size: 36px; font-weight: 800;
                 color: var(--color-brand); letter-spacing: -.02em; margin-bottom: 16px; }
  .ld-tags     { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 24px; }
  .ld-tag      { background: var(--color-surface-2); padding: 6px 12px; border-radius: 999px;
                 font-size: 13px; color: var(--color-text-muted); display:inline-flex; gap:6px; align-items:center; }

  .ld-cta-row { display:flex; gap:8px; margin-top: 24px; }
  .ld-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--color-border-soft); }
  .ld-section h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
                   color: var(--color-text-muted); margin-bottom: 12px; }
  .ld-desc { font-size: 14px; color: var(--color-text); line-height: 1.55; white-space: pre-wrap; }
  .ld-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
  .ld-meta dt { color: var(--color-text-muted); }
  .ld-meta dd { font-weight: 600; }

  .ld-posts li { display:flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border-soft);
                 align-items: center; font-size: 13px; }
  .ld-posts li:last-child { border-bottom: 0; }
  .ld-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .ld-status-dot.s-published { background: var(--color-success); }
  .ld-status-dot.s-scheduled { background: var(--color-warning); }
  .ld-status-dot.s-failed    { background: var(--color-danger); }
  .ld-status-dot.s-draft     { background: var(--color-text-muted); }

/* ─── LISTING MANUAL FORM (listing_manual_form.html) ─── */
.form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 12px 16px;
    }
    .form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

    .photo-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 8px;
      margin-top: 12px;
    }
    .photo-thumb-card {
      position: relative;
      aspect-ratio: 4/5;
      border-radius: var(--radius);
      overflow: hidden;
      background: var(--color-surface-2);
    }
    .photo-thumb-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .photo-thumb-card .thumb-num {
      position: absolute; top: 4px; left: 4px;
      background: rgba(0,0,0,.7); color: #fff;
      padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 600;
    }
    .photo-thumb-card .thumb-remove {
      position: absolute; top: 4px; right: 4px;
      background: rgba(0,0,0,.7); color: #fff;
      border: none; border-radius: 50%;
      width: 26px; height: 26px;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .photo-thumb-card .thumb-remove:hover { background: var(--color-danger); }

    .upload-drop {
      border: 2px dashed var(--color-border);
      border-radius: var(--radius);
      padding: 24px;
      text-align: center;
      background: var(--color-surface-2);
      cursor: pointer;
      transition: border-color .15s;
    }
    .upload-drop:hover { border-color: var(--color-brand); }
    .upload-drop.is-dragover { border-color: var(--color-brand); background: var(--color-brand-soft); }

    .pending-thumb {
      position: relative; aspect-ratio: 4/5;
      border-radius: var(--radius); overflow: hidden;
      background: var(--color-surface-2);
      border: 2px solid var(--color-info);
    }
    .pending-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .pending-thumb .pending-tag {
      position: absolute; bottom: 0; left: 0; right: 0;
      background: var(--color-info); color: #fff;
      font-size: 10px; padding: 2px 4px; text-align: center;
      font-weight: 600;
    }

/* ─── CALENDAR (calendar.html) ─── */
/* ─── Toolbar ──────────────────────────────────────── */
    .cal-toolbar {
      display: flex; align-items: center; justify-content: space-between;
      flex-wrap: wrap; gap: 12px;
      margin-bottom: 16px;
    }
    .cal-month-nav {
      display: flex; align-items: center; gap: 8px;
    }
    .cal-month-title {
      font-family: var(--font-display);
      font-size: 22px; font-weight: 800;
      letter-spacing: -0.01em;
      min-width: 200px;
    }

    /* Toggle Mês / Lista */
    .cal-view-toggle {
      display: flex;
      border: 1px solid var(--color-border);
      border-radius: var(--radius);
      padding: 2px;
      background: var(--color-surface);
    }
    .cal-view-toggle button {
      padding: 6px 14px; border: none; background: transparent;
      font-size: 13px; font-weight: 600;
      color: var(--color-text-muted);
      cursor: pointer; border-radius: 6px;
      display: inline-flex; align-items: center; gap: 6px;
    }
    .cal-view-toggle button.is-active {
      background: var(--color-brand);
      color: #fff;
    }

    /* Filtros chips */
    .cal-chips { display: flex; gap: 6px; flex-wrap: wrap; }
    .cal-chip {
      padding: 5px 12px;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-pill);
      font-size: 12px; font-weight: 600;
      cursor: pointer; user-select: none;
      background: var(--color-surface);
      color: var(--color-text-muted);
      display: inline-flex; align-items: center; gap: 4px;
    }
    .cal-chip:hover { border-color: var(--color-brand); }
    .cal-chip input { display: none; }
    .cal-chip:has(input:checked) {
      background: var(--color-brand-soft);
      color: var(--color-brand);
      border-color: var(--color-brand);
    }
    .cal-chip[data-color="success"]:has(input:checked) { background: var(--color-success-soft); color: var(--color-success); border-color: var(--color-success); }
    .cal-chip[data-color="warning"]:has(input:checked) { background: var(--color-warning-soft); color: var(--color-warning); border-color: var(--color-warning); }
    .cal-chip[data-color="danger"]:has(input:checked)  { background: var(--color-danger-soft);  color: var(--color-danger);  border-color: var(--color-danger); }
    .cal-chip[data-color="info"]:has(input:checked)    { background: var(--color-info-soft);    color: var(--color-info);    border-color: var(--color-info); }

    /* ─── Modal overlay ──────────────────────────────── */
    .modal-backdrop {
      position: fixed; inset: 0;
      background: rgba(0,0,0,.5);
      display: flex; align-items: center; justify-content: center;
      z-index: 1000;
    }
    .modal-panel {
      background: var(--color-surface);
      border-radius: var(--radius-lg);
      max-width: 560px; width: calc(100vw - 40px);
      max-height: 85vh; overflow-y: auto;
      box-shadow: var(--shadow-lg);
    }

/* ─── CALENDAR MONTH (_calendar_month.html) ─── */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
  }
  .month-weekday {
    padding: 10px 12px;
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--color-text-muted);
  }
  .month-cell {
    border-right: 1px solid var(--color-border-soft);
    border-bottom: 1px solid var(--color-border-soft);
    padding: 8px; min-height: 110px;
    background: var(--color-surface);
  }
  .month-cell:nth-child(7n) { border-right: none; }
  .month-cell.is-out {
    background: var(--color-surface-2);
    opacity: .55;
  }
  .month-cell.is-today .month-day-num {
    background: var(--color-brand);
    color: #fff;
    border-radius: 50%;
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
  }
  .month-day-num {
    font-size: 12px; font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    display: inline-block;
  }
  .month-posts { display: flex; flex-direction: column; gap: 3px; }
  .month-post {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    background: var(--color-surface-2);
    border-left: 3px solid var(--color-info);
    color: var(--color-text);
    overflow: hidden;
  }
  .month-post:hover { background: var(--color-brand-soft); }
  .month-post.is-success { border-left-color: var(--color-success); }
  .month-post.is-warning { border-left-color: var(--color-warning); }
  .month-post.is-danger  { border-left-color: var(--color-danger); }
  .month-post-thumb {
    width: 16px; height: 16px; border-radius: 2px; flex-shrink: 0;
    background: #ddd; background-size: cover; background-position: center;
  }
  .month-post-time {
    font-size: 10px; opacity: .7; margin-left: auto;
  }
  .month-post-more {
    text-align: center; font-size: 11px;
    color: var(--color-text-muted);
    padding: 2px;
  }

/* ─── CALENDAR LIST (_calendar_list.html) ─── */
.list-row {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    gap: 16px; align-items: center;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .12s, transform .12s;
  }
  .list-row:hover { border-color: var(--color-brand); transform: translateX(2px); }
  .list-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); background: #ddd; background-size: cover; background-position: center; flex-shrink: 0; }
  .list-meta-ref { font-weight: 700; font-size: 14px; }
  .list-meta-caption { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
  .list-when { font-size: 13px; color: var(--color-text-muted); text-align: right; min-width: 110px; }
  .list-when-time { font-weight: 700; color: var(--color-text); font-size: 14px; }

/* ─── SETTINGS (settings.html) ─── */
.settings-grid {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 24px;
      align-items: start;
    }
    @media (max-width: 900px) {
      .settings-grid { grid-template-columns: 1fr; }
    }

    /* Tabs verticais */
    .v-tabs {
      display: flex;
      flex-direction: column;
      gap: 2px;
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius);
      padding: 8px;
      position: sticky; top: 80px;
    }
    .v-tab {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 12px;
      border-radius: var(--radius);
      color: var(--color-text-muted);
      font-weight: 500;
      cursor: pointer;
      transition: background .12s;
      font-size: 14px;
    }
    .v-tab:hover { background: var(--color-surface-2); color: var(--color-text); }
    .v-tab.is-active {
      background: var(--color-brand-soft);
      color: var(--color-brand);
      font-weight: 600;
    }
    .v-tab i { font-size: 16px; width: 18px; }
    .v-tab .v-tab-badge {
      margin-left: auto;
      width: 8px; height: 8px; border-radius: 50%;
    }
    .v-tab-badge.is-warn { background: var(--color-warning); }
    .v-tab-badge.is-bad  { background: var(--color-danger); }

    /* Painéis */
    .panel { display: none; }
    .panel.is-active { display: block; }
    .panel-section {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 16px;
    }

    .conn-card {
      display: flex; gap: 16px; align-items: flex-start;
      padding: 16px;
      border-radius: var(--radius);
      border: 1px solid var(--color-border);
      background: var(--color-surface-2);
    }
    .conn-card.is-ok      { border-color: var(--color-success); background: var(--color-success-soft); }
    .conn-card.is-warn    { border-color: var(--color-warning); background: var(--color-warning-soft); }
    .conn-card.is-missing { border-color: var(--color-danger);  background: var(--color-danger-soft); }
    .conn-icon {
      width: 44px; height: 44px;
      border-radius: 10px;
      background: var(--color-surface);
      display: flex; align-items: center; justify-content: center;
      font-size: 22px;
      flex-shrink: 0;
    }
    .conn-meta { flex: 1; }
    .conn-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

    .color-input-wrap { display: flex; gap: 8px; align-items: center; }
    .color-input-wrap input[type="color"] {
      width: 40px; height: 40px; border: 1px solid var(--color-border);
      border-radius: var(--radius-sm); padding: 0; cursor: pointer; background: none;
    }

/* ─── ONBOARDING (onboarding.html) ─── */
/* Esconde sidebar e topbar no onboarding (foco total).
   BUG HISTÓRICO: essas regras estavam sem scope e aplicavam globalmente —
   zerava padding e overflow do .app-main em TODAS as páginas, criando
   "estourão" horizontal no studio/dashboard/etc. Escopadas via :has(.onb-shell)
   pra disparar APENAS quando a página é onboarding. */
body:has(.onb-shell) .app-shell {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
  grid-template-areas: "main" !important;
}
body:has(.onb-shell) .app-sidebar,
body:has(.onb-shell) .app-topbar { display: none !important; }
body:has(.onb-shell) .app-main { padding: 0 !important; overflow: auto; background: var(--color-bg); }

    .onb-shell {
      max-width: 720px;
      margin: 0 auto;
      padding: 48px 24px;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Header com logo Imobip */
    .onb-header {
      text-align: center;
      margin-bottom: 32px;
    }
    .onb-header img {
      height: 180px;
      width: auto;
      margin: 0 auto 8px;
      display: block;
    }
    @media (max-width: 768px) {
      .onb-header img { height: 140px; }
    }
    .onb-skip {
      position: absolute;
      top: 24px; right: 24px;
      font-size: 13px;
      color: var(--color-text-soft);
      cursor: pointer;
    }

    /* Stepper */
    .onb-stepper {
      display: flex;
      justify-content: space-between;
      gap: 4px;
      margin-bottom: 32px;
      position: relative;
    }
    .onb-step {
      flex: 1;
      display: flex; flex-direction: column; align-items: center; gap: 8px;
      position: relative;
    }
    .onb-step-num {
      width: 36px; height: 36px; border-radius: 50%;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--color-surface);
      border: 2px solid var(--color-border);
      color: var(--color-text-muted);
      font-weight: 700;
      font-size: 14px;
      transition: all .2s;
      z-index: 2;
    }
    .onb-step.is-active .onb-step-num {
      background: var(--color-brand);
      border-color: var(--color-brand);
      color: #fff;
    }
    .onb-step.is-done .onb-step-num {
      background: var(--color-success);
      border-color: var(--color-success);
      color: #fff;
    }
    .onb-step-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--color-text-muted);
    }
    .onb-step.is-active .onb-step-label,
    .onb-step.is-done .onb-step-label   { color: var(--color-text); }

    /* Linha conectando os steps */
    .onb-stepper::before {
      content: '';
      position: absolute;
      top: 17px; left: 18px; right: 18px;
      height: 2px;
      background: var(--color-border);
      z-index: 1;
    }

    /* Card do passo */
    .onb-card {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: 32px;
      box-shadow: var(--shadow);
    }
    .onb-card h2 {
      font-size: 24px;
      letter-spacing: -0.02em;
      margin-bottom: 8px;
    }
    .onb-title { font-size: 28px; letter-spacing: -0.02em; }
    .onb-card .subtitle {
      color: var(--color-text-muted);
      margin-bottom: 24px;
    }
    .onb-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid var(--color-border-soft);
    }

    .onb-feature {
      display: flex; gap: 12px; align-items: flex-start;
      padding: 12px 0;
    }
    .onb-feature-icon {
      width: 36px; height: 36px; border-radius: 8px;
      background: var(--color-brand-soft);
      color: var(--color-brand);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      font-size: 16px;
    }
    .onb-feature h4 { font-size: 14px; margin-bottom: 2px; }
    .onb-feature p  { font-size: 13px; color: var(--color-text-muted); }

.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}

/* ─── PRECOS (PRICING) (precos.html) ─── */
.precos-shell { max-width: 1180px; margin: 0 auto; padding: 56px 24px; }
  .precos-header { text-align: center; margin-bottom: 48px; }
  .precos-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(34px, 4.5vw, 48px); font-weight: 800;
    letter-spacing: -.02em; margin-bottom: 12px;
  }
  .precos-header .lead { color: var(--color-text-muted); font-size: 17px; max-width: 60ch; margin: 0 auto; }
  /* Layout: 5 cards em 1 linha em telas largas, 3+2 em médias, 1 em mobile.
     `repeat(auto-fit, minmax(...))` daria 5 cards apertados em 1100px. */
  .plans-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 48px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  @media (max-width: 1180px) {
    .plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 800px) {
    .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 520px) {
    .plans-grid { grid-template-columns: 1fr; }
  }
  .plan-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    display: flex; flex-direction: column;
    transition: transform .15s, box-shadow .15s, border-color .15s;
  }
  .plan-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(15,30,60,.08); }
  /* Featured "Pro" — diferenciação tipográfica reforçada (D-11) */
  .plan-card.is-featured {
    border-color: var(--color-brand); border-width: 2px;
    position: relative;
    box-shadow: 0 16px 32px rgba(11, 72, 129, 0.18);
  }
  .plan-card.is-featured .plan-price { font-size: 34px; }
  .plan-featured-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--color-brand); color: #fff; padding: 5px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  }
  .plan-name { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; }
  .plan-desc { color: var(--color-text-muted); font-size: 13px; min-height: 36px; margin: 6px 0 14px; }
  .plan-price { font-family: 'Montserrat', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
  .plan-price small { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
  .plan-price-custom { font-size: 18px; font-weight: 700; color: var(--color-text-muted); }

  /* Promoção de lançamento: pill -40% + preço futuro riscado */
  .plan-price-old {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
  }
  .plan-discount-pill {
    display: inline-block;
    background: #dc2626; color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    vertical-align: middle;
  }
  .plan-price-now {
    display: block;
    margin-top: 6px;
    white-space: nowrap;
    font-size: 26px;
  }
  .plan-card.is-featured .plan-price-now { font-size: 28px; }

  /* Form BYOK bloqueado quando plano não permite (Starter/Grow) */
  form.is-locked { opacity: .5; pointer-events: none; filter: grayscale(.3); position: relative; }

  /* Steps indicator no /signup — reduz ansiedade do usuário */
  .signup-steps {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 18px;
    font-size: 12px;
  }
  .signup-step {
    display: flex; align-items: center; gap: 6px;
    color: var(--color-text-muted);
    font-weight: 500;
  }
  .signup-step.is-current { color: var(--color-brand); font-weight: 700; }
  .signup-step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
  }
  .signup-step.is-current .signup-step-num {
    background: var(--color-brand); color: #fff;
  }
  .signup-step-line {
    flex: 1; height: 2px;
    background: var(--color-border);
    max-width: 80px;
  }

  /* Garantia em destaque ao lado do CTA */
  .signup-guarantee-banner {
    display: flex; align-items: center; gap: 10px;
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.25);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 16px 0 10px;
    font-size: 12px;
    color: #166534;
    line-height: 1.4;
  }
  .signup-guarantee-banner i { color: #16a34a; font-size: 18px; flex-shrink: 0; }
  .signup-guarantee-banner strong { color: #14532d; }

  /* CTA com preço + período */
  .cta-period { font-weight: 500; opacity: .9; font-size: 13px; }

  /* Trust seals abaixo do botão */
  .signup-trust {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px 18px;
    margin: 12px 0 8px;
    font-size: 11px;
    color: var(--color-text-muted);
  }
  .signup-trust-item { display: inline-flex; align-items: center; gap: 4px; }
  .signup-trust-item i { color: var(--color-brand); font-size: 13px; }

  /* Toggle Mensal/Anual no /signup */
  .billing-period-toggle {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 20px;
  }
  .bp-option {
    display: block;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
  }
  .bp-option:hover { border-color: var(--color-brand); }
  .bp-option.is-selected {
    border-color: var(--color-brand);
    background: var(--color-brand-soft);
  }
  .bp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
  .bp-name { font-weight: 700; font-size: 15px; }
  .bp-promo-pill {
    display: inline-block; background: #dc2626; color: #fff;
    padding: 1px 7px; border-radius: 999px;
    font-size: 11px; font-weight: 800; margin-left: 4px;
  }
  .bp-tag { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }
  .bp-option.is-selected .bp-tag { color: var(--color-brand); }
  .bp-price { font-size: 18px; font-weight: 800; color: var(--color-text); white-space: nowrap; }
  .bp-price small { font-size: 12px; font-weight: 500; color: var(--color-text-muted); }
  .bp-price-old {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
  }

  /* Banner geral da promo (acima dos cards) */
  .precos-launch-banner {
    display: flex; align-items: flex-start; gap: 10px;
    background: linear-gradient(90deg, #fff7ed, #fef3c7);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.45;
  }
  .precos-launch-banner i { color: #d97706; font-size: 18px; flex-shrink: 0; margin-top: 1px; }

  /* Trust signals técnicos — alternativa a depoimentos no pré-lançamento */
  .trust-signals {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 14px 24px;
    margin-top: 18px;
    font-size: 12px;
    color: var(--color-text-muted);
  }
  .trust-item { display: inline-flex; align-items: center; gap: 6px; }
  .trust-item i { font-size: 16px; color: var(--color-brand); }
  .trust-item strong { color: var(--color-text); }

  /* Hierarquia visual ajustada — pílula menor, preço maior */
  .plan-price-now { font-size: 30px !important; }
  .plan-card.is-featured .plan-price-now { font-size: 34px !important; }
  .plan-discount-pill { font-size: 11px; padding: 1px 7px; }
  .plan-price-free { font-size: 24px; font-weight: 700; }
  .plan-price-free small { font-size: 12px; }

  /* Âncora de valor (R$/post) */
  .plan-price-anchor {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.3;
  }
  .plan-price-anchor strong { color: var(--color-brand); font-weight: 700; }

  /* Caixa verde de garantia em cada card */
  .plan-guarantee {
    display: flex; align-items: center; gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.25);
    border-radius: 6px;
    font-size: 11px;
    color: #166534;
    line-height: 1.3;
  }
  .plan-guarantee i { color: #16a34a; font-size: 14px; }

  /* CTA Pro com glow sutil pra chamar atenção */
  .plan-cta.is-glow {
    box-shadow: 0 0 0 0 rgba(11,72,129,.5);
    animation: cta-pulse 2.4s ease-in-out infinite;
  }
  @keyframes cta-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(11,72,129,.35); }
    50%     { box-shadow: 0 0 0 8px rgba(11,72,129,0); }
  }

  /* Grid: prioriza 3+3 simétrico em telas grandes em vez do 5+2 atual */
  .plans-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }
  @media (min-width: 1100px) {
    .plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* Tabela comparativa */
  .precos-comparison {
    margin: 48px auto 32px;
    max-width: 1100px;
  }
  .precos-comparison h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 22px;
  }
  .precos-comparison-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--color-border-soft);
    background: var(--color-surface);
  }
  .precos-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 700px;
  }
  .precos-comparison-table th,
  .precos-comparison-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-soft);
  }
  .precos-comparison-table .feature-col {
    text-align: left;
    color: var(--color-text-muted);
    font-weight: 500;
    background: var(--color-surface-2);
    position: sticky;
    left: 0;
  }
  .precos-comparison-table thead th {
    background: var(--color-surface-2);
    font-weight: 700;
    padding: 12px;
  }
  .cmp-plan-name { font-weight: 700; color: var(--color-text); font-size: 14px; }
  .cmp-plan-price { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
  .cmp-plan-price small { font-size: 10px; }
  .plan-features { list-style: none; padding: 0; margin: 18px 0; flex: 1; font-size: 13px; }
  .plan-features li { padding: 5px 0; display:flex; gap: 8px; align-items: flex-start; }
  .plan-features li i { color: var(--color-success); flex-shrink: 0; margin-top: 2px; }
  .plan-cta { width: 100%; height: 40px; font-size: 13px; font-weight: 700; }

  .precos-comparativo { color: var(--color-text-muted); text-align: center; font-size: 14px; margin-bottom: 48px; }
  .precos-comparativo a { color: var(--color-brand); font-weight: 600; }

  .precos-faq { max-width: 720px; margin: 0 auto; }
  .precos-faq h2 { font-family: 'Montserrat', sans-serif; font-size: 26px; margin-bottom: 24px; text-align: center; font-weight: 800; letter-spacing: -.01em; }
  .precos-faq details {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: var(--color-surface);
  }
  .precos-faq summary {
    font-weight: 600; cursor: pointer; list-style: none;
    display:flex; justify-content:space-between; align-items:center;
  }
  .precos-faq summary::after { content:'+'; color: var(--color-brand); font-size: 22px; font-weight: 300; transition: transform .2s; }
  .precos-faq details[open] summary::after { transform: rotate(45deg); }
  .precos-faq p { color: var(--color-text-muted); font-size: 14px; margin-top: 10px; line-height: 1.55; }

  .contact-banner {
    background: var(--color-info-soft); color: var(--color-info);
    padding: 14px 18px; border-radius: 10px;
    margin-bottom: 24px; text-align: center; font-size: 14px;
  }

/* ─── /precos testimonials ─── */
.precos-testimonials {
  padding: 80px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(34,197,94,0.03) 100%);
}
.testimonials-header {
  text-align: center;
  margin-bottom: 48px;
}
.testimonials-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
}
.testimonials-header p {
  font-size: 16px;
  color: var(--color-text-muted, #64748b);
  margin: 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: white;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.testimonial-rating {
  color: #22c55e;
  font-size: 14px;
  display: flex;
  gap: 2px;
}

.testimonial-quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text, #1e293b);
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #e2e8f0);
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.testimonial-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text, #1e293b);
}
.testimonial-role {
  font-size: 13px;
  color: var(--color-text-muted, #64748b);
}

/* ─── SIGNUP (signup.html) ─── */
.signup-shell {
      max-width: 980px;
      margin: 0 auto;
      padding: 48px 24px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 48px;
      align-items: start;
    }
    @media (max-width: 768px) {
      .signup-shell { grid-template-columns: 1fr; padding: 32px 16px; }
    }

    .signup-form-card {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      padding: 32px;
      box-shadow: var(--shadow);
    }
    .signup-cta-btn { height: 48px; font-size: 15px; }
    .signup-logo {
      display: flex;
      justify-content: center;
      margin-bottom: 28px;
    }
    .signup-logo img {
      height: 80px;
      width: auto;
      max-width: 100%;
    }
    .signup-title {
      font-family: 'Montserrat', sans-serif;
      font-size: 26px;
      font-weight: 800;
      letter-spacing: -0.02em;
      margin: 0 0 8px;
      text-align: center;
    }
    @media (max-width: 480px) {
      .signup-logo img { height: 60px; }
      .signup-title { font-size: 22px; }
    }

    .signup-side {
      padding: 16px;
    }
    .signup-side h2 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 12px; }
    .signup-feature { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
    .signup-feature i { color: var(--color-success); font-size: 18px; margin-top: 2px; }
    .signup-feature p  { font-size: 13px; color: var(--color-text-muted); }

    .plan-tabs {
      display: flex; gap: 4px;
      background: var(--color-surface-2);
      border-radius: var(--radius);
      padding: 4px;
      margin-bottom: 24px;
    }
    .plan-tab {
      flex: 1; padding: 8px 12px;
      text-align: center;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-weight: 600;
      font-size: 13px;
      color: var(--color-text-muted);
    }
    .plan-tab.is-active {
      background: var(--color-surface);
      color: var(--color-brand);
      box-shadow: var(--shadow-sm);
    }
    .plan-price { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
    .plan-price small { font-size: 14px; font-weight: 500; color: var(--color-text-muted); }

    .signup-error {
      background: var(--color-danger-soft);
      color: var(--color-danger);
      padding: 10px 14px;
      border-radius: var(--radius);
      font-size: 13px;
      margin-bottom: 16px;
    }

/* ─── SIGNUP SUCCESS (signup_success.html) ─── */
.center-card {
      max-width: 520px; margin: 0 auto; padding: 64px 24px;
      text-align: center;
    }
    .center-card img { height: 180px; margin: 0 auto 16px; display: block; }
    .center-card .check {
      width: 80px; height: 80px; margin: 0 auto 16px;
      border-radius: 50%;
      background: var(--color-success-soft);
      color: var(--color-success);
      display: flex; align-items: center; justify-content: center;
      font-size: 40px;
    }
    .check.is-pending {
      background: var(--color-warning-soft);
      color: var(--color-warning);
    }

/* ─── TEAM ACCEPT (team_accept.html) ─── */
.ta-shell { min-height:70vh; display:flex; align-items:center; justify-content:center; padding:48px 24px }
  .ta-card  { max-width:520px; width:100%; text-align:center; padding:40px;
              background:var(--color-surface); border:1px solid var(--color-border);
              border-radius:12px; box-shadow:var(--shadow); }
  .ta-icon  { font-size:64px; margin-bottom:18px; }
  .ta-icon.ok    { color:var(--color-success); }
  .ta-icon.error { color:var(--color-danger); }
  .ta-icon.info  { color:var(--color-brand); }
  .ta-title { font-size:24px; font-weight:700; margin-bottom:10px; letter-spacing:-.01em; }
  .ta-msg   { font-size:15px; color:var(--color-text-muted); line-height:1.5; margin-bottom:28px; }

/* ─── STUDIO FEED (pages/studio_feed.html) ─── */
.spin { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

/* ─── STUDIO BOTH (pages/studio_both.html) ─── */
.spin { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

/* ─── STUDIO FEED INNER (pages/_studio_feed_inner.html) ─── */
/* IG mockup styles — replicado de studio_feed.html */
  .ig-mockup { max-width: 420px; margin: 0 auto; background: #fff; color: #000; border: 1px solid #dbdbdb; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,.10); overflow: hidden; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
  .ig-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #efefef; }
  .ig-avatar-ring { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); padding: 2px; }
  .ig-avatar-inner { width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--color-brand); font-size: 11px; }
  .ig-username { font-weight: 700; font-size: 13px; flex: 1; }
  .ig-media { position: relative; aspect-ratio: 4/5; background: #efefef; overflow: hidden; }
  .ig-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ig-counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
  .ig-actions { display: flex; gap: 12px; padding: 8px 12px; font-size: 22px; color: #262626; }
  .ig-caption-area { padding: 0 12px 12px; font-size: 13px; line-height: 1.4; max-height: 280px; overflow-y: auto; white-space: pre-wrap; }
  .ig-caption-user { font-weight: 700; color: #000; }
  .ig-caption-text { color: #262626; }
  .ig-caption-hashtags { color: #00376b; font-weight: 500; margin-top: 6px; }
  .photo-strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: var(--color-surface-2); border-radius: var(--radius); }
  .photo-thumb { position: relative; width: 64px; height: 80px; border-radius: 6px; overflow: hidden; flex-shrink: 0; border: 2px solid transparent; cursor: grab; background: #ddd; }
  .photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .photo-thumb-remove { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .variant-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); margin-bottom: 12px; }
  .variant-tab { padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .variant-tab.is-active { color: var(--color-brand); border-color: var(--color-brand); }
  .hashtag-chip { display: inline-block; padding: 4px 10px; margin: 0 4px 4px 0; background: var(--color-info-soft); color: var(--color-info); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; cursor: pointer; }
  .schedule-options { display: flex; flex-direction: column; gap: 8px; }
  .schedule-option { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; }
  .schedule-option.is-selected { border-color: var(--color-brand); background: var(--color-brand-soft); }
  .studio-grid { display: grid; grid-template-columns: 60% 40%; gap: 24px; align-items: start; }
  @media (max-width: 1024px) { .studio-grid { grid-template-columns: 1fr; } }

/* ─── STUDIO STORY INNER (pages/_studio_story_inner.html) ─── */
.story-mockup { width: 320px; margin: 0 auto; aspect-ratio: 9/16; background: #000; border-radius: 28px; overflow: hidden; position: relative; box-shadow: 0 8px 32px rgba(0,0,0,.25); border: 8px solid #0d0d0d; }
  .story-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
  .story-bg.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.05) 60%, rgba(0,0,0,0.7) 100%); }
  .story-progress { position: absolute; top: 8px; left: 8px; right: 8px; height: 2px; background: rgba(255,255,255,.3); border-radius: 2px; z-index: 4; }
  .story-progress::after { content: ''; display: block; width: 30%; height: 100%; background: #fff; border-radius: 2px; }
  .story-header { position: absolute; top: 18px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; color: #fff; z-index: 4; font-size: 12px; }
  .story-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--color-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #fff; }
  .story-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 70px 20px 80px; color: #fff; z-index: 3; }
  .story-headline { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
  .story-info { background: rgba(0,0,0,.5); backdrop-filter: blur(8px); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
  .story-ref { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: 0.06em; }
  .story-title { font-weight: 600; margin: 2px 0; }
  .story-price { font-weight: 800; font-size: 18px; }
  .story-subtitle { margin-top: 8px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
  .story-cta-pill { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.95); color: #000; padding: 10px 18px; border-radius: 99px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; z-index: 4; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
  .story-photos { display: flex; gap: 8px; padding: 8px; overflow-x: auto; background: var(--color-surface-2); border-radius: var(--radius); }
  .story-photo { width: 54px; height: 96px; border-radius: 6px; flex-shrink: 0; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
  .story-photo.is-selected { border-color: var(--color-brand); }
  .story-photo img { width: 100%; height: 100%; object-fit: cover; }
  .story-variant { border: 2px solid var(--color-border); border-radius: var(--radius); padding: 12px; cursor: pointer; transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 4px; }
  .story-variant:hover { background: var(--color-surface-2); }
  .story-variant.is-selected { border-color: var(--color-brand); background: var(--color-brand-soft); }
  .trigger-badge { align-self: flex-start; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; background: var(--color-info-soft); color: var(--color-info); }
  .variant-headline { font-weight: 700; font-size: 14px; }
  .variant-subtitle { font-size: 12px; color: var(--color-text-muted); }

/* ─── STORY EDITOR (pages/_story_editor.html) ─── */
.se-el { position:absolute; cursor:grab; padding:6px; box-sizing:border-box;
           color:#fff; font-family:'Montserrat',sans-serif; line-height:1.1;
           text-shadow:0 2px 8px rgba(0,0,0,.45); display:flex; align-items:center;
           border:1px dashed transparent; }
  .se-el.is-selected { border-color: var(--color-brand); background: rgba(11,72,129,.12); cursor:grabbing }
  .se-handle { position:absolute; right:-6px; bottom:-6px; width:14px; height:14px;
               background: var(--color-brand); border:2px solid #fff; border-radius:50%;
               cursor:nwse-resize; }

/* ─── SIGNUP CANCELED (pages/signup_canceled.html) ─── */
.center-card {
      max-width: 520px; margin: 0 auto; padding: 64px 24px;
      text-align: center;
    }
    .center-card img { height: 180px; margin: 0 auto 16px; display: block; }

/* ─── SUPER ADMIN LAYOUT (pages/super_admin/_layout.html) ─── */
.sa-shell { max-width: 1280px; margin: 0 auto; padding: 24px; }
  .sa-banner {
    background: var(--color-warning-soft, #fff4d6);
    color: #6b4500;
    border: 1px solid var(--color-warning);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13px;
    display:flex; gap: 10px; align-items: center;
    margin-bottom: 20px;
  }
  .sa-nav {
    display:flex; gap: 4px;
    background: var(--color-surface-2);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
    width: fit-content;
  }
  .sa-nav a {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
  }
  .sa-nav a.is-active { background: var(--color-surface); color: var(--color-brand); box-shadow: var(--shadow-sm); }

  .sa-counts { display:flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
  .sa-count {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13px;
    color: var(--color-text-muted);
    min-width: 110px;
  }
  .sa-count strong { display:block; font-size: 22px; color: var(--color-text); font-weight: 700; }

  .sa-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--color-surface); border-radius: 10px; overflow: hidden; }
  .sa-table th, .sa-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--color-border-soft); }
  .sa-table th { background: var(--color-surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--color-text-muted); }
  .sa-table tr:hover td { background: var(--color-surface-2); }

  .sa-status { display:inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
  .sa-status.active    { background: var(--color-success-soft); color: var(--color-success); }
  .sa-status.trial     { background: var(--color-info-soft);    color: var(--color-info); }
  .sa-status.past_due  { background: var(--color-warning-soft); color: var(--color-warning); }
  .sa-status.canceled  { background: var(--color-danger-soft);  color: var(--color-danger); }
  .sa-status.suspended { background: var(--color-surface-2);    color: var(--color-text-muted); }
  .sa-status.manual    { background: var(--color-brand-soft);   color: var(--color-brand); }
  .sa-status.failed    { background: var(--color-danger-soft);  color: var(--color-danger); }
  .sa-status.published { background: var(--color-success-soft); color: var(--color-success); }
  .sa-status.scheduled { background: var(--color-warning-soft); color: var(--color-warning); }
  .sa-status.draft     { background: var(--color-surface-2);    color: var(--color-text-muted); }
  .sa-status.publishing{ background: var(--color-info-soft);    color: var(--color-info); }

  .sa-churn { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-transform: uppercase; }
  .sa-churn.baixo   { background: var(--color-success-soft); color: var(--color-success); }
  .sa-churn.médio   { background: var(--color-warning-soft); color: var(--color-warning); }
  .sa-churn.alto    { background: var(--color-danger-soft);  color: var(--color-danger); }
  .sa-churn.perdido { background: var(--color-surface-2);    color: var(--color-text-muted); }

  .sa-form-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border-soft); }
  .sa-form-row:last-child { border: 0; }
  .sa-form-row label { color: var(--color-text-muted); font-size: 13px; font-weight: 500; }

  .sa-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
  .sa-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

  .sa-action-row { display:flex; gap: 8px; flex-wrap: wrap; }

/* ─── Super-admin nav v2 + cmdk + home ─── */

/* Nav v2 layout */
.sa-nav-v2 {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
}

/* Top-level nav item (both <a> and <button>) */
.sa-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.sa-nav-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.sa-nav-item.is-active,
.sa-nav-item.is-active-section {
  background: var(--color-surface);
  color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

/* Chevron rotation */
.sa-nav-chevron {
  font-size: 10px;
  transition: transform .15s;
  margin-left: 2px;
}
.sa-nav-chevron.rotated { transform: rotate(180deg); }

/* Dropdown wrapper */
.sa-nav-dropdown {
  position: relative;
}

/* Dropdown menu */
.sa-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.12));
  min-width: 200px;
  padding: 6px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Sub-item in dropdown */
.sa-nav-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background .1s, color .1s;
}
.sa-nav-sub:hover { background: var(--color-surface-2); color: var(--color-text); }
.sa-nav-sub.is-active { background: var(--color-brand-soft, rgba(99,102,241,.1)); color: var(--color-brand); }

/* Active parent section highlight */
.sa-nav-section.is-active-section .sa-nav-item,
.sa-nav-toggle.is-active-section {
  background: var(--color-surface);
  color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

/* ── Cmd+K search trigger ── */
.sa-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color .12s, color .12s;
  margin-left: auto;
}
.sa-search-trigger:hover { border-color: var(--color-brand); color: var(--color-text); }
.sa-search-trigger kbd {
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--color-text-muted);
}

/* ── Cmd+K overlay ── */
.sa-cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.sa-cmdk-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
}

.sa-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.sa-cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--color-text);
}

.sa-cmdk-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.sa-cmdk-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  transition: background .1s;
}
.sa-cmdk-result:hover,
.sa-cmdk-result.is-selected {
  background: var(--color-brand-soft, rgba(99,102,241,.1));
}

.sa-cmdk-kind {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
}

.sa-cmdk-label { font-weight: 500; flex: 1; }

.sa-cmdk-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.sa-cmdk-empty {
  padding: 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ── Home dashboard grid ── */
.sa-home-header { margin-bottom: 24px; }

.sa-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.sa-home-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 10px);
  padding: 20px;
}
.sa-home-card.is-attention {
  border-color: var(--color-warning, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}

.sa-home-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-home-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border-soft, rgba(0,0,0,.05));
}
.sa-home-stat-row:last-child { border-bottom: none; }
.sa-home-stat-row.is-warning strong { color: var(--color-warning); }

.sa-home-divider {
  height: 1px;
  background: var(--color-border);
  margin: 8px 0;
}

/* Attention items (list rows with icon) */
.sa-attention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border-soft, rgba(0,0,0,.05));
}
.sa-attention-item:last-child { border-bottom: none; }
.sa-attention-item.is-urgent { color: var(--color-danger); }
.sa-attention-item strong { margin-left: auto; }

/* Color helpers */
.color-success { color: var(--color-success); }
.color-info    { color: var(--color-info); }
.color-warning { color: var(--color-warning); }
.color-danger  { color: var(--color-danger); }
.color-muted   { color: var(--color-text-muted); }

/* ── Clickable count pills ── */
.sa-count.is-link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.sa-count.is-link:hover {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.sa-count.is-link.is-selected {
  border-color: var(--color-brand);
  background: var(--color-brand-soft, rgba(99,102,241,.08));
}

/* ── Semantic row link ── */
.sa-row-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.sa-row-link:hover { text-decoration: underline; }

/* ─── End super-admin nav v2 + cmdk + home ─── */

/* ─── SUPER ADMIN USAGE (pages/super_admin/usage.html) ─── */
.usage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .usage-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .usage-kpi-grid { grid-template-columns: 1fr; } }

.usage-bar {
  width: 100%;
  height: 6px;
  background: var(--color-border-soft, #e5e7eb);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}
.usage-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .3s ease;
}
.usage-bar-fill.is-green { background: var(--color-success, #16a34a); }
.usage-bar-fill.is-amber { background: var(--color-warning, #d97706); }
.usage-bar-fill.is-red   { background: var(--color-danger,  #dc2626); }

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--color-surface);
  border-radius: 10px;
  overflow: hidden;
}
.usage-table th {
  position: sticky;
  top: 0;
  background: var(--color-surface-2, #f3f4f6);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--color-text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  white-space: nowrap;
}
.usage-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: middle;
}
.usage-table tr:hover td { background: var(--color-surface-2, #f9fafb); }
.usage-table th a { color: inherit; text-decoration: none; }
.usage-table th a:hover { color: var(--color-brand); }

.usage-cell { min-width: 90px; }
.usage-cell-num { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; margin-bottom: 3px; }

.health-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.health-dot.is-healthy  { background: var(--color-success, #16a34a); }
.health-dot.is-warning  { background: var(--color-warning, #d97706); }
.health-dot.is-critical { background: var(--color-danger,  #dc2626); }
.health-dot.is-idle     { background: var(--color-text-muted, #9ca3af); }

.health-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.health-badge.is-healthy  { background: var(--color-success-soft); color: var(--color-success); }
.health-badge.is-warning  { background: var(--color-warning-soft); color: var(--color-warning); }
.health-badge.is-critical { background: var(--color-danger-soft);  color: var(--color-danger); }
.health-badge.is-idle     { background: var(--color-surface-2);    color: var(--color-text-muted); }

.usage-sparkline { display: block; width: 100%; overflow: hidden; }

/* ─── CHOOSE LISTING MODAL (_components/choose_listing_modal.html) ─── */
.cl-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 30, 60, .55);
    z-index: 9990;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 80px 16px 24px;
    animation: cl-fade .15s ease-out;
  }
  @keyframes cl-fade { from { opacity: 0; } to { opacity: 1; } }
  .cl-card {
    width: 100%; max-width: 560px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
    max-height: 70vh;
  }
  .cl-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--color-border-soft);
  }
  .cl-head h2 { font-size: 16px; font-weight: 700; }
  .cl-search { position: relative; padding: 12px 20px; border-bottom: 1px solid var(--color-border-soft); }
  .cl-type {
    display: flex; gap: 4px;
    padding: 8px 16px 10px; border-bottom: 1px solid var(--color-border-soft);
    background: var(--color-surface-2);
  }
  .cl-type button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 10px; font-size: 13px; font-weight: 600;
    color: var(--color-text-muted);
    background: transparent; border: 1px solid transparent; border-radius: var(--radius);
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
  }
  .cl-type button:hover { background: var(--color-surface); }
  .cl-type button.is-active {
    color: var(--color-brand); background: var(--color-surface);
    border-color: var(--color-brand-soft);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  .cl-search i.bi-search {
    position: absolute; left: 32px; top: 50%; transform: translateY(-50%);
    color: var(--color-text-soft);
  }
  .cl-search .input { padding-left: 36px; }
  .cl-list {
    list-style: none; padding: 4px; margin: 0;
    overflow-y: auto; flex: 1;
  }
  .cl-list li {
    display: grid; grid-template-columns: 40px 1fr auto;
    gap: 12px; align-items: center;
    padding: 10px 12px; border-radius: var(--radius);
    cursor: pointer; font-size: 14px;
  }
  .cl-list li.is-focused { background: var(--color-brand-soft); }
  .cl-list li small { color: var(--color-text-muted); display: block; font-size: 12px; }
  .cl-thumb {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--color-surface-2); background-size: cover; background-position: center;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text-soft);
  }
  .cl-tag {
    font-family: var(--font-display); font-weight: 700;
    color: var(--color-brand); font-size: 13px;
  }
  .cl-empty { padding: 24px; text-align: center; color: var(--color-text-muted); cursor: default; }
  .cl-empty:hover { background: transparent; }
  .cl-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; border-top: 1px solid var(--color-border-soft);
    color: var(--color-text-muted); font-size: 12px;
  }
  .cl-foot kbd {
    background: var(--color-surface-2); border: 1px solid var(--color-border);
    border-radius: 4px; padding: 1px 6px; font-family: ui-monospace, monospace;
    font-size: 11px; margin: 0 2px;
  }
  .spin { animation: spin 1s linear infinite; display: inline-block; }
  @keyframes spin { to { transform: rotate(360deg); } }

/* ─── TOPBAR (_components/topbar.html) ─── */
@media (max-width: 768px) {
    #mobileMenuBtn { display: inline-flex !important; }
  }
  /* Logo3-white fallback (FASE 5.15) — em tema dark, inverte o logo até existir
     o asset white dedicado. */
  [data-theme="dark"] .topbar-wordmark img {
    filter: brightness(0) invert(1);
  }

/* ─── ERROR PAGE (errors/_base.html) ─── */
.err-shell { min-height: 70vh; display:flex; align-items:center; justify-content:center; padding:48px 24px; }
    .err-card { max-width: 560px; text-align:center; }
    .err-code { font-family: var(--font-display); font-size: 96px; font-weight: 800;
                letter-spacing: -.02em; color: var(--color-brand); line-height: 1; margin-bottom: 8px; }
    .err-title { font-size: 26px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
    .err-text  { color: var(--color-text-muted); font-size: 15px; line-height:1.5; margin-bottom: 28px; }
    .err-cta   { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ─── LOGIN (login.html) — tela de entrada ─── */
.login-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(180deg,
    var(--color-brand-soft) 0%,
    var(--color-bg) 60%);
}
.login-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(11, 72, 129, 0.12);
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 32px;
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.login-logo img {
  height: auto;
  max-width: 100%;
}
.login-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 6px;
  color: var(--color-text);
}
.login-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}
.login-form .form-group { margin-bottom: 16px; }
.login-form .input { font-size: 15px; height: 44px; }
.login-btn {
  height: 48px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}
.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}
.login-footer a {
  color: var(--color-brand);
  text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .login-card { padding: 28px 22px 24px; border-radius: 12px; }
  .login-logo img { max-width: 200px; }
}

/* ─── PUBLIC STATS (social proof na landing) — _public_stats.html ─── */
.stats-shell {
  padding: 56px 0;
  background: linear-gradient(180deg, var(--color-brand-soft) 0%, transparent 100%);
}
.stats-eyebrow {
  text-align: center;
  font-size: 16px;
  margin-bottom: 32px;
  color: var(--color-text);
}
.stats-eyebrow strong { color: var(--color-brand); }
.stats-eyebrow i { margin-right: 6px; color: var(--color-brand); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stats-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(11, 72, 129, 0.04);
}
.stats-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.stats-icon.stats-ig {
  background: var(--color-instagram-soft);
  color: var(--color-instagram);
}
.stats-icon.stats-fb {
  background: var(--color-facebook-soft);
  color: var(--color-facebook);
}
.stats-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.1;
}
.stats-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
  font-weight: 600;
}
.stats-note {
  text-align: center;
  margin-top: 24px;
}

/* ═══ Rascunhos (/rascunhos) ═══ */
.drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.draft-card {
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.draft-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-brand); }
.draft-card.is-age-warning { border-left: 4px solid #d97706; }
.draft-card.is-age-danger  { border-left: 4px solid #dc2626; }

.draft-thumb {
  position: relative;
  height: 180px;
  background: #1a1a1a;
  display: block;
  overflow: hidden;
}
.draft-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.draft-thumb-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 32px;
}
.draft-kind {
  position: absolute; top: 8px; right: 8px;
  background: var(--color-brand); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: .03em; text-transform: uppercase;
}
.draft-card[data-kind="story"] .draft-kind { background: #7c3aed; }
.draft-card[data-kind="both"]  .draft-kind { background: linear-gradient(90deg, var(--color-brand) 50%, #7c3aed 50%); }

.draft-body {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.draft-title {
  font-weight: 600; color: var(--color-text); text-decoration: none;
  font-size: 15px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.draft-title:hover { color: var(--color-brand); }
.draft-meta {
  font-size: 12px; color: var(--color-text-muted);
}
.draft-ref { font-family: monospace; }
.draft-caption {
  font-size: 13px; color: var(--color-text-soft);
  margin: 4px 0 0;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2;
}
.draft-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-soft);
  gap: 8px;
}
.draft-age {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500;
  color: var(--color-text-muted);
}
.draft-age.is-warning { color: #d97706; font-weight: 600; }
.draft-age.is-danger  { color: #dc2626; font-weight: 700; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state h3 { margin: 16px 0 8px; }

/* ═══ Modal genérico (usado pelo limite de rascunhos) ═══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 30, 60, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-dialog {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px; width: 100%;
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-soft);
}
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border-soft);
  flex-wrap: wrap;
}

.oldest-drafts-list {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.oldest-draft-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.oldest-draft-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ═══ Suporte (/suporte) ═══ */
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .support-grid { grid-template-columns: 1fr; }
}
.support-prefill {
  padding: 10px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* Tipo do chamado — 3 cards selecionáveis */
/* Ticket type cards (4 tipos = grid 2x2) */
.ticket-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .ticket-type-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1200px) {
  .ticket-type-grid { grid-template-columns: repeat(4, 1fr); }
}
.ticket-type {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  text-align: center;
}
.ticket-type:hover { border-color: var(--color-brand); }
.ticket-type.is-selected {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}
.ticket-type input { position: absolute; opacity: 0; pointer-events: none; }
.ticket-type i { font-size: 24px; }
.ticket-type-label { font-weight: 700; font-size: 14px; }
.ticket-type-desc { font-size: 11px; color: var(--color-text-muted); }

/* Lista de tickets (histórico) */
.ticket-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ticket-item {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.ticket-item[data-status="resolved"],
.ticket-item[data-status="closed"] { opacity: .65; }

.ticket-item-header {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.ticket-type-badge, .ticket-status-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .03em; text-transform: uppercase;
}
.ticket-type-badge.type-problem    { background: #fee2e2; color: #991b1b; }
.ticket-type-badge.type-complaint  { background: #fef3c7; color: #92400e; }
.ticket-type-badge.type-improvement{ background: #cffafe; color: #155e75; }
.ticket-type-badge.type-praise     { background: #dcfce7; color: #166534; }

/* Praise card — hover + selected */
.ticket-type[data-type="praise"]:hover { border-color: #22c55e; }
.ticket-type.is-selected[data-type="praise"] {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

/* Rating stars */
.rating-stars {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.rating-star {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  font-size: 24px;
  color: var(--color-border, #d1d5db);
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.rating-star.is-filled { color: #22c55e; }
.rating-star:hover { transform: scale(1.1); }

/* Consent label */
.consent-label {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400 !important;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.consent-label input { margin-top: 2px; flex-shrink: 0; }

.ticket-status-badge.status-open          { background: var(--color-brand-soft); color: var(--color-brand); }
.ticket-status-badge.status-in_progress   { background: #ede9fe; color: #5b21b6; }
.ticket-status-badge.status-waiting_user  { background: #fef3c7; color: #92400e; }
.ticket-status-badge.status-resolved      { background: #dcfce7; color: #166534; }
.ticket-status-badge.status-closed        { background: var(--color-surface-2); color: var(--color-text-muted); }

.ticket-item-title {
  font-size: 14px; font-weight: 600; color: var(--color-text);
  margin: 2px 0;
}
.ticket-item-meta {
  font-size: 11px; color: var(--color-text-muted);
  display: flex; gap: 6px; align-items: center;
}
.empty-state-mini {
  text-align: center; padding: 24px 0;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}

/* Ticket item — clickable */
.ticket-item-link {
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.ticket-item-link:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}
.ticket-item-link-overlay { display: none; }

/* ─── Support thread (detail page) ─── */
.thread-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.thread-message {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}
.thread-message.is-tenant {
  align-self: flex-end;
  align-items: flex-end;
}
.thread-message.is-support {
  align-self: flex-start;
  align-items: flex-start;
}
.thread-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 12px;
}
.thread-author {
  font-weight: 700;
  color: var(--color-text);
}
.thread-time {
  color: var(--color-text-muted);
}
.thread-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.thread-message.is-tenant .thread-bubble {
  background: var(--color-brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.thread-message.is-support .thread-bubble {
  background: var(--color-surface-2, #f1f5f9);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}
.thread-input-area {
  margin-top: 4px;
}
.thread-input {
  padding: 16px;
}
@media (max-width: 600px) {
  .thread-message { max-width: 95%; }
}

/* ─── SUPER-ADMIN OBSERVABILITY (pages/super_admin/observability.html) ─── */

/* Stack status pills row */
.obs-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.obs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.obs-pill.is-up {
  background: var(--color-success-soft, #dcfce7);
  color: var(--color-success, #16a34a);
  border-color: var(--color-success, #16a34a);
}
.obs-pill.is-down {
  background: var(--color-danger-soft, #fee2e2);
  color: var(--color-danger, #dc2626);
  border-color: var(--color-danger, #dc2626);
}
.obs-pill.is-unknown {
  background: var(--color-surface-2, #f3f4f6);
  color: var(--color-text-muted, #6b7280);
  border-color: var(--color-border, #e5e7eb);
}

/* Section header with icon + title + external link */
.obs-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.obs-section-header h2 {
  margin: 0;
  flex: 1;
}
.obs-section-header .obs-ext-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-brand, #7c3aed);
  text-decoration: none;
  white-space: nowrap;
}
.obs-section-header .obs-ext-link:hover { text-decoration: underline; }

/* KPI grid — 3-col by default, collapses on mobile */
.obs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .obs-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .obs-kpi-grid { grid-template-columns: 1fr; } }

.obs-kpi-tile {
  background: var(--color-surface-2, #f9fafb);
  border: 1px solid var(--color-border-soft, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  padding: 14px 16px;
}
.obs-kpi-tile .obs-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 4px;
}
.obs-kpi-tile .obs-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text, #111827);
  font-family: var(--font-display, inherit);
  letter-spacing: -0.02em;
}
.obs-kpi-tile .obs-kpi-value.is-danger { color: var(--color-danger, #dc2626); }
.obs-kpi-tile .obs-kpi-value.is-success { color: var(--color-success, #16a34a); }
.obs-kpi-tile .obs-kpi-value.is-muted { color: var(--color-text-muted, #6b7280); }

/* Grafana dashboards 2-col grid */
.obs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 700px) { .obs-grid { grid-template-columns: 1fr; } }

.obs-dashboard-card {
  background: var(--color-surface-2, #f9fafb);
  border: 1px solid var(--color-border-soft, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.obs-dashboard-card .obs-dash-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #111827);
}

/* Severity badges */
.obs-severity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.obs-severity.critical { background: #fee2e2; color: #991b1b; }
.obs-severity.warning  { background: #fef3c7; color: #92400e; }
.obs-severity.info     { background: #dbeafe; color: #1e40af; }

/* Generic obs table */
.obs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.obs-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #6b7280);
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-soft, #e5e7eb);
  text-align: left;
  white-space: nowrap;
}
.obs-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--color-border-soft, #e5e7eb);
  vertical-align: middle;
}
.obs-table tr:last-child td { border-bottom: 0; }
.obs-table tr:hover td { background: var(--color-surface-2, #f9fafb); }

/* Metrics list */
.obs-metric-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.obs-metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  background: var(--color-surface-2, #f3f4f6);
  padding: 6px 10px;
  border-radius: 6px;
}
.obs-metric-type {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.obs-metric-type.counter  { background: #dbeafe; color: #1e40af; }
.obs-metric-type.histogram { background: #ede9fe; color: #5b21b6; }
.obs-metric-type.gauge    { background: #d1fae5; color: #065f46; }
.obs-metric-type.info     { background: #fef9c3; color: #78350f; }

/* Empty state */
.obs-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted, #6b7280);
  font-size: 13px;
}
.obs-empty code {
  background: var(--color-surface-2, #f3f4f6);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Health dot next to target */
.obs-health-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.obs-health-dot.up   { background: var(--color-success, #16a34a); }
.obs-health-dot.down { background: var(--color-danger, #dc2626); }
.obs-health-dot.unknown { background: var(--color-text-muted, #9ca3af); }

/* ─── SUPER-ADMIN OPERATIONS PANEL ─────────────────────────────────────────── */
.ops-page {
  max-width: 1100px;
}
.sa-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sa-subtitle {
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 24px;
}
.ops-section {
  margin-bottom: 36px;
}
.ops-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.ops-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 20px;
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,.06));
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}
.ops-card.is-danger {
  border-left: 4px solid var(--color-danger, #dc2626);
}
.ops-card.is-active {
  background: #fef2f2;
}
.ops-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.ops-card-header strong {
  font-size: 14px;
  font-weight: 700;
}
.ops-card-desc {
  font-size: 12px;
  color: var(--color-text-muted, #6b7280);
  line-height: 1.55;
  margin: 0;
}
.ops-status-pill {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.ops-status-pill.is-on {
  background: #fef2f2;
  color: #b91c1c;
}
.ops-status-pill.is-off {
  background: #f0fdf4;
  color: #15803d;
}
.ops-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ops-form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text, #111827);
}
.ops-form-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.ops-input {
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: var(--radius, 8px);
  padding: 7px 10px;
  font-size: 13px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #111827);
  width: 100%;
  transition: border-color 0.12s;
}
.ops-input:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
}
.ops-input--sm {
  width: auto;
}
.ops-textarea {
  resize: vertical;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}
.ops-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.ops-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.ops-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius, 8px);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.12s, background 0.12s;
}
.ops-btn:hover { opacity: 0.85; }
.ops-btn--danger    { background: var(--color-danger, #dc2626); color: #fff; }
.ops-btn--warning   { background: #f59e0b; color: #fff; }
.ops-btn--success   { background: var(--color-success, #16a34a); color: #fff; }
.ops-btn--secondary {
  background: var(--color-surface-2, #f3f4f6);
  color: var(--color-text, #111827);
  border: 1px solid var(--color-border, #d1d5db);
}
.ops-flash {
  border-radius: var(--radius, 8px);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.ops-flash--ok    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.ops-flash--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ops-flash--info  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ─── SUPER-ADMIN OPERATIONS v2 — Command Center ─────────────────────────── */

/* Status bar — sticky top */
.ops-statusbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--color-surface, #fff);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  padding: 14px 0 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* sa-ops-statusbar: namespace alias + removes title padding since title is now in sa-page-header */
.ops-statusbar.sa-ops-statusbar { padding-top: 10px; }
.ops-statusbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.ops-statusbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ops-statusbar-sep {
  color: var(--color-border, #d1d5db);
  font-weight: 300;
}

/* Health pill */
.ops-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-health-pill.is-ok       { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.ops-health-pill.is-warn     { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ops-health-pill.is-critical { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.ops-secondary-status {
  font-size: 12px;
  color: var(--color-text-muted, #6b7280);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick chips row */
.ops-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-surface, #fff);
  color: var(--color-text, #111827);
  transition: border-color 0.12s, background 0.12s;
  user-select: none;
}
.ops-chip:hover { border-color: var(--color-primary, #2563eb); }
.ops-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ops-chip.is-on  .ops-chip-dot { background: #16a34a; }
.ops-chip.is-off .ops-chip-dot { background: #dc2626; }
.ops-chip.is-on  { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.ops-chip.is-off { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

/* Two-column layout */
.ops-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1100px) {
  .ops-layout {
    grid-template-columns: 8fr 4fr;
  }
  .ops-page { max-width: 1400px; }
}

/* Timeline panel */
.ops-timeline {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,.06));
  overflow: hidden;
}
@media (min-width: 1100px) {
  .ops-timeline {
    position: sticky;
    top: 130px; /* below status bar */
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }
}
.ops-timeline-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}
.ops-timeline-refresh {
  font-size: 11px;
  color: var(--color-text-muted, #6b7280);
  font-weight: 400;
}
.ops-timeline-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.ops-timeline-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border, #f3f4f6);
  font-size: 12px;
  border-left: 3px solid transparent;
}
.ops-timeline-item:last-child { border-bottom: none; }
.ops-timeline-item.cat-critical { border-left-color: #dc2626; background: #fff8f8; }
.ops-timeline-item.cat-warning  { border-left-color: #f59e0b; background: #fffdf0; }
.ops-timeline-item.cat-neutral  { border-left-color: #d1d5db; }
.ops-timeline-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ops-timeline-label {
  font-weight: 700;
  color: var(--color-text, #111827);
}
.ops-timeline-actor {
  color: var(--color-primary, #2563eb);
  font-weight: 600;
}
.ops-timeline-when {
  color: var(--color-text-muted, #9ca3af);
  font-size: 11px;
  margin-left: auto;
}
.ops-timeline-reason {
  color: var(--color-text-muted, #6b7280);
  font-size: 11px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ops-timeline-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--color-text-muted, #9ca3af);
  font-size: 13px;
}

/* Accordion cards (incident actions) */
.ops-accordion-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,.06));
  overflow: hidden;
  transition: border-color 0.15s;
}
.ops-accordion-card.is-danger  { border-left: 4px solid #dc2626; }
.ops-accordion-card.is-active  { background: #fef2f2; }
.ops-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text, #111827);
}
.ops-accordion-trigger:hover { background: var(--color-surface-2, #f9fafb); }
.ops-accordion-trigger-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ops-accordion-chevron {
  transition: transform 0.2s;
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
}
[data-accordion-open="true"] .ops-accordion-chevron { transform: rotate(180deg); }
.ops-accordion-body {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Typed-confirm modal */
.ops-typed-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ops-typed-confirm-box {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
}
.ops-typed-confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 8px;
}
.ops-typed-confirm-desc {
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 16px;
  line-height: 1.5;
}
.ops-typed-confirm-code {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--color-text, #111827);
  background: var(--color-surface-2, #f3f4f6);
  padding: 4px 8px;
  border-radius: 4px;
}
.ops-typed-confirm-input {
  width: 100%;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: var(--radius, 8px);
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-mono, monospace);
  margin-top: 4px;
  margin-bottom: 16px;
  transition: border-color 0.12s;
}
.ops-typed-confirm-input:focus { outline: none; border-color: var(--color-primary, #2563eb); }
.ops-typed-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Command palette (cmd+k) */
.ops-cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 800;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}
.ops-cmdk-box {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
}
.ops-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.ops-cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: var(--color-text, #111827);
}
.ops-cmdk-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 6px 0;
}
.ops-cmdk-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text, #111827);
}
.ops-cmdk-result:hover,
.ops-cmdk-result.is-selected {
  background: var(--color-surface-2, #f3f4f6);
}
.ops-cmdk-result-icon { color: var(--color-text-muted, #9ca3af); width: 20px; text-align: center; }
.ops-cmdk-result-label { flex: 1; font-weight: 600; }
.ops-cmdk-result-hint  { font-size: 12px; color: var(--color-text-muted, #9ca3af); }
.ops-cmdk-empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--color-text-muted, #9ca3af);
  font-size: 14px;
}

/* Recompute diff drawer */
.ops-diff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 600;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.ops-diff-drawer {
  background: var(--color-surface, #fff);
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  width: min(700px, 96vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ops-diff-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ops-diff-close {
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted, #6b7280);
  background: none;
  border: none;
  padding: 4px;
  line-height: 1;
}
.ops-diff-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.ops-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ops-diff-table th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted, #6b7280);
  padding: 6px 8px;
  border-bottom: 2px solid var(--color-border, #e5e7eb);
}
.ops-diff-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border, #f3f4f6);
  vertical-align: middle;
}
.ops-diff-table tr:hover td { background: var(--color-surface-2, #f9fafb); }
.ops-diff-delta.is-pos { color: #16a34a; font-weight: 700; }
.ops-diff-delta.is-neg { color: #dc2626; font-weight: 700; }
.ops-diff-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--color-border, #e5e7eb);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ops-diff-summary {
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
  flex: 1;
}

/* Tooltip helper */
.ops-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ops-tooltip-icon {
  color: var(--color-text-muted, #9ca3af);
  cursor: help;
  font-size: 13px;
  margin-left: 4px;
}
.ops-tooltip-panel {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  background: var(--color-text, #111827);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  pointer-events: none;
}
/* Responsive: flip to left on small screens handled via JS if needed */

/* ─── Super-admin CRM lite ──────────────────────────────────────────── */

/* Tag pills */
.sa-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--color-border, #e5e7eb);
  color: var(--color-text-muted, #6b7280);
  border: 1px solid transparent;
}
.sa-tag-pill.color-gray   { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.sa-tag-pill.color-blue   { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.sa-tag-pill.color-green  { background: #dcfce7; color: #166534; border-color: #86efac; }
.sa-tag-pill.color-amber  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sa-tag-pill.color-red    { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.sa-tag-pill.color-purple { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }

/* × button inside pill — visible on hover */
.sa-tag-pill .close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 2px;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  opacity: 0;
  transition: opacity 0.15s;
}
.sa-tag-pill:hover .close { opacity: 0.7; }
.sa-tag-pill .close:hover  { opacity: 1; }

/* Inline add-tag form */
.sa-tag-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

/* Notes list */
.sa-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-notes-empty {
  color: var(--color-text-muted, #6b7280);
  font-size: 13px;
  padding: 12px 0;
  text-align: center;
}

/* Individual note card */
.sa-note {
  background: var(--color-bg, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  font-size: 13px;
}

.sa-note.is-pinned {
  border-left: 3px solid var(--color-brand, #6366f1);
  background: var(--color-brand-soft, #eef2ff);
}

.sa-note-body {
  line-height: 1.55;
  word-break: break-word;
  margin-bottom: 6px;
}

.sa-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted, #6b7280);
}

.sa-note-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT C — Inbox, Bulk, Saved Filters, Tabs
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tenant detail tabs ─── */
.sa-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border, #e5e7eb);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sa-tabs a {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted, #6b7280);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.sa-tabs a:hover { color: var(--color-text, #111); }
.sa-tabs a.is-active {
  color: var(--color-brand, #2563eb);
  border-bottom-color: var(--color-brand, #2563eb);
  font-weight: 700;
}

/* ─── Inbox ─── */
.sa-inbox-list { display: flex; flex-direction: column; gap: 6px; }
.sa-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 10px);
  padding: 14px 16px;
  transition: background .1s;
}
.sa-inbox-item:hover { background: var(--color-surface-2, #f8fafc); }
.sa-inbox-item.is-urgent { border-left: 4px solid var(--color-danger, #b91c1c); }
.sa-inbox-item.is-handled { opacity: .55; }
.sa-inbox-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.sa-inbox-urgency-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 7px;
}
.sa-inbox-urgency-dot.high   { background: var(--color-danger, #b91c1c); }
.sa-inbox-urgency-dot.normal { background: var(--color-warning, #d97706); }
.sa-inbox-body { flex: 1; min-width: 0; }
.sa-inbox-title { font-size: 14px; font-weight: 600; color: var(--color-text, #111); }
.sa-inbox-title a { color: inherit; text-decoration: none; }
.sa-inbox-title a:hover { text-decoration: underline; }
.sa-inbox-snippet {
  font-size: 12px; color: var(--color-text-muted, #6b7280);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 600px; margin-top: 2px;
}
.sa-inbox-meta { display: flex; gap: 10px; align-items: center; margin-top: 5px; font-size: 11px; }
.sa-inbox-tenant-badge {
  display: inline-flex; padding: 1px 8px; border-radius: 999px;
  background: var(--color-brand-soft, #dbeafe); color: var(--color-brand, #2563eb);
  font-size: 11px; font-weight: 600;
}
.sa-inbox-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; margin-top: 2px; }
.sa-inbox-btn {
  background: none; border: 1px solid var(--color-border, #e5e7eb); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--color-text-muted, #6b7280);
  transition: background .1s, color .1s;
}
.sa-inbox-btn:hover { background: var(--color-surface-2, #f8fafc); color: var(--color-text, #111); }
.sa-inbox-snooze-dropdown {
  position: absolute; background: var(--color-surface, #fff); border: 1px solid var(--color-border);
  border-radius: 8px; box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.12));
  z-index: 100; min-width: 160px; padding: 4px 0;
}
.sa-inbox-snooze-dropdown button {
  display: block; width: 100%; text-align: left; padding: 8px 14px; font-size: 13px;
  background: none; border: none; cursor: pointer; color: var(--color-text, #111);
}
.sa-inbox-snooze-dropdown button:hover { background: var(--color-surface-2, #f8fafc); }

/* ─── Bulk action bar ─── */
.sa-bulk-bar {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.18);
  padding: 12px 20px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; z-index: 200; min-width: 560px; max-width: 90vw;
  transition: bottom .25s cubic-bezier(.22,.68,0,1.2);
}
.sa-bulk-bar.is-visible { bottom: 24px; }
.sa-bulk-label { font-size: 14px; font-weight: 700; white-space: nowrap; min-width: 100px; }
.sa-bulk-divider { width: 1px; height: 28px; background: var(--color-border, #e5e7eb); }
.sa-bulk-action {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface-2, #f8fafc); color: var(--color-text, #111);
  transition: background .1s;
}
.sa-bulk-action:hover { background: var(--color-border-soft, #f1f3f5); }
.sa-bulk-action.is-danger { color: var(--color-danger, #b91c1c); border-color: var(--color-danger-soft, #fee2e2); }
.sa-bulk-action.is-danger:hover { background: var(--color-danger-soft, #fee2e2); }
.sa-bulk-cancel { margin-left: auto; }

/* ─── Saved filters dropdown ─── */
.sa-savedfilters-wrap { position: relative; display: inline-block; margin-bottom: 8px; }
.sa-savedfilters-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 150;
  background: var(--color-surface, #fff); border: 1px solid var(--color-border);
  border-radius: 10px; box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.12));
  min-width: 240px; padding: 4px 0;
}
.sa-savedfilter-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px;
  font-size: 13px; cursor: pointer; color: var(--color-text, #111);
  text-decoration: none; border: none; background: none; width: 100%; text-align: left;
}
.sa-savedfilter-item:hover { background: var(--color-surface-2, #f8fafc); }
.sa-savedfilter-item.is-default { font-weight: 700; }
.sa-savedfilter-item.is-default::before { content: "⭐"; margin-right: 2px; }
.sa-savedfilter-divider { height: 1px; background: var(--color-border-soft, #f1f3f5); margin: 4px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   Unified badge system — .sa-badge + modifiers (Agent D, 2026-05)
   Existing classes (.sa-status, .sa-churn, .ticket-status-badge) preserved.
   ═══════════════════════════════════════════════════════════════════════════ */
.sa-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sa-badge--ok      { background: rgba(34,197,94,.12);   color: rgb(21,128,61); }
.sa-badge--warn    { background: rgba(245,158,11,.12);  color: rgb(180,83,9); }
.sa-badge--crit    { background: rgba(239,68,68,.12);   color: rgb(185,28,28); }
.sa-badge--neutral { background: rgba(100,116,139,.12); color: rgb(71,85,105); }
.sa-badge--info    { background: rgba(59,130,246,.12);  color: rgb(29,78,216); }
.sa-badge--purple  { background: rgba(147,51,234,.12);  color: rgb(126,34,206); }

/* Health badge — grade-specific sizing + tooltip trigger */
.sa-health-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; cursor: default;
  position: relative;
}
.sa-health-badge.sa-health-grade-A,
.sa-health-badge.sa-health-grade-B { background: rgba(34,197,94,.12);   color: rgb(21,128,61); }
.sa-health-badge.sa-health-grade-C { background: rgba(245,158,11,.12);  color: rgb(180,83,9); }
.sa-health-badge.sa-health-grade-D,
.sa-health-badge.sa-health-grade-F { background: rgba(239,68,68,.12);   color: rgb(185,28,28); }

/* Health tooltip */
.sa-health-tooltip {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 8px 12px; z-index: 200;
  min-width: 160px; font-size: 11px; white-space: nowrap;
}
.sa-health-badge:hover .sa-health-tooltip { display: block; }
.sa-health-tooltip-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 2px 0; color: var(--color-text, #111);
}
.sa-health-tooltip-row span:first-child { color: var(--color-text-muted, #6b7280); }

/* Quick-actions on row hover */
.sa-row-actions {
  display: flex; gap: 4px; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.12s;
}
tr:hover .sa-row-actions,
tr:focus-within .sa-row-actions { opacity: 1; pointer-events: auto; }

.sa-row-action-btn {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 5px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
  color: var(--color-text, #111);
  cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.sa-row-action-btn:hover { background: var(--color-surface-2, #f8fafc); }
.sa-row-action-btn.is-danger { color: var(--color-danger, #b91c1c); border-color: var(--color-danger-soft, #fee2e2); }
.sa-row-action-btn.is-danger:hover { background: var(--color-danger-soft, #fee2e2); }

/* Auto-refresh indicator bar */
.sa-refresh-bar {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--color-text-muted, #6b7280);
  padding: 6px 12px;
  background: var(--color-surface-2, #f8fafc);
  border: 1px solid var(--color-border-soft, #f1f3f5);
  border-radius: 8px;
  margin-bottom: 12px;
}
.sa-refresh-bar button {
  font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 5px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
  cursor: pointer;
}
.sa-refresh-bar button:hover { background: var(--color-surface-2, #f8fafc); }

/* Renewal calendar card */
.sa-renewals-list { list-style: none; margin: 0; padding: 0; }
.sa-renewal-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--color-border-soft, #f1f3f5);
  font-size: 13px;
}
.sa-renewal-item:last-child { border-bottom: none; }
.sa-renewal-date {
  font-weight: 700; font-size: 12px; color: var(--color-brand, #0b2a4a);
  min-width: 44px;
}
.sa-renewal-tenant { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sa-renewal-mrr { font-weight: 600; font-size: 12px; color: var(--color-success, #16a34a); white-space: nowrap; }

/* ============================================================
   Super-admin Stripe-vibe v3 — additive, no removals
   ============================================================ */

/* ── Page header ── */
.sa-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-soft, rgba(0,0,0,.06));
}
.sa-page-header-text { flex: 1; min-width: 0; }
.sa-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text, #111827);
  margin: 0;
  line-height: 1.2;
}
.sa-page-subtitle {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  margin: 4px 0 0;
  line-height: 1.4;
}
.sa-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── sa-card system (Stripe vibe) ── */
/* Base card — extends existing .sa-card; safe to use together */
.sa-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #dce5f0);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* Variant: attention (amber tint + left accent) */
.sa-card--attention {
  background: rgba(245, 158, 11, 0.04);
  border-left: 3px solid var(--color-warning, #c07a00);
}

/* Variant: danger (rose tint + left accent) */
.sa-card--danger {
  background: rgba(239, 68, 68, 0.04);
  border-left: 3px solid var(--color-danger, #c0392b);
}

/* Variant: success (emerald tint + left accent) */
.sa-card--success {
  background: rgba(34, 197, 94, 0.04);
  border-left: 3px solid var(--color-success, #1a8547);
}

/* Card sub-elements */
.sa-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.sa-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  min-width: 0;
}
.sa-card-actions { margin-left: auto; flex-shrink: 0; }
.sa-card-body {
  font-size: 14px;
  line-height: 1.5;
}
.sa-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-soft, rgba(0,0,0,.05));
  font-size: 13px;
}

/* ── Auto-refresh pill ── */
.sa-refresh-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
}
.sa-refresh-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--color-surface-2, #f8fafd);
  border: 1px solid var(--color-border, #dce5f0);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.sa-refresh-pill-btn:hover {
  background: var(--color-border-soft, #e8eef5);
  color: var(--color-text, #111827);
}
.sa-refresh-pill-num {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted, #6b7280);
  margin-left: 2px;
}

/* Spinning icon for refresh pill */
@keyframes sa-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin {
  display: inline-block;
  animation: sa-spin 2s linear infinite;
}

/* ── Home grid v2 — asymmetric Stripe layout ── */
/*
  6-column grid:
    Row 1: primary=4col (≈67%), sidebar=2col (≈33%)
    Row 2: full=6col
    Row 3: atividade=3col, renovações=3col (50/50)
*/
.sa-home-grid-v2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* "Hoje precisa de mim" — 4 of 6 cols, row 1 */
.sa-home-card--primary {
  grid-column: 1 / 5;
}

/* "Saúde geral" — 2 of 6 cols, row 1 */
.sa-home-card--sidebar {
  grid-column: 5 / 7;
}

/* "Tenants em risco" — full width, row 2 */
.sa-home-card--full {
  grid-column: 1 / -1;
}

/* Row 3: last 2 cards auto-place 3+3 cols */
.sa-home-grid-v2 > .sa-home-card:not(.sa-home-card--primary):not(.sa-home-card--sidebar):not(.sa-home-card--full) {
  grid-column: span 3;
}

/* On narrow screens, stack everything */
@media (max-width: 900px) {
  .sa-home-grid-v2 {
    grid-template-columns: 1fr;
  }
  .sa-home-card--primary,
  .sa-home-card--sidebar,
  .sa-home-card--full,
  .sa-home-grid-v2 > .sa-home-card:not(.sa-home-card--primary):not(.sa-home-card--sidebar):not(.sa-home-card--full) {
    grid-column: auto;
  }
}

/* ── Modal overlay + box ── */
.sa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sa-modal {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.sa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-soft, rgba(0,0,0,.06));
}
.sa-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}
.sa-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-soft, rgba(0,0,0,.06));
}
.sa-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sa-modal-close:hover { color: var(--color-text, #111827); background: var(--color-surface-2, #f8fafd); }

/* ── Super-admin a11y ─────────────────────────────────────── */
.sa-skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-brand, #2563eb);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  text-decoration: none;
}
.sa-skiplink:focus {
  left: 0;
  outline: 2px solid white;
  outline-offset: -2px;
}

/* sa-row-link: semantic anchor inside clickable <tr> rows */
.sa-row-link {
  color: inherit;
  text-decoration: none;
}
.sa-row-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Super-admin v3 layout — standalone shell (sidebar + topbar dedicados).
   Substitui o sa-shell + sa-nav-v2 antigos (que herdavam sidebar do produto).
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --sa-sidebar-width: 232px;
  --sa-sidebar-width-collapsed: 60px;
  --sa-topbar-height: 52px;
  --sa-content-padding: 24px;
}

/* Reset corpo super-admin (não usa .app-shell do produto) */
.sa-body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-surface-2, #f8fafd);
  color: var(--color-text, #0f172a);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout shell ────────────────────────────────────────────────────── */
.sa-layout {
  display: grid;
  grid-template-columns: var(--sa-sidebar-width) 1fr;
  grid-template-rows: var(--sa-topbar-height) 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  min-height: 100vh;
  transition: grid-template-columns 200ms ease;
}
.sa-layout.is-sidebar-collapsed {
  grid-template-columns: var(--sa-sidebar-width-collapsed) 1fr;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.sa-topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  z-index: 100;
  position: sticky;
  top: 0;
}
.sa-topbar-burger {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 8px;
  color: var(--color-text-muted);
  border-radius: 6px;
}
.sa-topbar-burger:hover { background: var(--color-surface-2); color: var(--color-text); }

.sa-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  min-width: calc(var(--sa-sidebar-width) - 16px);
  letter-spacing: -0.01em;
}
.sa-topbar-brand:hover { color: var(--color-brand); }
.sa-topbar-brand .bi { color: var(--color-brand, #0b4881); font-size: 20px; flex-shrink: 0; }
.sa-topbar-brand strong { font-weight: 700; }

.sa-topbar-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}
.sa-search-trigger-v3 {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 12px;
  background: var(--color-surface-2, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  text-align: left;
}
.sa-search-trigger-v3:hover {
  border-color: var(--color-brand, #0b4881);
  background: var(--color-surface, #fff);
}
.sa-search-trigger-v3 span { flex: 1; }
.sa-search-trigger-v3 kbd {
  padding: 2px 7px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  color: var(--color-text-muted);
}

/* User menu */
.sa-topbar-user { position: relative; }
.sa-topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  transition: background 120ms;
}
.sa-topbar-user-btn:hover { background: var(--color-surface-2); }
.sa-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-brand, #0b4881);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
.sa-topbar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sa-topbar-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-width: 240px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 200;
}
.sa-user-menu-header { padding: 12px 14px; border-bottom: 1px solid var(--color-border-soft, var(--color-border)); }
.sa-user-menu-header strong { display: block; font-size: 13px; color: var(--color-text); }
.sa-user-menu-header small { color: var(--color-text-muted); font-size: 11px; font-weight: 500; }
.sa-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 100ms;
}
.sa-user-menu-item:hover { background: var(--color-surface-2); }
.sa-user-menu-item .bi { color: var(--color-text-muted); font-size: 15px; }
.sa-user-menu-sep { height: 1px; background: var(--color-border-soft, var(--color-border)); margin: 2px 0; }

/* ── Topbar user-btn focus-visible ───────────────────────────────────── */
.sa-topbar-user-btn:focus-visible,
.sa-nav-item-v3:focus-visible,
.sa-search-trigger-v3:focus-visible {
  outline: 2px solid var(--color-brand, #0b4881);
  outline-offset: 2px;
}

/* ── Health pill (Design Critique #1) ───────────────────────────────── */
.sa-topbar-health {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sa-health-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 120ms;
  white-space: nowrap;
}
.sa-health-link:hover { background: var(--color-surface-2); color: var(--color-text); }
.sa-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
  transition: background 300ms;
}
.sa-health-dot.ok   { background: rgb(34,197,94); }
.sa-health-dot.warn { background: rgb(245,158,11); }
.sa-health-dot.crit { background: rgb(239,68,68); animation: sa-health-pulse 1.5s infinite; }
.sa-health-dot.unknown { background: rgb(148,163,184); }
@keyframes sa-health-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.sa-health-label { font-size: 12px; }
@media (max-width: 900px) { .sa-topbar-health { display: none; } }

/* ── Notification center / sino (Design Critique #2) ───────────────── */
.sa-topbar-notifs { position: relative; flex-shrink: 0; }
.sa-notifs-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  font-size: 16px;
  color: var(--color-text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background 120ms, color 120ms;
}
.sa-notifs-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.sa-notifs-btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.sa-notifs-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgb(239,68,68);
  color: white;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--color-surface);
}
.sa-notifs-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  z-index: 200;
}
.sa-notifs-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-soft, var(--color-border));
  font-size: 13px;
}
.sa-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 100ms;
  border-bottom: 1px solid var(--color-border-soft, var(--color-border));
}
.sa-notif-item:last-of-type { border-bottom: 0; }
.sa-notif-item:hover { background: var(--color-surface-2); }
.sa-notif-title { display: block; font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-notif-when  { display: block; color: var(--color-text-muted); font-size: 11px; margin-top: 2px; }
.sa-notifs-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--color-border-soft, var(--color-border));
  text-align: center;
  font-size: 12px;
}
.sa-notifs-footer a { color: var(--color-brand); text-decoration: none; }
.sa-notifs-footer a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .sa-notifs-panel { right: -60px; width: 280px; }
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sa-sidebar {
  grid-area: sidebar;
  background: var(--color-surface, #ffffff);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  position: sticky;
  top: var(--sa-topbar-height);
  height: calc(100vh - var(--sa-topbar-height));
  transition: width 200ms ease;
}
.sa-sidebar-nav { flex: 1; padding: 14px 0; }

.sa-nav-section-v3 { margin-top: 14px; }
.sa-nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 4px 20px 6px;
}
.sa-layout.is-sidebar-collapsed .sa-nav-section-title {
  visibility: hidden;
  height: 6px;
  padding: 0;
  margin-top: 8px;
  border-top: 1px solid var(--color-border-soft, var(--color-border));
}
.sa-layout.is-sidebar-collapsed .sa-nav-section-v3:first-of-type .sa-nav-section-title { border-top: 0; }

.sa-nav-item-v3 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  margin: 1px 0;
  color: var(--color-text, #0f172a);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background 100ms, border-color 100ms, color 100ms;
  position: relative;
}
.sa-nav-item-v3 .bi {
  font-size: 16px;
  width: 18px;
  text-align: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.sa-nav-item-v3:hover { background: var(--color-surface-2); }
.sa-nav-item-v3:hover .bi { color: var(--color-text); }
.sa-nav-item-v3.is-active {
  background: var(--color-brand-soft, rgba(11,72,129,0.08));
  color: var(--color-brand);
  border-left-color: var(--color-brand);
  font-weight: 600;
}
.sa-nav-item-v3.is-active .bi { color: var(--color-brand); }

.sa-nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sa-layout.is-sidebar-collapsed .sa-nav-label { display: none; }
.sa-layout.is-sidebar-collapsed .sa-nav-item-v3 {
  padding: 10px 0;
  justify-content: center;
}
.sa-layout.is-sidebar-collapsed .sa-nav-item-v3 .sa-nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 6px;
  height: 6px;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
}

.sa-nav-badge {
  margin-left: auto;
  background: rgba(239,68,68,0.14);
  color: rgb(185,28,28);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

/* Sidebar footer */
.sa-sidebar-footer {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--color-border-soft, var(--color-border));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sa-sidebar-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 6px;
  font-size: 11px;
  color: rgb(146,64,14);
  line-height: 1.4;
}
.sa-sidebar-warning .bi { color: rgb(217,119,6); font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.sa-layout.is-sidebar-collapsed .sa-sidebar-warning { justify-content: center; padding: 8px; }
.sa-layout.is-sidebar-collapsed .sa-sidebar-warning .sa-nav-label { display: none; }

.sa-sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background 100ms, color 100ms;
}
.sa-sidebar-collapse-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* ── Main ────────────────────────────────────────────────────────────── */
.sa-main {
  grid-area: main;
  padding: var(--sa-content-padding);
  max-width: 100%;
  overflow-x: hidden;
}
.sa-main:focus { outline: none; }

/* ── Mobile ──────────────────────────────────────────────────────────── */
.sa-sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .sa-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "main";
  }
  .sa-topbar-burger { display: inline-flex; }
  .sa-topbar-brand { min-width: 0; }
  .sa-topbar-brand span { display: none; }
  .sa-topbar-search { display: none; }
  .sa-topbar-user-name { display: none; }

  .sa-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    z-index: 250;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  }
  .sa-layout.is-sidebar-mobile-open .sa-sidebar { transform: translateX(0); }
  .sa-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
  }
  .sa-layout.is-sidebar-collapsed { grid-template-columns: 1fr; }
  .sa-layout.is-sidebar-collapsed .sa-nav-label { display: inline; }
  .sa-layout.is-sidebar-collapsed .sa-nav-item-v3 { padding: 8px 20px; justify-content: flex-start; }
  .sa-main { padding: 16px; }
}

/* ── Backwards-compat: páginas antigas que usavam .sa-shell ──────────── */
/* O wrapper .sa-shell foi removido; mas se algum partial ainda referenciar,
   garante que continua renderizando full-width sem layout próprio. */
.sa-shell { display: contents; }



/* ─── Help / ajuda (/ajuda, /ajuda/<section>, /ajuda/<section>/<slug>) ─── */
.help-shell { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.help-hero { text-align: center; margin-bottom: 48px; }
.help-hero h1 { font-size: 32px; margin: 0 0 8px; }
.help-hero p { color: var(--color-text-muted); margin: 0 0 20px; }
.help-hero kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.help-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.help-section-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
}
.help-section-card h2 {
  font-size: 18px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-section-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.help-section-card li { margin-bottom: 8px; }
.help-section-card a {
  color: var(--color-brand);
  text-decoration: none;
  font-size: 14px;
}
.help-section-card a:hover { text-decoration: underline; }
.help-section-all {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.help-section-all:hover { color: var(--color-brand); text-decoration: underline; }

/* Search */
.help-search {
  margin: 0 auto 0;
  max-width: 560px;
  position: relative;
}
.help-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 15px;
  background: var(--color-surface);
  color: var(--color-text, #1a2a3a);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.help-search input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(11,72,129,0.12);
}
.help-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* "Comece por aqui" */
.help-quickstart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
@media (max-width: 720px) {
  .help-quickstart { grid-template-columns: 1fr; }
}
.help-quickstart-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.help-quickstart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--color-brand);
}
.help-quickstart-card .qs-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-brand-soft);
  border-radius: 10px;
  color: var(--color-brand);
  font-size: 20px;
  margin-bottom: 4px;
}
.help-quickstart-card .qs-title {
  font-size: 16px; font-weight: 600; margin: 0;
}
.help-quickstart-card .qs-desc {
  font-size: 13px; color: var(--color-text-muted); margin: 0;
}

/* Section: restricted (admin) */
.help-restricted {
  margin-top: 64px;
  border-left: 4px solid #dc2626;
  padding-left: 16px;
}
.help-restricted-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.help-restricted .help-section-card { border-color: rgba(220,38,38,0.2); }

/* Badge Admin */
.help-badge-admin {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(220,38,38,0.1);
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 999px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Badge FAQ */
.help-badge-faq {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 999px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Capítulo prefix */
.capitulo-num {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  background: var(--color-surface-2);
  border-radius: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Section list — bigger touch targets */
.help-section-card ul { padding: 0; list-style: none; margin: 0 0 16px; }
.help-section-card li { margin: 0; }
.help-section-card a {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 6px;
  color: var(--color-text, #1a2a3a);
  text-decoration: none;
  font-size: 14px;
  min-height: 38px;
  transition: background 0.12s, color 0.12s;
}
.help-section-card a:hover {
  background: var(--color-surface-2);
  color: var(--color-brand);
}
.help-section-card a:hover .capitulo-num { color: var(--color-brand); }

/* Search results */
.help-results {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 48px;
}
.help-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s;
}
.help-result:hover { border-color: var(--color-brand); }
.help-result-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.help-result-badge.is-admin {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
}
.help-result-title { flex: 1; font-size: 14px; }

.help-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}
.help-empty a { color: var(--color-brand); }

/* CTA padronizado */
.help-cta {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.help-cta i { font-size: 24px; color: var(--color-brand); flex-shrink: 0; }
.help-cta p { margin: 0; flex: 1; font-size: 14px; color: var(--color-text-muted); }
.help-cta a { color: var(--color-brand); font-weight: 600; }

/* ── Breadcrumb (section.html) ── */
.help-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.help-breadcrumb a { color: var(--color-brand); text-decoration: none; }
.help-breadcrumb a:hover { text-decoration: underline; }
.help-section-header { margin-bottom: 24px; }
.help-section-header h1 { font-size: 28px; margin: 0; }

.help-section-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.help-section-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 150ms, background 150ms;
}
.help-section-link:hover {
  border-color: var(--color-brand);
  background: rgba(37,99,235,0.03);
}
.help-section-link span { flex: 1; }
.help-section-arrow { color: var(--color-text-muted); font-size: 12px; }

/* ── Article layout (article.html) ── */
.help-article-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
}
.help-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.help-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13px;
}
.help-back:hover { color: var(--color-brand); }
.help-sidebar h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 16px 0 8px;
}
.help-sidebar ul { list-style: none; padding: 0; margin: 0; }
.help-sidebar li a {
  display: block;
  padding: 6px 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  line-height: 1.4;
}
.help-sidebar li a:hover { background: var(--color-surface-2); }
.help-sidebar li a.is-active {
  background: rgba(37,99,235,0.08);
  color: var(--color-brand);
  font-weight: 600;
}

/* ── Markdown body (article.html) ── */
.help-article.markdown-body {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px 40px;
  font-size: 15px;
  line-height: 1.75;
  min-width: 0; /* previne overflow em grid */
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin-top: 32px; }
.markdown-body h1:first-child { margin-top: 0; }
.markdown-body h1 { font-size: 28px; }
.markdown-body h2 {
  font-size: 22px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}
.markdown-body h3 { font-size: 18px; }
.markdown-body h4 { font-size: 16px; }
.markdown-body p { margin: 12px 0; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin: 12px 0; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body img {
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin: 16px 0;
}
.markdown-body code {
  background: var(--color-surface-2, #f1f5f9);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.markdown-body pre {
  background: var(--color-surface-2, #f1f5f9);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
}
.markdown-body pre code { background: none; padding: 0; }
.markdown-body table { border-collapse: collapse; margin: 16px 0; width: 100%; }
.markdown-body th, .markdown-body td {
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  text-align: left;
}
.markdown-body th { background: var(--color-surface-2, #f8fafc); font-weight: 600; }
.markdown-body blockquote {
  border-left: 4px solid var(--color-brand);
  margin: 16px 0;
  padding: 8px 16px;
  background: rgba(37,99,235,0.04);
  color: var(--color-text-primary);
  border-radius: 0 4px 4px 0;
}
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 24px 0;
}
.markdown-body a { color: var(--color-brand); }
.markdown-body strong { font-weight: 600; }

/* ── Feedback ── */
.help-feedback {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--color-text-muted);
}
.help-feedback p { margin: 0; }
.help-feedback .btn-ghost {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  transition: background 150ms;
}
.help-feedback .btn-ghost:hover:not(:disabled) { background: var(--color-surface-2); }
.help-feedback .btn-ghost:disabled { opacity: 0.5; cursor: default; }
.help-feedback-support {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-brand);
  text-decoration: none;
}
.help-feedback-support:hover { text-decoration: underline; }

/* ── Floating help button ── */
.help-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  z-index: 1000;
  transition: transform 200ms, box-shadow 200ms;
}
.help-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .help-article-shell {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .help-sidebar {
    position: static;
    max-height: none;
  }
  .help-article.markdown-body { padding: 20px; }
  .help-sections { grid-template-columns: 1fr; }
  .help-floating-btn { bottom: 16px; right: 16px; }
}

/* ─── Shadow Mode chip (DEV banner reduzido) ─── */
.shadow-mode-chip-wrap {
  position: relative;
  display: inline-block;
}
.shadow-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  min-height: 32px; /* touch area >= 32px */
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.shadow-mode-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}
.shadow-mode-chip i { font-size: 12px; }

.shadow-mode-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-size: 13px;
}
.shadow-mode-popover-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 6px;
}
.shadow-mode-popover-body {
  padding: 12px 14px;
}
.shadow-mode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.shadow-mode-row code {
  background: var(--color-surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-text);
}
.shadow-mode-popover-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════
   Super-admin testimonials
   ═══════════════════════════════════════════════════════════ */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.testimonial-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.testimonial-card.is-featured {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.03);
}

.testimonial-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Avatar com iniciais */
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: var(--color-brand, #6366f1);
}
.testimonial-avatar[data-initials="A"] { background: #6366f1; }
.testimonial-avatar[data-initials="B"] { background: #8b5cf6; }
.testimonial-avatar[data-initials="C"] { background: #ec4899; }
.testimonial-avatar[data-initials="D"] { background: #f59e0b; }
.testimonial-avatar[data-initials="E"] { background: #10b981; }
.testimonial-avatar[data-initials="F"] { background: #3b82f6; }

.testimonial-meta {
  flex: 1;
  min-width: 0;
}
.testimonial-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.testimonial-role-company {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-rating {
  display: flex;
  gap: 2px;
}
.testimonial-rating .star { color: #22c55e; font-size: 13px; }
.testimonial-rating .star-empty { color: var(--color-border); font-size: 13px; }

.testimonial-quote {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
  font-style: italic;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.testimonial-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.testimonial-source-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.testimonial-source-badge.is-ticket { background: #ede9fe; color: #5b21b6; }
.testimonial-source-badge.is-csat   { background: #cffafe; color: #155e75; }
.testimonial-source-badge.is-manual { background: #fef9c3; color: #854d0e; }

.testimonial-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.testimonial-status-badge.is-pending  { background: #fef3c7; color: #92400e; }
.testimonial-status-badge.is-approved { background: #dcfce7; color: #166534; }
.testimonial-status-badge.is-rejected { background: #fee2e2; color: #991b1b; }
.testimonial-status-badge.is-archived { background: var(--color-surface-2); color: var(--color-text-muted); }

.testimonial-warning {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 11px;
  color: #92400e;
  display: flex;
  gap: 6px;
  align-items: center;
}

.testimonial-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.testimonial-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

/* Drag handle */
.testimonial-drag-handle {
  cursor: grab;
  color: var(--color-text-muted);
  padding: 4px;
  font-size: 16px;
}
.testimonial-drag-handle:active { cursor: grabbing; }

/* Edit modal */
.testimonial-modal-original {
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  max-height: 120px;
  overflow-y: auto;
}

/* ─── Cookie banner (LGPD) ─────────────────────────────────────────── */
.cookie-banner-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.04));
  pointer-events: none;
}
.cookie-banner {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  pointer-events: auto;
}
.cookie-banner-header {
  font-size: 14px;
  margin-bottom: 8px;
}
.cookie-banner-body p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--color-surface-2, #f8fafc);
  border-radius: 8px;
  margin-bottom: 12px;
}
.cookie-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}
.cookie-toggle input { margin-top: 2px; }
.cookie-toggle small {
  display: block;
  color: var(--color-text-muted, #64748b);
  font-size: 12px;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .cookie-banner-actions { flex-direction: column; }
  .cookie-banner-actions .btn { width: 100%; }
}

/* ─── INPUT WITH PREFIX (ex: @ do Instagram em Settings) ─── */
.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.input-with-prefix:focus-within {
  border-color: var(--color-brand, #22c55e);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}
.input-prefix {
  padding: 8px 4px 8px 12px;
  color: var(--color-text-muted, #64748b);
  font-weight: 500;
  font-size: 14px;
  user-select: none;
}
.input-with-prefix .input {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 8px 12px 8px 0 !important;
  box-shadow: none !important;
  flex: 1;
}
.input-with-prefix .input:focus {
  box-shadow: none !important;
}
