/* =============================================================
   UBEE — Carrinho lateral, área de cliente e checkout
   Componente compartilhado em todo o site (injetado via commerce.js)
   Usa os tokens de assets/css/styles.css (--blue, --ink, --r-*, --shadow-*)
   ============================================================= */

/* ---------- Botões no header ---------- */
.ubee-nav-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: .25rem;
}
.ubee-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  color: var(--ink);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.ubee-icon-btn:hover { background: var(--bg-soft); color: var(--blue); }
.ubee-icon-btn.bump { animation: ubeeBump .35s ease; }
@keyframes ubeeBump { 30% { transform: scale(1.18); } 100% { transform: scale(1); } }

.ubee-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ubee-cart-badge[hidden] { display: none; }

/* ---------- Overlay de fundo (compartilhado) ---------- */
.ubee-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 26, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1900;
}
.ubee-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Drawer do carrinho ---------- */
.ubee-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 1950;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease;
  box-shadow: var(--shadow-lg);
}
.ubee-cart-drawer.is-open { transform: translateX(0); }

.ubee-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.ubee-cart-head h2 { font-size: 1.15rem; }
.ubee-cart-pill {
  font-size: .78rem;
  color: var(--slate);
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  padding: .2rem .7rem;
  margin-left: .5rem;
}
.ubee-cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate);
}
.ubee-cart-close:hover { background: var(--bg-soft); color: var(--ink); }

.ubee-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.ubee-cart-empty {
  margin: auto;
  text-align: center;
  color: var(--slate);
  padding: 2rem 0;
}

.ubee-cart-item {
  display: flex;
  gap: .85rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.ubee-cart-item-thumb {
  flex: none;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--blue-050);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.ubee-cart-item-body { flex: 1; min-width: 0; }
.ubee-cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.ubee-cart-item-name { font-weight: 700; font-size: .95rem; }
.ubee-cart-item-sub { font-size: .8rem; color: var(--slate); margin-top: .15rem; }
.ubee-cart-item-remove { color: var(--slate); flex: none; padding: .2rem; }
.ubee-cart-item-remove:hover { color: #c0392b; }
.ubee-cart-item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.ubee-cart-item-price { font-weight: 700; font-family: var(--font-display); }

.ubee-cart-foot {
  border-top: 1px solid var(--line);
  padding: 1.1rem 1.4rem 1.4rem;
}
.ubee-cart-totals { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ubee-cart-totals b { font-family: var(--font-display); font-size: 1.2rem; }

/* ---------- Overlays cheios (checkout / conta) ---------- */
.ubee-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #fff;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ubee-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

/* Variante com identidade Ubee (conta + checkout) */
.ubee-overlay--branded { background: var(--bg-soft); }

.ubee-overlay__bar {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem clamp(1.1rem, 4vw, 2.5rem);
  z-index: 2;
}
/* Barra brandada: logo centralizado, voltar à esquerda */
.ubee-overlay__bar--branded { box-shadow: var(--shadow-sm); }
.ubee-overlay__logo img { height: 36px; display: block; }
.ubee-overlay__back {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--slate); font-weight: 600; font-size: .88rem;
  min-width: 72px;
}
.ubee-overlay__back:hover { color: var(--blue); }
.ubee-overlay__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem clamp(1.1rem, 4vw, 2.5rem) 4rem;
}

/* ---------- Card de autenticação brandado ---------- */
.ubee-auth-card {
  max-width: 480px;
  margin: 2rem auto 0;
  background: #fff;
  border-radius: var(--r-xl);
  padding: 2.8rem 2.4rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.ubee-auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}
.ubee-auth-brand p {
  font-size: .88rem;
  color: var(--slate);
  margin-top: .7rem;
  max-width: 28ch;
  margin-inline: auto;
  line-height: 1.5;
}
.ubee-auth-submit {
  width: 100%;
  justify-content: center;
  border-radius: var(--r-pill) !important;
  height: 50px;
  font-size: 1rem;
  margin-top: .4rem;
}
.ubee-auth-switch {
  text-align: center;
  font-size: .88rem;
  color: var(--slate);
  margin-top: 1.2rem;
}
.ubee-auth-switch a { color: var(--blue); font-weight: 700; }
.ubee-auth-back-link {
  margin-bottom: 1.2rem;
}
.ubee-auth-back-link a { color: var(--blue); font-size: .88rem; font-weight: 700; }

/* ---------- Indicador de força da senha ---------- */
.pwd-strength { margin-top: -.6rem; margin-bottom: 1rem; }
.pwd-strength-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: .65rem;
}
.pwd-strength-seg {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background .25s ease;
}
.pwd-strength-seg.s1 { background: #ef4444; }
.pwd-strength-seg.s2 { background: #f97316; }
.pwd-strength-seg.s3 { background: #eab308; }
.pwd-strength-seg.s4 { background: #22c55e; }
.pwd-strength-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .3rem .8rem;
}
.pwd-req {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--slate-400);
  transition: color .2s ease;
}
.pwd-req.ok { color: #16a34a; }
.pwd-req svg { flex: none; }

/* Divisor visual entre o card e o restante do portal */
.ubee-profile-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: var(--r-md);
  padding: .9rem 1.1rem; margin-bottom: 1.5rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

/* ---------- Formulários ---------- */
.ubee-field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.ubee-field label { font-size: .85rem; font-weight: 700; color: var(--ink-700); }
.ubee-field input,
.ubee-field select {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: .8rem .9rem;
  font-size: .95rem;
  background: #fff;
}
.ubee-field input:focus,
.ubee-field select:focus { border-color: var(--blue); }
.ubee-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 480px) { .ubee-field-row { grid-template-columns: 1fr; } }
.ubee-error {
  display: none;
  background: #fdecea;
  color: #b91c1c;
  border-radius: var(--r-sm);
  padding: .7rem .9rem;
  font-size: .88rem;
  margin-bottom: 1rem;
  white-space: pre-line;
}
.ubee-hint { font-size: .82rem; color: var(--slate); margin-top: -.5rem; margin-bottom: 1rem; }

/* ---------- Tabs de pagamento ---------- */
.ubee-pm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.3rem; }
.ubee-pm-tab {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: .9rem .5rem;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-700);
}
.ubee-pm-tab.is-active { border-color: var(--blue); color: var(--blue); background: var(--blue-050); }

