/* ============================================================
   Plena v2 — Design System + Shell (portal do cliente)
   Carregado após style.css/custom.css. Escopo: body.customers
   ============================================================ */

:root {
  --pc-bg: #eef2f7;
  --pc-surface: #ffffff;
  --pc-surface-2: #f7f9fc;
  --pc-border: #e3e8ef;
  --pc-text: #0f1b2d;
  --pc-text-2: #5b6b81;
  --pc-text-3: #93a1b5;
  --pc-primary: #2563eb;
  --pc-primary-600: #1d4ed8;
  --pc-primary-soft: #e6efff;
  --pc-sidebar: #0b1b3a;
  --pc-sidebar-2: #12264d;
  --pc-sidebar-text: #c7d2e5;
  --pc-success: #10b981;
  --pc-warning: #f59e0b;
  --pc-danger: #ef4444;
  --pc-info: #0ea5e9;
  --pc-radius: 16px;
  --pc-radius-sm: 10px;
  --pc-shadow: 0 1px 2px rgba(15,27,45,.06), 0 8px 24px rgba(15,27,45,.06);
  --pc-shadow-sm: 0 1px 2px rgba(15,27,45,.08);
  --pc-sidebar-w: 248px;
  --pc-topbar-h: 64px;
  --pc-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  --pc-bg: #0b1220;
  --pc-surface: #131c2e;
  --pc-surface-2: #0f1728;
  --pc-border: #22304a;
  --pc-text: #eaf0f9;
  --pc-text-2: #a7b4c9;
  --pc-text-3: #6b7a92;
  --pc-primary: #4f8cff;
  --pc-primary-soft: #16233c;
  --pc-sidebar: #070f1f;
  --pc-sidebar-2: #0d1a31;
  --pc-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}

/* ---------- Base ---------- */
body.customers {
  background: var(--pc-bg) !important;
  color: var(--pc-text);
  font-family: var(--pc-font);
  -webkit-font-smoothing: antialiased;
}
body.customers a { color: var(--pc-primary); }
body.customers h1, body.customers h2, body.customers h3, body.customers h4 {
  font-weight: 700; letter-spacing: -.01em; color: var(--pc-text);
}
body.customers .container { width: auto; max-width: 1240px; padding-left: 20px; padding-right: 20px; }

/* ---------- Shell ---------- */
.pc-shell { display: flex; min-height: 100vh; }

.pc-sidebar {
  width: var(--pc-sidebar-w);
  flex: 0 0 var(--pc-sidebar-w);
  background: linear-gradient(180deg, var(--pc-sidebar) 0%, var(--pc-sidebar-2) 100%);
  color: var(--pc-sidebar-text);
  position: fixed; inset: 0 auto 0 0; z-index: 1030;
  display: flex; flex-direction: column; padding: 18px 14px;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.pc-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.pc-sidebar__brand img { max-height: 34px; }
.pc-sidebar__brand span { font-weight: 700; color: #fff; font-size: 1rem; }
.pc-sidebar__nav { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.pc-sidebar__nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-bottom: 4px;
  border-radius: var(--pc-radius-sm); color: var(--pc-sidebar-text); text-decoration: none;
  font-size: .9rem; font-weight: 500; transition: background .18s, color .18s, transform .18s;
}
.pc-sidebar__nav a i { width: 18px; text-align: center; opacity: .85; }
.pc-sidebar__nav a:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.pc-sidebar__nav a.active { background: var(--pc-primary); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.pc-sidebar__foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; margin-top: 10px; }

.pc-main { flex: 1; min-width: 0; margin-left: var(--pc-sidebar-w); display: flex; flex-direction: column; }

.pc-topbar {
  height: var(--pc-topbar-h); position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: color-mix(in srgb, var(--pc-surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--pc-border);
}
.pc-topbar__toggle { display: none; background: none; border: 0; font-size: 1.2rem; color: var(--pc-text); }
.pc-topbar__search { flex: 1; max-width: 460px; position: relative; }
.pc-topbar__search input {
  width: 100%; border: 1px solid var(--pc-border); background: var(--pc-surface-2);
  border-radius: 999px; padding: 10px 14px 10px 40px; color: var(--pc-text); font-size: .9rem;
}
.pc-topbar__search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pc-text-3); }
.pc-topbar__spacer { flex: 1; }
.pc-topbar__actions { display: flex; align-items: center; gap: 10px; }
.pc-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pc-border); }

.pc-content { padding: 24px 20px 90px; flex: 1; }

