/* ══════════════════════════════════════════════════════════════════
   Igreja Pastoral – App CSS (Mobile First, Responsive)
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
    --primary:      #1a56a4;
    --primary-dark: #133d7a;
    --primary-light:#dbeafe;
    --secondary:    #16a34a;
    --accent:       #f59e0b;
    --danger:       #dc2626;
    --danger-light: #fee2e2;
    --bg:           #f1f5f9;
    --card:         #ffffff;
    --border:       #e2e8f0;
    --text:         #0f172a;
    --muted:        #64748b;
    --radius:       14px;
    --radius-sm:    8px;
    --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
    --shadow-md:    0 4px 16px rgba(0,0,0,.12);
    --nav-h:        64px;
    --safe-top:     env(safe-area-inset-top, 0px);
    --safe-bottom:  env(safe-area-inset-bottom, 0px);
    --sidebar-w:    260px;
    --font:         'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── LOGIN ─────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f2f5e 0%, #1a56a4 60%, #1d6fa5 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(26,86,164,.3);
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.login-logo p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

.login-error {
    background: var(--danger-light);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--danger);
    margin-bottom: 16px;
}

/* ── LAYOUT PRINCIPAL ──────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: #0f2f5e;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform .3s ease;
    overflow-y: auto;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #1a56a4, #2563eb);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

.sidebar-title { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; }
.sidebar-sub   { color: rgba(255,255,255,.5); font-size: 11px; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.35);
    padding: 12px 20px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,.7);
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: all .15s;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #60a5fa;
    border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 18px; flex-shrink: 0; width: 22px; text-align: center; }

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.user-info {
    display: flex; align-items: center; gap: 10px;
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #1a56a4, #60a5fa);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}

.user-name  { color: #fff; font-size: 13px; font-weight: 600; }
.user-role  { color: rgba(255,255,255,.5); font-size: 11px; }

.btn-logout {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; padding: 8px 12px;
    background: rgba(255,255,255,.08);
    border: none; border-radius: var(--radius-sm);
    color: rgba(255,255,255,.7); font-size: 13px; width: 100%;
    transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── TOPBAR MOBILE ─────────────────────────────────────────────── */
.topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(var(--nav-h) + env(safe-area-inset-top));
    background: #0f2f5e;
    z-index: 150;
    align-items: flex-end;
    padding: 0 16px env(safe-area-inset-bottom, 0) 16px;
    padding-top: env(safe-area-inset-top);
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.topbar-title { color: #fff; font-size: 17px; font-weight: 700; flex: 1; }

.btn-menu {
    background: none; border: none;
    color: #fff; font-size: 22px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
}

.topbar-badge {
    background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 99px;
}

/* Overlay sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 190;
}

/* ── CONTEÚDO PRINCIPAL ────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-inner {
    padding: 28px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── CARDS ─────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── KPIs ──────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.kpi {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 16px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    text-align: center;
}

.kpi.green  { border-top-color: var(--secondary); }
.kpi.amber  { border-top-color: var(--accent); }
.kpi.red    { border-top-color: var(--danger); }

.kpi-num { font-size: 32px; font-weight: 800; color: var(--primary); }
.kpi.green .kpi-num { color: var(--secondary); }
.kpi.amber .kpi-num { color: var(--accent); }
.kpi.red   .kpi-num { color: var(--danger); }
.kpi-lbl   { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* ── BOTÕES ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    border: none; cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success   { background: var(--secondary); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-whatsapp  { background: #25D366; color: #fff; }
.btn-warning   { background: var(--accent);    color: #fff; }
.btn-danger    { background: var(--danger);    color: #fff; }
.btn-ghost     { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #e2e8f0; }
.btn-sm        { padding: 6px 12px; font-size: 13px; }
.btn-lg        { padding: 14px 24px; font-size: 16px; }
.btn-full      { width: 100%; justify-content: center; }
.btn-icon      { padding: 8px; border-radius: var(--radius-sm); }

/* ── FORMULÁRIOS ───────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
    font-size: 12px; font-weight: 600;
    color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
}

.form-control {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 15px; color: var(--text);
    background: #fff; outline: none;
    transition: border-color .15s;
    width: 100%;
    -webkit-appearance: none;
}

.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,164,.12); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ── SEÇÃO TÍTULO ──────────────────────────────────────────────── */
.section-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    color: var(--primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    margin-bottom: 14px;
}

/* ── TABELA ────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.data-table th {
    background: var(--primary); color: #fff;
    padding: 11px 14px; text-align: left;
    font-weight: 600; font-size: 13px;
    white-space: nowrap;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table .actions { white-space: nowrap; display: flex; gap: 6px; }

/* ── BADGES ────────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 99px;
    font-size: 12px; font-weight: 600;
}
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-amber  { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ── PROGRESS BAR ──────────────────────────────────────────────── */
.progress { background: #e2e8f0; border-radius: 99px; height: 10px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--secondary); transition: width .4s; }
.progress-bar.low { background: var(--danger); }

/* ── MODAL ─────────────────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-overlay.open { display: flex; }

.modal {
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 32px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp .25s ease;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-handle {
    width: 40px; height: 4px;
    background: #e2e8f0; border-radius: 99px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 18px; font-weight: 700;
    margin-bottom: 20px;
}

.modal-close {
    float: right; background: none; border: none;
    font-size: 22px; color: var(--muted); line-height: 1;
    padding: 0; margin-top: -2px;
}

/* ── FILTROS ───────────────────────────────────────────────────── */
.filters {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 16px; align-items: flex-end;
}

.filters .form-control { padding: 9px 12px; font-size: 14px; }

/* ── RADIO / CHECK CARDS ───────────────────────────────────────── */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 8px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.radio-card, .check-card {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13px; font-weight: 500;
    transition: all .15s;
}

.radio-card:hover, .check-card:hover { border-color: var(--primary); background: #f0f4ff; }
.radio-card input, .check-card input { accent-color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.radio-card:has(input:checked) { border-color: var(--primary); background: #dbeafe; color: var(--primary); font-weight: 700; }
.check-card:has(input:checked) { border-color: var(--secondary); background: #dcfce7; color: #166534; font-weight: 700; }

/* ── ABAS ──────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: -1px; }
.tab-btn {
    padding: 9px 18px; border-radius: 10px 10px 0 0;
    font-size: 13px; font-weight: 600;
    background: #e9eef5; color: var(--muted);
    border: 1px solid transparent; cursor: pointer;
    transition: all .15s;
}
.tab-btn.active { background: #fff; color: var(--primary); border-color: var(--border); border-bottom-color: #fff; }
.tab-content { background: #fff; border: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius); padding: 20px; }

/* ── ALERTAS ───────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.alert-danger  { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-info    { background: #dbeafe; border: 1px solid #93c5fd; color: #1e40af; }

/* ── PAGINAÇÃO ─────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: #fff; font-size: 13px; color: var(--text); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sidebar         { transform: translateX(-100%); }
    .sidebar.open    { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .topbar          { display: flex; }
    .main-content    { margin-left: 0; padding-top: calc(var(--nav-h) + env(safe-area-inset-top)); }
    .page-inner      { padding: 16px; }
    .form-grid       { grid-template-columns: 1fr; }
    .kpi-grid        { grid-template-columns: repeat(2, 1fr); }
    .modal           { border-radius: 20px 20px 0 0; }
    .check-grid      { grid-template-columns: 1fr; }
    .filters         { flex-direction: column; }
    .filters .form-control { width: 100%; }
    .page-header     { flex-direction: column; align-items: flex-start; }
    .table-wrap      { margin: 0; border-radius: var(--radius-sm); }
    .data-table th, .data-table td { padding: 9px 10px; font-size: 13px; }
}

@media (min-width: 769px) {
    .modal-overlay   { align-items: center; padding: 20px; }
    .modal           { border-radius: 20px; max-width: 680px; }
    .modal-handle    { display: none; }
}

@media (min-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── PRINT ─────────────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .btn, .filters, .modal-overlay { display: none !important; }
    .main-content { margin: 0; padding: 0; }
}


/* ==========================================================================
   v6.5.6 — FORCE REAL PREMIUM UI
   Aplicado diretamente no app.css real do PWA.
   ========================================================================== */

:root{
  --force-bg:#f4f7fb;
  --force-card:#ffffff;
  --force-text:#0f172a;
  --force-muted:#64748b;
  --force-border:#e5eaf2;
  --force-blue:#2563eb;
  --force-blue2:#1d4ed8;
  --force-purple:#7c3aed;
  --force-green:#16a34a;
  --force-red:#dc2626;
  --force-orange:#f97316;
  --force-sidebar:#07111f;
  --force-sidebar2:#0f172a;
  --force-shadow:0 14px 38px rgba(15,23,42,.075);
  --force-shadow-lg:0 24px 70px rgba(15,23,42,.14);
}

html body,
body.ip-app,
body{
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.08),transparent 30%),
    radial-gradient(circle at 94% 0%,rgba(124,58,237,.06),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb) !important;
  color:var(--force-text) !important;
}

/* containers reais possíveis */
.app, .app-shell, .ip-app-shell, .main, main, .app-main, .main-content, #app-content, .content, .ip-content, .page-content, .pwa-content{
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.07),transparent 30%),
    radial-gradient(circle at 94% 0%,rgba(124,58,237,.05),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb) !important;
  color:var(--force-text) !important;
}

/* Sidebar */
#app-sidebar, .app-sidebar, aside.sidebar, .sidebar, .menu-lateral, .side-menu{
  background:linear-gradient(180deg,var(--force-sidebar),var(--force-sidebar2)) !important;
  color:#e5e7eb !important;
  border-right:1px solid rgba(255,255,255,.08) !important;
  box-shadow:16px 0 44px rgba(15,23,42,.15) !important;
}

#app-sidebar *, .app-sidebar *, aside.sidebar *, .sidebar *, .menu-lateral *, .side-menu *{
  color:inherit;
}

#app-sidebar a, .app-sidebar a, aside.sidebar a, .sidebar a, .menu-lateral a, .side-menu a, .nav-link, .menu-link{
  color:#cbd5e1 !important;
  border-radius:16px !important;
  font-weight:850 !important;
}

#app-sidebar a:hover, .app-sidebar a:hover, aside.sidebar a:hover, .sidebar a:hover, .nav-link:hover, .menu-link:hover{
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
}

#app-sidebar a.active, .app-sidebar a.active, aside.sidebar a.active, .sidebar a.active, .nav-link.active, .menu-link.active{
  background:linear-gradient(135deg,var(--force-blue),var(--force-purple)) !important;
  color:#fff !important;
  box-shadow:0 14px 34px rgba(37,99,235,.30) !important;
}

/* Topbar */
.app-header, .topbar, .ip-topbar, header, .header{
  background:rgba(255,255,255,.96) !important;
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(226,232,240,.96) !important;
  box-shadow:0 8px 28px rgba(15,23,42,.045) !important;
  color:var(--force-text) !important;
}

/* Hero criado/injetado */
.force-premium-hero,
.ip-react-hero, .ip-page-hero, .ip-bib-hero, .ip-module-hero, .page-hero, .module-hero, .pwa-hero, .dashboard-hero{
  background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 54%,#7c3aed 100%) !important;
  color:#fff !important;
  border-radius:30px !important;
  padding:30px !important;
  box-shadow:var(--force-shadow-lg) !important;
  border:1px solid rgba(255,255,255,.15) !important;
  overflow:hidden;
  position:relative;
  margin:0 0 22px !important;
}

.force-premium-hero:after,
.ip-react-hero:after, .ip-page-hero:after, .ip-bib-hero:after, .ip-module-hero:after, .page-hero:after, .module-hero:after, .pwa-hero:after, .dashboard-hero:after{
  content:"";
  position:absolute;
  right:34px;
  top:16px;
  width:190px;
  height:150px;
  border-radius:34px;
  background:rgba(255,255,255,.13);
  transform:rotate(-12deg);
  pointer-events:none;
}

.force-premium-hero h1, .force-premium-hero h2,
.ip-react-hero h1,.ip-react-hero h2,.ip-page-hero h1,.ip-page-hero h2,.ip-bib-hero h1,.ip-bib-hero h2,.ip-module-hero h1,.ip-module-hero h2,.page-hero h1,.page-hero h2,.module-hero h1,.module-hero h2{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  margin:0 !important;
  position:relative;
  z-index:1;
}

.force-premium-hero p,
.ip-react-hero p,.ip-page-hero p,.ip-bib-hero p,.ip-module-hero p,.page-hero p,.module-hero p{
  color:rgba(255,255,255,.84) !important;
  -webkit-text-fill-color:rgba(255,255,255,.84) !important;
  position:relative;
  z-index:1;
}

/* cards */
.card, .ip-card, .dashboard-card, .stat-card, .panel, .widget, .box, .msg-card, .form-card, .content-card, .data-card, .ip-bi-card, .ip-bi-panel{
  background:#fff !important;
  color:var(--force-text) !important;
  border:1px solid var(--force-border) !important;
  border-radius:24px !important;
  box-shadow:var(--force-shadow) !important;
}

.card *, .ip-card *, .dashboard-card *, .stat-card *, .panel *, .widget *, .box *, .msg-card *, .form-card *{
  color:inherit;
}

h1,h2,h3,h4,h5,h6,
.card h1,.card h2,.card h3,.ip-card h1,.ip-card h2,.ip-card h3,.panel h1,.panel h2,.panel h3{
  color:var(--force-text) !important;
  -webkit-text-fill-color:var(--force-text) !important;
}