/* ---------- Resumo / pedido ---------- */
.ubee-summary-item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line-2, var(--line)); }
.ubee-summary-item-thumb {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--blue-050); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; flex: none;
}
.ubee-summary-item-body { flex: 1; }
.ubee-summary-item-name { font-weight: 700; font-size: .92rem; }
.ubee-summary-item-sub { font-size: .78rem; color: var(--slate); }
.ubee-summary-item-price { font-weight: 700; font-family: var(--font-display); }
.ubee-summary-total { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }

/* ---------- Resultado do pagamento ---------- */
.ubee-pay-result { text-align: center; padding: 1.5rem 0; }
.ubee-pix-qr {
  width: 220px; height: 220px; margin: 0 auto 1.2rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--bg-soft);
}
.ubee-pix-code {
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: .85rem 1rem;
  font-family: var(--font-mono, monospace);
  font-size: .78rem;
  word-break: break-all;
  margin-bottom: 1rem;
}

/* ---------- Tabs login/registro ---------- */
.ubee-auth-switch { text-align: center; margin-top: 1.2rem; font-size: .9rem; color: var(--slate); }
.ubee-auth-switch a { color: var(--blue); font-weight: 700; }

/* ---------- Pedidos (Minha conta) ---------- */
.ubee-order-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-bottom: .9rem;
}
.ubee-order-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.ubee-order-status {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .25rem .6rem; border-radius: var(--r-pill);
  background: var(--bg-soft); color: var(--slate);
}
.ubee-order-status--pago { background: #e6f6ec; color: #15803d; }
.ubee-order-status--aguardando_pagamento { background: #fff6e0; color: #92400e; }
.ubee-profile-bar-old {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft); border-radius: var(--r-md);
  padding: .9rem 1.1rem; margin-bottom: 1.5rem;
}

/* ---------- Cards de plano (Ubee Growth) ---------- */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 720px) { .plans-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .plans-grid { grid-template-columns: repeat(3, 1fr); } }

