/* ===== RESET / BASE ===== */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; background: #f3f3f4; color: #333; }

/* ===== RIPPLE EFFECT ===== */
/* A classe .ripple-ready é adicionada via JS nos elementos elegíveis */
.ripple-ready {
  position: relative !important;
  overflow: hidden !important;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-expand .55s linear;
  pointer-events: none;
  z-index: 9;
  background: rgba(255, 255, 255, 0.30);
}

.ripple-wave.ripple-dark {
  background: rgba(26, 179, 148, 0.20);
}

@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ===== LOGIN ===== */
#tela-login {
  display: flex; min-height: 100vh;
}

/* Painel esquerdo */
.login-left {
  flex: 0 0 62%;
  background: linear-gradient(135deg, #1a2744 0%, #1c3a6e 50%, #1ab394 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(26,179,148,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(100,120,200,.2) 0%, transparent 50%);
}
.login-brand-big {
  position: relative; z-index: 1;
  font-size: 42px; font-weight: 800; color: #fff; letter-spacing: -1.5px;
}
.login-brand-big span { color: #1ab394; }

/* Painel direito */
.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 40px 32px;
}
.login-right-inner { width: 100%; max-width: 380px; }

.login-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f4f4f5; border: 1px solid #e4e4e7; border-radius: 20px;
  padding: 5px 14px; font-size: 12px; font-weight: 600; color: #555;
  margin-bottom: 28px;
}
.login-tag .fa { color: #1ab394; font-size: 13px; }

.login-h1 { font-size: 26px; font-weight: 800; color: #1a2744; margin: 0 0 6px; letter-spacing: -.5px; }
.login-sub { font-size: 13px; color: #888; margin: 0 0 32px; }

.login-label { font-size: 11px; font-weight: 700; color: #555; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 6px; display: block; }

.login-input-wrap { position: relative; margin-bottom: 18px; }
.login-input-wrap .fa-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #bbb; font-size: 14px; pointer-events: none;
}
.login-input-wrap input {
  width: 100%; height: 50px; border: 1.5px solid #e4e4e7; border-radius: 10px;
  padding: 0 42px 0 40px; font-size: 14px; color: #333; outline: none;
  transition: border-color .15s, box-shadow .15s; background: #fafafa;
}
.login-input-wrap input:focus { border-color: #1ab394; box-shadow: 0 0 0 3px rgba(26,179,148,.12); background: #fff; }
.login-input-wrap input::placeholder { color: #bbb; }
.btn-toggle-senha {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #bbb; font-size: 16px; padding: 0;
}
.btn-toggle-senha:hover { color: #888; }

.btn-login {
  width: 100%; height: 52px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #1a2744 0%, #1ab394 100%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .15s, transform .1s; margin-top: 4px;
}
.btn-login:hover { opacity: .92; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.login-switch { text-align: center; margin-top: 20px; font-size: 13px; color: #999; }
.login-switch a { color: #1ab394; font-weight: 700; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }

/* Responsivo: empilha em mobile */
@media (max-width: 680px) {
  #tela-login { flex-direction: column; }
  .login-left { flex: 0 0 180px; }
  .login-brand-big { font-size: 30px; }
}

/* ===== SIDEBAR ===== */
.mc-sidebar {
  position: fixed; top: 0; left: 0; width: 240px; height: 100vh;
  background: linear-gradient(180deg, #1a2744 0%, #1a3a32 60%, #17705a 100%);
  overflow-y: auto; z-index: 1000;
  transition: transform .25s ease; display: flex; flex-direction: column;
}
.mc-sidebar-header {
  padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.mc-brand { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.5px; margin-bottom: 10px; }
.mc-brand span { color: #5ee8c8; }
.mc-user-line { font-size: 11px; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-user-badge {
  background: rgba(26,179,148,.25); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 20px; border: 1px solid rgba(26,179,148,.4);
}

.mc-nav { padding: 6px 0; flex: 1; }
.mc-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; color: rgba(255,255,255,.6);
  font-size: 12px; font-weight: 600; text-decoration: none; letter-spacing: .3px;
  transition: background .15s, color .15s, border-color .15s;
  border-left: 3px solid transparent;
}
.mc-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mc-nav a.ativo { background: rgba(255,255,255,.12); color: #fff; border-left-color: #5ee8c8; }
.mc-nav a .fa { width: 16px; text-align: center; font-size: 13px; opacity: .75; flex-shrink: 0; }
.mc-nav a.ativo .fa { opacity: 1; color: #5ee8c8; }
.mc-nav-label {
  padding: 14px 16px 4px; font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.3); letter-spacing: 1.2px; text-transform: uppercase;
}
.mc-nav-sair {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; margin-top: auto;
  color: rgba(255,255,255,.4) !important; font-size: 12px; font-weight: 600;
  text-decoration: none; border-top: 1px solid rgba(255,255,255,.1);
  transition: color .15s, background .15s; letter-spacing: .3px; border-left: 3px solid transparent !important;
}
.mc-nav-sair:hover { color: #fff !important; background: rgba(231,76,60,.2); }

/* ===== OVERLAY MOBILE ===== */
.mc-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
.mc-overlay.ativo { display: block; }

/* ===== WRAPPER ===== */
.mc-wrapper { margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }

/* ===== TOPBAR ===== */
.mc-topbar {
  height: 54px; background: #fff; border-bottom: 1px solid #d4ede8;
  display: flex; align-items: center; padding: 0 22px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(26,179,148,.08);
}
.menu-abrir { display: none; background: none; border: none; font-size: 18px; cursor: pointer; color: #555; padding: 4px 8px; }
.page-title { flex: 1; font-size: 14px; font-weight: 700; color: #1a2744; letter-spacing: .2px; }
.mc-topbar-right { display: flex; align-items: center; gap: 10px; }
.mc-topbar-saldo {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #edfaf7 0%, #d4f5ec 100%);
  border: 2px solid #1ab394; border-radius: 10px;
  padding: 7px 18px; font-size: 15px; font-weight: 800; color: #0e6b55;
  transition: background .3s, border-color .3s, color .3s;
  white-space: nowrap;
}
.mc-topbar-saldo .fa { color: #1ab394; font-size: 17px; transition: color .3s; }
.mc-topbar-saldo .saldo-label { font-size: 11px; font-weight: 600; opacity: .7; margin-right: 2px; }
#xsaldox3 { font-size: 16px; letter-spacing: .3px; }

/* Estado: créditos acabando (< R$ 10) */
.mc-topbar-saldo.saldo-baixo {
  background: linear-gradient(135deg, #fff5f5 0%, #fde8e8 100%);
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: saldo-pulsar 1.8s ease-in-out infinite;
}
.mc-topbar-saldo.saldo-baixo .fa { color: var(--color-danger); }
.saldo-aviso-texto {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--color-danger);
  background: #fde8e8; border-radius: 4px; padding: 1px 5px;
  margin-left: 2px;
}

@keyframes saldo-pulsar {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,.35); }
  50%       { box-shadow: 0 0 0 5px rgba(231,76,60,.0); }
}
.mc-topbar-sair {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #666; text-decoration: none; font-weight: 600;
  border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 5px 12px;
  transition: color .15s, border-color .15s;
}
.mc-topbar-sair:hover { color: #e74c3c; border-color: #e74c3c; }

/* ===== CONTAINER ===== */
.mc-container { flex: 1; padding: 20px 24px; background: #f4f6f8; }

/* ===== ABAS DE CATEGORIA ===== */
.cat-tabs {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.cat-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: 2px solid #dde2ea; background: #fff; color: #555;
  transition: all .15s; letter-spacing: .3px; text-transform: uppercase;
}
.cat-tab .fa { font-size: 14px; }
.cat-tab:hover { border-color: #1a2744; color: #1a2744; }
.cat-tab.ativo { background: linear-gradient(135deg, #1a2744 0%, #1ab394 100%); border-color: #1ab394; color: #fff; }
.cat-tab.ativo .fa { color: #fff; }

/* ===== CARDS DE CONSULTA ===== */
.cons-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 1100px) { .cons-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .cons-grid { grid-template-columns: 1fr; } }

.cons-card {
  background: #fff;
  border: 1.5px solid #e0e7ef;
  border-left: 4px solid #1ab394;
  border-radius: 10px;
  padding: 14px 16px 14px 14px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  position: relative;
  box-shadow: 0 1px 4px rgba(26,39,68,.05);
}
.cons-card:hover {
  background: #f5fdfb;
  border-color: #1ab394;
  border-left-color: #1a2744;
  box-shadow: 0 4px 14px rgba(26,179,148,.13);
}

.cons-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #1a2744 0%, #1ab394 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  box-shadow: 0 2px 6px rgba(26,179,148,.25);
}
.cons-info { flex: 1; min-width: 0; }
.cons-titulo {
  font-size: 12.5px; font-weight: 800; color: #1ab394;
  text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cons-desc { font-size: 11.5px; color: #7a8a9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Em coluna única os textos aparecem completos */
.cons-card .cons-titulo,
.cons-card .cons-desc { white-space: normal; overflow: visible; text-overflow: unset; }

.cons-preco {
  flex-shrink: 0;
  background: #e8faf4;
  color: #1ab394;
  border: 1.5px solid #1ab394;
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px; letter-spacing: .3px;
  white-space: nowrap;
}
.cons-card:hover .cons-preco {
  background: linear-gradient(135deg, #1a2744 0%, #1ab394 100%);
  color: #fff; border-color: transparent;
}

/* Card destaque (Aumente Score) */
.cons-card-destaque {
  border-left-color: #1a2744;
  background: linear-gradient(135deg, rgba(26,39,68,.03) 0%, rgba(26,179,148,.04) 100%);
}
.cons-card-destaque .cons-titulo { color: #1ab394; }
.cons-card-destaque .cons-preco  { background: linear-gradient(135deg,#1a2744,#1ab394); color:#fff; border-color:transparent; }

/* ===== CARDS ===== */
.mc-card { background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 20px; }
.mc-card-header { padding: 14px 18px; border-bottom: 1px solid #f0f0f0; font-size: 13px; font-weight: 700; color: #333; display: flex; align-items: center; gap: 8px; }
.mc-card-body { padding: 18px; }

/* ===== DASHBOARD STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 6px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.stat-icon.verde  { background: #1ab394; }
.stat-icon.azul   { background: #1c84c6; }
.stat-icon.laranja{ background: #f8ac59; }
.stat-icon.roxo   { background: #9b59b6; }
.stat-info small  { display: block; font-size: 11px; color: #999; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.stat-info strong { font-size: 22px; font-weight: 700; color: #333; line-height: 1.2; }

/* ===== TABELA ===== */
.table-responsive { overflow-x: auto; }
.mc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mc-table th { background: #f8f8f8; padding: 9px 12px; text-align: left; font-weight: 700; color: #555; border-bottom: 2px solid #e8e8e8; white-space: nowrap; }
.mc-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; color: #444; vertical-align: middle; }
.mc-table tr:hover td { background: #fafafa; }

/* ===== BADGES ===== */
.badge-tipo { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.badge-cpf      { background: #e8f4fd; color: #1c84c6; }
.badge-cnpj     { background: #eafaf1; color: #1ab394; }
.badge-placa    { background: #fef9e7; color: #d4a017; }
.badge-telefone { background: #f5eef8; color: #9b59b6; }
.badge-ok   { background: #eafaf1; color: #1ab394; }
.badge-erro { background: #fce8e8; color: #e74c3c; }

/* ===== CONSULTA FORM ===== */
.tipo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tipo-btn {
  border: 2px solid #e8e8e8; border-radius: 8px; padding: 16px 12px;
  text-align: center; cursor: pointer; transition: all .15s; background: #fff;
}
.tipo-btn:hover { border-color: #1ab394; background: #f0faf8; }
.tipo-btn.selecionado { border-color: #1ab394; background: #f0faf8; }
.tipo-btn .fa { font-size: 22px; color: #1ab394; display: block; margin-bottom: 6px; }
.tipo-btn span { font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .5px; }

/* ===== RESULTADO CONSULTA ===== */
.resultado-box { background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 6px; padding: 16px; }
.resultado-item { display: flex; padding: 6px 0; border-bottom: 1px solid #eee; gap: 12px; }
.resultado-item:last-child { border-bottom: none; }
.resultado-label { font-weight: 700; color: #888; font-size: 11px; text-transform: uppercase; min-width: 140px; }
.resultado-valor { color: #333; font-size: 13px; }

/* ===== PAGINACAO ===== */
.mc-paginacao { display: flex; gap: 4px; justify-content: flex-end; margin-top: 12px; }
.mc-paginacao button { padding: 4px 10px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.mc-paginacao button:hover { background: #f0f0f0; }
.mc-paginacao button.ativo { background: #1ab394; color: #fff; border-color: #1ab394; }

/* ===== MODAL ===== */
.modal-content { border-radius: 8px; border: none; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.modal-header { background: #1a2744; color: #fff; border-radius: 8px 8px 0 0; border-bottom: none; }
.modal-header .close { color: #fff; opacity: .7; }
.modal-title { font-size: 14px; font-weight: 700; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 20px; color: #bbb; }
.empty-state .fa { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== SEÇÕES DE RESULTADO ===== */
.res-secao { margin-bottom: 12px; }
.res-secao-titulo {
  font-size: 11px; font-weight: 700; color: #1a2744; text-transform: uppercase;
  letter-spacing: .8px; padding: 6px 0 4px; display: flex; align-items: center; gap: 6px;
}
.res-secao-titulo .fa { color: #1ab394; }
.resultado-box { background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 6px; padding: 4px 12px; }
.resultado-item { display: flex; padding: 6px 0; border-bottom: 1px solid #eee; gap: 12px; align-items: flex-start; }
.resultado-item:last-child { border-bottom: none; }
.resultado-label { font-weight: 700; color: #888; font-size: 11px; text-transform: uppercase; min-width: 130px; flex-shrink: 0; padding-top: 1px; }
.resultado-valor { color: #333; font-size: 13px; word-break: break-word; }

/* ===== POPUP SALDO INSUFICIENTE ===== */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(10,20,40,.65);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
@keyframes popupIn {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes popupOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(.85) translateY(20px); }
}
.popup-box {
  background: #fff; border-radius: 16px; padding: 36px 32px; max-width: 380px; width: 90%;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: popupIn .25s cubic-bezier(.34,1.56,.64,1) forwards;
}
.popup-icone {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.popup-box-erro .popup-icone { background: #fff0f0; color: #e74c3c; }
.popup-titulo {
  font-size: 18px; font-weight: 800; letter-spacing: .5px; margin-bottom: 10px;
}
.popup-box-erro .popup-titulo { color: #c0392b; }
.popup-msg {
  font-size: 13px; color: #666; line-height: 1.7; margin-bottom: 24px;
}
.popup-msg strong { color: #1a2744; }
.popup-acoes { display: flex; flex-direction: column; gap: 10px; }
.popup-btn-recarga {
  background: linear-gradient(135deg, #1a2744 0%, #1ab394 100%);
  color: #fff; border: none; border-radius: 10px; padding: 13px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.popup-btn-recarga:hover { opacity: .9; }
.popup-btn-fechar {
  background: none; border: 1.5px solid #e0e0e0; border-radius: 10px;
  padding: 10px 20px; font-size: 13px; color: #999; cursor: pointer;
  transition: border-color .15s, color .15s; font-weight: 600;
}
.popup-btn-fechar:hover { border-color: #bbb; color: #666; }

/* ===== PIX ===== */
.pix-box {
  background: #f0faf8; border: 2px solid #1ab394; border-radius: 12px;
  padding: 24px; text-align: center; margin: 16px 0;
}
.pix-logo { font-size: 36px; color: #1ab394; margin-bottom: 8px; }
.pix-titulo { font-size: 15px; font-weight: 700; color: #1a2744; margin-bottom: 4px; }
.pix-sub { font-size: 12px; color: #888; margin-bottom: 16px; }
.pix-valor { font-size: 28px; font-weight: 800; color: #1ab394; margin-bottom: 16px; }
.pix-chave-wrap { background: #fff; border: 1.5px dashed #1ab394; border-radius: 8px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pix-chave { font-size: 13px; font-weight: 600; color: #1a2744; word-break: break-all; text-align: left; }
.btn-copiar { background: #1ab394; border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s; }
.btn-copiar:hover { background: #17a085; }
.pix-aviso { background: #fff8e1; border: 1px solid #ffc107; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #856404; margin-top: 12px; text-align: left; }
.pix-aviso .fa { margin-right: 6px; }

/* ===== PENDENTES ===== */
.pendente-card {
  background: #fff; border: 1.5px solid #e8eaed; border-radius: 10px;
  padding: 16px; display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px; transition: border-color .15s;
}
.pendente-card:hover { border-color: #1ab394; }
.pendente-info { flex: 1; }
.pendente-nome { font-size: 13px; font-weight: 700; color: #1a2744; }
.pendente-email { font-size: 11px; color: #888; }
.pendente-valor { font-size: 20px; font-weight: 800; color: #1ab394; margin: 0 16px; white-space: nowrap; }
.pendente-data { font-size: 11px; color: #aaa; margin-top: 2px; }
.pendente-acoes { display: flex; gap: 8px; flex-shrink: 0; }

/* ===== RESULTADO — layout harmonizado ===== */
.resultado-wrapper { font-family: 'Open Sans', sans-serif; }

/* Cabeçalho de sucesso */
.res-header-ok {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; padding: 10px 14px;
  background: #f0faf8; border-radius: 8px; border: 1px solid #1ab394;
}
.res-header-ok .res-header-title { font-size: 13px; font-weight: 700; color: #1ab394; }
.res-header-ok .res-header-meta  { margin-left: auto; font-size: 11px; color: #888; white-space: nowrap; }

/* Seções */
.res-secao { margin-bottom: 18px; }
.res-secao-titulo {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #1a2744;
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 7px; margin-bottom: 8px;
  border-bottom: 2px solid #e0e7ef;
}
.res-secao-titulo .fa { color: #1ab394; font-size: 13px; }

/* Caixa de campos */
.resultado-box {
  background: #fff; border: 1px solid #e8ecf0;
  border-radius: 8px; padding: 0; overflow: hidden;
}

/* Linha de campo */
.resultado-item {
  display: flex; align-items: flex-start; gap: 0;
  padding: 9px 14px; border-bottom: 1px solid #f0f0f0;
  transition: background .1s;
}
.resultado-item:last-child { border-bottom: none; }
.resultado-item:hover { background: #f8fffe; }
.resultado-label {
  font-weight: 700; color: #7a8a9a; font-size: 10px;
  text-transform: uppercase; letter-spacing: .5px;
  min-width: 145px; flex-shrink: 0; padding-top: 2px;
}
.resultado-valor { color: #222; font-size: 13px; word-break: break-word; line-height: 1.4; }

/* Card de pessoa/empresa nos resultados de lista */
.res-card {
  background: #fafbfc; border: 1px solid #e4e9f0;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 8px;
  transition: border-color .15s;
}
.res-card:hover { border-color: #1ab394; }
.res-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.res-card-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#1a2744,#1ab394);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.res-card-nome { font-weight: 700; font-size: 14px; color: #1a2744; }
.res-card-sub  { font-size: 11px; color: #888; margin-top: 1px; }

/* Barra de ações pós-resultado */
.res-acoes {
  display: flex; gap: 10px; margin-top: 18px; padding-top: 14px;
  border-top: 2px solid #e0e7ef;
}
.res-btn-voltar {
  flex: 1; height: 40px; border: 1.5px solid #ccd3dc; background: #fff;
  border-radius: 6px; font-size: 13px; font-weight: 600; color: #555;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .15s;
}
.res-btn-voltar:hover { border-color: #1a2744; color: #1a2744; background: #f4f6fa; }
.res-btn-pdf {
  flex: 1; height: 40px; border: none;
  background: linear-gradient(135deg,#1a2744,#1ab394);
  border-radius: 6px; font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity .15s;
}
.res-btn-pdf:hover { opacity: .88; }

/* Badge contador */
.res-badge {
  background: #1ab394; color: #fff; border-radius: 12px;
  padding: 1px 9px; font-size: 11px; font-weight: 700; margin-left: 6px;
}

/* ===== PRINT / PDF ===== */
@media print {
  #tela-login, .mc-sidebar, .mc-topbar,
  .modal-header, .res-acoes,
  .loading-consulta, input, button { display: none !important; }
  .modal-body { padding: 0 !important; }
  .resultado-wrapper { font-size: 12px; }
  .res-secao-titulo { color: #000; border-bottom-color: #000; }
  .resultado-item:hover { background: transparent; }
}

/* ===== AVISO RETENÇÃO HISTÓRICO ===== */
.hist-aviso-retencao {
  display: flex; align-items: center; gap: 10px;
  background: #fff8e8; border: 1px solid #f8ac59; border-radius: 8px;
  padding: 10px 16px; margin-bottom: 14px;
  font-size: 12px; color: #7a5c00;
}
.hist-aviso-retencao .fa { color: #f8ac59; font-size: 15px; flex-shrink: 0; }

/* ===== POPUP AUMENTE SCORE ===== */
.popup-score-box {
  background: #fff; border-radius: 14px; width: 92vw; max-width: 620px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
}

.popup-score-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; background: linear-gradient(135deg,#1a2744 0%,#1ab394 100%);
  color: #fff; flex-shrink: 0;
}
.popup-score-header-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.15); display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.popup-score-titulo { font-size: 15px; font-weight: 800; }
.popup-score-sub    { font-size: 11px; opacity: .8; margin-top: 2px; }
.popup-score-fechar {
  margin-left: auto; background: rgba(255,255,255,.15); border: none;
  color: #fff; width: 32px; height: 32px; border-radius: 50%;
  font-size: 14px; cursor: pointer; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; transition: background .15s;
}
.popup-score-fechar:hover { background: rgba(255,255,255,.3); }

.popup-score-body {
  overflow-y: auto; padding: 20px; flex: 1;
  scrollbar-width: thin; scrollbar-color: #1ab394 #f0f0f0;
}

/* Faixas de pontuação */
.score-faixas { display: flex; gap: 8px; margin-bottom: 20px; }
.score-faixa {
  flex: 1; background: var(--cor); border-radius: 8px;
  padding: 8px 6px; text-align: center; color: #fff;
}
.score-faixa-range { display: block; font-size: 11px; font-weight: 800; }
.score-faixa-label { display: block; font-size: 10px; opacity: .9; margin-top: 2px; }

/* Título de seção */
.score-secao-titulo {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: #1a2744;
  border-bottom: 2px solid #e0e7ef; padding-bottom: 6px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.score-secao-titulo .fa { color: #1ab394; }

/* Pilares */
.score-pilares { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 20px; }
.score-pilar { text-align: center; }
.score-pilar-pct {
  color: #fff; font-size: 15px; font-weight: 800; border-radius: 8px;
  padding: 6px 4px; margin-bottom: 5px;
}
.score-pilar-nome { font-size: 10px; color: #555; line-height: 1.3; }

/* Dicas */
.score-dicas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.score-dica {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f8fffe; border: 1px solid #d4f0e8; border-radius: 8px; padding: 10px 12px;
}
.score-dica-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#1a2744,#1ab394);
  color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.score-dica strong { font-size: 12px; color: #1a2744; }
.score-dica small  { font-size: 11px; color: #666; line-height: 1.4; }

/* Aviso */
.score-aviso {
  background: #f4f6fa; border-left: 3px solid #1ab394;
  border-radius: 0 6px 6px 0; padding: 10px 12px;
  font-size: 11px; color: #666; display: flex; gap: 8px; align-items: flex-start;
}
.score-aviso .fa { color: #1ab394; flex-shrink: 0; margin-top: 1px; }

/* Rodapé */
.popup-score-footer {
  padding: 14px 20px; border-top: 1px solid #eee;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-shrink: 0; background: #fafafa;
}
.score-btn-download {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg,#1a2744,#1ab394);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 9px 18px; border-radius: 8px; text-decoration: none;
  transition: opacity .15s; white-space: nowrap;
}
.score-btn-download:hover { opacity: .88; color: #fff; }
.score-btn-bloqueado {
  background: #ccc !important; cursor: not-allowed; opacity: .6;
}

/* Card destaque no catálogo */
.cons-card-destaque {
  border-color: #1ab394;
  background: linear-gradient(135deg,rgba(26,179,148,.04) 0%,#fff 100%);
}
/* cons-card-destaque herda o mesmo ícone padrão */
.cons-card-destaque .cons-titulo { color: #1ab394; }

/* Mobile */
@media (max-width: 480px) {
  .score-faixas { flex-wrap: wrap; }
  .score-faixa  { min-width: calc(50% - 4px); }
  .score-pilares { grid-template-columns: repeat(2,1fr); }
  .popup-score-footer { flex-direction: column; align-items: stretch; text-align: center; }
  .score-btn-download { justify-content: center; }
}

/* ===== LOADING CATAVENTO ===== */
.loading-consulta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; gap: 14px;
}

/* Estrutura do catavento */
.loading-pinwheel {
  position: relative; width: 72px; height: 72px;
  animation: pinwheel-spin 1.1s linear infinite;
  transform-origin: center center;
}

/* 4 pás do catavento */
.pin-blade {
  position: absolute; width: 28px; height: 28px;
  border-radius: 50% 0 50% 0;
  top: 50%; left: 50%;
  transform-origin: 0 0;
}
.pin-blade:nth-child(1) { background: linear-gradient(135deg,#1a2744,#1ab394); transform: rotate(0deg)   translate(-100%,-100%); }
.pin-blade:nth-child(2) { background: linear-gradient(135deg,#1ab394,#1a2744); transform: rotate(90deg)  translate(-100%,-100%); }
.pin-blade:nth-child(3) { background: linear-gradient(135deg,#1a2744,#1ab394); transform: rotate(180deg) translate(-100%,-100%); }
.pin-blade:nth-child(4) { background: linear-gradient(135deg,#1ab394,#1a2744); transform: rotate(270deg) translate(-100%,-100%); }

/* Pino central */
.pin-center {
  position: absolute; width: 10px; height: 10px;
  background: #1a2744; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 2; box-shadow: 0 0 0 2px #fff;
}

@keyframes pinwheel-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-titulo {
  font-size: 16px; font-weight: 700; color: #1a2744; letter-spacing: .5px;
}
.loading-msg {
  font-size: 13px; color: #666; text-align: center;
}

/* Três pontinhos pulsantes */
.loading-dots { display: flex; gap: 6px; margin-top: 4px; }
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg,#1a2744,#1ab394);
  animation: dot-bounce 1.2s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40%            { transform: scale(1);  opacity: 1;   }
}

/* ===== VARIÁVEIS DE COR ===== */
:root {
  --color-navy:   #1a2744;
  --color-teal:   #1ab394;
  --color-danger: #e74c3c;
  --color-warn:   #f8ac59;
}

/* ===== BOTÃO PADRÃO DO SISTEMA ===== */
.btn-confere {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-teal) 100%);
  border: none; color: #fff; font-weight: 700; transition: opacity .15s;
}
.btn-confere:hover, .btn-confere:focus { opacity: .88; color: #fff; }

/* Override btn-primary Bootstrap → padrão do sistema */
.btn-primary {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-teal) 100%) !important;
  border-color: transparent !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  opacity: .88; border-color: transparent !important;
}

/* Badge alerta (pendentes) */
.badge-alerta {
  background: var(--color-danger); color: #fff;
  border-radius: 10px; padding: 1px 6px; font-size: 10px; margin-left: 4px;
}

/* Card-form com largura máxima responsiva */
.card-form { max-width: 520px; }

/* Modal de consulta responsivo */
.modal-consulta { max-width: 680px; width: 100%; }

/* ===== MOBILE (768px e abaixo) ===== */
@media (max-width: 768px) {

  /* Sidebar: oculta por padrão, abre via toggle */
  .mc-sidebar { transform: translateX(-100%); }
  .mc-sidebar.aberta { transform: translateX(0); }

  /* Wrapper: sem margem lateral (sidebar é overlay) */
  .mc-wrapper { margin-left: 0; width: 100%; }

  /* Botão hamburguer visível */
  .menu-abrir { display: block; }

  /* Topbar: compacta para caber em telas pequenas */
  .mc-topbar { padding: 0 10px; gap: 8px; height: 50px; }
  .mc-topbar-sair { display: none; } /* já tem SAIR na sidebar */
  .mc-topbar-saldo { padding: 5px 10px; font-size: 13px; }
  .mc-topbar-saldo .saldo-label { display: none; } /* esconde label "Saldo" */
  #xsaldox3 { font-size: 13px; }
  .page-title { font-size: 13px; }

  /* Container: padding menor */
  .mc-container { padding: 12px 10px; }

  /* Stats: 2 colunas */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px 10px; gap: 8px; }
  .stat-icon { width: 36px; height: 36px; font-size: 15px; }
  .stat-info small { font-size: 10px; }
  .stat-info strong { font-size: 18px; }

  /* Cards de consulta: coluna única */
  .cons-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  .cons-card { padding: 12px 14px; }
  .cons-card .cons-titulo,
  .cons-card .cons-desc { white-space: normal; overflow: visible; text-overflow: unset; }
  .cons-icon { width: 38px; height: 38px; font-size: 16px; }

  /* Modal de consulta: largura total */
  .modal-consulta { max-width: 96vw; width: 96vw; margin: 8px auto; }
  .modal-dialog { margin: 6px; width: auto; }
  .modal-content { border-radius: 10px; }

  /* Resultado: label acima do valor */
  .resultado-item { flex-direction: column; gap: 2px; padding: 8px 12px; }
  .resultado-label { min-width: unset; font-size: 10px; }
  .resultado-valor { font-size: 12px; }

  /* Barra ações PDF/Voltar */
  .res-acoes { flex-direction: column; gap: 8px; }
  .res-btn-voltar, .res-btn-pdf { width: 100%; text-align: center; }

  /* Res card header */
  .res-card-header { flex-wrap: wrap; gap: 6px; }

  /* Pendente card empilha */
  .pendente-card { flex-wrap: wrap; }
  .pendente-acoes { width: 100%; justify-content: flex-end; margin-top: 8px; }
  .pendente-valor { margin: 0 8px 0 0; }

  /* Tabelas: scroll horizontal */
  .table-responsive { -webkit-overflow-scrolling: touch; overflow-x: auto; }
  .mc-table { min-width: 560px; }
  .mc-table td, .mc-table th { font-size: 12px; padding: 7px 6px; }

  /* Score: barra de pontuação compacta */
  .res-secao { margin-bottom: 12px; }

  /* mc-card header: flex-wrap */
  .mc-card-header { flex-wrap: wrap; gap: 8px; min-height: unset; padding: 12px 14px; }
}

/* ===== MOBILE PEQUENO (480px) ===== */
@media (max-width: 480px) {
  /* Topbar saldo ainda mais compacto */
  .mc-topbar-saldo { padding: 4px 8px; font-size: 12px; border-width: 1.5px; }

  /* Stats: 2 colunas menores */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }

  /* Login: painel esquerdo menor */
  .login-left { flex: 0 0 120px; }
  .login-brand-big { font-size: 26px; }
  .login-right { padding: 24px 16px; }
}

/* ===== MUITO PEQUENO (375px — iPhone SE) ===== */
@media (max-width: 390px) {
  .mc-container { padding: 10px 8px; }
  .mc-topbar { padding: 0 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 10px 8px; }
  .resultado-label { font-size: 9px; }
  .resultado-valor { font-size: 11px; }
  .cons-card { padding: 10px 12px; }
  .mc-card-body { padding: 10px 12px; }
}

/* ===== SAFE AREA — iPhone X+ (notch / home bar) ===== */
@supports (padding: env(safe-area-inset-top)) {
  .mc-topbar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .mc-sidebar {
    padding-bottom: env(safe-area-inset-bottom);
    padding-top: env(safe-area-inset-top);
  }
  .mc-container {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  #tela-login {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== ACESSIBILIDADE E BOAS PRÁTICAS ===== */

/* Touch targets mínimos 44px (WCAG 2.5.5) */
.btn, .cat-tab, .cons-card, .mc-nav a,
.res-btn-voltar, .res-btn-pdf, .login-btn {
  min-height: 44px;
}
.btn-xs { min-height: 30px; } /* exceção para botões compactos em tabela */

/* Foco visível para navegação por teclado */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #1ab394;
  outline-offset: 2px;
}

/* Tabelas admin: scroll horizontal em mobile */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}
.mc-table { min-width: 600px; }

/* Melhora legibilidade de tabelas em mobile */
@media (max-width: 768px) {
  .mc-table td, .mc-table th { font-size: 12px; padding: 8px 6px; }
  .mc-table .btn-xs { padding: 3px 6px; font-size: 11px; }
}

/* Evita overflow horizontal global */
body { overflow-x: hidden; }

/* Sidebar overlay em mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}
@media (max-width: 768px) {
  .sidebar-overlay.ativo { display: block; }
}

/* Skip to content para acessibilidade */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1ab394;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