small,.muted,.text-muted,.description,.help{
  color:var(--force-muted) !important;
  -webkit-text-fill-color:var(--force-muted) !important;
}

/* Formulários: regra mais forte */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.regular-text,
.search-input{
  background:#fff !important;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  border-radius:15px !important;
  padding:12px 14px !important;
  font-weight:650 !important;
  box-shadow:none !important;
}

input::placeholder, textarea::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}

form label, .form-label, fieldset label, .field-label{
  color:#1f2937 !important;
  -webkit-text-fill-color:#1f2937 !important;
  font-weight:800 !important;
}

/* Tabelas */
table, .data-table, .wp-list-table{
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid var(--force-border) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  box-shadow:var(--force-shadow) !important;
}

table th, .data-table th, .wp-list-table th{
  background:#f8fafc !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  font-size:12px !important;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:900 !important;
}

table td, .data-table td, .wp-list-table td{
  color:#1f2937 !important;
  -webkit-text-fill-color:#1f2937 !important;
  border-bottom:1px solid #edf2f7 !important;
}

/* Botões */
.btn, .button, button, input[type="submit"], a.button{
  border-radius:15px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

.btn-primary, .button-primary, button.primary, input[type="submit"].primary, input[type="submit"].button-primary{
  background:linear-gradient(135deg,var(--force-blue),var(--force-blue2)) !important;
  border-color:var(--force-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* default não invisível */
.button:not(.button-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
.btn:not(.btn-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
button:not(.primary):not(.button-primary):not([data-action*="delete"]):not([data-action*="excluir"]):not([data-action*="edit"]):not([data-action*="editar"]){
  background:#fff !important;
  border:1px solid var(--force-border) !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
}

.btn-wa-send,.btn-whatsapp,a[href*="wa.me"],a[href*="whatsapp"]{
  background:var(--force-green) !important;
  border-color:var(--force-green) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-excluir,.btn-delete,.button-delete,.delete,button[data-action*="excluir"],button[data-action*="delete"],a[href*="excluir"],a[href*="delete"]{
  background:var(--force-red) !important;
  border-color:var(--force-red) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-editar,.btn-edit,button[data-action*="editar"],button[data-action*="edit"],.ip-editar-livro-tab,.ip-force-edit{
  background:var(--force-blue) !important;
  border-color:var(--force-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-warning,.warning,button[data-action*="alerta"],button[data-action*="warning"]{
  background:var(--force-orange) !important;
  border-color:var(--force-orange) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.empty-state,.ip-empty,.no-results,.ip-bib-empty{
  background:#fff !important;
  border:1px dashed #cbd5e1 !important;
  border-radius:24px !important;
  color:var(--force-muted) !important;
  padding:38px 22px !important;
  text-align:center;
}

@media(max-width:800px){
  .force-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero{
    padding:23px !important;
    border-radius:24px !important;
  }
}

/* v6.5.7 Sidebar Polish */
#app-sidebar,.app-sidebar,.sidebar,.menu-lateral,.side-menu{
  background:radial-gradient(circle at 30% 0%,rgba(37,99,235,.18),transparent 30%),linear-gradient(180deg,#07111f 0%,#081120 48%,#0f172a 100%)!important;
  color:#e5e7eb!important;
  padding:18px 14px!important;
}
#app-sidebar a,.app-sidebar a,.sidebar a,.menu-link,.nav-link{
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:11px 13px!important;
  margin:4px 0!important;
  border-radius:14px!important;
  color:#dbeafe!important;
  font-size:15px!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
}
#app-sidebar a.active,.app-sidebar a.active,.sidebar a.active,.menu-link.active,.nav-link.active{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%)!important;
  color:#fff!important;
  box-shadow:0 12px 26px rgba(37,99,235,.34)!important;
}
#app-sidebar a:hover,.app-sidebar a:hover,.sidebar a:hover,.menu-link:hover,.nav-link:hover{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
}
.ip-menu-section-title,
#app-sidebar .menu-section-title,
.app-sidebar .menu-section-title,
.sidebar .menu-section-title{
  display:block!important;
  margin:20px 10px 8px!important;
  color:#94a3b8!important;
  font-size:12px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  line-height:1!important;
}
#app-sidebar .user-card,.app-sidebar .user-card,.sidebar .user-card,#app-sidebar .profile,.app-sidebar .profile,.sidebar .profile{
  border-bottom:1px solid rgba(148,163,184,.16)!important;
  padding-bottom:16px!important;
  margin-bottom:16px!important;
}
#app-sidebar a[href*="ajuda"],.app-sidebar a[href*="ajuda"],.sidebar a[href*="ajuda"]{
  margin-top:18px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  background:rgba(255,255,255,.03)!important;
}


/* ==========================================================================
   v6.5.8 — Apple Experience UI
   Refinamento visual global: hero único, cards Apple-like, tabelas claras,
   formulários legíveis e menu lateral organizado.
   ========================================================================== */

:root{
  --ae-bg:#f4f7fb;
  --ae-bg2:#f8fbff;
  --ae-card:#ffffff;
  --ae-text:#0f172a;
  --ae-text2:#334155;
  --ae-muted:#64748b;
  --ae-border:#e5eaf2;
  --ae-blue:#2563eb;
  --ae-blue2:#1d4ed8;
  --ae-purple:#7c3aed;
  --ae-green:#16a34a;
  --ae-red:#ef4444;
  --ae-orange:#f97316;
  --ae-yellow:#f59e0b;
  --ae-sidebar:#07111f;
  --ae-sidebar2:#0f172a;
  --ae-shadow-sm:0 8px 22px rgba(15,23,42,.045);
  --ae-shadow:0 14px 38px rgba(15,23,42,.07);
  --ae-shadow-lg:0 24px 70px rgba(15,23,42,.13);
}

/* Base */
html,body{
  background:
    radial-gradient(circle at 10% 0%,rgba(37,99,235,.08),transparent 32%),
    radial-gradient(circle at 90% 0%,rgba(124,58,237,.06),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb)!important;
  color:var(--ae-text)!important;
  -webkit-font-smoothing:antialiased;
}

body,.app-shell,.ip-app-shell,.app-main,.main-content,#app-content,.content,.ip-content,.wrap,main{
  background:
    radial-gradient(circle at 10% 0%,rgba(37,99,235,.07),transparent 32%),
    radial-gradient(circle at 90% 0%,rgba(124,58,237,.05),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb)!important;
  color:var(--ae-text)!important;
}

/* Topbar Apple-like */
.app-header,.topbar,.ip-topbar,header,.header{
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 8px 28px rgba(15,23,42,.045)!important;
  color:var(--ae-text)!important;
}

/* Sidebar */
#app-sidebar,.app-sidebar,.sidebar,.menu-lateral,.side-menu{
  background:
    radial-gradient(circle at 30% 0%,rgba(37,99,235,.20),transparent 30%),
    linear-gradient(180deg,var(--ae-sidebar),var(--ae-sidebar2))!important;
  color:#e5e7eb!important;
  border-right:1px solid rgba(255,255,255,.08)!important;
  box-shadow:16px 0 44px rgba(15,23,42,.15)!important;
  padding:18px 14px!important;
}

#app-sidebar *,.app-sidebar *,.sidebar *,.menu-lateral *,.side-menu *{color:inherit}

#app-sidebar a,.app-sidebar a,.sidebar a,.menu-lateral a,.side-menu a,.nav-link,.menu-link{
  color:#dbeafe!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:11px 13px!important;
  margin:4px 0!important;
  border-radius:14px!important;
  font-size:15px!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
  transition:all .18s ease!important;
}

#app-sidebar a:hover,.app-sidebar a:hover,.sidebar a:hover,.nav-link:hover,.menu-link:hover{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  transform:translateX(3px);
}

#app-sidebar a.active,.app-sidebar a.active,.sidebar a.active,.menu-link.active,.nav-link.active{
  background:linear-gradient(135deg,var(--ae-blue),var(--ae-blue2))!important;
  color:#fff!important;
  box-shadow:0 12px 26px rgba(37,99,235,.34)!important;
}

.ip-menu-section-title,
#app-sidebar .menu-section-title,.app-sidebar .menu-section-title,.sidebar .menu-section-title{
  display:block!important;
  margin:20px 10px 8px!important;
  color:#94a3b8!important;
  font-size:12px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  line-height:1!important;
}

/* Hero único e refinado */
.force-premium-hero,.apple-premium-hero,
.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero,.pwa-hero,.dashboard-hero{
  background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 52%,#7c3aed 100%)!important;
  color:#fff!important;
  border-radius:28px!important;
  padding:28px 32px!important;
  box-shadow:0 22px 58px rgba(37,99,235,.18)!important;
  border:1px solid rgba(255,255,255,.15)!important;
  overflow:hidden!important;
  position:relative!important;
  margin:0 0 24px!important;
}

.force-premium-hero:before,.apple-premium-hero:before,
.ip-react-hero:before,.ip-page-hero:before,.ip-bib-hero:before,.ip-module-hero:before,.page-hero:before,.module-hero:before,.pwa-hero:before,.dashboard-hero:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 55% 0%,rgba(255,255,255,.16),transparent 38%);
  pointer-events:none;
}

.force-premium-hero:after,.apple-premium-hero:after,
.ip-react-hero:after,.ip-page-hero:after,.ip-bib-hero:after,.ip-module-hero:after,.page-hero:after,.module-hero:after,.pwa-hero:after,.dashboard-hero:after{
  content:"";
  position:absolute;
  right:34px;
  top:22px;
  width:170px;
  height:128px;
  border-radius:32px;
  background:rgba(255,255,255,.14);
  transform:rotate(-12deg);
  pointer-events:none;
}

.force-premium-hero h1,.force-premium-hero h2,.apple-premium-hero h1,.apple-premium-hero h2,
.ip-react-hero h1,.ip-react-hero h2,.ip-page-hero h1,.ip-page-hero h2,.ip-bib-hero h1,.ip-bib-hero h2,.ip-module-hero h1,.ip-module-hero h2,.page-hero h1,.page-hero h2,.module-hero h1,.module-hero h2{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  margin:0!important;
  position:relative!important;
  z-index:1!important;
  font-size:clamp(30px,4vw,44px)!important;
  line-height:1.04!important;
  letter-spacing:-.06em!important;
}

.force-premium-hero p,.apple-premium-hero p,
.ip-react-hero p,.ip-page-hero p,.ip-bib-hero p,.ip-module-hero p,.page-hero p,.module-hero p{
  color:rgba(255,255,255,.86)!important;
  -webkit-text-fill-color:rgba(255,255,255,.86)!important;
  max-width:760px!important;
  margin:8px 0 0!important;
  position:relative!important;
  z-index:1!important;
  font-size:15px!important;
}

/* Remove título duplicado imediatamente após hero */
.force-premium-hero + h1,
.force-premium-hero + h2,
.apple-premium-hero + h1,
.apple-premium-hero + h2,
.ip-react-hero + h1,
.ip-react-hero + h2,
.ip-page-hero + h1,
.ip-page-hero + h2,
.ip-bib-hero + h1,
.ip-bib-hero + h2,
.ip-module-hero + h1,
.ip-module-hero + h2,
.page-hero + h1,
.page-hero + h2,
.module-hero + h1,
.module-hero + h2{
  display:none!important;
}

/* Tipografia */
h1,h2,h3,h4,h5,h6,.app-main h1,.main-content h1,.ip-content h1,.wrap h1{
  color:var(--ae-text)!important;
  -webkit-text-fill-color:var(--ae-text)!important;
  letter-spacing:-.045em;
}

small,.muted,.text-muted,.description,.help{
  color:var(--ae-muted)!important;
  -webkit-text-fill-color:var(--ae-muted)!important;
}

/* Cards */
.card,.ip-card,.dashboard-card,.stat-card,.panel,.widget,.box,.msg-card,.form-card,.content-card,.data-card,.ip-bi-card,.ip-bi-panel{
  background:#fff!important;
  color:var(--ae-text)!important;
  border:1px solid var(--ae-border)!important;
  border-radius:22px!important;
  box-shadow:var(--ae-shadow)!important;
}

.card:hover,.ip-card:hover,.dashboard-card:hover,.stat-card:hover,.panel:hover,.widget:hover{
  box-shadow:var(--ae-shadow-lg)!important;
  border-color:#d7e2ef!important;
}

.card *,.ip-card *,.dashboard-card *,.stat-card *,.panel *,.widget *,.box *,.msg-card *,.form-card *{
  color:inherit;
}

.card h1,.card h2,.card h3,.ip-card h1,.ip-card h2,.ip-card h3,.panel h1,.panel h2,.panel h3,.widget h1,.widget h2,.widget h3{
  color:var(--ae-text)!important;
  -webkit-text-fill-color:var(--ae-text)!important;
}

/* Formulários: corrige títulos/labels brancos */
form h1,form h2,form h3,form h4,
.form-title,.form-heading,
.modal-content h1,.modal-content h2,.modal-content h3,
label,form label,.form-label,fieldset label,.field-label{
  color:#1f2937!important;
  -webkit-text-fill-color:#1f2937!important;
}