.plan-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.8rem;
  background: #fff;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.plan-card--featured { border-color: var(--blue); box-shadow: var(--shadow-blue); }
.plan-card__badge {
  align-self: flex-start;
  font-size: .75rem; font-weight: 700;
  background: var(--blue-050); color: var(--blue-700);
  padding: .3rem .75rem; border-radius: var(--r-pill);
  margin-bottom: .9rem;
}
.plan-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.plan-card__desc { color: var(--slate); font-size: .92rem; margin-bottom: 1.1rem; }
.plan-card__price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: .15rem; }
.plan-card__price span { font-size: .95rem; font-weight: 600; color: var(--slate); }
.plan-card__list { display: flex; flex-direction: column; gap: .55rem; margin: 1.1rem 0 1.4rem; flex: 1; }
.plan-card__list li { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; color: var(--ink-700); }
.plan-card__list svg { flex: none; color: var(--blue); margin-top: .15rem; }
.plans-empty, .plans-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--slate);
  padding: 3rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.plan-card-skeleton {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.8rem;
  height: 380px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, #fff 37%, var(--bg-soft) 63%);
  background-size: 400% 100%;
  animation: ubeeShimmer 1.4s infinite;
}
@keyframes ubeeShimmer { to { background-position: -135% 0; } }

@media (max-width: 560px) {
  .ubee-cart-drawer { width: 100%; }
}

/* ---------- Banner por página (assets/js/banners.js) ---------- */
.banner-slot { margin-block: 2rem; }
.banner-slot:empty { display: none; }
.banner-slot a { display: block; }
.banner-slot img {
  width: 100%;
  display: block;
  border-radius: var(--r-lg);
}

/* =============================================================
   PORTAL DO CLIENTE — abas, contratações, suporte, instalar tema
   ============================================================= */

/* ---------- Abas do portal ---------- */
.cp-tabs {
  display: flex;
  gap: .3rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.5rem;
}
.cp-tab {
  padding: .65rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--slate);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.cp-tab:hover { color: var(--blue); }
.cp-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.cp-panel { display: none; }
.cp-panel.is-active { display: block; }

/* ---------- Perfil / conta ---------- */
.cp-profile-form { display: grid; gap: .9rem; }
.cp-save-btn { margin-top: .5rem; }