/* ---------- Cards / KPI ---------- */
.pc-card {
  background: var(--pc-surface); border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius); box-shadow: var(--pc-shadow); margin-bottom: 18px; overflow: hidden;
}
.pc-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--pc-border);
}
.pc-card__head h3 { margin: 0; font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pc-card__body { padding: 18px; }
.pc-card__foot { padding: 14px 18px; border-top: 1px solid var(--pc-border); background: var(--pc-surface-2); }
.pc-card__foot.text-right { text-align: right; }

/* Documentos e assinaturas (dashboard) */
.pc-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px dashed var(--pc-border); }
.pc-doc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pc-doc-row__main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-doc-row__main > i { font-size: 1.1rem; }
.pc-doc-row__main div { display: flex; flex-direction: column; min-width: 0; }
.pc-doc-row__main strong { color: var(--pc-text); font-size: .92rem; }
.pc-doc-row__sub { color: var(--pc-text-2); font-size: .78rem; }
.pc-doc-row__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-doc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; font-size: .78rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease; }
.pc-doc-btn:hover { transform: translateY(-2px); text-decoration: none; }
.pc-doc-btn--primary { color: #fff; background: var(--pc-primary); border-color: var(--pc-primary); }
.pc-doc-btn--ghost { color: var(--pc-text); background: var(--pc-surface-2); border-color: var(--pc-border); }
.pc-doc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pc-doc-tag--ok { color: #059669; background: rgba(5,150,105,.12); border: 1px solid rgba(5,150,105,.35); }

.pc-section-title { font-size: 1.05rem; font-weight: 700; margin: 6px 0 14px; display: flex; align-items: center; gap: 8px; }

.pc-grid { display: grid; gap: 14px; }
.pc-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pc-grid--bento { grid-template-columns: 1.4fr 1fr; }

.pc-kpi {
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius);
  padding: 18px; box-shadow: var(--pc-shadow-sm); display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.pc-kpi:hover { transform: translateY(-3px); box-shadow: var(--pc-shadow); border-color: var(--pc-primary); }
.pc-kpi__icon {
  width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; background: var(--pc-primary-soft); color: var(--pc-primary); flex: 0 0 auto;
}
.pc-kpi__value { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--pc-text); }
.pc-kpi__label { font-size: .8rem; color: var(--pc-text-2); margin-top: 4px; }

.pc-hero {
  border-radius: var(--pc-radius); padding: 24px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(120deg, #0b1b3a 0%, #16386f 55%, #2563eb 100%);
  box-shadow: var(--pc-shadow); position: relative; overflow: hidden;
}
.pc-hero h2 { color: #fff; margin: 0 0 6px; font-size: 1.4rem; }
.pc-hero p { color: rgba(255,255,255,.85); margin: 0; }
.pc-hero .pc-hero__actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Botões ---------- */
body.customers .btn, .pc-btn {
  border-radius: 10px; font-weight: 600; border: 1px solid transparent; transition: .18s;
}
body.customers .btn-primary, .pc-btn--primary { background: var(--pc-primary); border-color: var(--pc-primary); color: #fff; }
body.customers .btn-primary:hover, .pc-btn--primary:hover { background: var(--pc-primary-600); border-color: var(--pc-primary-600); }

/* ---------- Tabelas / painéis legados (compat) ---------- */
body.customers .panel_s, body.customers .panel {
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm); overflow: hidden;
}
body.customers .panel_s > .panel-heading, body.customers .panel-heading {
  background: var(--pc-surface); border-bottom: 1px solid var(--pc-border); padding: 14px 18px;
}
body.customers .table { color: var(--pc-text); margin-bottom: 0; }
body.customers .table > thead > tr > th {
  border-bottom: 1px solid var(--pc-border); color: var(--pc-text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
}
body.customers .table > tbody > tr > td { border-top: 1px solid var(--pc-border); vertical-align: middle; }
body.customers .table-striped > tbody > tr:nth-of-type(odd) { background: var(--pc-surface-2); }
body.customers .form-control {
  border-radius: 10px; border-color: var(--pc-border); background: var(--pc-surface); color: var(--pc-text); box-shadow: none;
}
body.customers .form-control:focus { border-color: var(--pc-primary); box-shadow: 0 0 0 3px var(--pc-primary-soft); }
body.customers .label { border-radius: 999px; font-weight: 600; padding: .35em .7em; }

/* ---------- Bottom nav (mobile) ---------- */
.pc-bottomnav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1035;
  background: var(--pc-surface); border-top: 1px solid var(--pc-border);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.pc-bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
  font-size: .68rem; color: var(--pc-text-3); text-decoration: none; padding: 6px 0; border-radius: 10px;
}
.pc-bottomnav a i { font-size: 1.05rem; }
.pc-bottomnav a.active { color: var(--pc-primary); }

/* ---------- Overlay mobile ---------- */
.pc-overlay { display: none; position: fixed; inset: 0; background: rgba(4,10,20,.5); z-index: 1029; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .pc-sidebar { transform: translateX(-100%); box-shadow: var(--pc-shadow); }
  .pc-main { margin-left: 0; }
  .pc-topbar__toggle { display: inline-flex; }
  .pc-grid--bento { grid-template-columns: 1fr; }
  body.pc-nav-open .pc-sidebar { transform: translateX(0); }
  body.pc-nav-open .pc-overlay { display: block; }
}
@media (max-width: 767px) {
  .pc-content { padding: 16px 12px 96px; }
  .pc-topbar { padding: 0 12px; }
  .pc-bottomnav { display: flex; }
  body.customers .container { padding-left: 12px; padding-right: 12px; }
  .pc-kpi__value { font-size: 1.45rem; }
}

/* ---------- Utilidades ---------- */
body.customers .text-muted { color: var(--pc-text-2) !important; }
.pc-mb0 { margin-bottom: 0 !important; }
.pc-mt { margin-top: 16px; }


/* ============================================================
   v2.1 — Submenu recursivo, contraste, overflow e MOBILE
   ============================================================ */

/* ----- Menu recursivo ----- */
.pc-sidebar__scroll { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.pc-sidebar__sub { list-style: none; margin: 2px 0 6px; padding: 0 0 0 14px; display: none; }
.pc-has-sub.open > .pc-sidebar__sub { display: block; }
.pc-sidebar__sub a { font-size: .84rem; padding: 8px 12px; }
.pc-sidebar__nav > li > a .pc-chev { margin-left: auto; font-size: .6rem; opacity: .7; transition: transform .2s; }
.pc-has-sub.open > a .pc-chev { transform: rotate(180deg); }
.pc-nav-toggle { cursor: pointer; }

/* ----- Contraste light/dark ----- */
body.customers { color: var(--pc-text); background: var(--pc-bg); }
body.customers h1, body.customers h2, body.customers h3, body.customers h4, body.customers h5,
body.customers p, body.customers span, body.customers strong, body.customers li, body.customers td, body.customers th {
  color: var(--pc-text);
}
body.customers .text-muted { color: var(--pc-text-2) !important; }
body.customers .footer { color: var(--pc-text-2) !important; background: transparent !important; border-top: 1px solid var(--pc-border); padding: 16px 0; }
body.customers .footer .copyright-footer, body.customers .footer a { color: var(--pc-text-2) !important; }
body.customers .footer a:hover { color: var(--pc-primary) !important; }
[data-theme="dark"] body.customers, [data-theme="dark"] body.customers h1, [data-theme="dark"] body.customers h2,
[data-theme="dark"] body.customers h3, [data-theme="dark"] body.customers h4, [data-theme="dark"] body.customers p,
[data-theme="dark"] body.customers span, [data-theme="dark"] body.customers strong, [data-theme="dark"] body.customers td {
  color: var(--pc-text);
}
[data-theme="dark"] body.customers .pc-card, [data-theme="dark"] body.customers .pc-kpi, [data-theme="dark"] body.customers .pc-kpi__value { color: var(--pc-text); }
[data-theme="dark"] body.customers .form-control { background: var(--pc-surface-2); color: var(--pc-text); }

/* ----- Overflow: nada sai da página ----- */
html, body.customers { overflow-x: hidden; max-width: 100%; }
.pc-shell, .pc-main, .pc-content { min-width: 0; max-width: 100%; }
.pc-content { overflow-x: hidden; }
.pc-grid > *, .pc-grid--bento > * { min-width: 0; }
.pc-card { max-width: 100%; }
.pc-card__body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pc-card__body img, .pc-card__body canvas, body.customers canvas { max-width: 100% !important; height: auto; }
body.customers img { max-width: 100%; height: auto; }
body.customers .table-responsive, body.customers .panel_s .table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================
   MOBILE-FIRST / RESPONSIVO
   ============================================================ */
.pc-topbar__toggle { display: none; }

@media (max-width: 1024px) {
  .pc-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.pc-nav-open .pc-sidebar { transform: translateX(0); }
  body.pc-nav-open .pc-overlay { display: block; }
  .pc-main { margin-left: 0; }
  .pc-topbar__toggle { display: inline-flex; }
  .pc-grid--bento { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .pc-topbar { height: 56px; gap: 8px; padding: 0 12px; }
  .pc-topbar__search { flex: 1; max-width: none; }
  .pc-topbar__search input { padding: 9px 12px 9px 34px; font-size: .85rem; }
  .pc-topbar__actions .btn { padding: 6px 10px; }
  .pc-topbar__actions .btn .hidden-xs { display: none; }

  .pc-content { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  body.customers .container { padding-left: 12px; padding-right: 12px; }

  .pc-grid--kpi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-kpi { padding: 13px; gap: 10px; }
  .pc-kpi__icon { width: 40px; height: 40px; border-radius: 11px; font-size: .95rem; }
  .pc-kpi__value { font-size: 1.3rem; }
  .pc-kpi__label { font-size: .72rem; }

  .pc-hero { padding: 18px; }
  .pc-hero h2 { font-size: 1.15rem; }
  .pc-hero__actions .btn { width: 100%; margin-bottom: 6px; }
  .pc-section-title { font-size: .98rem; margin: 14px 0 10px; }

  .pc-card__head { padding: 12px 14px; }
  .pc-card__body { padding: 14px; }
  .pc-avatar { width: 32px; height: 32px; }

  /* Tabelas: rolagem horizontal suave */
  body.customers .table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }
  body.customers .table > thead, body.customers .table > tbody { display: table; width: 100%; }

  .pc-bottomnav { display: flex; }
  .pc-bottomnav a { padding: 8px 0; }
  .pc-bottomnav a span { font-size: .62rem; white-space: nowrap; }
}

@media (max-width: 420px) {
  .pc-grid--kpi { grid-template-columns: 1fr; }
  .pc-kpi__value { font-size: 1.4rem; }
}


/* ============================================================
   v2.2 — Header com menu (sem sidebar) + menu flutuante mobile
   ============================================================ */
body.customers .pc-main { margin-left: 0 !important; }

body.customers .pc-topbar {
  height: 64px;
  background: linear-gradient(120deg, #0b1b3a 0%, #16386f 55%, #2563eb 100%) !important;
  border-bottom: 0;
  color: #fff;
  padding: 0 18px;
  gap: 12px;
}
body.customers .pc-topbar__brand { display: flex; align-items: center; margin-right: 8px; }
body.customers .pc-topbar__brand img { max-height: 40px; }

body.customers .pc-topbar__nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body.customers .pc-topbar__nav::-webkit-scrollbar { display: none; }

body.customers .pc-nav-h { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
body.customers .pc-nav-h > li { position: relative; }
body.customers .pc-nav-h > li > a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  color: #fff !important; text-decoration: none; font-size: .86rem; font-weight: 500; white-space: nowrap;
  transition: background .18s, color .18s; opacity: .9;
}
body.customers .pc-nav-h > li > a:hover { background: rgba(255,255,255,.14); opacity: 1; }
body.customers .pc-nav-h > li.active > a,
body.customers .pc-nav-h > li > a.active { background: rgba(255,255,255,.22); opacity: 1; }
body.customers .pc-nav-h > li > a .pc-chev { font-size: .6rem; opacity: .8; }

body.customers .pc-nav-h__sub {
  list-style: none; position: absolute; top: 44px; left: 0; min-width: 220px; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--pc-border); border-radius: 12px; box-shadow: var(--pc-shadow);
  display: none; z-index: 1050;
}
body.customers .pc-nav-h > li.pc-has-sub:hover > .pc-nav-h__sub,
body.customers .pc-nav-h > li.pc-has-sub:focus-within > .pc-nav-h__sub { display: block; }
body.customers .pc-nav-h__sub a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px;
  color: #0f1b2d !important; text-decoration: none; font-size: .85rem;
}
body.customers .pc-nav-h__sub a:hover { background: var(--pc-surface-2); }
body.customers .pc-nav-h__sub a.active { background: var(--pc-primary-soft); color: var(--pc-primary) !important; }

body.customers .pc-btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4); color: #fff !important; text-decoration: none; font-size: .82rem; font-weight: 600;
  transition: background .18s;
}
body.customers .pc-btn-ghost:hover { background: rgba(255,255,255,.16); }
body.customers .pc-topbar .pc-avatar { border-color: rgba(255,255,255,.5); }

body.customers .pc-topbar__toggle {
  display: none; background: none; border: 0; color: #fff; font-size: 1.25rem; padding: 6px 8px; border-radius: 10px;
}
body.customers .pc-topbar__toggle:hover { background: rgba(255,255,255,.14); }

/* ===== Menu flutuante mobile ===== */
.pc-floatmenu {
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 1060;
  background: linear-gradient(160deg, #0b1b3a 0%, #12264d 100%);
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.45); padding: 14px;
  transform: translateY(-16px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .24s ease, opacity .24s ease, visibility .24s; max-height: calc(100vh - 24px); overflow-y: auto;
}
body.pc-menu-open .pc-floatmenu { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.pc-floatmenu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pc-floatmenu__head img { max-height: 28px; }
.pc-floatmenu__close { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; }
.pc-floatmenu .pc-sidebar__nav, .pc-floatmenu .pc-sidebar__sub { margin: 0; padding: 0; }
.pc-floatmenu .pc-sidebar__nav a { color: #fff; padding: 12px 12px; border-radius: 12px; font-size: .95rem; }
.pc-floatmenu .pc-sidebar__nav a:hover, .pc-floatmenu .pc-sidebar__nav a.active { background: rgba(255,255,255,.12); }
.pc-floatmenu .pc-sidebar__sub { padding-left: 12px; }
.pc-floatmenu .pc-sidebar__sub a { font-size: .88rem; color: #c7d2e5; }
.pc-floatmenu__foot { border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px; padding-top: 10px; }
.pc-floatmenu__foot a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pc-floatmenu__foot .pc-floatmenu__logout { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.12); color: #ffb4b4; font-weight: 600; }
.pc-floatmenu__foot .pc-floatmenu__logout:hover { color: #ff8f8f; }

/* Overlay só quando o menu mobile está aberto */
body.customers .pc-overlay { display: none; position: fixed; inset: 0; background: rgba(4,10,20,.5); z-index: 1055; }
body.pc-menu-open .pc-overlay { display: block; }

@media (max-width: 1024px) {
  body.customers .pc-topbar__nav { display: none; }
  body.customers .pc-topbar__toggle { display: inline-flex; }
}
@media (min-width: 1025px) {
  .pc-floatmenu, body.customers .pc-overlay { display: none !important; }
}


/* ============================================================
   Informe Anual de Rendimentos (IR)
   ============================================================ */
.ir-card { background: var(--pc-surface-2); border:1px solid var(--pc-border); border-radius:14px; padding:14px; margin-bottom:14px; }
.ir-top { display:flex; align-items:center; gap:12px; }
.ir-icon { width:44px; height:44px; border-radius:12px; background:var(--pc-primary-soft); color:var(--pc-primary); display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex:0 0 auto; }
.ir-info { flex:1; min-width:0; }
.ir-info h4 { margin:0 0 2px; font-size:.95rem; }
.ir-info p { margin:0 0 8px; font-size:.8rem; color:var(--pc-text-2); }
.ir-badges { display:flex; gap:6px; flex-wrap:wrap; }
.pill { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; font-size:.72rem; font-weight:600; background:var(--pc-surface); border:1px solid var(--pc-border); color:var(--pc-text-2); }
.pill-green { background:#e7f8f0; color:#059669; border-color:transparent; }
.pill-blue { background:var(--pc-primary-soft); color:var(--pc-primary); border-color:transparent; }
.pill-amber { background:#fff7e6; color:#d97706; border-color:transparent; }
.ir-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:10px; background:var(--pc-primary); color:#fff !important; text-decoration:none; font-size:.82rem; font-weight:600; white-space:nowrap; }
.ir-btn.is-disabled { background:#94a3b8; cursor:not-allowed; }
.ir-history h4 { font-size:.85rem; margin:0 0 8px; color:var(--pc-text-2); display:flex; align-items:center; gap:6px; }
.ir-year { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--pc-border); border-radius:10px; background:var(--pc-surface); margin-bottom:6px; }
.ir-year-left { display:flex; align-items:center; gap:10px; min-width:0; }
.ir-year-badge { width:42px; height:32px; border-radius:8px; background:var(--pc-primary-soft); color:var(--pc-primary); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.78rem; }
.ir-year-info p { margin:0; font-size:.82rem; font-weight:600; }
.ir-year-info small { color:var(--pc-text-3); font-size:.72rem; }
.ir-year-link { font-size:.8rem; font-weight:600; color:var(--pc-primary) !important; text-decoration:none; white-space:nowrap; }
.ir-year-link.is-disabled { color:var(--pc-text-3) !important; }
[data-theme="dark"] .pill-green { background:#0c3b2c; color:#6ee7b7; }
[data-theme="dark"] .pill-amber { background:#3d2c0c; color:#fcd34d; }
@media (max-width:480px){ .ir-top{flex-wrap:wrap} .ir-btn{width:100%;justify-content:center} }


/* ============================================================
   v2.3 — Texto branco no header, hero e botões (menu/dropdown preservados)
   ============================================================ */
body.customers .pc-topbar,
body.customers .pc-topbar__brand,
body.customers .pc-topbar__brand a,
body.customers .pc-topbar__toggle,
body.customers .pc-topbar__spacer { color: #fff !important; }

/* Menu horizontal (topo) — branco */
body.customers .pc-nav-h > li > a,
body.customers .pc-nav-h > li > a span,
body.customers .pc-nav-h > li > a i,
body.customers .pc-nav-h > li > a .pc-chev { color: #fff !important; }

/* Ações do header — branco */
body.customers .pc-topbar .pc-btn-ghost,
body.customers .pc-topbar .pc-btn-ghost span,
body.customers .pc-topbar .pc-btn-ghost i { color: #fff !important; }

/* Dropdown (fundo claro) — mantém texto escuro para contraste */
body.customers .pc-nav-h__sub a,
body.customers .pc-nav-h__sub a span,
body.customers .pc-nav-h__sub a i { color: #0f1b2d !important; }
body.customers .pc-nav-h__sub a.active,
body.customers .pc-nav-h__sub a.active span,
body.customers .pc-nav-h__sub a.active i { color: var(--pc-primary) !important; }

/* Hero — texto branco */
body.customers .pc-hero,
body.customers .pc-hero h2,
body.customers .pc-hero p,
body.customers .pc-hero i { color: #fff !important; }

/* Botões do hero / primário — texto branco */
body.customers .pc-hero .btn,
body.customers .pc-hero .btn span,
body.customers .pc-hero .btn i,
body.customers .pc-btn--primary,
body.customers .btn-primary { color: #fff !important; }

/* Botão do hero "Minhas faturas" (sólido, texto branco) */
body.customers .pc-hero .pc-btn--primary { background: #1d4ed8 !important; color: #fff !important; border-color: transparent !important; font-weight: 700; }
body.customers .pc-hero .pc-btn--primary i { color: #fff !important; }


/* v2.6 — Header em UMA linha (nav rolável) + logo + botão tema */
body.customers .pc-topbar { height: 64px !important; flex-wrap: nowrap !important; padding-top: 0; padding-bottom: 0; column-gap: 10px; }
body.customers .pc-topbar__brand { flex: 0 0 auto; }
body.customers .pc-topbar__brand img { max-height: 40px; width: auto; display: block; }
body.customers .pc-topbar__nav { flex: 1 1 auto; order: 0; overflow-x: auto; overflow-y: hidden; }
body.customers .pc-topbar__nav::-webkit-scrollbar { height: 4px; }
body.customers .pc-topbar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 4px; }
body.customers .pc-nav-h { flex-wrap: nowrap !important; }


/* ============================================================
   v2.5 — Cards animados, chips e dashboard consolidado
   ============================================================ */
@keyframes pcFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.pc-anim { animation: pcFadeUp .5s both; }
.pc-grid--kpi > .pc-anim:nth-child(1) { animation-delay: .03s; }
.pc-grid--kpi > .pc-anim:nth-child(2) { animation-delay: .06s; }
.pc-grid--kpi > .pc-anim:nth-child(3) { animation-delay: .09s; }
.pc-grid--kpi > .pc-anim:nth-child(4) { animation-delay: .12s; }
.pc-grid--kpi > .pc-anim:nth-child(5) { animation-delay: .15s; }
.pc-grid--kpi > .pc-anim:nth-child(6) { animation-delay: .18s; }
.pc-grid--kpi > .pc-anim:nth-child(7) { animation-delay: .21s; }

.pc-kpi { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pc-kpi:hover { transform: translateY(-4px) scale(1.01); }
.pc-kpi__icon { transition: transform .2s ease; }
.pc-kpi:hover .pc-kpi__icon { transform: scale(1.08); }

.pc-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--pc-primary-soft); color: var(--pc-primary); padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }

body.customers .pc-btn-ghost-hero { background: rgba(255,255,255,.15); color: #fff !important; border: 1px solid rgba(255,255,255,.3); }
body.customers .pc-btn-ghost-hero:hover { background: rgba(255,255,255,.25); }
body.customers .pc-btn-ghost-hero i { color: #fff !important; }

/* Suaviza o card do gráfico */
#pc-payments-chart { width: 100%; }
#pc-payments-chart svg { border-radius: 12px; }


/* ============================================================
   v2.6 — KPIs em UMA linha (rolável) + botão de tema no header
   ============================================================ */
body.customers .pc-grid--kpi {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: stretch; gap: 12px; overflow: visible;
}
body.customers .pc-grid--kpi > .pc-kpi { flex: 0 0 auto; width: 196px; padding: 16px; gap: 12px; }
body.customers .pc-kpi__value { font-size: 1.6rem; }
body.customers .pc-kpi__label { font-size: .78rem; line-height: 1.15; }
body.customers .pc-kpi__icon { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }
@media (max-width: 1024px) {
  body.customers .pc-grid--kpi { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
  body.customers .pc-grid--kpi > .pc-kpi { width: auto; flex-direction: column; text-align: center; padding: 10px 6px; gap: 4px; }
  body.customers .pc-kpi__icon { width: 30px; height: 30px; font-size: .8rem; }
  body.customers .pc-kpi__value { font-size: 1.05rem; }
  body.customers .pc-kpi__label { font-size: .6rem; }
}
@media (max-width: 420px) {
  body.customers .pc-kpi__icon { display: none; }
  body.customers .pc-kpi__value { font-size: 1.05rem; }
}

body.customers .pc-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff !important; cursor: pointer; }
body.customers .pc-iconbtn:hover { background: rgba(255,255,255,.25); }
body.customers .pc-iconbtn i { color: #fff !important; }


/* ============================================================
   v2.7 — Header: espaçamento e menu centralizado
   ============================================================ */
body.customers .pc-topbar { align-items: center; column-gap: 16px; }
body.customers .pc-topbar__brand { margin-right: 0; }
body.customers .pc-topbar__spacer { display: none !important; }
body.customers .pc-topbar__nav { display: flex; justify-content: center; align-items: center; flex: 1 1 auto; }
body.customers .pc-nav-h { justify-content: center; align-items: center; gap: 6px; width: 100%; }
body.customers .pc-nav-h > li > a { padding: 9px 14px; }
body.customers .pc-topbar__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

@media (max-width: 1024px) {
  body.customers .pc-topbar { justify-content: space-between; column-gap: 10px; }
  body.customers .pc-topbar__nav { display: none; }
}


/* ============================================================
   Calendário (FullCalendar) — botões com texto branco
   ============================================================ */
body.customers .fc .fc-button,
body.customers .fc .fc-button-primary {
  color: #fff !important;
  background-color: var(--pc-primary) !important;
  border-color: var(--pc-primary) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  box-shadow: none !important;
  opacity: 1;
}
body.customers .fc .fc-button:hover,
body.customers .fc .fc-button:focus {
  color: #fff !important;
  background-color: var(--pc-primary-600) !important;
  border-color: var(--pc-primary-600) !important;
}
body.customers .fc .fc-button:disabled {
  color: #fff !important;
  background-color: var(--pc-primary) !important;
  opacity: .55;
}
body.customers .fc .fc-button-active {
  background-color: var(--pc-primary-600) !important;
  border-color: var(--pc-primary-600) !important;
  color: #fff !important;
}
body.customers .fc .fc-toolbar-title { color: var(--pc-text) !important; font-weight: 700; }
body.customers .fc .fc-col-header-cell-cushion,
body.customers .fc .fc-daygrid-day-number { color: var(--pc-text-2) !important; }


/* ============================================================
   DARK MODE — legibilidade de labels, links e componentes
   ============================================================ */
[data-theme="dark"] body.customers .label {
  color: #fff !important;
}
/* Labels de status (bootstrap usa fundo claro; no dark deixamos solidos) */
[data-theme="dark"] body.customers .label-danger,
[data-theme="dark"] body.customers .label-danger.inline-block { background-color: #b91c1c !important; color: #fff !important; }
[data-theme="dark"] body.customers .label-success,
[data-theme="dark"] body.customers .label-success.inline-block { background-color: #047857 !important; color: #fff !important; }
[data-theme="dark"] body.customers .label-warning { background-color: #b45309 !important; color: #fff !important; }
[data-theme="dark"] body.customers .label-info    { background-color: #0369a1 !important; color: #fff !important; }
[data-theme="dark"] body.customers .label-default { background-color: #475569 !important; color: #fff !important; }
[data-theme="dark"] body.customers .label-primary { background-color: var(--pc-primary) !important; color: #fff !important; }

/* Links em tabelas e cabecalhos de card (especificidade baixa) */
[data-theme="dark"] body.customers .table a { color: var(--pc-primary); }
[data-theme="dark"] body.customers .table a.btn { color: #fff; }
[data-theme="dark"] body.customers .pc-inv__doc .n,
[data-theme="dark"] body.customers .pc-inv__row strong { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .pc-card__head a { color: var(--pc-primary); }

/* DataTables: paginacao ("Anterior/Proximo") */
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button a { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover { color: var(--pc-text-3) !important; }
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_info,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_length,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_filter { color: var(--pc-text-2) !important; }

/* Calendar (FullCalendar) no dark */
[data-theme="dark"] body.customers .fc .fc-daygrid-day-number { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .fc .fc-col-header-cell-cushion { color: var(--pc-text-2) !important; }


/* Knowledge base / tailwind badges no dark */
[data-theme="dark"] body.customers .badge,
[data-theme="dark"] body.customers .tw-bg-neutral-50 { background-color: #1e293b !important; color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .kb-search-heading { color: var(--pc-text) !important; }

/* Dropzone (Arquivos) no dark */
[data-theme="dark"] body.customers .dropzone,
[data-theme="dark"] body.customers .dropzone .dz-message { background: var(--pc-surface-2) !important; color: var(--pc-text) !important; border-color: var(--pc-border) !important; }

/* Graficos (legenda e eixos) no dark */
[data-theme="dark"] body.customers .apexcharts-legend-text { color: var(--pc-text-2) !important; }
[data-theme="dark"] body.customers .apexcharts-text,
[data-theme="dark"] body.customers .apexcharts-xaxis-label,
[data-theme="dark"] body.customers .apexcharts-yaxis-label { fill: var(--pc-text-2) !important; }

/* Graficos (tooltip ApexCharts) no dark — evita valor invisivel (span global claro em fundo claro) */
[data-theme="dark"] body.customers .apexcharts-tooltip { background: #131c2e !important; border: 1px solid #22304a !important; box-shadow: 0 8px 24px rgba(0,0,0,.45) !important; }
[data-theme="dark"] body.customers .apexcharts-tooltip-title { background: #0f1728 !important; color: #eaf0f9 !important; border-bottom: 1px solid #22304a !important; }
[data-theme="dark"] body.customers .apexcharts-tooltip-series-group { background: transparent !important; }
[data-theme="dark"] body.customers .apexcharts-tooltip-text,
[data-theme="dark"] body.customers .apexcharts-tooltip-series-group span,
[data-theme="dark"] body.customers .apexcharts-tooltip-y-group span,
[data-theme="dark"] body.customers .apexcharts-tooltip-goals-group span { color: #eaf0f9 !important; }
[data-theme="dark"] body.customers .apexcharts-tooltip-marker { border-color: transparent !important; }

/* Botao secundario (Voltar as Propriedades) e ir-btn desabilitado */
[data-theme="dark"] body.customers .btn-secondary { background: var(--pc-surface-2) !important; color: var(--pc-text) !important; border-color: var(--pc-border) !important; }
[data-theme="dark"] body.customers .btn-default { background: var(--pc-surface-2) !important; color: var(--pc-text) !important; border-color: var(--pc-border) !important; }
[data-theme="dark"] body.customers .btn-default:hover { background: var(--pc-surface) !important; color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .ir-btn.is-disabled { background: #475569 !important; color: #e2e8f0 !important; }

/* Botões primários no dark: texto branco garantido (por ultimo) */
[data-theme="dark"] body.customers .btn-primary,
[data-theme="dark"] body.customers .btn-primary span,
[data-theme="dark"] body.customers .btn-primary i,
[data-theme="dark"] body.customers a.btn-primary { color: #fff !important; }
[data-theme="dark"] body.customers .btn-success,
[data-theme="dark"] body.customers .btn-success span,
[data-theme="dark"] body.customers .btn-success i { color: #fff !important; }

/* DataTables: paginacao (numeros das paginas) no dark — Bootstrap usa ul.pagination */
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > a,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > span { background: var(--pc-surface-2) !important; border: 1px solid var(--pc-border) !important; color: var(--pc-text) !important; box-shadow: none !important; }
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > a:hover,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li > span:hover { background: var(--pc-surface) !important; border-color: var(--pc-primary) !important; color: var(--pc-text) !important; }
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.active > a,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.active > span { background: var(--pc-primary) !important; border-color: var(--pc-primary) !important; color: #fff !important; }
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.disabled > a,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_paginate ul.pagination > li.disabled > span { background: var(--pc-surface-2) !important; border-color: var(--pc-border) !important; color: var(--pc-text-3) !important; opacity: .6; }
/* Compat: DataTables antigo (.paginate_button como li) */
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button { background: transparent !important; border-color: transparent !important; }
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_paginate .paginate_button a { color: inherit !important; }

/* DataTables: lupa da busca no dark (input-group-addon + fa-search) */
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_filter .input-group-addon { background: var(--pc-surface-2) !important; border: 1px solid var(--pc-border) !important; color: var(--pc-text-2) !important; }
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_filter .input-group-addon .fa,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_filter .input-group-addon .fa-search,
[data-theme="dark"] body.customers div.dataTables_wrapper div.dataTables_filter .input-group-addon span { color: var(--pc-text-2) !important; }

/* Tabelas DataTables no dark — contraste e separacao de linhas (evita tabela confusa) */
[data-theme="dark"] body.customers .table { background: var(--pc-surface) !important; color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .table > thead > tr > th { background: var(--pc-surface-2) !important; color: var(--pc-text-2) !important; border-bottom: 1px solid var(--pc-border) !important; }
[data-theme="dark"] body.customers .table > tbody > tr > td { border-top: 1px solid var(--pc-border) !important; color: var(--pc-text) !important; background: transparent !important; }
[data-theme="dark"] body.customers .table > tbody > tr:nth-of-type(odd) > td { background: rgba(255,255,255,.025) !important; }
[data-theme="dark"] body.customers .table > tbody > tr:hover > td { background: rgba(79,140,255,.09) !important; }
[data-theme="dark"] body.customers .table > tbody > tr > td.sorting_1 { background: rgba(255,255,255,.03) !important; }
[data-theme="dark"] body.customers .table > tbody > tr:hover > td.sorting_1 { background: rgba(79,140,255,.12) !important; }
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_length select,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_length input { background: var(--pc-surface-2) !important; border: 1px solid var(--pc-border) !important; color: var(--pc-text) !important; border-radius: 8px !important; }
[data-theme="dark"] body.customers .dataTables_wrapper .dataTables_filter input::placeholder { color: var(--pc-text-3) !important; }
[data-theme="dark"] body.customers table.dataTable thead .sorting,
[data-theme="dark"] body.customers table.dataTable thead .sorting_asc,
[data-theme="dark"] body.customers table.dataTable thead .sorting_desc { filter: invert(.7); }

/* FullCalendar no dark: fundo das celulas */
[data-theme="dark"] body.customers .fc .fc-daygrid-day,
[data-theme="dark"] body.customers .fc .fc-scrollgrid,
[data-theme="dark"] body.customers .fc .fc-col-header-cell { background: var(--pc-surface) !important; }
[data-theme="dark"] body.customers .fc .fc-daygrid-day-number { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .fc .fc-daygrid-day.fc-day-other { background: var(--pc-surface-2) !important; }
[data-theme="dark"] body.customers .fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number { color: var(--pc-text-3) !important; }

/* Base de Conhecimento (busca + badges) no dark */
[data-theme="dark"] body.customers .kb-search-heading { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .kb-search-heading,
[data-theme="dark"] body.customers .kb-search-wrap,
[data-theme="dark"] body.customers .kb-search-input { background: transparent !important; color: var(--pc-text) !important; }

/* Base de Conhecimento — jumbotron/bootstrap claros no dark */
[data-theme="dark"] body.customers .jumbotron,
[data-theme="dark"] body.customers .kb-search-jumbotron,
[data-theme="dark"] body.customers .kb-search { background: var(--pc-surface-2) !important; color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .kb-search-heading,
[data-theme="dark"] body.customers .kb-search-heading *,
[data-theme="dark"] body.customers .jumbotron h1,
[data-theme="dark"] body.customers .jumbotron h2,
[data-theme="dark"] body.customers .jumbotron p { color: var(--pc-text) !important; }
[data-theme="dark"] body.customers .kb-search-input { background: var(--pc-surface) !important; color: var(--pc-text) !important; border-color: var(--pc-border) !important; }
[data-theme="dark"] body.customers .kb-search-input::placeholder { color: var(--pc-text-3) !important; }
[data-theme="dark"] body.customers .kb-search-icon { color: var(--pc-text-3) !important; }

/* FullCalendar: numero do dia atual (destaque) legivel */
/* Dia atual (FullCalendar): fundo solido + numero branco (claro e escuro) */
body.customers .fc .fc-daygrid-day.fc-day-today,
body.customers .fc .fc-day-today { background: #2563eb !important; }
body.customers .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number,
body.customers .fc .fc-day-today .fc-daygrid-day-number,
body.customers .fc .fc-day-today .fc-daygrid-day-number a { color: #fff !important; font-weight: 700 !important; }
[data-theme="dark"] body.customers .fc .fc-daygrid-day.fc-day-today,
[data-theme="dark"] body.customers .fc .fc-day-today { background: #2563eb !important; }