form label,.form-label,fieldset label,.field-label{
  font-weight:800!important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,textarea,.form-control,.regular-text,.search-input{
  background:#fff!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  border:1px solid #cbd5e1!important;
  border-radius:14px!important;
  padding:11px 13px!important;
  font-weight:650!important;
  box-shadow:none!important;
}

input::placeholder,textarea::placeholder{
  color:#94a3b8!important;
  -webkit-text-fill-color:#94a3b8!important;
}

input:focus,select:focus,textarea:focus{
  border-color:var(--ae-blue)!important;
  box-shadow:0 0 0 4px rgba(37,99,235,.12)!important;
  outline:none!important;
}

/* Tabelas Apple-like */
table,.data-table,.wp-list-table{
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid var(--ae-border)!important;
  border-radius:20px!important;
  overflow:hidden!important;
  box-shadow:var(--ae-shadow)!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}

table th,.data-table th,.wp-list-table th{
  background:#f8fafc!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  font-size:12px!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  font-weight:900!important;
}

table td,.data-table td,.wp-list-table td{
  color:#1f2937!important;
  -webkit-text-fill-color:#1f2937!important;
  border-bottom:1px solid #edf2f7!important;
}

table a,.data-table a{
  color:#1d4ed8!important;
  -webkit-text-fill-color:#1d4ed8!important;
  font-weight:800!important;
}

/* Botões */
.btn,.button,button,input[type="submit"],a.button{
  border-radius:14px!important;
  font-weight:900!important;
  text-decoration:none!important;
}

.btn-primary,.button-primary,button.primary,input[type="submit"].primary,input[type="submit"].button-primary{
  background:linear-gradient(135deg,var(--ae-blue),var(--ae-blue2))!important;
  border-color:var(--ae-blue)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 12px 24px rgba(37,99,235,.22)!important;
}

.button:not(.button-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
.btn:not(.btn-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
button:not(.primary):not(.button-primary):not([data-action*="delete"]):not([data-action*="excluir"]):not([data-action*="edit"]):not([data-action*="editar"]){
  background:#fff!important;
  border:1px solid var(--ae-border)!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
}

.btn-wa-send,.btn-whatsapp,a[href*="wa.me"],a[href*="whatsapp"]{
  background:var(--ae-green)!important;
  border-color:var(--ae-green)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

.btn-excluir,.btn-delete,.button-delete,.delete,button[data-action*="excluir"],button[data-action*="delete"],a[href*="excluir"],a[href*="delete"]{
  background:var(--ae-red)!important;
  border-color:var(--ae-red)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

.btn-editar,.btn-edit,button[data-action*="editar"],button[data-action*="edit"],.ip-editar-livro-tab,.ip-force-edit{
  background:var(--ae-blue)!important;
  border-color:var(--ae-blue)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

.btn-warning,.warning,button[data-action*="alerta"],button[data-action*="warning"]{
  background:var(--ae-orange)!important;
  border-color:var(--ae-orange)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Estados vazios */
.empty-state,.ip-empty,.no-results,.ip-bib-empty{
  background:#fff!important;
  border:1px dashed #cbd5e1!important;
  border-radius:22px!important;
  color:var(--ae-muted)!important;
  padding:36px 22px!important;
  text-align:center!important;
}

.empty-state strong,.ip-empty strong,.no-results strong,.ip-bib-empty strong{
  color:var(--ae-text)!important;
  -webkit-text-fill-color:var(--ae-text)!important;
}

/* Biblioteca clara com hero */
.ip-bib-v544{
  background:linear-gradient(180deg,#f8fbff,#f4f7fb)!important;
  color:var(--ae-text)!important;
}

.ip-bib-v544 .ip-bib-hero,.ip-bib-v544 .ip-bib-hero *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

.ip-bib-v544 .ip-bib-stat,.ip-bib-v544 .ip-bib-card,.ip-bib-v544 .ip-bib-collection{
  background:#fff!important;
  border-color:var(--ae-border)!important;
  color:var(--ae-text)!important;
  box-shadow:var(--ae-shadow)!important;
}

/* Mobile */
@media(max-width:800px){
  .force-premium-hero,.apple-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero{
    padding:23px!important;
    border-radius:23px!important;
  }
  .force-premium-hero:after,.apple-premium-hero:after,.ip-react-hero:after,.ip-page-hero:after,.ip-bib-hero:after,.ip-module-hero:after,.page-hero:after,.module-hero:after{
    width:120px;height:92px;right:-18px;
  }
}


/* v6.5.9 — FORCE LIVE UI, não depende do CSS antigo */
:root{--live-bg:#f4f7fb;--live-text:#0f172a;--live-muted:#64748b;--live-border:#e5eaf2;--live-blue:#2563eb;--live-blue2:#1d4ed8;--live-purple:#7c3aed;--live-green:#16a34a;--live-red:#ef4444;--live-orange:#f97316}
html body{background:linear-gradient(180deg,#f8fbff,#f4f7fb)!important;color:var(--live-text)!important}
.app-shell,.ip-app-shell,.app-main,.main-content,#app-content,.content,.ip-content,main{background:linear-gradient(180deg,#f8fbff,#f4f7fb)!important;color:var(--live-text)!important}
#app-sidebar,.app-sidebar,.sidebar,.menu-lateral,.side-menu{background:linear-gradient(180deg,#07111f,#0f172a)!important;color:#e5e7eb!important}
#app-sidebar a,.app-sidebar a,.sidebar a,.menu-link,.nav-link{color:#dbeafe!important;border-radius:14px!important}
#app-sidebar a.active,.app-sidebar a.active,.sidebar a.active,.menu-link.active,.nav-link.active{background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;color:#fff!important}
.force-premium-hero,.apple-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero,.pwa-hero,.dashboard-hero{background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 52%,#7c3aed 100%)!important;color:#fff!important;border-radius:28px!important;padding:28px 32px!important;box-shadow:0 22px 58px rgba(37,99,235,.18)!important;position:relative!important;overflow:hidden!important;margin:0 0 24px!important}
.force-premium-hero:after,.apple-premium-hero:after,.ip-react-hero:after,.ip-page-hero:after,.ip-bib-hero:after,.ip-module-hero:after,.page-hero:after,.module-hero:after{content:"";position:absolute;right:34px;top:22px;width:170px;height:128px;border-radius:32px;background:rgba(255,255,255,.14);transform:rotate(-12deg)}
.force-premium-hero h1,.apple-premium-hero h1,.ip-react-hero h1,.ip-page-hero h1,.ip-bib-hero h1,.ip-module-hero h1,.page-hero h1,.module-hero h1{color:#fff!important;-webkit-text-fill-color:#fff!important;margin:0!important;position:relative;z-index:1}
.force-premium-hero p,.apple-premium-hero p,.ip-react-hero p,.ip-page-hero p,.ip-bib-hero p,.ip-module-hero p,.page-hero p,.module-hero p{color:rgba(255,255,255,.86)!important;-webkit-text-fill-color:rgba(255,255,255,.86)!important;position:relative;z-index:1}
.force-premium-hero + h1,.force-premium-hero + h2,.apple-premium-hero + h1,.apple-premium-hero + h2,.ip-react-hero + h1,.ip-react-hero + h2,.ip-page-hero + h1,.ip-page-hero + h2,.ip-bib-hero + h1,.ip-bib-hero + h2{display:none!important}
.card,.ip-card,.dashboard-card,.stat-card,.panel,.widget,.box,.msg-card,.form-card,.content-card,.data-card{background:#fff!important;color:var(--live-text)!important;border:1px solid var(--live-border)!important;border-radius:22px!important;box-shadow:0 14px 38px rgba(15,23,42,.07)!important}
h1,h2,h3,h4,h5,h6{color:var(--live-text)!important;-webkit-text-fill-color:var(--live-text)!important}
form h1,form h2,form h3,form h4,label,form label,.form-title,.form-heading{color:#1f2937!important;-webkit-text-fill-color:#1f2937!important}
input:not([type="checkbox"]):not([type="radio"]),select,textarea,.form-control,.regular-text{background:#fff!important;color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;border:1px solid #cbd5e1!important;border-radius:14px!important}
table,.data-table,.wp-list-table{background:#fff!important;color:#0f172a!important;border:1px solid var(--live-border)!important;border-radius:20px!important;overflow:hidden!important;box-shadow:0 14px 38px rgba(15,23,42,.07)!important}
table th,.data-table th,.wp-list-table th{background:#f8fafc!important;color:#334155!important;-webkit-text-fill-color:#334155!important}
table td,.data-table td,.wp-list-table td{color:#1f2937!important;-webkit-text-fill-color:#1f2937!important}
.btn,.button,button,input[type="submit"],a.button{border-radius:14px!important;font-weight:900!important}
.btn-wa-send,.btn-whatsapp,a[href*="wa.me"],a[href*="whatsapp"]{background:var(--live-green)!important;border-color:var(--live-green)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-excluir,.btn-delete,.button-delete,.delete,button[data-action*="excluir"],button[data-action*="delete"],a[href*="excluir"],a[href*="delete"]{background:var(--live-red)!important;border-color:var(--live-red)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-editar,.btn-edit,button[data-action*="editar"],button[data-action*="edit"],.ip-editar-livro-tab,.ip-force-edit{background:var(--live-blue)!important;border-color:var(--live-blue)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-warning,.warning,button[data-action*="alerta"]{background:var(--live-orange)!important;border-color:var(--live-orange)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.ip-menu-section-title{display:block!important;margin:20px 10px 8px!important;color:#94a3b8!important;font-size:12px!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.08em!important}


/* Igreja Gestão — UI Foundation v6.6.0 */
:root{--ig-bg:#f5f7fb;--ig-card:#fff;--ig-text:#0f172a;--ig-muted:#64748b;--ig-border:#e5eaf2;--ig-blue:#2563eb;--ig-blue2:#1d4ed8;--ig-purple:#7c3aed;--ig-green:#16a34a;--ig-red:#ef4444;--ig-orange:#f97316;--ig-side:#07111f;--ig-side2:#0f172a;--ig-shadow:0 10px 28px rgba(15,23,42,.06);--ig-shadow-lg:0 18px 52px rgba(15,23,42,.11)}
html body,body{background:radial-gradient(circle at 10% 0%,rgba(37,99,235,.07),transparent 34%),linear-gradient(180deg,#f8fbff,var(--ig-bg))!important;color:var(--ig-text)!important}
.app-shell,.ip-app-shell,.app-main,.main-content,#app-content,.content,.ip-content,.page-content,.pwa-content,main,.wrap{background:radial-gradient(circle at 10% 0%,rgba(37,99,235,.065),transparent 34%),radial-gradient(circle at 92% 0%,rgba(124,58,237,.045),transparent 30%),linear-gradient(180deg,#f8fbff,var(--ig-bg))!important;color:var(--ig-text)!important}
.app-header,.topbar,.ip-topbar,header.header,.header{background:rgba(255,255,255,.96)!important;backdrop-filter:blur(8px);border-bottom:1px solid rgba(226,232,240,.95)!important;box-shadow:0 6px 20px rgba(15,23,42,.04)!important;color:var(--ig-text)!important}
#app-sidebar,.app-sidebar,.sidebar,.menu-lateral,.side-menu{background:radial-gradient(circle at 30% 0%,rgba(37,99,235,.20),transparent 30%),linear-gradient(180deg,var(--ig-side),var(--ig-side2))!important;color:#e5e7eb!important;border-right:1px solid rgba(255,255,255,.08)!important;box-shadow:14px 0 38px rgba(15,23,42,.14)!important;padding:18px 14px!important}
#app-sidebar *,.app-sidebar *,.sidebar *,.menu-lateral *,.side-menu *{color:inherit}
#app-sidebar a,.app-sidebar a,.sidebar a,.menu-lateral a,.side-menu a,.nav-link,.menu-link{color:#dbeafe!important;min-height:42px!important;display:flex!important;align-items:center!important;gap:12px!important;padding:10px 13px!important;margin:3px 0!important;border-radius:13px!important;font-size:14.5px!important;font-weight:760!important;letter-spacing:-.01em!important}
#app-sidebar a:hover,.app-sidebar a:hover,.sidebar a:hover,.nav-link:hover,.menu-link:hover{background:rgba(255,255,255,.075)!important;color:#fff!important}
#app-sidebar a.active,.app-sidebar a.active,.sidebar a.active,.menu-link.active,.nav-link.active{background:linear-gradient(135deg,var(--ig-blue),var(--ig-blue2))!important;color:#fff!important;box-shadow:0 10px 22px rgba(37,99,235,.30)!important}
.ip-menu-section-title{display:block!important;margin:18px 10px 8px!important;color:#94a3b8!important;font-size:11.5px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.08em!important;line-height:1!important}
.ig-hero,.apple-premium-hero,.force-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero,.pwa-hero,.dashboard-hero{background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 52%,#7c3aed 100%)!important;color:#fff!important;border-radius:24px!important;padding:26px 28px!important;box-shadow:0 18px 46px rgba(37,99,235,.16)!important;border:1px solid rgba(255,255,255,.15)!important;overflow:hidden!important;position:relative!important;margin:0 0 22px!important}
.ig-hero:before,.apple-premium-hero:before,.force-premium-hero:before,.ip-react-hero:before,.ip-page-hero:before,.ip-bib-hero:before,.ip-module-hero:before,.page-hero:before,.module-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 55% -10%,rgba(255,255,255,.18),transparent 40%);pointer-events:none}
.ig-hero:after,.apple-premium-hero:after,.force-premium-hero:after,.ip-react-hero:after,.ip-page-hero:after,.ip-bib-hero:after,.ip-module-hero:after,.page-hero:after,.module-hero:after{content:"";position:absolute;right:42px;top:22px;width:150px;height:112px;border-radius:28px;background:rgba(255,255,255,.14);transform:rotate(-12deg);pointer-events:none}
.ig-hero h1,.ig-hero h2,.apple-premium-hero h1,.apple-premium-hero h2,.force-premium-hero h1,.force-premium-hero h2,.ip-react-hero h1,.ip-react-hero h2,.ip-page-hero h1,.ip-page-hero h2,.ip-bib-hero h1,.ip-bib-hero h2,.ip-module-hero h1,.ip-module-hero h2,.page-hero h1,.page-hero h2,.module-hero h1,.module-hero h2{color:#fff!important;-webkit-text-fill-color:#fff!important;margin:0!important;position:relative!important;z-index:1!important;font-size:clamp(28px,3.2vw,42px)!important;line-height:1.04!important;letter-spacing:-.055em!important}
.ig-hero p,.apple-premium-hero p,.force-premium-hero p,.ip-react-hero p,.ip-page-hero p,.ip-bib-hero p,.ip-module-hero p,.page-hero p,.module-hero p{color:rgba(255,255,255,.86)!important;-webkit-text-fill-color:rgba(255,255,255,.86)!important;max-width:760px!important;margin:8px 0 0!important;position:relative!important;z-index:1!important;font-size:15px!important}
.card,.ip-card,.dashboard-card,.stat-card,.panel,.widget,.box,.msg-card,.form-card,.content-card,.data-card,.ip-bi-card,.ip-bi-panel{background:#fff!important;color:var(--ig-text)!important;border:1px solid var(--ig-border)!important;border-radius:20px!important;box-shadow:var(--ig-shadow)!important}
.card:hover,.ip-card:hover,.dashboard-card:hover,.stat-card:hover,.panel:hover,.widget:hover{box-shadow:var(--ig-shadow-lg)!important;border-color:#d8e2ef!important}
h1,h2,h3,h4,h5,h6,.card h1,.card h2,.card h3,.ip-card h1,.ip-card h2,.ip-card h3,.panel h1,.panel h2,.panel h3{color:var(--ig-text)!important;-webkit-text-fill-color:var(--ig-text)!important}
small,.muted,.text-muted,.description,.help{color:var(--ig-muted)!important;-webkit-text-fill-color:var(--ig-muted)!important}
form h1,form h2,form h3,form h4,.form-title,.form-heading,label,form label,.form-label,fieldset label,.field-label{color:#1f2937!important;-webkit-text-fill-color:#1f2937!important;font-weight:800!important}
input:not([type="checkbox"]):not([type="radio"]),select,textarea,.form-control,.regular-text,.search-input{background:#fff!important;color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;border:1px solid #cbd5e1!important;border-radius:12px!important;padding:10px 12px!important;font-weight:620!important;box-shadow:none!important}
input::placeholder,textarea::placeholder{color:#94a3b8!important;-webkit-text-fill-color:#94a3b8!important}
table,.data-table,.wp-list-table{background:#fff!important;color:#0f172a!important;border:1px solid var(--ig-border)!important;border-radius:18px!important;overflow:hidden!important;box-shadow:var(--ig-shadow)!important;border-collapse:separate!important;border-spacing:0!important}
table th,.data-table th,.wp-list-table th{background:#f8fafc!important;color:#334155!important;-webkit-text-fill-color:#334155!important;font-size:12px!important;text-transform:uppercase!important;letter-spacing:.06em!important;font-weight:900!important}
table td,.data-table td,.wp-list-table td{color:#1f2937!important;-webkit-text-fill-color:#1f2937!important;border-bottom:1px solid #edf2f7!important}
.btn,.button,button,input[type="submit"],a.button{border-radius:12px!important;font-weight:850!important;text-decoration:none!important}
.btn-primary,.button-primary,button.primary,input[type="submit"].primary,input[type="submit"].button-primary{background:linear-gradient(135deg,var(--ig-blue),var(--ig-blue2))!important;border-color:var(--ig-blue)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-wa-send,.btn-whatsapp,a[href*="wa.me"],a[href*="whatsapp"]{background:var(--ig-green)!important;border-color:var(--ig-green)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-excluir,.btn-delete,.button-delete,.delete,button[data-action*="excluir"],button[data-action*="delete"],a[href*="excluir"],a[href*="delete"]{background:var(--ig-red)!important;border-color:var(--ig-red)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-editar,.btn-edit,button[data-action*="editar"],button[data-action*="edit"],.ip-editar-livro-tab,.ip-force-edit{background:var(--ig-blue)!important;border-color:var(--ig-blue)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-warning,.warning,button[data-action*="alerta"],button[data-action*="warning"]{background:var(--ig-orange)!important;border-color:var(--ig-orange)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.button:not(.button-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),.btn:not(.btn-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),button:not(.primary):not(.button-primary):not([data-action*="delete"]):not([data-action*="excluir"]):not([data-action*="edit"]):not([data-action*="editar"]){background:#fff!important;border:1px solid var(--ig-border)!important;color:#334155!important;-webkit-text-fill-color:#334155!important}
.empty-state,.ip-empty,.no-results,.ip-bib-empty{background:#fff!important;border:1px dashed #cbd5e1!important;border-radius:20px!important;color:var(--ig-muted)!important;padding:34px 20px!important;text-align:center!important}
@media(max-width:800px){.ig-hero,.apple-premium-hero,.force-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero{padding:22px!important;border-radius:22px!important}.ig-hero:after,.apple-premium-hero:after,.force-premium-hero:after,.ip-react-hero:after,.ip-page-hero:after,.ip-bib-hero:after,.ip-module-hero:after,.page-hero:after,.module-hero:after{width:110px;height:84px;right:-14px}}


/* ==========================================================================
   v6.6.1 — Form Title Contrast Fix
   Corrige títulos/labels brancos em formulários e modais.
   ========================================================================== */

.modal,
.modal-overlay,
.modal-content,
.ip-modal,
.ip-modal *,
.form-card,
.form-card *,
.form-wrapper,
.form-wrapper *,
.form-container,
.form-container *,
.panel form,
.card form,
.ip-card form {
  color: #1f2937 !important;
  -webkit-text-fill-color: #1f2937 !important;
}

form h1,
form h2,
form h3,
form h4,
form h5,
form h6,
.modal h1,
.modal h2,
.modal h3,
.modal h4,
.modal h5,
.modal h6,
.modal-title,
.form-title,
.form-heading,
.form-subtitle,
.form-section-title,
fieldset legend,
label,
form label,
.form-label,
.field-label,
.input-label,
.modal label,
.ip-modal label,
.card form label,
.panel form label,
.ip-card form label {
  color: #1f2937 !important;
  -webkit-text-fill-color: #1f2937 !important;
  font-weight: 800 !important;
}

form p,
form span,
form small,
form div,
.modal p,
.modal span,
.modal small,
.modal div,
.form-help,
.form-description,
.description {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.regular-text,
.search-input,
.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select,
.modal textarea,
.ip-modal input:not([type="checkbox"]):not([type="radio"]),
.ip-modal select,
.ip-modal textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

input::placeholder,
textarea::placeholder,
.modal input::placeholder,
.modal textarea::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* Mantém botões coloridos com texto branco */
button,
.button,
.btn,
input[type="submit"],
a.button,
.btn-primary,
.button-primary,
.btn-whatsapp,
.btn-wa-send,
.btn-delete,
.btn-excluir,
.btn-edit,
.btn-editar,
.btn-warning {
  -webkit-text-fill-color: currentColor !important;
}

.btn-primary,
.button-primary,
.btn-whatsapp,
.btn-wa-send,
.btn-delete,
.btn-excluir,
.btn-edit,
.btn-editar,
.btn-warning,
button.primary,
input[type="submit"].primary,
input[type="submit"].button-primary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}



/* ==========================================================================
v6.6.2 — Minimal Premium UI
========================================================================== */

.ip-react-banner,
.react-banner,
.react-pilot-banner,
[class*="react-pilot"],
[class*="pilot-react"],
.notice-react,
.notice-beta,
.beta-banner {
    display:none !important;
}

.ig-hero,
.apple-premium-hero,
.force-premium-hero,
.ip-react-hero,
.ip-page-hero,
.ip-bib-hero,
.ip-module-hero,
.page-hero,
.module-hero {
    padding:18px 22px !important;
    border-radius:20px !important;
    min-height:auto !important;
    box-shadow:0 10px 30px rgba(37,99,235,.12) !important;
}

.ig-hero p,
.apple-premium-hero p,
.force-premium-hero p,
.ip-react-hero p,
.ip-page-hero p,
.ip-bib-hero p,
.ip-module-hero p,
.page-hero p,
.module-hero p{
    display:none !important;
}

.ig-hero h1,
.apple-premium-hero h1,
.force-premium-hero h1,
.ip-react-hero h1,
.ip-page-hero h1,
.ip-bib-hero h1,
.ip-module-hero h1,
.page-hero h1,
.module-hero h1{
    font-size:clamp(24px,2.2vw,34px) !important;
    letter-spacing:-.04em !important;
}

#app-sidebar,
.app-sidebar,
.sidebar,
.menu-lateral,
.side-menu{
    width:250px !important;
    padding-top:14px !important;
}

#app-sidebar a,
.app-sidebar a,
.sidebar a,
.menu-lateral a,
.side-menu a{
    min-height:38px !important;
    border-radius:12px !important;
    font-size:14px !important;
}

.card,
.ip-card,
.dashboard-card,
.stat-card,
.panel,
.widget,
.box,
.msg-card,
.form-card,
.content-card,
.data-card{
    border-radius:18px !important;
    box-shadow:0 4px 18px rgba(15,23,42,.05) !important;
}

.card:hover,
.ip-card:hover,
.dashboard-card:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 24px rgba(15,23,42,.08) !important;
}

table,
.data-table,
.wp-list-table{
    border-radius:16px !important;
}

table td,
.data-table td,
.wp-list-table td{
    padding-top:14px !important;
    padding-bottom:14px !important;
}

.btn-primary,
.button-primary{
    background:#2563eb !important;
}


/* v6.6.5 — Dashboard Real Data + Top Cleanup */
body.ip-dashboard-pilot .ig-hero:first-child,
body.ip-dashboard-pilot .apple-premium-hero:first-child,
body.ip-dashboard-pilot .force-premium-hero:first-child,
body.ip-dashboard-pilot main > h1:first-child,
body.ip-dashboard-pilot .main-content > h1:first-child,
body.ip-dashboard-pilot .ip-content > h1:first-child {
  display:none !important;
}

.ip-dashboard-pilot-page .ig-hero,
.ip-dashboard-pilot-page .apple-premium-hero,
.ip-dashboard-pilot-page .force-premium-hero,
.ip-dashboard-pilot-page > h1,
.ip-dashboard-pilot-page > h2 {
  display:none !important;
}

.ip-dash-grid-secondary {
  margin-top:-4px;
}

.ip-dash-grid-secondary .ip-dash-kpi {
  padding:18px;
}

.ip-dash-grid-secondary .ip-dash-kpi-icon {
  width:48px;
  height:48px;
  font-size:22px;
}

.ip-dash-grid-secondary .ip-dash-kpi strong {
  font-size:26px;
}


/* v6.6.6 — Hero Quick Actions + Desktop Grid Fix */
.ip-dash-hero .ip-dash-title,
.ip-dash-hero .ip-dash-title *,
.ip-dash-hero h1.ip-dash-title{color:#fff!important;-webkit-text-fill-color:#fff!important}

.ip-dash-hero{min-height:260px!important;padding:30px 34px 84px!important}
.ip-dash-hero-top{align-items:flex-start!important}

.ip-dash-actions-expanded{
  display:flex!important;align-items:flex-end!important;flex-direction:column!important;
  gap:12px!important;width:min(560px,46vw);max-width:560px;position:relative;z-index:4
}
.ip-dash-date{align-self:flex-end}
.ip-dash-quick-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(190px,1fr));gap:10px;width:100%}
.ip-dash-quick-btn{
  min-height:42px;display:flex!important;align-items:center;justify-content:center;gap:8px;
  padding:0 14px;border-radius:13px;color:#fff!important;-webkit-text-fill-color:#fff!important;
  text-decoration:none!important;font-size:13px;font-weight:900;border:1px solid rgba(255,255,255,.16);
  box-shadow:0 10px 24px rgba(15,23,42,.14);white-space:nowrap
}
.ip-dash-quick-btn.green{background:linear-gradient(135deg,#16a34a,#059669)!important}
.ip-dash-quick-btn.blue{background:linear-gradient(135deg,#2563eb,#1d4ed8)!important}
.ip-dash-quick-btn.orange{background:linear-gradient(135deg,#f97316,#ea580c)!important}
.ip-dash-quick-btn.purple{background:linear-gradient(135deg,#7c3aed,#6d28d9)!important}

.ip-dash-grid-kpis{
  display:grid!important;grid-template-columns:repeat(4,minmax(220px,1fr))!important;
  gap:20px!important;align-items:stretch!important;width:100%!important
}
.ip-dash-kpi{min-width:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important}
.ip-dash-kpi-top{min-width:0!important}
.ip-dash-kpi small,.ip-dash-kpi strong,.ip-dash-trend{overflow-wrap:anywhere!important}
.ip-dash-main-grid{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr)!important;gap:22px!important;align-items:start!important}
.ip-dash-bottom-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:22px!important;align-items:start!important}
.ip-dash-panel{min-width:0!important;overflow:hidden!important}

@media(max-width:1280px){
  .ip-dash-grid-kpis{grid-template-columns:repeat(2,minmax(260px,1fr))!important}
  .ip-dash-actions-expanded{width:min(520px,50vw)}
}
@media(max-width:980px){
  .ip-dash-hero-top{flex-direction:column!important;align-items:flex-start!important}
  .ip-dash-actions-expanded{width:100%!important;max-width:none!important;align-items:flex-start!important}
  .ip-dash-date{align-self:flex-start}
  .ip-dash-quick-buttons{grid-template-columns:repeat(4,minmax(150px,1fr));overflow:auto;padding-bottom:4px}
  .ip-dash-main-grid,.ip-dash-bottom-grid{grid-template-columns:1fr!important}
}
@media(max-width:760px){
  .ip-dash-hero{min-height:auto!important;padding:22px 20px 76px!important}
  .ip-dash-grid-kpis{grid-template-columns:1fr!important;gap:16px!important}
  .ip-dash-quick-buttons{grid-template-columns:1fr 1fr!important;width:100%!important}
  .ip-dash-quick-btn{min-height:40px;font-size:12px;padding:0 10px}
}
@media(max-width:430px){.ip-dash-quick-buttons{grid-template-columns:1fr!important}}


/* ==========================================================================
   v6.6.7 — Dashboard Grid Fix
   Corrige cards sobrepostos: dashboard volta a ter linhas fixas e previsíveis.
   ========================================================================== */

/* Remove qualquer comportamento antigo de painel/tabs escondendo conteúdo */
.ip-dash-tab-panels,
.ip-dash-panel-screen,
.ip-dash-panel-screen.active {
  display:block !important;
  width:100% !important;
}

/* Container principal do dashboard */
.ip-dash-pilot {
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
}

/* KPIs: 4 colunas reais no desktop, sem sobreposição */
.ip-dash-grid-kpis {
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:20px !important;
  width:100% !important;
  margin:0 0 20px !important;
  align-items:stretch !important;
  clear:both !important;
}

.ip-dash-grid-secondary {
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:20px !important;
  width:100% !important;
  margin:0 0 20px !important;
  clear:both !important;
}

/* Cards não podem ultrapassar coluna */
.ip-dash-kpi,
.ip-dash-panel {
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

/* Linha de gráficos: 2 colunas */
.ip-dash-main-grid {
  display:grid !important;
  grid-template-columns:minmax(0, 1.4fr) minmax(360px, .85fr) !important;
  gap:22px !important;
  width:100% !important;
  margin:0 0 20px !important;
  align-items:stretch !important;
  clear:both !important;
}

/* Linha inferior: 2 colunas */
.ip-dash-bottom-grid {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) !important;
  gap:22px !important;
  width:100% !important;
  margin:0 0 20px !important;
  align-items:stretch !important;
  clear:both !important;
}

/* Corrige o painel gráfico para não virar coluna estreita */
.ip-dash-main-grid > .ip-dash-panel,
.ip-dash-bottom-grid > .ip-dash-panel {
  width:100% !important;
}

/* Garante que o gráfico respeite largura do card */
.ip-dash-chart,
.ip-dash-line-svg {
  width:100% !important;
  max-width:100% !important;
}

/* Evita texto espremido quebrando layout */
.ip-dash-panel h2,
.ip-dash-activity-title,
.ip-dash-event-title {
  overflow-wrap:normal !important;
  word-break:normal !important;
}

/* Tira tabs "quebradas" como navegação real por enquanto: ficam como abas visuais do hero */
.ip-dash-tab {
  cursor:default !important;
}

.ip-dash-tab:not(.active) {
  opacity:.82;
}

/* Desktop menor */
@media(max-width:1280px){
  .ip-dash-grid-kpis,
  .ip-dash-grid-secondary {
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  .ip-dash-main-grid,
  .ip-dash-bottom-grid {
    grid-template-columns:1fr !important;
  }
}

/* Tablet/mobile */
@media(max-width:760px){
  .ip-dash-grid-kpis,
  .ip-dash-grid-secondary,
  .ip-dash-main-grid,
  .ip-dash-bottom-grid {
    grid-template-columns:1fr !important;
    gap:16px !important;
  }

  .ip-dash-kpi,
  .ip-dash-panel {
    width:100% !important;
  }
}


/* ==========================================================================
   v6.7.1 — Dashboard Hero Tabs Glass
   ========================================================================== */

/* Dashboard em branco ao lado do ícone */
.ipdr-title-group {
  display:flex !important;
  align-items:center !important;
  gap:18px !important;
}

.ipdr-title-group h1,
.ipdr-dashboard-title {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  margin:0 !important;
  text-shadow:0 8px 24px rgba(0,0,0,.18);
}

/* Abas com visual glass */
.ipdr-tabs {
  align-items:center !important;
  gap:10px !important;
  border-top:1px solid rgba(255,255,255,.16) !important;
  padding-top:10px !important;
  padding-bottom:10px !important;
}

.ipdr-tab {
  min-height:42px !important;
  padding:0 15px !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
  cursor:pointer !important;
  transition:all .18s ease;
}

.ipdr-tab:hover {
  background:rgba(255,255,255,.16) !important;
  transform:translateY(-1px);
}

.ipdr-tab.active {
  background:rgba(255,255,255,.24) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  box-shadow:0 12px 28px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.16);
}

.ipdr-tab.active::after {
  display:none !important;
}

/* Tabs reais */
.ipdr-tab-panel {
  display:none !important;
}

.ipdr-tab-panel.active {
  display:block !important;
}

.ipdr-tab-kpis {
  margin-bottom:0 !important;
}

/* Ajuste de espaçamento após hero */
.ipdr-tab-panels {
  width:100%;
}

/* mobile */
@media(max-width:760px){
  .ipdr-tabs {
    align-items:center !important;
    padding-bottom:10px !important;
  }

  .ipdr-tab {
    min-height:38px !important;
    padding:0 12px !important;
  }
}


/* ==========================================================================
   v6.8.0 — Mobile UX Polish
   Login, safe-area mobile, botões legíveis e acabamento PWA.
   ========================================================================== */

:root{
  --ux-blue:#2563eb;
  --ux-blue2:#1d4ed8;
  --ux-purple:#7c3aed;
  --ux-green:#16a34a;
  --ux-red:#dc2626;
  --ux-orange:#f97316;
  --ux-text:#0f172a;
  --ux-muted:#64748b;
  --ux-border:#dbe4f0;
}

/* --------------------------------------------------------------------------
   1. Safe-area mobile / topo branco
   -------------------------------------------------------------------------- */
@media(max-width: 820px){
  body,
  body.ip-app,
  html body{
    background:
      linear-gradient(180deg,#133f78 0, #1e5f9e 92px, #f5f7fb 260px) !important;
  }

  .app-header,
  .topbar,
  .ip-topbar,
  header,
  .header{
    background:
      linear-gradient(135deg, rgba(15,23,42,.92), rgba(37,99,235,.82), rgba(124,58,237,.78)) !important;
    backdrop-filter:blur(14px) !important;
    -webkit-backdrop-filter:blur(14px) !important;
    border-bottom:1px solid rgba(255,255,255,.16) !important;
    box-shadow:0 10px 30px rgba(15,23,42,.18) !important;
    color:#fff !important;
  }

  .app-header *,
  .topbar *,
  .ip-topbar *,
  header *,
  .header *{
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
  }

  #btn-menu,
  .btn-menu,
  .menu-toggle,
  .hamburger{
    background:rgba(255,255,255,.18) !important;
    border:1px solid rgba(255,255,255,.28) !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    box-shadow:0 12px 28px rgba(15,23,42,.18) !important;
  }

  .app-main,
  .main-content,
  #app-content,
  .content,
  .ip-content,
  main{
    padding-top:12px !important;
  }
}

/* --------------------------------------------------------------------------
   2. Login premium / inputs com ícones sem sobrepor placeholder
   -------------------------------------------------------------------------- */
.login-card,
.ip-login-card,
.auth-card,
.login-box,
.ip-auth-card{
  border-radius:28px !important;
  box-shadow:0 24px 80px rgba(15,23,42,.16) !important;
  border:1px solid rgba(226,232,240,.9) !important;
  background:rgba(255,255,255,.96) !important;
}

.login-card input:not([type="checkbox"]):not([type="radio"]),
.ip-login-card input:not([type="checkbox"]):not([type="radio"]),
.auth-card input:not([type="checkbox"]):not([type="radio"]),
.login-box input:not([type="checkbox"]):not([type="radio"]),
.ip-auth-card input:not([type="checkbox"]):not([type="radio"]){
  min-height:58px !important;
  border-radius:16px !important;
  padding-left:58px !important;
  font-size:18px !important;
  font-weight:750 !important;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
  background:#fff !important;
  border:1px solid #cbd5e1 !important;
}

.login-card input::placeholder,
.ip-login-card input::placeholder,
.auth-card input::placeholder,
.login-box input::placeholder,
.ip-auth-card input::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
  opacity:1 !important;
}

/* ícones em campos de login */
.login-card .input-icon,
.ip-login-card .input-icon,
.auth-card .input-icon,
.login-box .input-icon,
.ip-auth-card .input-icon,
.login-card .field-icon,
.ip-login-card .field-icon,
.auth-card .field-icon,
.login-box .field-icon,
.ip-auth-card .field-icon{
  position:absolute !important;
  left:18px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  z-index:2 !important;
  pointer-events:none !important;
  opacity:.9 !important;
}

/* fallback para emojis soltos antes dos inputs */
.login-card label + input,
.ip-login-card label + input,
.auth-card label + input,
.login-box label + input{
  margin-top:8px !important;
}

/* Segmented control login */
.login-tabs,
.auth-tabs,
.ip-login-tabs,
.login-method-tabs{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:0 !important;
  padding:4px !important;
  border:1px solid #dbe4f0 !important;
  border-radius:18px !important;
  background:#f8fafc !important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.04) !important;
}

.login-tabs button,
.auth-tabs button,
.ip-login-tabs button,
.login-method-tabs button,
.login-tabs a,
.auth-tabs a,
.ip-login-tabs a,
.login-method-tabs a{
  min-height:52px !important;
  border-radius:15px !important;
  border:0 !important;
  background:transparent !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  font-weight:900 !important;
  text-align:center !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.login-tabs .active,
.auth-tabs .active,
.ip-login-tabs .active,
.login-method-tabs .active,
.login-tabs button[aria-selected="true"],
.auth-tabs button[aria-selected="true"],
.ip-login-tabs button[aria-selected="true"]{
  background:linear-gradient(135deg,var(--ux-blue),var(--ux-purple)) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  box-shadow:0 12px 28px rgba(37,99,235,.22) !important;
}

/* botão login */
.login-card button[type="submit"],
.ip-login-card button[type="submit"],
.auth-card button[type="submit"],
.login-box button[type="submit"],
.ip-auth-card button[type="submit"],
.login-card input[type="submit"],
.ip-login-card input[type="submit"],
.auth-card input[type="submit"],
.login-box input[type="submit"]{
  min-height:58px !important;
  border-radius:17px !important;
  background:linear-gradient(135deg,var(--ux-blue),var(--ux-purple)) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  font-size:18px !important;
  font-weight:950 !important;
  box-shadow:0 16px 34px rgba(37,99,235,.22) !important;
}

/* --------------------------------------------------------------------------
   3. Botões ilegíveis / ações em cards, mensagens, visitantes
   -------------------------------------------------------------------------- */
.btn-wa-send,
.btn-whatsapp,
a[href*="wa.me"],
a[href*="whatsapp"],
button[data-action*="whatsapp"],
button[data-action*="wa"]{
  background:var(--ux-green) !important;
  border-color:var(--ux-green) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-excluir,
.btn-delete,
.button-delete,
.delete,
button[data-action*="excluir"],
button[data-action*="delete"],
button[data-action*="remover"],
a[href*="excluir"],
a[href*="delete"],
a[href*="remover"]{
  background:var(--ux-red) !important;
  border-color:var(--ux-red) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-editar,
.btn-edit,
button[data-action*="editar"],
button[data-action*="edit"],
a[href*="editar"],
a[href*="edit"]{
  background:var(--ux-blue) !important;
  border-color:var(--ux-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-responder,
.btn-reply,
button[data-action*="responder"],
button[data-action*="reply"],
button[data-action*="reenviar"],
.btn-mark-sent,
.btn-mark-sent *,
button.btn-mark-sent{
  background:var(--ux-blue) !important;
  border-color:var(--ux-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* Botões pequenos de cards no mobile */
@media(max-width:820px){
  .msg-card button,
  .msg-card a.button,
  .msg-card .btn,
  .visitor-card button,
  .visitor-card a.button,
  .visitor-card .btn,
  .card-actions button,
  .card-actions a,
  .actions button,
  .actions a{
    min-height:46px !important;
    min-width:52px !important;
    border-radius:14px !important;
    font-size:16px !important;
    font-weight:900 !important;
    box-shadow:0 8px 20px rgba(15,23,42,.10) !important;
  }

  .msg-card .actions,
  .msg-card .card-actions,
  .visitor-card .actions,
  .visitor-card .card-actions,
  .card-actions,
  .actions{
    gap:10px !important;
    flex-wrap:wrap !important;
  }

  /* se tiver apenas ícone, pelo menos deixa legível */
  .msg-card button:not(.btn-wa-send):not(.btn-whatsapp):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
  .visitor-card button:not(.btn-wa-send):not(.btn-whatsapp):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar){
    background:#fff !important;
    color:#0f172a !important;
    -webkit-text-fill-color:#0f172a !important;
    border:1px solid #cbd5e1 !important;
  }
}

/* --------------------------------------------------------------------------
   4. Cards mobile mais confortáveis
   -------------------------------------------------------------------------- */
@media(max-width:820px){
  .msg-card,
  .visitor-card,
  .ip-card,
  .card,
  .panel{
    border-radius:22px !important;
  }

  .msg-card,
  .visitor-card{
    padding:18px !important;
  }

  .msg-card textarea,
  .visitor-card textarea{
    font-size:16px !important;
    line-height:1.45 !important;
  }
}


/* v6.9.0 — Visitor Workflow Rules */
.ip-v690-filters,
.ip-v690-filter-form{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
}
.ip-v690-filter-form .form-control{
  min-width:150px;
}
.ip-v690-filter-form input[type="search"]{
  min-width:240px;
  flex:1;
}
@media(max-width:760px){
  .ip-v690-filter-form .form-control,
  .ip-v690-filter-form input[type="search"],
  .ip-v690-filter-form button,
  .ip-v690-filter-form a{
    width:100%;
  }
}


/* ==========================================================================
   v6.9.1 — Visitors UI Rebuild
   Camada visual segura: não altera endpoints, regras ou vínculos.
   ========================================================================== */

:root{
  --v691-bg:#f5f7fb;
  --v691-card:#fff;
  --v691-text:#0f172a;
  --v691-muted:#64748b;
  --v691-border:#e5eaf2;
  --v691-blue:#2563eb;
  --v691-purple:#7c3aed;
  --v691-green:#16a34a;
  --v691-orange:#f97316;
  --v691-red:#dc2626;
  --v691-shadow:0 14px 38px rgba(15,23,42,.07);
}

body.ip-visitors-ui-v691 .app-page,
body.ip-visitors-ui-v691 .main-content,
body.ip-visitors-ui-v691 .ip-content{
  background:
    radial-gradient(circle at 12% 0%,rgba(37,99,235,.08),transparent 34%),
    linear-gradient(180deg,#f8fbff,#f5f7fb) !important;
}

/* HERO */
.ip-v691-hero{
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.20), transparent 34%),
    linear-gradient(135deg,#0f172a 0%,#2563eb 52%,#7c3aed 100%);
  border-radius:28px;
  padding:30px;
  color:#fff;
  margin:0 0 22px;
  box-shadow:0 24px 70px rgba(37,99,235,.18);
  overflow:hidden;
  position:relative;
}

.ip-v691-hero:after{
  content:"";
  position:absolute;
  right:52px;
  top:30px;
  width:160px;
  height:112px;
  border-radius:32px;
  background:rgba(255,255,255,.13);
  transform:rotate(-14deg);
}

.ip-v691-hero-main{
  position:relative;
  z-index:2;
  display:flex;
  justify-content:space-between;
  gap:22px;
  align-items:flex-start;
}

.ip-v691-title{
  display:flex;
  align-items:center;
  gap:18px;
}

.ip-v691-icon{
  width:72px;
  height:72px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:38px;
  background:rgba(255,255,255,.16);
}

.ip-v691-title h1{
  margin:0!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-size:clamp(34px,4vw,52px)!important;
  line-height:1!important;
  letter-spacing:-.06em!important;
}

.ip-v691-title p{
  margin:8px 0 0;
  color:rgba(255,255,255,.82)!important;
  -webkit-text-fill-color:rgba(255,255,255,.82)!important;
  font-size:15px;
  font-weight:700;
}

.ip-v691-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  max-width:520px;
}

.ip-v691-action{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 15px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.14);
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-weight:900;
  text-decoration:none!important;
  backdrop-filter:blur(10px);
}

.ip-v691-action.primary{
  background:linear-gradient(135deg,#ffffff,#eef2ff)!important;
  color:#1d4ed8!important;
  -webkit-text-fill-color:#1d4ed8!important;
}

/* KPI */
.ip-v691-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
  margin:0 0 22px;
}

.ip-v691-kpi{
  background:rgba(255,255,255,.9);
  border:1px solid var(--v691-border);
  border-radius:20px;
  padding:18px;
  box-shadow:var(--v691-shadow);
}

.ip-v691-kpi span{
  display:block;
  color:var(--v691-muted)!important;
  -webkit-text-fill-color:var(--v691-muted)!important;
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}

.ip-v691-kpi strong{
  display:block;
  color:var(--v691-text)!important;
  -webkit-text-fill-color:var(--v691-text)!important;
  font-size:28px;
  line-height:1;
}

.ip-v691-kpi small{
  display:block;
  margin-top:10px;
  color:#059669!important;
  -webkit-text-fill-color:#059669!important;
  font-size:12px;
  font-weight:850;
}

/* Toolbar/filtros */
body.ip-visitors-ui-v691 .filters,
body.ip-visitors-ui-v691 .ip-v690-filters{
  background:#fff!important;
  border:1px solid var(--v691-border)!important;
  border-radius:22px!important;
  box-shadow:var(--v691-shadow)!important;
  padding:16px!important;
  margin-bottom:18px!important;
}

body.ip-visitors-ui-v691 .filters form,
body.ip-visitors-ui-v691 .ip-v690-filter-form{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  align-items:center!important;
}

body.ip-visitors-ui-v691 .filters input,
body.ip-visitors-ui-v691 .filters select,
body.ip-visitors-ui-v691 .ip-v690-filter-form input,
body.ip-visitors-ui-v691 .ip-v690-filter-form select{
  min-height:42px!important;
  border-radius:13px!important;
  border:1px solid #cbd5e1!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  font-weight:750!important;
}

/* Cards existentes viram cards pastorais */
body.ip-visitors-ui-v691 .visitor-card,
body.ip-visitors-ui-v691 .msg-card,
body.ip-visitors-ui-v691 .card,
body.ip-visitors-ui-v691 .data-card{
  border-radius:22px!important;
  border:1px solid var(--v691-border)!important;
  box-shadow:var(--v691-shadow)!important;
  background:#fff!important;
}

/* Tabela modo clássico mais premium */
body.ip-visitors-ui-v691 table,
body.ip-visitors-ui-v691 .data-table,
body.ip-visitors-ui-v691 .wp-list-table{
  border-radius:22px!important;
  overflow:hidden!important;
  box-shadow:var(--v691-shadow)!important;
  border:1px solid var(--v691-border)!important;
}

body.ip-visitors-ui-v691 table th,
body.ip-visitors-ui-v691 .data-table th{
  background:#f8fafc!important;
  color:#475569!important;
  -webkit-text-fill-color:#475569!important;
  font-size:12px!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
}

body.ip-visitors-ui-v691 table td,
body.ip-visitors-ui-v691 .data-table td{
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
}

/* Tags criadas via JS */
.ip-v691-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border-radius:999px;
  padding:6px 9px;
  font-size:11px;
  font-weight:900;
  background:#eef2ff;
  color:#4f46e5!important;
  -webkit-text-fill-color:#4f46e5!important;
  margin:2px;
}

.ip-v691-chip.green{background:#ecfdf5;color:#047857!important;-webkit-text-fill-color:#047857!important}
.ip-v691-chip.orange{background:#fff7ed;color:#c2410c!important;-webkit-text-fill-color:#c2410c!important}
.ip-v691-chip.pink{background:#fdf2f8;color:#be185d!important;-webkit-text-fill-color:#be185d!important}

.ip-v691-side-note{
  background:linear-gradient(135deg,#312e81,#7c3aed);
  color:#fff;
  border-radius:22px;
  padding:18px;
  box-shadow:0 18px 44px rgba(124,58,237,.22);
  margin-top:18px;
}
.ip-v691-side-note *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Botões */
body.ip-visitors-ui-v691 .btn-wa-send,
body.ip-visitors-ui-v691 .btn-whatsapp,
body.ip-visitors-ui-v691 a[href*="wa.me"],
body.ip-visitors-ui-v691 a[href*="whatsapp"]{
  background:#16a34a!important;
  border-color:#16a34a!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:1280px){
  .ip-v691-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .ip-v691-hero{border-radius:24px;padding:22px;margin-bottom:16px}
  .ip-v691-hero-main{flex-direction:column}
  .ip-v691-icon{width:58px;height:58px;font-size:30px}
  .ip-v691-title h1{font-size:34px!important}
  .ip-v691-actions{width:100%;justify-content:flex-start}
  .ip-v691-action{flex:1;justify-content:center}
  .ip-v691-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .ip-v691-kpi{padding:14px}
  .ip-v691-kpi strong{font-size:24px}
  body.ip-visitors-ui-v691 .filters input,
  body.ip-visitors-ui-v691 .filters select,
  body.ip-visitors-ui-v691 .filters button,
  body.ip-visitors-ui-v691 .filters a{
    width:100%!important;
  }
}


/* ==========================================================================
   v6.9.2 — Visitors UI Scope Fix
   Garante que o cabeçalho/KPIs de Visitantes não vazem para outros módulos.
   ========================================================================== */

body:not(.ip-visitors-ui-v691) .ip-v691-hero,
body:not(.ip-visitors-ui-v691) .ip-v691-kpis,
body:not(.ip-visitors-ui-v691) .ip-v691-side-note {
  display:none !important;
}

/* Só permite hero/KPIs de visitantes quando a classe correta existir no body */
body.ip-visitors-ui-v691 .ip-v691-hero,
body.ip-visitors-ui-v691 .ip-v691-kpis {
  display:grid;
}

body.ip-visitors-ui-v691 .ip-v691-hero {
  display:block;
}


/* ==========================================================================
   v6.9.4 — Visitors Timeline + Compact Pagination Fix
   ========================================================================== */

/* Paginação compacta */
body.ip-visitors-ui-v691 .pagination,
body.ip-visitors-ui-v691 .tablenav-pages,
body.ip-visitors-ui-v691 .page-numbers,
body.ip-visitors-ui-v691 .ip-pagination{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
  justify-content:center !important;
  margin:24px 0 !important;
}

body.ip-visitors-ui-v691 .pagination a,
body.ip-visitors-ui-v691 .pagination span,
body.ip-visitors-ui-v691 .tablenav-pages a,
body.ip-visitors-ui-v691 .tablenav-pages span,
body.ip-visitors-ui-v691 .page-numbers a,
body.ip-visitors-ui-v691 .page-numbers span,
body.ip-visitors-ui-v691 .ip-pagination a,
body.ip-visitors-ui-v691 .ip-pagination span{
  min-width:42px !important;
  height:42px !important;
  border-radius:13px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border:1px solid #dbe4f0 !important;
  background:#fff !important;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
  font-weight:850 !important;
  text-decoration:none !important;
  box-shadow:0 8px 20px rgba(15,23,42,.04) !important;
}

body.ip-visitors-ui-v691 .pagination .current,
body.ip-visitors-ui-v691 .tablenav-pages .current,
body.ip-visitors-ui-v691 .page-numbers .current,
body.ip-visitors-ui-v691 .ip-pagination .current{
  background:linear-gradient(135deg,#2563eb,#7c3aed) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:transparent !important;
}

/* Esconde excesso quando a paginação legada imprime páginas demais */
body.ip-visitors-ui-v691 .pagination a:nth-of-type(n+8):not(:last-child),
body.ip-visitors-ui-v691 .pagination span:nth-of-type(n+8):not(:last-child),
body.ip-visitors-ui-v691 .ip-pagination a:nth-of-type(n+8):not(:last-child),
body.ip-visitors-ui-v691 .ip-pagination span:nth-of-type(n+8):not(:last-child){
  display:none !important;
}

.ip-v694-pagination-note{
  text-align:center;
  margin:8px 0 18px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}

/* Timeline e jornada fixas dentro de Visitantes */
.ip-v694-journey-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:20px;
  align-items:start;
  margin-top:20px;
}

.ip-v694-timeline-side{
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:18px;
}

.ip-v694-box{
  background:#fff;
  border:1px solid #e5eaf2;
  border-radius:24px;
  box-shadow:0 14px 38px rgba(15,23,42,.07);
  padding:20px;
}

.ip-v694-box h3{
  margin:0 0 16px!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  font-size:18px!important;
}

.ip-v694-journey{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.ip-v694-step{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:12px;
  position:relative;
}

.ip-v694-step:not(:last-child):after{
  content:"";
  position:absolute;
  left:9px;
  top:23px;
  width:3px;
  height:calc(100% + 4px);
  background:#dbeafe;
  border-radius:999px;
}

.ip-v694-dot{
  width:20px;
  height:20px;
  border-radius:999px;
  background:#cbd5e1;
  margin-top:1px;
  position:relative;
  z-index:2;
}

.ip-v694-dot.done{
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  box-shadow:0 0 0 5px rgba(37,99,235,.10);
}

.ip-v694-step strong{
  display:block;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  font-size:14px;
}

.ip-v694-step span{
  display:block;
  color:#64748b!important;
  -webkit-text-fill-color:#64748b!important;
  font-size:12px;
  margin-top:2px;
}

.ip-v694-event{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid #edf2f7;
}

.ip-v694-event:last-child{
  border-bottom:0;
}

.ip-v694-event-icon{
  width:36px;
  height:36px;
  border-radius:13px;
  background:#eef2ff;
  color:#4f46e5;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ip-v694-event strong{
  display:block;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  font-size:13px;
}

.ip-v694-event span{
  display:block;
  color:#64748b!important;
  -webkit-text-fill-color:#64748b!important;
  font-size:12px;
  margin-top:2px;
}

.ip-v694-note{
  background:linear-gradient(135deg,#312e81,#7c3aed);
  color:#fff;
}

.ip-v694-note *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:1100px){
  .ip-v694-journey-wrap{
    grid-template-columns:1fr;
  }
  .ip-v694-timeline-side{
    position:static;
  }
}

@media(max-width:760px){
  .ip-v694-box{
    border-radius:20px;
    padding:16px;
  }

  body.ip-visitors-ui-v691 .pagination,
  body.ip-visitors-ui-v691 .ip-pagination{
    justify-content:flex-start!important;
    overflow:auto!important;
    flex-wrap:nowrap!important;
    padding-bottom:8px;
  }
}


/* v6.9.5 — GC status/tag fix */
.ip-gc-status-badge,
.gc-status-badge,
.status-badge,
.badge-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  background:#eef2ff;
  color:#4338ca !important;
  -webkit-text-fill-color:#4338ca !important;
  white-space:nowrap;
}

.ip-gc-status-aguardando{
  background:#fef3c7 !important;
  color:#92400e !important;
  -webkit-text-fill-color:#92400e !important;
}

.ip-gc-status-contatado{
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
}

.ip-gc-status-encaminhado{
  background:#ede9fe !important;
  color:#6d28d9 !important;
  -webkit-text-fill-color:#6d28d9 !important;
}

.ip-gc-status-integrado{
  background:#dcfce7 !important;
  color:#166534 !important;
  -webkit-text-fill-color:#166534 !important;
}

.ip-gc-status-sem-retorno,
.ip-gc-status-desistiu{
  background:#fee2e2 !important;
  color:#991b1b !important;
  -webkit-text-fill-color:#991b1b !important;
}


/* v6.9.6 — Dashboard Add Visitor First */
.ip-dash-quick-btn,
button.ip-dash-quick-btn{
  border:1px solid rgba(255,255,255,.16);
  cursor:pointer;
}


/* v6.9.8 — Dashboard inline visitor modal */
.ipdr-quick-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

.ip-dash-quick-buttons{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

.modal-visitante-dashboard-inline{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  z-index:99999;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.modal-visitante-dashboard-inline.open,
.modal-visitante-dashboard-inline.active,
.modal-visitante-dashboard-inline.show{
  display:flex !important;
}

.modal-visitante-dashboard-inline .modal-content{
  width:min(760px,96vw);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:24px;
  box-shadow:0 30px 90px rgba(15,23,42,.28);
  padding:26px;
  position:relative;
}

.modal-visitante-dashboard-inline h2{
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  margin:0 0 20px!important;
}

.modal-visitante-dashboard-inline .modal-close{
  position:absolute;
  right:18px;
  top:16px;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid #e5eaf2;
  background:#fff;
  font-size:24px;
  cursor:pointer;
}

.modal-visitante-dashboard-inline .form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.modal-visitante-dashboard-inline .form-group{
  margin-bottom:14px;
}

.modal-visitante-dashboard-inline label{
  display:block;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  font-weight:850;
  font-size:13px;
  margin-bottom:7px;
}

.modal-visitante-dashboard-inline .form-control{
  width:100%;
  min-height:44px;
  border:1px solid #cbd5e1!important;
  border-radius:13px!important;
  color:#0f172a!important;
  -webkit-text-fill-color:#0f172a!important;
  background:#fff!important;
  padding:0 12px;
}

.modal-visitante-dashboard-inline textarea.form-control{
  padding:12px;
}

.modal-visitante-dashboard-inline .checkbox-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.modal-visitante-dashboard-inline .checkbox-grid label{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:9px;
  background:#f8fafc;
  border:1px solid #e5eaf2;
  border-radius:13px;
  padding:0 12px;
  margin:0;
}

.modal-visitante-dashboard-inline .modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

@media(max-width:760px){
  .ipdr-quick-grid,
  .ip-dash-quick-buttons{
    grid-template-columns:1fr !important;
  }

  .modal-visitante-dashboard-inline{
    padding:12px;
    align-items:flex-end;
  }

  .modal-visitante-dashboard-inline .modal-content{
    width:100%;
    max-height:92vh;
    border-radius:24px 24px 0 0;
    padding:22px;
  }

  .modal-visitante-dashboard-inline .form-grid,
  .modal-visitante-dashboard-inline .checkbox-grid{
    grid-template-columns:1fr;
  }

  .modal-visitante-dashboard-inline .modal-actions{
    flex-direction:column-reverse;
  }

  .modal-visitante-dashboard-inline .modal-actions .btn{
    width:100%;
  }
}


/* v6.9.9 — Visitors Mobile Bottom Navigation */
@media(max-width:820px){
  body.ip-v699-visitors-mobile{padding-bottom:88px!important;background:#f5f7fb!important}

  body.ip-v699-visitors-mobile .app-header,
  body.ip-v699-visitors-mobile .ip-topbar,
  body.ip-v699-visitors-mobile .topbar,
  body.ip-v699-visitors-mobile header.header{
    min-height:76px!important;
    background:linear-gradient(135deg,#0f172a 0%,#2563eb 55%,#7c3aed 100%)!important;
    border-bottom:1px solid rgba(255,255,255,.12)!important;
    box-shadow:0 8px 28px rgba(15,23,42,.14)!important;
  }

  body.ip-v699-visitors-mobile .app-header h1,
  body.ip-v699-visitors-mobile .app-header .page-title,
  body.ip-v699-visitors-mobile .ip-topbar h1,
  body.ip-v699-visitors-mobile .ip-topbar .page-title,
  body.ip-v699-visitors-mobile .topbar h1,
  body.ip-v699-visitors-mobile .topbar .page-title{display:none!important}

  body.ip-v699-visitors-mobile #btn-menu,
  body.ip-v699-visitors-mobile .btn-menu,
  body.ip-v699-visitors-mobile .menu-toggle,
  body.ip-v699-visitors-mobile .hamburger{
    background:rgba(255,255,255,.16)!important;
    border:1px solid rgba(255,255,255,.24)!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    box-shadow:0 12px 28px rgba(15,23,42,.18)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  body.ip-v699-visitors-mobile .ip-v691-hero{
    margin-top:0!important;
    border-radius:0 0 24px 24px!important;
    padding:28px 20px 22px!important;
    min-height:auto!important;
  }

  body.ip-v699-visitors-mobile .ip-v691-icon{
    width:58px!important;height:58px!important;border-radius:18px!important;font-size:30px!important;
  }

  body.ip-v699-visitors-mobile .ip-v691-title h1{font-size:40px!important;line-height:1!important}
  body.ip-v699-visitors-mobile .ip-v691-title p{font-size:15px!important;line-height:1.35!important;max-width:94%!important}

  body.ip-v699-visitors-mobile .ip-v691-actions{
    display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:10px!important;width:100%!important;margin-top:18px!important;
  }

  body.ip-v699-visitors-mobile .ip-v691-action{
    min-height:54px!important;border-radius:16px!important;justify-content:center!important;padding:0 10px!important;font-size:14px!important;
  }

  body.ip-v699-visitors-mobile .ip-v691-kpis{display:none!important}

  body.ip-v699-visitors-mobile .module-hero:not(.ip-v691-hero),
  body.ip-v699-visitors-mobile .page-hero:not(.ip-v691-hero),
  body.ip-v699-visitors-mobile .force-premium-hero:not(.ip-v691-hero),
  body.ip-v699-visitors-mobile .apple-premium-hero:not(.ip-v691-hero),
  body.ip-v699-visitors-mobile .ip-page-hero:not(.ip-v691-hero){display:none!important}

  body.ip-v699-visitors-mobile .app-page>h1,
  body.ip-v699-visitors-mobile .app-page>h2{display:none!important}

  .ip-v699-bottom-nav{
    position:fixed;left:12px;right:12px;bottom:10px;z-index:99998;height:68px;border-radius:24px;
    background:rgba(255,255,255,.92);border:1px solid rgba(226,232,240,.9);
    box-shadow:0 20px 60px rgba(15,23,42,.18);
    backdrop-filter:blur(18px) saturate(160%);-webkit-backdrop-filter:blur(18px) saturate(160%);
    display:grid;grid-template-columns:repeat(5,1fr);align-items:center;padding:6px;
  }
  .ip-v699-bottom-nav a,.ip-v699-bottom-nav button{
    appearance:none;border:0;background:transparent;height:56px;border-radius:18px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:3px;color:#64748b!important;-webkit-text-fill-color:#64748b!important;
    font-size:11px;font-weight:900;text-decoration:none;
  }
  .ip-v699-bottom-nav .icon{font-size:21px;line-height:1}
  .ip-v699-bottom-nav .active{background:#eef2ff;color:#2563eb!important;-webkit-text-fill-color:#2563eb!important}
  .ip-v699-bottom-nav .fab{
    width:58px;height:58px;border-radius:999px;margin:auto;transform:translateY(-16px);
    background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
    box-shadow:0 18px 42px rgba(37,99,235,.36);font-size:0;
  }
  .ip-v699-bottom-nav .fab .icon{font-size:32px}

  .ip-v699-more-sheet{
    position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.42);
    backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:none;align-items:flex-end;
  }
  .ip-v699-more-sheet.open{display:flex}
  .ip-v699-more-panel{width:100%;max-height:82vh;background:#fff;border-radius:28px 28px 0 0;box-shadow:0 -20px 70px rgba(15,23,42,.22);padding:22px;overflow:auto}
  .ip-v699-more-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
  .ip-v699-more-head h3{margin:0!important;color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;font-size:22px!important}
  .ip-v699-more-close{width:42px;height:42px;border-radius:14px;border:1px solid #e2e8f0;background:#f8fafc;font-size:22px}
  .ip-v699-more-list{display:grid;gap:8px}
  .ip-v699-more-list a,.ip-v699-more-list button{
    min-height:52px;border-radius:16px;border:1px solid #e5eaf2;background:#fff;display:flex;align-items:center;gap:12px;padding:0 14px;
    color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;font-weight:850;text-decoration:none;
  }
}


/* v6.10.0 — Visitors Mobile Cleanup */
@media(max-width:820px){

  body.ip-v699-visitors-mobile .app-header,
  body.ip-v699-visitors-mobile .ip-topbar,
  body.ip-v699-visitors-mobile .topbar,
  body.ip-v699-visitors-mobile header.header,
  body.ip-v699-visitors-mobile #btn-menu,
  body.ip-v699-visitors-mobile .btn-menu,
  body.ip-v699-visitors-mobile .menu-toggle,
  body.ip-v699-visitors-mobile .hamburger{
    display:none !important;
  }

  body.ip-v699-visitors-mobile .ip-v691-hero{
    margin-top:0 !important;
    padding-top:42px !important;
    border-radius:0 0 30px 30px !important;
  }

  body.ip-v699-visitors-mobile form,
  body.ip-v699-visitors-mobile .form-wrapper,
  body.ip-v699-visitors-mobile .visitor-form,
  body.ip-v699-visitors-mobile .app-content{
    padding-bottom:130px !important;
  }

  body.ip-v699-visitors-mobile .form-actions,
  body.ip-v699-visitors-mobile .modal-actions,
  body.ip-v699-visitors-mobile .actions-footer{
    position:sticky !important;
    bottom:88px !important;
    z-index:40 !important;
    background:rgba(255,255,255,.96) !important;
    backdrop-filter:blur(12px) !important;
    -webkit-backdrop-filter:blur(12px) !important;
    padding:14px !important;
    border-radius:24px !important;
    border:1px solid rgba(226,232,240,.9) !important;
    box-shadow:0 10px 40px rgba(15,23,42,.10) !important;
    margin-top:24px !important;
  }

  body.ip-v699-visitors-mobile .form-actions .btn,
  body.ip-v699-visitors-mobile .modal-actions .btn,
  body.ip-v699-visitors-mobile .actions-footer .btn{
    min-height:52px !important;
    border-radius:16px !important;
    font-size:18px !important;
    font-weight:900 !important;
  }

  .ip-v699-bottom-nav{
    bottom:14px !important;
  }
}


/* ==========================================================================
   v6.10.1 — Dashboard Mobile Cleanup
   ========================================================================== */

@media(max-width:820px){

  body.ip-v6101-dashboard-mobile{
    padding-bottom:88px !important;
    background:#f5f7fb !important;
  }

  /* Remove header/hamburger antigo no mobile do Dashboard */
  body.ip-v6101-dashboard-mobile .app-header,
  body.ip-v6101-dashboard-mobile .ip-topbar,
  body.ip-v6101-dashboard-mobile .topbar,
  body.ip-v6101-dashboard-mobile header.header,
  body.ip-v6101-dashboard-mobile #btn-menu,
  body.ip-v6101-dashboard-mobile .btn-menu,
  body.ip-v6101-dashboard-mobile .menu-toggle,
  body.ip-v6101-dashboard-mobile .hamburger{
    display:none !important;
  }

  /* Hero do Dashboard sobe para o topo */
  body.ip-v6101-dashboard-mobile .ipdr-hero,
  body.ip-v6101-dashboard-mobile .ip-dashboard-hero,
  body.ip-v6101-dashboard-mobile .dashboard-hero,
  body.ip-v6101-dashboard-mobile .module-hero,
  body.ip-v6101-dashboard-mobile .page-hero{
    margin-top:0 !important;
    border-radius:0 0 30px 30px !important;
    padding-top:42px !important;
  }

  /* Remove título duplicado abaixo do hero */
  body.ip-v6101-dashboard-mobile .app-page > h1,
  body.ip-v6101-dashboard-mobile .app-page > h2,
  body.ip-v6101-dashboard-mobile main > h1,
  body.ip-v6101-dashboard-mobile main > h2{
    display:none !important;
  }

  body.ip-v6101-dashboard-mobile .ipdr-quick-grid,
  body.ip-v6101-dashboard-mobile .ip-dash-quick-buttons{
    grid-template-columns:1fr !important;
  }

  body.ip-v6101-dashboard-mobile .ipdr-quick-grid [data-ipdr-action="visitante"],
  body.ip-v6101-dashboard-mobile .ip-dash-quick-buttons [data-ipdr-action="visitante"]{
    order:-10 !important;
  }

  /* Modal do visitante no dashboard */
  .modal-visitante-dashboard-inline{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.58);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    z-index:99999;
    align-items:flex-end;
    justify-content:center;
    padding:0 12px 0;
  }

  .modal-visitante-dashboard-inline.open,
  .modal-visitante-dashboard-inline.active,
  .modal-visitante-dashboard-inline.show{
    display:flex !important;
  }

  .modal-visitante-dashboard-inline .modal-content{
    width:100%;
    max-height:92vh;
    overflow:auto;
    background:#fff;
    border-radius:24px 24px 0 0;
    box-shadow:0 -20px 70px rgba(15,23,42,.24);
    padding:22px;
    position:relative;
  }

  .modal-visitante-dashboard-inline h2{
    color:#0f172a!important;
    -webkit-text-fill-color:#0f172a!important;
    margin:0 0 20px!important;
  }

  .modal-visitante-dashboard-inline .modal-close{
    position:absolute;
    right:18px;
    top:16px;
    width:40px;
    height:40px;
    border-radius:12px;
    border:1px solid #e5eaf2;
    background:#fff;
    font-size:24px;
    cursor:pointer;
  }

  .modal-visitante-dashboard-inline .form-grid,
  .modal-visitante-dashboard-inline .checkbox-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  .modal-visitante-dashboard-inline label{
    display:block;
    color:#334155!important;
    -webkit-text-fill-color:#334155!important;
    font-weight:850;
    font-size:13px;
    margin-bottom:7px;
  }

  .modal-visitante-dashboard-inline .form-control{
    width:100%;
    min-height:46px;
    border:1px solid #cbd5e1!important;
    border-radius:14px!important;
    color:#0f172a!important;
    -webkit-text-fill-color:#0f172a!important;
    background:#fff!important;
    padding:0 12px;
  }

  .modal-visitante-dashboard-inline textarea.form-control{
    padding:12px;
  }

  .modal-visitante-dashboard-inline .checkbox-grid label{
    min-height:52px;
    display:flex;
    align-items:center;
    gap:9px;
    background:#f8fafc;
    border:1px solid #e5eaf2;
    border-radius:14px;
    padding:0 12px;
    margin:0;
  }

  .modal-visitante-dashboard-inline form{
    padding-bottom:130px !important;
  }

  .modal-visitante-dashboard-inline .modal-actions{
    position:sticky !important;
    bottom:0 !important;
    z-index:20 !important;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    background:rgba(255,255,255,.96) !important;
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border:1px solid rgba(226,232,240,.9);
    border-radius:22px;
    box-shadow:0 10px 40px rgba(15,23,42,.10);
    padding:12px;
    margin-top:22px;
  }

  .modal-visitante-dashboard-inline .modal-actions .btn{
    min-height:52px !important;
    border-radius:16px !important;
    font-size:17px !important;
    font-weight:900 !important;
  }
}

/* Desktop/tablet modal safety */
.modal-visitante-dashboard-inline.open,
.modal-visitante-dashboard-inline.active,
.modal-visitante-dashboard-inline.show{
  display:flex !important;
}


/* v6.10.2 — Bottom Nav Order Fix */
@media(max-width:820px){
  .ip-v699-bottom-nav{
    grid-template-columns:repeat(5,1fr) !important;
  }

  .ip-v699-bottom-nav a,
  .ip-v699-bottom-nav button{
    min-width:0 !important;
  }

  .ip-v699-bottom-nav span:not(.icon){
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .ip-v699-bottom-nav .nav-dashboard span:not(.icon){
    font-size:10px;
  }
}


/* v6.10.3 — Global Bottom Nav + Tablet Dashboard Fix */
@media(max-width:1180px){
  body.ip-global-bottom-nav{padding-bottom:88px!important}
  body.ip-global-bottom-nav .ip-v699-bottom-nav{position:fixed;left:12px;right:12px;bottom:10px;z-index:99998;height:68px;border-radius:24px;background:rgba(255,255,255,.92);border:1px solid rgba(226,232,240,.9);box-shadow:0 20px 60px rgba(15,23,42,.18);backdrop-filter:blur(18px) saturate(160%);-webkit-backdrop-filter:blur(18px) saturate(160%);display:grid;grid-template-columns:repeat(5,1fr);align-items:center;padding:6px}
  body.ip-global-bottom-nav .ip-v699-bottom-nav a,body.ip-global-bottom-nav .ip-v699-bottom-nav button{appearance:none;border:0;background:transparent;height:56px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#64748b!important;-webkit-text-fill-color:#64748b!important;font-size:11px;font-weight:900;text-decoration:none;min-width:0}
  body.ip-global-bottom-nav .ip-v699-bottom-nav .icon{font-size:21px;line-height:1}
  body.ip-global-bottom-nav .ip-v699-bottom-nav .active{background:#eef2ff;color:#2563eb!important;-webkit-text-fill-color:#2563eb!important}
  body.ip-global-bottom-nav .ip-v699-bottom-nav .fab{width:58px;height:58px;border-radius:999px;margin:auto;transform:translateY(-16px);background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;box-shadow:0 18px 42px rgba(37,99,235,.36);font-size:0}
  body.ip-global-bottom-nav .ip-v699-bottom-nav .fab .icon{font-size:32px}
}
@media(min-width:821px) and (max-width:1180px){
  .ipdr-quick-grid,.ip-dash-quick-buttons,.dashboard-actions,.quick-actions-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  .ipdr-quick,.ip-dash-quick-btn,.dashboard-actions a,.dashboard-actions button,.quick-actions-grid a,.quick-actions-grid button{min-width:0!important;width:100%!important;white-space:normal!important;line-height:1.2!important;min-height:64px!important;padding:12px!important;overflow:hidden!important}
  .ipdr-kpi-grid,.dashboard-kpi-grid,.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .ipdr-hero,.dashboard-hero{overflow:hidden!important}
}
.ip-gc-status-encaminhado-gc{background:#ede9fe!important;color:#6d28d9!important;-webkit-text-fill-color:#6d28d9!important}


/* ==========================================================================
   v6.10.4 — GC Forward + Smart Bottom Nav
   ========================================================================== */

.ip-gc-status-encaminhado-gc{
  background:#ede9fe !important;
  color:#6d28d9 !important;
  -webkit-text-fill-color:#6d28d9 !important;
}

/* Menu inferior inteligente: quando atrapalha, recolhe */
@media(max-width:1180px){
  body.ip-global-bottom-nav,
  body.ip-v699-visitors-mobile,
  body.ip-v6101-dashboard-mobile{
    padding-bottom:112px !important;
  }

  .ip-v699-bottom-nav{
    transition:transform .28s ease, opacity .28s ease !important;
    will-change:transform;
  }

  body.ip-bottom-nav-hidden .ip-v699-bottom-nav{
    transform:translateY(92px) !important;
    opacity:.05 !important;
    pointer-events:none !important;
  }

  body.ip-bottom-nav-force-show .ip-v699-bottom-nav{
    transform:translateY(0) !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }

  .ip-bottom-nav-handle{
    position:fixed;
    left:50%;
    bottom:8px;
    transform:translateX(-50%);
    z-index:99997;
    width:56px;
    height:24px;
    border-radius:999px;
    border:1px solid rgba(226,232,240,.9);
    background:rgba(255,255,255,.94);
    color:#64748b !important;
    -webkit-text-fill-color:#64748b !important;
    box-shadow:0 10px 28px rgba(15,23,42,.12);
    display:none;
    align-items:center;
    justify-content:center;
    font-weight:950;
    line-height:1;
  }

  body.ip-bottom-nav-hidden .ip-bottom-nav-handle{
    display:flex;
  }

  .modal-overlay.open ~ .ip-v699-bottom-nav,
  .modal-overlay.show ~ .ip-v699-bottom-nav,
  .modal-overlay.active ~ .ip-v699-bottom-nav{
    display:none !important;
  }

  /* Dá respiro para últimos botões/ações nunca ficarem atrás do menu */
  form,
  .modal-content,
  .app-page,
  main,
  .main-content,
  .ip-content{
    scroll-padding-bottom:130px !important;
  }

  .modal-actions,
  .form-actions,
  .actions-footer{
    margin-bottom:22px !important;
  }
}

@media(max-width:760px){
  .modal-actions,
  .form-actions,
  .actions-footer{
    margin-bottom:34px !important;
  }
}


/* v6.10.5 — GC canonical encaminhado_gc */
.ip-gc-status-encaminhado-gc,
.ip-gc-status-encaminhado_gc{
  background:#ede9fe !important;
  color:#6d28d9 !important;
  -webkit-text-fill-color:#6d28d9 !important;
}


/* ==========================================================================
   v6.10.6 — Tablet Hero + Full More Menu
   ========================================================================== */
@media(min-width:821px) and (max-width:1180px){
  body.ip-v6106-tablet .dashboard-hero,
  body.ip-v6106-tablet .ipdr-hero,
  body.ip-v6106-tablet .hero-dashboard,
  body.ip-v6106-tablet .ip-dashboard-hero,
  .ip-v6106-fixed-hero{
    overflow:hidden !important;
    padding-bottom:28px !important;
    min-height:auto !important;
  }

  body.ip-v6106-tablet .ipdr-hero{
    max-width:100% !important;
  }

  .ip-v6106-tablet-tabs{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:10px !important;
    width:100% !important;
    margin-top:16px !important;
    overflow:visible !important;
    position:relative !important;
    transform:none !important;
  }

  .ip-v6106-tablet-tabs a,
  .ip-v6106-tablet-tabs button,
  .ip-v6106-tablet-tabs .tab,
  .ip-v6106-tablet-tabs > *{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    white-space:normal !important;
    text-align:center !important;
    line-height:1.15 !important;
    min-height:58px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:9px 10px !important;
    overflow:hidden !important;
    border-radius:17px !important;
    font-size:14px !important;
  }

  .ip-v6106-tablet-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    margin-top:16px !important;
    width:100% !important;
    overflow:visible !important;
  }

  .ip-v6106-tablet-actions a,
  .ip-v6106-tablet-actions button,
  .ip-v6106-tablet-actions > *{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    min-height:62px !important;
    white-space:normal !important;
    line-height:1.15 !important;
    overflow:hidden !important;
  }
}

.ip-v6106-more-sheet{
  z-index:100000 !important;
}

.ip-v6106-full-menu{
  max-height:84vh !important;
  overflow:hidden !important;
}

.ip-v6106-full-menu .ip-v699-more-list{
  overflow:auto !important;
  max-height:70vh !important;
  padding-bottom:18px !important;
  display:grid !important;
  gap:8px !important;
}

.ip-v6106-full-menu .ip-v699-more-list a{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-height:54px !important;
  padding:14px 18px !important;
  border-radius:16px !important;
  border:1px solid #e5eaf2 !important;
  background:#fff !important;
  font-weight:800 !important;
  text-decoration:none !important;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
}

.ip-v6106-full-menu .ip-v699-more-list a:hover{
  background:#eef2ff !important;
}


/* v6.10.7 — Restore full Visitor form everywhere */
.modal-visitante-dashboard-inline{
  display:none !important;
  pointer-events:none !important;
}

body:not(.modal-open) .modal-visitante-dashboard-inline{
  display:none !important;
}

body.ip-global-bottom-nav .modal-visitante-dashboard-inline,
body.ip-v699-visitors-mobile .modal-visitante-dashboard-inline,
body.ip-v6101-dashboard-mobile .modal-visitante-dashboard-inline{
  display:none !important;
}


/* v6.10.7.1 — Stable Visitor Modal Freeze Fix */
.modal-visitante-dashboard-inline{
  display:none !important;
  pointer-events:none !important;
}

#modal-visitante.open,
#modal-visitante.show,
#modal-visitante.active{
  display:flex !important;
  pointer-events:auto !important;
}

body:not(.modal-open) .modal-backdrop,
body:not(.modal-open) .overlay-lock,
body:not(.modal-open) .ip-freeze-overlay{
  display:none !important;
  pointer-events:none !important;
}