/* ---------- Contratações (pedidos) ---------- */
.cp-billing-heading {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin: 1.5rem 0 .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.cp-billing-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.cp-order-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-bottom: .8rem;
}
.cp-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .6rem;
}
.cp-order-id { font-family: var(--font-display); font-size: .95rem; font-weight: 700; }
.cp-order-date { font-size: .8rem; color: var(--slate); }
.cp-order-items { font-size: .87rem; color: var(--ink-700); margin-bottom: .6rem; }
.cp-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.cp-order-total { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.cp-order-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.cp-order-actions a,
.cp-order-actions button {
  font-size: .8rem;
  padding: .4rem .8rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-700);
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.cp-order-actions a:hover,
.cp-order-actions button:hover { background: var(--blue-050); color: var(--blue); border-color: var(--blue); }
.cp-order-actions .install-btn { border-color: #16a34a; color: #16a34a; }
.cp-order-actions .install-btn:hover { background: #e6f6ec; border-color: #15803d; color: #15803d; }

/* Badges de status */
.ubee-order-status { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .25rem .65rem; border-radius: var(--r-pill); background: var(--bg-soft); color: var(--slate); }
.ubee-order-status--pago { background: #e6f6ec; color: #15803d; }
.ubee-order-status--aguardando_pagamento { background: #fff6e0; color: #92400e; }
.ubee-order-status--cancelado { background: #fdecea; color: #b91c1c; }

/* ---------- Suporte / tickets ---------- */
.cp-ticket-actions { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.cp-ticket-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .9rem 1.1rem;
  margin-bottom: .7rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cp-ticket-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(13,110,253,.08); }
.cp-ticket-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; flex-wrap: wrap; gap: .4rem; }
.cp-ticket-subject { font-weight: 700; font-size: .92rem; }
.cp-ticket-meta { font-size: .78rem; color: var(--slate); }
.cp-priority { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .55rem; border-radius: var(--r-pill); }
.cp-priority--low { background: #e6f6ec; color: #15803d; }
.cp-priority--normal { background: #dbeafe; color: #1d4ed8; }
.cp-priority--high { background: #fdecea; color: #b91c1c; }

/* Thread de mensagens */
.cp-ticket-back { margin-bottom: 1rem; font-size: .88rem; font-weight: 700; color: var(--slate); cursor: pointer; }
.cp-ticket-back:hover { color: var(--blue); }
.cp-thread { display: grid; gap: .9rem; margin-bottom: 1.2rem; }
.cp-msg { padding: .85rem 1rem; border-radius: var(--r-md); font-size: .9rem; line-height: 1.55; }
.cp-msg--client { background: var(--blue-050); border-left: 3px solid var(--blue); }
.cp-msg--staff  { background: var(--bg-soft); border-left: 3px solid var(--line-strong); }
.cp-msg__meta { font-size: .75rem; color: var(--slate); margin-top: .4rem; }
.cp-reply-area { border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: .75rem .9rem; }
.cp-reply-area textarea { width: 100%; resize: vertical; min-height: 80px; border: none; outline: none; font-family: inherit; font-size: .9rem; background: transparent; }
.cp-reply-foot { display: flex; justify-content: flex-end; margin-top: .6rem; }

/* Formulário de novo ticket */
.cp-new-ticket { background: var(--bg-soft); border-radius: var(--r-md); padding: 1.2rem; margin-bottom: 1rem; display: none; }
.cp-new-ticket.is-open { display: block; }
.cp-new-ticket h3 { font-size: 1rem; margin-bottom: 1rem; }

/* ---------- Modal de instalação de tema ---------- */
.install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,18,26,.6);
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
}
.install-overlay.is-open { display: flex; }
.install-modal {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 1.8rem;
  width: min(480px, 92vw);
  box-shadow: var(--shadow-lg);
}
.install-modal h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.install-modal .install-note { font-size: .85rem; color: var(--slate); margin-bottom: 1.2rem; }
.install-modal-foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }

/* ---------- Visualizar senha ---------- */
.pwd-toggle-wrap { position: relative; }
.pwd-toggle-wrap input { width: 100%; padding-right: 2.6rem; }
.pwd-eye {
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-400);
  display: flex;
  padding: .2rem;
  transition: color .15s;
}
.pwd-eye:hover { color: var(--blue); }

/* ---------- Indicador de etapas do checkout ---------- */
.co-steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--slate);
  margin-bottom: .5rem;
}
.co-step { font-weight: 600; }
.co-step.is-active { color: var(--blue); }
.co-step-sep { color: var(--slate); font-weight: 400; }

/* ---------- Bloco informativo do método de pagamento (etapa 2) ---------- */
.co-pay-info {
  text-align: center;
  padding: 1.4rem 1rem;
  margin-bottom: 1.2rem;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.co-pay-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
}
.co-pay-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: .35rem;
}
.co-pay-desc {
  font-size: .88rem;
  color: var(--slate);
  line-height: 1.5;
}

/* =============================================================
   PORTAL DO CLIENTE — layout sidebar + main
   ============================================================= */

/* ── Overlay full-screen ── */
/* Quando o portal dashboard está ativo, o overlay vira full-screen */
#ubee-account-overlay.p-overlay-portal {
  overflow: hidden;
}
#ubee-account-overlay.p-overlay-portal .ubee-overlay__bar {
  display: none;
}
#ubee-account-inner.p-inner-full {
  max-width: 100%;
  padding: 0;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Portal shell ── */
#ubee-portal {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f5f7fb;
}

/* ── Sidebar ── */
.p-sidebar {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: width .22s ease, min-width .22s ease;
}
/* Estado recolhido */
.p-sidebar.is-collapsed {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}
.p-sidebar-logo {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  overflow: hidden;
  white-space: nowrap;
}
.p-sidebar-logo img { flex-shrink: 0; }
.p-sidebar.is-collapsed .p-sidebar-logo img { display: none; }
.p-sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--slate); padding: .3rem; border-radius: 6px;
  display: flex; align-items: center; flex-shrink: 0;
  transition: background .14s, color .14s;
}
.p-sidebar-toggle:hover { background: var(--bg-soft); color: var(--blue); }
.p-sidebar.is-collapsed .p-sidebar-logo {
  justify-content: center;
  padding: 1.1rem 0;
}
.p-nav {
  flex: 1;
  padding: .9rem .6rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.p-sidebar.is-collapsed .p-nav { padding: .9rem .35rem; }
.pnav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .65rem .9rem;
  border-radius: 8px;
  color: #4b5563;
  font-weight: 600;
  font-size: .87rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .14s, color .14s;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.pnav-item:hover { background: #f0f4ff; color: var(--blue); }
.pnav-item.is-active { background: #eff6ff; color: var(--blue); }
.pnav-item svg { flex: none; opacity: .65; }
.pnav-item:hover svg, .pnav-item.is-active svg { opacity: 1; }
.pnav-item span { transition: opacity .18s ease; }
.p-sidebar.is-collapsed .pnav-item { padding: .65rem; justify-content: center; gap: 0; }
.p-sidebar.is-collapsed .pnav-item span { display: none; }
/* Tooltip ao recolher */
.p-sidebar.is-collapsed .pnav-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%; transform: translateY(-50%);
  background: #1e293b; color: #fff;
  font-size: .78rem; font-weight: 600;
  padding: .3rem .65rem; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s ease;
  z-index: 100;
}
.p-sidebar.is-collapsed .pnav-item:hover::after { opacity: 1; }
.p-sidebar-foot { padding: 1rem .9rem; border-top: 1px solid var(--line); }
.p-sidebar.is-collapsed .p-sidebar-foot { padding: .7rem .35rem; }
.p-help-card {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: #f0f4ff;
  border-radius: 8px;
  padding: .75rem .9rem;
  font-size: .82rem;
}
.p-sidebar.is-collapsed .p-help-card { justify-content: center; padding: .65rem; }
.p-help-card svg { margin-top: .1rem; flex: none; color: var(--blue); }
.p-help-card b, .p-help-card div { transition: opacity .18s ease; }
.p-sidebar.is-collapsed .p-help-card div { display: none; }
.p-sidebar.is-collapsed .p-help-card svg { margin-top: 0; cursor: pointer; }
.p-help-card b { font-size: .82rem; display: block; margin-bottom: .1rem; }
.p-help-link {
  background: none; border: none; cursor: pointer;
  color: var(--blue); font-size: .8rem; font-weight: 700; padding: 0;
}
.p-help-link:hover { text-decoration: underline; }

/* ── Main area ── */
.p-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
}

/* ── Topbar ── */
.p-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  flex-shrink: 0;
  z-index: 5;
}
.p-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--slate);
}
.p-topbar-right { display: flex; align-items: center; gap: .8rem; }
.p-user-badge { display: flex; align-items: center; gap: .65rem; }
.p-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
}
.p-avatar--lg { width: 52px; height: 52px; font-size: 1.1rem; }
.p-user-info { line-height: 1.25; }
.p-user-info b { font-size: .88rem; display: block; }
.p-user-info span { font-size: .78rem; color: var(--slate); }
.p-icon-btn {
  background: none; border: none; cursor: pointer;
  padding: .4rem; border-radius: 6px; color: var(--slate);
  display: flex; align-items: center;
  transition: background .14s, color .14s;
}
.p-icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.p-logout-btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; border-radius: 7px;
  background: none; border: 1px solid var(--line-strong);
  font-size: .82rem; font-weight: 700; color: var(--slate);
  cursor: pointer; transition: background .14s, color .14s, border-color .14s;
}
.p-logout-btn:hover { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }

/* ── Body / content area ── */
.p-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.8rem 1.6rem 2.4rem;
}


/* ── Loading ── */
.p-loading {
  color: var(--slate); font-size: .9rem; padding: 1.5rem 0;
}

/* ── Page header ── */
.p-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.p-page-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.p-back-btn {
  background: none; border: none; cursor: pointer;
  font-weight: 700; font-size: .88rem; color: var(--blue);
  display: flex; align-items: center; gap: .35rem;
  padding: 0;
}
.p-back-btn:hover { text-decoration: underline; }

/* ── Welcome ── */
.p-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.6rem 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.p-welcome-left { display: flex; align-items: center; gap: 1rem; }
.p-welcome .p-avatar { background: rgba(255,255,255,.2); color: #fff; width: 52px; height: 52px; font-size: 1.1rem; }
.p-welcome-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 .25rem; }
.p-welcome-sub { font-size: .88rem; opacity: .88; margin: 0; line-height: 1.5; }
.p-status-badge {
  display: flex; align-items: center; gap: .7rem;
  background: rgba(255,255,255,.15);
  border-radius: 10px; padding: .8rem 1.1rem;
}
.p-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.3);
  flex-shrink: 0;
}
.p-status-label { font-weight: 700; font-size: .88rem; }
.p-status-sub { font-size: .78rem; opacity: .8; }

/* ── Stats row ── */
.p-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.p-stat-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: box-shadow .15s;
  min-width: 0;
}
.p-stat-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.p-stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p-stat-body { flex: 1; min-width: 0; }
.p-stat-label { font-size: .8rem; font-weight: 600; color: var(--slate); margin-bottom: .25rem; }
.p-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--ink); margin-bottom: .3rem; line-height: 1; }
.p-stat-link {
  background: none; border: none; cursor: pointer;
  font-size: .78rem; font-weight: 700; color: var(--blue); padding: 0;
}
.p-stat-link:hover { text-decoration: underline; }

/* ── 2-col grid ── */
.p-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

/* ── Card ── */
.p-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 1.2rem;
  overflow: hidden;
}
.p-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  gap: .5rem;
}
.p-card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.p-card-link {
  background: none; border: none; cursor: pointer;
  font-size: .82rem; font-weight: 700; color: var(--blue); padding: 0;
}
.p-card-link:hover { text-decoration: underline; }
.p-card-close {
  background: none; border: none; cursor: pointer;
  color: var(--slate); padding: .2rem; border-radius: 4px;
  display: flex; align-items: center;
}
.p-card-close:hover { background: var(--bg-soft); color: var(--ink); }
.p-card-body { padding: 1.1rem 1.2rem; }

/* ── Account summary grid ── */
.p-account-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.p-sum-item { display: flex; flex-direction: column; gap: .15rem; }
.p-sum-label { font-size: .75rem; color: var(--slate); font-weight: 600; }
.p-sum-val { font-size: .9rem; font-weight: 600; color: var(--ink); }

/* ── Table ── */
.p-table-wrap { overflow-x: auto; }
.p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}
.p-table th {
  text-align: left;
  padding: .65rem .8rem;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.p-table td {
  padding: .75rem .8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}
.p-table tbody tr:last-child td { border-bottom: none; }
.p-table tbody tr:hover td { background: #fafbff; }
.p-cell-desc { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Action buttons in table ── */
.p-action-btn, .p-action-link {
  font-size: .79rem; font-weight: 700;
  padding: .35rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-700);
  cursor: pointer; text-decoration: none;
  transition: background .14s, color .14s, border-color .14s;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.p-action-btn:hover, .p-action-link:hover { background: #eff6ff; color: var(--blue); border-color: var(--blue); }
.install-btn { border-color: #16a34a; color: #16a34a; }
.install-btn:hover { background: #f0fdf4; border-color: #15803d; color: #15803d; }

/* ── Status badges ── */
.p-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  padding: .2rem .6rem;
  border-radius: 20px;
  background: var(--bg-soft); color: var(--slate);
  white-space: nowrap;
}
.p-badge--reembolsado { background: #ede9fe; color: #5b21b6; }
.p-badge--pago        { background: #dcfce7; color: #15803d; }
.p-tipo-badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .18rem .55rem; border-radius: 20px; white-space: nowrap; }
.p-tipo-rec  { background: #dbeafe; color: #1d4ed8; }
.p-tipo-avl  { background: #f3f4f6; color: #4b5563; }
.p-badge--ativo       { background: #dcfce7; color: #15803d; }
.p-badge--aguardando_pagamento { background: #fef3c7; color: #92400e; }
.p-badge--aguardando_analise  { background: #fef3c7; color: #92400e; }
.p-badge--aprovado    { background: #dbeafe; color: #1d4ed8; }
.p-badge--cancelado   { background: #fee2e2; color: #b91c1c; }
.p-badge--em_atraso   { background: #fee2e2; color: #b91c1c; }
/* Tickets */
.p-badge--tk-aberto    { background: #fef3c7; color: #92400e; }
.p-badge--tk-andamento { background: #dbeafe; color: #1d4ed8; }
.p-badge--tk-resolvido { background: #dcfce7; color: #15803d; }
/* Prioridade */
.p-badge--prio-baixa  { background: #dcfce7; color: #15803d; }
.p-badge--prio-media  { background: #fef3c7; color: #92400e; }
.p-badge--prio-alta   { background: #fee2e2; color: #b91c1c; }

/* ── PIX pay detail inside table ── */
.cp-pay-detail {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-align: center;
}
.cp-pay-detail-title { font-weight: 700; color: #166534; margin-bottom: .5rem; font-size: .95rem; }
.cp-pix-img { width: 150px; height: 150px; display: block; margin: .5rem auto; }
.cp-pix-code {
  font-size: .72rem; word-break: break-all;
  background: #fff; border-radius: 4px; padding: .5rem;
  text-align: left; color: var(--ink); margin: .5rem 0;
  border: 1px solid var(--line);
}
.cp-copy-pix {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; padding: .45rem 1rem;
}

/* ── Empty state ── */
.p-empty { color: var(--slate); font-size: .9rem; padding: .5rem 0; }

/* ── Ticket thread ── */
.p-reply-area {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: .75rem .9rem;
  margin-top: 1.2rem;
}
.p-reply-area textarea {
  width: 100%; resize: vertical; min-height: 80px;
  border: none; outline: none; font-family: inherit; font-size: .9rem; background: transparent;
}
.p-tk-header { margin-bottom: .8rem; }
.cp-msg-name { font-size: .75rem; font-weight: 700; margin-bottom: .3rem; color: var(--slate); }
.cp-msg-text { font-size: .9rem; line-height: 1.55; }

/* ── Form row ── */
.ubee-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ubee-success { background: #dcfce7; color: #15803d; border-radius: var(--r-sm); padding: .6rem .9rem; font-size: .88rem; margin-bottom: .8rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .p-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .p-sidebar { display: none; }
  .p-main { margin-left: 0; }
  .p-stats { grid-template-columns: 1fr 1fr; }
  .p-grid-2 { grid-template-columns: 1fr; }
  .p-account-summary { grid-template-columns: 1fr; }
  .ubee-field-row { grid-template-columns: 1fr; }
  .p-welcome { padding: 1.2rem; }
}
@media (max-width: 480px) {
  .p-stats { grid-template-columns: 1fr; }
  .p-body { padding: 1.2rem .9rem; }
}

/* ── Filtros de chamados ── */
.p-tk-filters {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.p-tk-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: .5rem .85rem;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  color: var(--slate);
}
.p-tk-search-wrap input {
  border: none; outline: none; font: inherit;
  font-size: .88rem; background: transparent;
  color: var(--ink); width: 100%;
}
.p-tk-status-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.p-tk-stab {
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 20px; padding: .35rem .9rem;
  font-size: .8rem; font-weight: 600; color: var(--slate);
  cursor: pointer; transition: all .14s;
}
.p-tk-stab:hover { border-color: var(--blue); color: var(--blue); }
.p-tk-stab.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Paginação ── */
.p-pagination {
  display: flex; gap: .35rem; justify-content: center;
  margin-top: 1rem; flex-wrap: wrap;
}
.p-page-btn {
  min-width: 34px; height: 34px;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 6px; font-size: .82rem; font-weight: 700;
  color: var(--slate); cursor: pointer;
  transition: all .14s; display: flex; align-items: center; justify-content: center;
}
.p-page-btn:hover { border-color: var(--blue); color: var(--blue); }
.p-page-btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Indicador real-time ── */
.p-tk-live {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: #16a34a; font-weight: 600;
}
.p-tk-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #16a34a;
  animation: tkPulse 2s infinite;
}
@keyframes tkPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

