/* ==========================================================================
   JUSMIDAS - GESTÃO JURÍDICA DE COBRANÇA & RECUPERAÇÃO DE ATIVOS
   GOMES & PHILYP ADVOCACIA
   Design System: Marfim Nobre, Linhas Douradas Brilhantes & Ouro Escovado
   Full Responsive Engine & Bordas 100% Retas (Zero Border-Radius)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Prevenção instantânea de flicker de login no carregamento / F5 */
html.has-active-session #login-view {
  display: none !important;
}
html.has-active-session #app-view {
  display: flex !important;
}

:root {
  /* Fundo e Superfícies Marfim Nobre (JusMidas & Gomes & Philyp) */
  --bg-deep: #faf7f0;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfbf7;
  --bg-glass: rgba(255, 255, 255, 0.98);

  /* Marfim Bars & Surfaces */
  --bg-sidebar: #fcfbfa;
  --bg-header: #fcfbfa;
  --bg-ivory-soft: #f5f0e6;
  --bg-ivory-warm: #faf7f0;

  /* Dourado Ouro Prestige & Bronze Escovado */
  --gold-primary: #b38a38;
  --gold-light: #dfb75c;
  --gold-dark: #8c6820;
  --gold-deep: #574112;
  --gold-glow: rgba(223, 183, 92, 0.22);
  --gold-border: rgba(179, 138, 56, 0.35);
  --gold-gradient: linear-gradient(135deg, #dfb75c 0%, #b88d36 50%, #dfb75c 100%);
  --gold-soft-bg: rgba(223, 183, 92, 0.08);

  /* Tipografia */
  --text-main: #1e293b;
  --text-title: #0f172a;
  --text-muted: #64748b;
  --text-gold: #8c6820;
  --text-subtle: #94a3b8;

  /* Bordas e Linhas em Ouro Escovado & Marfim */
  --border-subtle: #e8decb;
  --border-card: #d5cbbd;
  --border-gold: #d4af37;
  --border-gold-brushed: rgba(179, 138, 56, 0.35);

  /* Status Colors */
  --status-active-bg: #eaf6ed;
  --status-active-color: #15803d;
  --status-inactive-bg: #fdf2f2;
  --status-inactive-color: #b91c1c;
  --status-waiting-bg: #fef8ec;
  --status-waiting-color: #b45309;

  /* Formas e Cantos 100% Retos (Autoridade Jurídica) */
  --radius-xs: 0px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  /* Tipografia & Dimensões Base */
  --sidebar-width: 240px;
  --font-serif: 'Cinzel', 'Cambria Math', Georgia, serif;
  --font-title: 'Inter', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Sombras */
  --shadow-sm: 0 2px 6px rgba(20, 18, 16, 0.04);
  --shadow-md: 0 8px 20px rgba(20, 18, 16, 0.06);
  --shadow-lg: 0 16px 36px rgba(20, 18, 16, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Universal Enforced Straight Corners Rule (Janelas, Modais, Cards, Botões e Inputs 100% Retos) */
*,
*::before,
*::after {
  border-radius: 0px !important;
}

/* Preserva apenas avatares circulares e pontos de status luminosos */
.user-avatar,
.chat-avatar,
.user-avatar-gold,
.jusmidas-dot-green,
.security-dot-green,
.m-dot,
.dot-indicator,
.envelope-badge,
.tab-badge {
  border-radius: 50% !important;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

@media (min-width: 1440px) {
  html {
    font-size: 15px;
  }
  :root {
    --sidebar-width: 260px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 16px;
  }
  :root {
    --sidebar-width: 280px;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar Elegante em Marfim & Ouro */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1eee8;
}
::-webkit-scrollbar-thumb {
  background: #d8d0c2;
  border-radius: 0px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b38a38;
}

/* ==========================================================================
   TELA DE LOGIN JUSMIDAS (FULLSCREEN 100VH / SPLIT-SCREEN NOBRE EM MARFIM & OURO)
   ========================================================================== */
.jusmidas-fullscreen-login {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  display: flex;
  background-color: #faf7f0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 10;
}

/* PAINEL ESQUERDO: Hero Institucional (60% da Tela - Logo Flutuando Naturalmente) */
.jusmidas-hero-pane {
  flex: 6;
  width: 60%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: 
    radial-gradient(ellipse at 50% 20%, rgba(223, 183, 92, 0.16) 0%, rgba(250, 247, 240, 0) 68%),
    linear-gradient(135deg, #f7f4ed 0%, #faf8f5 50%, #f4f0e6 100%);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Linhas Geométricas Sutis de Fundo (Art Déco / Geometria Áurea) */
.jusmidas-bg-geometric-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    linear-gradient(45deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.8;
}

.jusmidas-hero-content {
  width: 100%;
  max-width: 540px;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -30px;
}

.jusmidas-hero-logo-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.8rem;
}

.jusmidas-hero-logo-img {
  max-width: 430px;
  width: 92%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(179, 138, 56, 0.22));
  transition: transform 0.3s ease;
}

.jusmidas-hero-logo-img:hover {
}

.jusmidas-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin: 1.2rem 0;
}

.jusmidas-hero-divider .gold-line {
  height: 1.5px;
  flex: 1;
  max-width: 100px;
  background: linear-gradient(90deg, transparent, #b38a38, transparent);
}

.jusmidas-hero-divider .gold-diamond {
  color: #b38a38;
  font-size: 0.8rem;
}

.jusmidas-hero-tagline {
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #382e22;
  text-transform: uppercase;
  line-height: 1.45;
  margin-top: 0.4rem;
  margin-bottom: 1.6rem;
  max-width: 520px;
}

.jusmidas-hero-footer-firm {
  position: absolute;
  bottom: 1.8rem;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-size: 0.90rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #8c6820;
  text-transform: uppercase;
  z-index: 2;
}

/* DIVISÓRIA VERTICAL DOURADA METÁLICA */
.jusmidas-split-divider {
  width: 2px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(212, 175, 55, 0.85) 50%, rgba(212, 175, 55, 0.05) 100%);
  flex-shrink: 0;
}

/* PAINEL DIREITO: Formulário & Navegação Institucional (40% da Tela) */
.jusmidas-form-pane {
  flex: 4;
  width: 40%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 2.2rem 1.8rem 2.2rem;
  background: #ffffff;
  position: relative;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Topo Direito: Barra de Navegação Institucional */
.jusmidas-top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid #efeae1;
  flex-shrink: 0;
}

.jusmidas-nav-brand-mobile {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8c6820;
}

.jusmidas-mobile-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.jusmidas-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-wrap: nowrap;
}

.btn-inst-nav {
  background: transparent !important;
  border: none !important;
  border-radius: 0px !important;
  color: #524737;
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 0.4rem 0.45rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
  position: relative;
  white-space: nowrap;
}

.btn-inst-nav::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #b38a38, #dfb75c, #b38a38);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-inst-nav:hover {
  color: #8c6820;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-inst-nav:hover::after {
  width: 100%;
}

.btn-inst-nav .inst-icon {
  font-size: 0.82rem;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(179, 138, 56, 0.2));
}

.inst-nav-sep {
  color: #d8cebe;
  font-size: 0.65rem;
  user-select: none;
  opacity: 0.8;
}

/* Centro: Container do Formulário */
.jusmidas-form-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 1.5rem 0;
}

/* Moldura Nobre de Login com Contorno Dourado */
.jusmidas-form-box {
  width: 100%;
  max-width: 430px;
  position: relative;
  background: #ffffff;
  border: 1.5px solid #d4af37;
  padding: 2.2rem 2.2rem;
  border-radius: 0px !important;
  box-shadow: 
    0 20px 50px rgba(20, 18, 16, 0.07),
    0 4px 14px rgba(212, 175, 55, 0.08);
}

.jusmidas-form-header {
  margin-bottom: 1.6rem;
}

.jusmidas-tag-restricted {
  display: inline-block;
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8c6820;
  background: #faf5ea;
  border: 1px solid #e8d7b5;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.6rem;
  border-radius: 0px !important;
}

.jusmidas-form-title {
  font-family: 'Cinzel', 'Cambria Math', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #141210;
  margin: 0 0 0.35rem 0;
  text-transform: uppercase;
}

.jusmidas-form-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

/* Formulário e Inputs */
.jusmidas-form-group {
  margin-bottom: 1.25rem;
}

.jusmidas-input-label {
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #141210;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.jusmidas-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.jusmidas-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #b38a38;
  pointer-events: none;
  z-index: 2;
}

.jusmidas-input {
  width: 100% !important;
  background-color: #fcfbfa !important;
  border: 1.5px solid #d5cbbd !important;
  border-radius: 0px !important;
  padding: 0.75rem 1rem 0.75rem 2.75rem !important;
  color: #141210 !important;
  font-family: var(--font-sans) !important;
  font-size: 0.90rem !important;
  height: 48px !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.jusmidas-input:focus {
  outline: none !important;
  border-color: #b38a38 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(179, 138, 56, 0.18) !important;
}

.jusmidas-input::placeholder {
  color: #94a3b8 !important;
}

.jusmidas-input:-webkit-autofill,
.jusmidas-input:-webkit-autofill:hover,
.jusmidas-input:-webkit-autofill:focus,
.jusmidas-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #fcfbfa inset !important;
  box-shadow: 0 0 0 1000px #fcfbfa inset !important;
  -webkit-text-fill-color: #141210 !important;
  color: #141210 !important;
  border: 1.5px solid #d5cbbd !important;
}

.login-error-msg {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  color: #991b1b;
  padding: 0.65rem 0.9rem;
  border-radius: 0px !important;
  font-size: 0.80rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
  display: none;
  position: relative;
  z-index: 2;
}

/* BOTÃO RETANGULAR CHANFRADO EM OURO */
.btn-jusmidas-submit {
  width: 100%;
  background: linear-gradient(135deg, #dfb75c 0%, #b88d36 50%, #dfb75c 100%) !important;
  color: #0d141c !important;
  font-family: 'Montserrat', var(--font-title), sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none !important;
  border-radius: 0px !important;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(179, 138, 56, 0.35);
  margin-top: 1.5rem;
}

.btn-jusmidas-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(179, 138, 56, 0.45);
}

.btn-jusmidas-submit:active {
  transform: translateY(0);
}

.btn-submit-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-jusmidas-submit:hover .btn-submit-arrow {
}

.jusmidas-security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.jusmidas-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #15803d;
  box-shadow: 0 0 6px rgba(21, 128, 61, 0.7);
}

.jusmidas-date-display {
  text-align: center;
  margin-top: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8c6820;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Rodapé do Painel */
.jusmidas-form-pane-footer {
  border-top: 1px solid #efeae1;
  padding-top: 0.85rem;
  text-align: center;
  font-size: 0.68rem;
  color: #94a3b8;
  flex-shrink: 0;
}

/* OVERLAY DE AUTENTICAÇÃO SUAVE */
.login-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 20;
  border-radius: 0px !important;
}

.login-card-overlay.active {
  display: flex !important;
}

.auth-icon-pulse {
  font-size: 2.2rem;
  color: #b38a38;
  margin-bottom: 0.8rem;
  animation: pulseAuthIcon 1.2s infinite ease-in-out;
}

@keyframes pulseAuthIcon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(179, 138, 56, 0.3)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(179, 138, 56, 0.6)); }
}

.auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #141210;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-user-text {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1.2rem;
}

.auth-progress-track {
  width: 100%;
  max-width: 260px;
  height: 4px;
  background: #e8e2d8;
  overflow: hidden;
  position: relative;
}

.auth-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b38a38, #dfb75c, #ffd978);
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-subtext {
  margin-top: 1.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8c6820;
  text-transform: uppercase;
}

/* ==========================================================================
   MODAIS INSTITUCIONAIS DO PORTAL JUSMIDAS (MARFIM & OURO - EXPANDIDO & NOBRE)
   ========================================================================== */
.modal-jusmidas-inst {
  max-width: 820px;
  width: 94%;
  background: #ffffff !important;
  border: 2px solid #d4af37 !important;
  border-radius: 0px !important;
  box-shadow: 0 30px 80px rgba(20, 18, 16, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.4) !important;
  padding: 0 !important;
  overflow: hidden;
}

.modal-inst-header {
  background: #fbf9f4;
  border-bottom: 1.5px solid #e8dfd1;
  padding: 1.8rem 2.2rem;
  position: relative;
}

.modal-inst-badge {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8c6820;
  background: #faf5ea;
  border: 1px solid #e8d7b5;
  padding: 0.3rem 0.75rem;
  margin-bottom: 0.45rem;
  border-radius: 0px !important;
}

.modal-inst-title {
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #141210;
  margin: 0;
  letter-spacing: 0.8px;
}

.btn-close-inst-modal {
  position: absolute;
  top: 1.8rem;
  right: 2.2rem;
  background: transparent;
  border: 1.5px solid #d5cbbd;
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0px !important;
  transition: all 0.2s ease;
}

.btn-close-inst-modal:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.modal-inst-body {
  padding: 2.2rem 2.4rem;
  max-height: 72vh;
  overflow-y: auto;
}

.inst-hero-card-inner {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  background: #faf7f0;
  border: 1.5px solid #e8decb;
  padding: 1.1rem 1.8rem;
  margin-bottom: 1.6rem;
  border-radius: 0px;
  position: relative;
  overflow: hidden;
}

.inst-modal-logo {
  width: 125px;
  height: 125px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(184, 141, 54, 0.32));
  transition: transform 0.25s ease;
}

.inst-modal-logo:hover {
}

.inst-hero-text {
  flex: 1;
}

.inst-hero-text h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #8c6820;
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.8px;
}

.inst-hero-text p {
  font-size: 0.94rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
  font-weight: 500;
}

.modal-inst-text-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1e293b;
  font-weight: 500;
}

.modal-inst-paragraph {
  margin: 0 0 1.35rem 0 !important;
  line-height: 1.85 !important;
  color: #1e293b !important;
  font-size: 1.02rem !important;
}

.modal-inst-paragraph:last-child {
  margin-bottom: 0 !important;
}

.modal-inst-text-content strong,
.modal-inst-paragraph strong {
  font-weight: 800 !important;
  color: #0f172a !important;
}

.modal-inst-text-content em,
.modal-inst-paragraph em {
  font-style: italic !important;
  color: #334155 !important;
}


.modal-inst-footer {
  background: #fbf9f4;
  border-top: 1.5px solid #e8dfd1;
  padding: 1.3rem 2.2rem;
  display: flex;
  justify-content: flex-end;
}

.btn-primary-inst {
  background: linear-gradient(135deg, #dfb75c 0%, #b88d36 100%) !important;
  color: #0d141c !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none !important;
  border-radius: 0px !important;
  padding: 0.75rem 2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(179, 138, 56, 0.3);
  transition: all 0.2s ease;
}

.btn-primary-inst:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(179, 138, 56, 0.45);
}

/* Grid de Contatos */
.inst-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.inst-contact-card {
  background: #faf7f0;
  border: 1.5px solid #e8decb;
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 0px;
  transition: border-color 0.2s ease;
}

.inst-contact-card:hover {
  border-color: #d4af37;
}

.inst-contact-card.full-width {
  grid-column: 1 / -1;
}

.inst-contact-icon {
  font-size: 1.75rem;
  color: #b38a38;
}

.inst-contact-details {
  display: flex;
  flex-direction: column;
}

.inst-contact-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: #8c6820;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.inst-contact-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1c1a;
  text-decoration: none;
}

.inst-link-gold {
  color: #b38a38;
}

.inst-link-gold:hover {
  text-decoration: underline;
  color: #8c6820;
}

/* RESPONSIVIDADE PARA NOTEBOOKS & TELAS COMPACTAS */
@media (max-width: 1366px) {
  .jusmidas-form-pane {
    padding: 1.8rem 1.8rem 1.4rem 1.8rem;
  }
  .btn-inst-nav {
    font-size: 0.66rem;
    padding: 0.35rem 0.35rem;
    letter-spacing: 0.4px;
    gap: 0.25rem;
  }
  .btn-inst-nav .inst-icon {
    font-size: 0.76rem;
  }
}

@media (max-width: 1100px) {
  .jusmidas-form-pane {
    padding: 1.5rem 1.2rem;
  }
  .btn-inst-nav {
    font-size: 0.62rem;
    padding: 0.3rem 0.25rem;
    letter-spacing: 0.3px;
  }
  .inst-nav-sep {
    font-size: 0.55rem;
  }
}

/* RESPONSIVIDADE PARA TELAS MENORES & MOBILE */
@media (max-width: 960px) {
  .jusmidas-fullscreen-login {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  
  .jusmidas-hero-pane {
    height: auto;
    min-height: 380px;
    padding: 2.5rem 1.5rem;
    flex: none;
  }

  .jusmidas-hero-footer-firm {
    position: static;
    margin-top: 1.8rem;
  }

  .jusmidas-split-divider {
    width: 100%;
    height: 2px;
  }

  .jusmidas-form-pane {
    height: auto;
    min-height: 500px;
    padding: 2rem 1.5rem;
    flex: none;
  }

  .jusmidas-nav-brand-mobile {
    display: flex;
  }

  .jusmidas-nav-links {
    margin-top: 0.6rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .inst-contacts-grid {
    grid-template-columns: 1fr;
  }
}



/* ==================== APP DASHBOARD LAYOUT (ADAPTIVE SYSTEM) ==================== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-deep);
}

/* ==================== MARFIM NOBRE & OURO ESCOVADO SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: #fbf9f4;
  border-right: 1.5px solid rgba(179, 138, 56, 0.32);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 25px rgba(20, 18, 16, 0.06);
  transition: width 0.25s ease;
}

.sidebar-header {
  padding: 0.85rem 0.75rem 0.65rem 0.75rem;
  border-bottom: 1.5px solid rgba(179, 138, 56, 0.25);
  background: radial-gradient(ellipse at top, rgba(223, 183, 92, 0.12) 0%, transparent 80%), #faf7f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
}

.sidebar-header-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

.sidebar-logo-img {
  width: 170px;
  max-width: 95%;
  height: auto;
  object-fit: contain;
  filter: none !important;
  transform: none !important;
  transition: none !important;
  display: block !important;
  margin: 0 auto 0.25rem auto !important;
}

.sidebar-logo-img:hover {
  transform: none !important;
  filter: none !important;
}

.sidebar-welcome-label {
  display: block !important;
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #9a7627;
  font-weight: 800;
  margin-top: 0.15rem;
  text-align: center !important;
  white-space: nowrap !important;
  width: 100% !important;
}

.sidebar-nav {
  padding: 0.65rem 0.65rem 1.25rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.68rem 0.85rem 0.68rem 1.15rem;
  border-radius: 0px !important;
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 1.5px solid #e8decb;
  background: #ffffff;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  transform: none !important;
}

/* Barra luminosa fixa no canto esquerdo */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: rgba(179, 138, 56, 0.25);
  border-radius: 0px !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
}

.nav-item:hover {
  color: #8c6820;
  background: #fdfbf7;
  border-color: #d4af37 !important;
  transform: none !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25) !important;
}

.nav-item:hover::before {
  background: #d4af37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Ativo / Selecionado: Barra lateral em ouro e fundo marfim */
.nav-item.active {
  color: #6b4c0b !important;
  background: linear-gradient(90deg, #f7efe0 0%, #faf6ee 100%) !important;
  border-color: #d4af37 !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 12px rgba(223, 183, 92, 0.15), 0 0 10px rgba(212, 175, 55, 0.3) !important;
  transform: none !important;
}

.nav-item.active::before {
  background: #d4af37 !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.85) !important;
}

/* Rodapé Elegante da Barra Lateral: Gomes & Philyp */
.sidebar-firm-footer {
  padding: 1.15rem 0.85rem 1.25rem 0.85rem;
  border-top: 1.5px solid rgba(179, 138, 56, 0.3);
  background: #f5f0e6;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
}

.sidebar-firm-title {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #8c6820;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-firm-subtitle {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: #574112;
  line-height: 1.1;
  margin-top: 0.15rem;
}

.nav-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(179, 138, 56, 0.25));
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: margin-left 0.25s ease, width 0.25s ease, max-width 0.25s ease;
}

/* ==================== CONTROLES DO MENU MOBILE & DRAWER (BASE) ==================== */
.btn-mobile-hamburger {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(179, 138, 56, 0.45);
  border-radius: 0px;
  width: 38px;
  height: 38px;
  padding: 8px 7px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-mobile-hamburger:hover,
.btn-mobile-hamburger:active {
  background: rgba(212, 175, 55, 0.12);
  border-color: #d4af37;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #8c6820;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.btn-sidebar-close-mobile {
  display: none;
  background: transparent;
  border: 1px solid rgba(179, 138, 56, 0.35);
  color: #8c6820;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0px;
  transition: all 0.2s ease;
}

.btn-sidebar-close-mobile:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 20, 28, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== MARFIM NOBRE TOP HEADER COM DETALHES EM OURO ESCOVADO ==================== */
.top-header {
  height: 63px;
  background: linear-gradient(90deg, #fdfbf7 0%, #f8f4eb 50%, #faf6ee 100%);
  border-bottom: 1.5px solid rgba(179, 138, 56, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 14px rgba(20, 18, 16, 0.05);
  flex-wrap: nowrap !important;
  gap: 0.5rem;
}

.header-left-cluster {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.header-system-title {
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.header-logo-horus {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 800;
  color: #8c6820 !important;
  letter-spacing: 3.5px;
  white-space: nowrap;
}

.header-sep {
  color: rgba(179, 138, 56, 0.45) !important;
}

.header-system-tag {
  color: #64748b !important;
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 600;
  white-space: nowrap;
}

.user-profile-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

.header-clock-pill {
  height: 36px;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  border-radius: 0px !important;
  padding: 0 0.85rem;
  font-size: 0.78rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  flex-shrink: 0 !important;
}

.header-clock-pill .clock-date {
  color: #1e293b !important;
  font-weight: 600;
  white-space: nowrap;
}

.header-clock-pill .clock-time {
  display: inline-block;
  width: 68px;
  text-align: center;
  color: #8c6820 !important;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  font-family: 'Montserrat', monospace, sans-serif !important;
}

.user-info-pill {
  height: 36px;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  color: #2c2825;
  padding: 0 0.85rem;
  border-radius: 0px !important;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0 !important;
}

.user-info-pill:hover {
  background: #fefce8;
  border-color: #d4af37 !important;
  color: #854d0e;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45) !important;
}

.user-info-pill .user-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  transition: color 0.2s ease;
}

.user-info-pill:hover .user-name {
  color: #713f12;
}

.user-pwd-change-icon {
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.35rem;
  background: #faf7f0;
  border: 1px solid #e8decb;
  border-radius: 0px !important;
  color: #8c6820;
  transition: all 0.2s ease;
}

.user-info-pill:hover .user-pwd-change-icon {
  background: #fefce8;
  border-color: #d4af37;
  color: #854d0e;
  box-shadow: none;
}

@media (max-width: 1550px) {
  .top-header {
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .header-left-cluster {
    gap: 12px;
  }
  .header-system-tag,
  .header-sep {
    display: none !important;
  }
  .user-profile-bar {
    gap: 0.45rem;
  }
  .header-clock-pill {
    min-width: auto;
    padding: 0 0.75rem;
  }
  .btn-header-maintenance {
    min-width: auto;
    padding: 0 0.75rem;
  }
  .header-maintenance-timer {
    padding: 0 0.75rem;
  }
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dfb75c 0%, #b38a38 100%);
  color: #0d141c;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.3);
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.role-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.18rem 0.5rem;
  border-radius: 0px !important;
  font-weight: 800;
  line-height: 1.2;
}

.role-badge.dev,
.role-badge.supremo {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.role-badge.admin,
.role-badge.administrador {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #7e22ce !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
}

.role-badge.funcionario {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

.role-badge.empresa,
.role-badge.usuario {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.btn-logout {
  height: 36px;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  color: #475569;
  padding: 0 0.85rem;
  border-radius: 0px !important;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.btn-logout:hover {
  border-color: #ef4444;
  color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

/* Page Content */
.content-body {
  padding: 1.5rem 1.8rem;
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Padronização de Títulos em Caixa Alta (Poppins Nobre Circular) */
.page-title,
.modal-title,
.table-title-luxury,
.page-header h2,
.section-title,
.form-section-title,
.box-title,
.card-title,
.detail-section-title {
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.9px !important;
}

.page-header,
.page-header-luxury {
  background: #ffffff;
  border: 1px solid rgba(179, 138, 56, 0.32);
  border-left: 5px solid #b38a38;
  border-radius: 0px !important;
  padding: 1.25rem 1.65rem;
  margin-bottom: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 6px 22px -3px rgba(35, 25, 15, 0.05), 0 2px 6px -1px rgba(35, 25, 15, 0.02);
  flex-wrap: wrap;
}

.page-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8c6820;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.badge-gold-dot {
  width: 6px;
  height: 6px;
  border-radius: 0px;
  background: #b38a38;
  box-shadow: 0 0 6px rgba(179, 138, 56, 0.6);
}

.page-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #141210;
  font-family: var(--font-title);
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  line-height: 1.25;
}

.page-subtitle {
  font-size: 0.84rem;
  color: #64748b;
  margin-top: 0.25rem;
  font-weight: 400;
}

.btn-primary-luxury {
  background: #ffffff !important;
  color: #8c6820 !important;
  font-family: var(--font-title) !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  border: 1.5px solid #d4af37 !important;
  padding: 0.6rem 1.35rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  font-size: 0.82rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary-luxury svg {
  stroke: #8c6820 !important;
  stroke-width: 2.5;
  transition: none !important;
}

.btn-primary-luxury:hover {
  background: #faf6ee !important;
  border-color: #d4af37 !important;
  color: #8c6820 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary-luxury:hover svg {
  stroke: #8c6820 !important;
}

/* Banner de Alerta de Parcelas Vencidas */
.overdue-alert-banner {
  background: #fff8f8;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 0px !important;
  min-height: 52px;
  padding: 0.65rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px -2px rgba(220, 38, 38, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.overdue-alert-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overdue-alert-icon {
  font-size: 1.4rem;
}

.overdue-alert-title {
  color: #991b1b;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.overdue-alert-subtitle {
  color: #4b5563;
  font-size: 0.8rem;
}

/* Banner de Alerta Azul de Novos Cadastros */
.new-debtor-alert-banner {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 0px !important;
  min-height: 52px;
  padding: 0.65rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px -2px rgba(37, 99, 235, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.new-debtor-alert-title {
  color: #1e40af;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.new-debtor-alert-subtitle {
  color: #4b5563;
  font-size: 0.8rem;
}

/* ==================== KPI CARDS GRID (AUREUS LUXURY LIGHT PRESTIGE) ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid rgba(179, 138, 56, 0.28);
  border-top: 3.5px solid #d4af37;
  border-radius: 0px !important;
  padding: 1.05rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px -2px rgba(35, 25, 15, 0.05), 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:nth-child(1) {
  border-top: 3.5px solid #d4af37;
}
.kpi-card:nth-child(1):hover {
  border-color: #d4af37;
  border-top-color: #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kpi-card:nth-child(2) {
  border-top: 3.5px solid #f59e0b;
}
.kpi-card:nth-child(2):hover {
  border-color: #f59e0b;
  border-top-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kpi-card:nth-child(3) {
  border-top: 3.5px solid #10b981;
}
.kpi-card:nth-child(3):hover {
  border-color: #10b981;
  border-top-color: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kpi-card:nth-child(4) {
  border-top: 3.5px solid #ca8a04;
}
.kpi-card:nth-child(4):hover {
  border-color: #ca8a04;
  border-top-color: #ca8a04;
  box-shadow: 0 0 14px rgba(202, 138, 4, 0.35), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-label-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kpi-sublabel {
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a09a90;
  font-weight: 700;
}

.kpi-label {
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #8c6820;
  font-weight: 800;
  font-family: var(--font-sans);
}

/* Insígnias Vetoriais Nobres */
.kpi-insignia {
  width: 42px;
  height: 42px;
  border-radius: 0px !important;
  background: rgba(179, 138, 56, 0.08);
  border: 1px solid rgba(179, 138, 56, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
  flex-shrink: 0;
}

.kpi-card:hover .kpi-insignia {
}

.kpi-insignia svg {
  width: 22px;
  height: 22px;
}

.kpi-insignia.insignia-gold {
  background: rgba(179, 138, 56, 0.1);
  border-color: rgba(179, 138, 56, 0.35);
}
.kpi-insignia.insignia-gold svg {
  stroke: #b38a38;
}

.kpi-insignia.insignia-amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
.kpi-insignia.insignia-amber svg {
  stroke: #d97706;
}

.kpi-insignia.insignia-emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.kpi-insignia.insignia-emerald svg {
  stroke: #059669;
}

.kpi-insignia.insignia-justice {
  background: radial-gradient(circle, rgba(179, 138, 56, 0.18) 0%, rgba(179, 138, 56, 0.06) 100%);
  border-color: #b38a38;
  box-shadow: 0 0 10px rgba(179, 138, 56, 0.2);
}
.kpi-insignia.insignia-justice svg {
  stroke: #8c6820;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #141210;
  font-family: var(--font-sans);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.kpi-value.gold {
  color: #9e7526;
}

.kpi-value.amber {
  color: #b45309;
}

.kpi-value.emerald {
  color: #15803d;
}

/* Controls & Filters Bar */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 0px;
  border: 1px solid var(--border-card);
  box-shadow: 0 6px 20px -3px rgba(35, 25, 15, 0.06), 0 2px 6px -1px rgba(35, 25, 15, 0.03);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fbf9f5;
  border: 1px solid var(--border-card);
  padding: 0.4rem 0.8rem;
  border-radius: 0px;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-container .select-input,
.app-container input.form-input:not(.aureus-input),
.app-container input[type="text"].form-input:not(.aureus-input),
.app-container input[type="number"].form-input,
.app-container input[type="date"].form-input,
.app-container input[type="password"].form-input,
.app-container select.select-input,
.app-container select.form-input {
  background: #fbf9f5 !important;
  border: 1px solid var(--border-card) !important;
  color: var(--text-main) !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 0px !important;
  outline: none !important;
  font-family: var(--font-sans) !important;
  font-size: 0.85rem !important;
  height: 38px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  transition: var(--transition) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.app-container textarea.form-input,
.app-container textarea.ruler-wa-textarea,
.ruler-wa-textarea,
#ruler-wa-message-textarea {
  background: #ffffff !important;
  border: 1.5px solid #d4af37 !important;
  color: #141210 !important;
  padding: 1rem 1.25rem !important;
  border-radius: 0px !important;
  outline: none !important;
  font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  height: 340px !important;
  min-height: 320px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  resize: vertical !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  display: block !important;
}

.app-container .select-input:focus,
.app-container .form-input:not(.aureus-input):focus,
.app-container input[type="text"].form-input:not(.aureus-input):focus,
.app-container input[type="number"].form-input:focus,
.app-container input[type="date"].form-input:focus,
.app-container select.select-input:focus,
.app-container select.form-input:focus {
  border-color: var(--gold-primary) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(179, 138, 56, 0.15) !important;
}

/* ==================== DATA TABLES (RESPONSIVAS & LUXURY PRESTIGE) ==================== */
.table-card,
.table-card-luxury {
  background: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 0px !important;
  overflow-x: auto;
  box-shadow: 0 8px 24px -4px rgba(35, 25, 15, 0.06), 0 2px 6px -2px rgba(35, 25, 15, 0.03);
  width: 100%;
  -webkit-overflow-scrolling: touch;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.table-card:hover,
.table-card-luxury:hover {
  border-color: rgba(212, 175, 55, 0.85);
  box-shadow: 0 12px 32px -4px rgba(35, 25, 15, 0.09), 0 3px 10px -2px rgba(35, 25, 15, 0.04);
}

.table-card-header-luxury {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #faf8f5 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.table-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-title-insignia {
  width: 32px;
  height: 32px;
  border-radius: 0px !important;
  background: rgba(179, 138, 56, 0.08);
  border: 1px solid rgba(179, 138, 56, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-title-insignia svg {
  width: 17px;
  height: 17px;
  stroke: #8c6820;
}

.table-title-luxury {
  font-family: var(--font-title);
  font-size: 0.98rem;
  font-weight: 800;
  color: #141210;
  margin: 0;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
}

.badge-pending-chip-luxury {
  background: #fef8ec;
  border: 1px solid rgba(180, 83, 9, 0.3);
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 0px !important;
}

.custom-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  text-align: center !important;
}

.custom-table th {
  background: #faf6ee;
  padding: 0.75rem 0.65rem;
  font-size: 0.70rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #3f3322;
  font-weight: 800;
  border-bottom: 1.5px solid #d4af37 !important;
  border-right: 1px solid rgba(212, 175, 55, 0.4) !important;
  text-align: center !important;
  white-space: nowrap;
}

.custom-table th:last-child {
  border-right: none !important;
  min-width: 100px;
}

.custom-table td {
  padding: 0.7rem 0.65rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.3) !important;
  color: var(--text-main);
  vertical-align: middle;
  text-align: center !important;
}

.custom-table td strong {
  color: var(--text-title);
}

.custom-table td:last-child {
  border-right: none !important;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background: #faf7f0;
}

.custom-table tbody tr.row-overdue-alert {
  background: #fee2e2 !important;
}

.custom-table tbody tr.row-overdue-alert:hover {
  background: #fecaca !important;
}

.custom-table tbody tr.row-overdue-alert td {
  border-bottom: 1px solid rgba(212, 175, 55, 0.45) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.4) !important;
}

.custom-table tbody tr.row-overdue-alert td:last-child {
  border-right: none !important;
}

.custom-table tbody tr.row-overdue-alert:hover td {
  border-bottom: 1px solid rgba(212, 175, 55, 0.5) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.45) !important;
}

.custom-table tbody tr.row-overdue-alert:hover td:last-child {
  border-right: none !important;
}

.custom-table tbody tr.row-overdue-alert td:first-child strong {
  color: #dc2626 !important;
}

/* Status Badges & Grid Tags (Cantos Retos) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0px !important;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.grid-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 0px !important;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.grid-tag.acordo {
  background: #fdf8ed;
  color: var(--gold-dark);
  border: 1px solid rgba(179, 138, 56, 0.4);
}

.grid-tag.parcela {
  background: #f5f2eb;
  color: var(--text-main);
  border: 1px solid var(--border-card);
}

.status-pill.ativa, .status-pill.ativo, .status-pill.realizado, .status-pill.pago {
  background: var(--status-active-bg);
  color: var(--status-active-color);
  border: 1px solid rgba(21, 128, 61, 0.3);
}

.status-pill.inativa, .status-pill.inativo, .status-pill.cancelado {
  background: var(--status-inactive-bg);
  color: var(--status-inactive-color);
  border: 1px solid rgba(185, 28, 28, 0.3);
}

.status-pill.aguardando_confirmacao, .status-pill.pendente, .status-pill.retido {
  background: var(--status-waiting-bg);
  color: var(--status-waiting-color);
  border: 1px solid rgba(180, 83, 9, 0.3);
}

/* ==================== BUTTONS & ACTION CONTROLS (COMPLETOS & SEM VAZAMENTOS) ==================== */
button {
  font-family: var(--font-sans);
  box-sizing: border-box;
}

.btn-primary {
  background: #ffffff !important;
  color: #8c6820 !important;
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  border: 1.5px solid #d4af37 !important;
  padding: 0.6rem 1.35rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  font-size: 0.8rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary svg {
  stroke: #8c6820 !important;
  stroke-width: 2.5;
  transition: none !important;
}

.btn-primary:hover {
  background: #faf6ee !important;
  border-color: #d4af37 !important;
  color: #8c6820 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary:hover svg {
  stroke: #8c6820 !important;
}

.btn-secondary {
  background: #ffffff !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  color: #8c6820 !important;
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  font-size: 0.78rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: none !important;
  transform: none !important;
}

.btn-secondary:hover {
  background: #faf6ee !important;
  border-color: #d4af37 !important;
  color: #8c6820 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-draft-yellow,
.btn-draft-yellow-opaco {
  background: #fef3c7 !important;
  border: 1px solid #f59e0b !important;
  color: #92400e !important;
  font-weight: 700 !important;
  border-radius: 0px !important;
  padding: 0.65rem 1rem !important;
  cursor: pointer;
  font-size: 0.82rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-draft-yellow:hover,
.btn-draft-yellow-opaco:hover {
  background: #fde68a !important;
}

.btn-propose-green,
.btn-propose-green-opaco {
  background: #d1fae5 !important;
  border: 1px solid #10b981 !important;
  color: #065f46 !important;
  font-weight: 700 !important;
  border-radius: 0px !important;
  padding: 0.65rem 1rem !important;
  cursor: pointer;
  font-size: 0.82rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-propose-green:hover,
.btn-propose-green-opaco:hover {
  background: #a7f3d0 !important;
}

/* Botão Confirmar Baixa Verde com Efeito Luminoso Glow */
.btn-confirm-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1px solid #047857 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 0px !important;
  padding: 0.55rem 1.25rem !important;
  cursor: pointer;
  font-size: 0.84rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.45), 0 4px 10px rgba(5, 150, 105, 0.3) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-confirm-green:hover {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.75), 0 6px 15px rgba(5, 150, 105, 0.45) !important;
}

.btn-confirm-green:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
}

.btn-edit-fee-gold {
  background: #ffffff !important;
  border: 1px solid var(--gold-border) !important;
  color: var(--gold-dark) !important;
  font-weight: 700 !important;
  padding: 0.42rem 0.8rem !important;
  border-radius: 0px !important;
  font-size: 0.78rem !important;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-edit-fee-gold:hover {
  background: var(--gold-soft-bg) !important;
  border-color: var(--gold-primary) !important;
}

/* Botões de Exportação / Backup com Texto Branco de Alto Contraste */
.btn-export-green {
  background: #059669 !important;
  border: 1.5px solid #047857 !important;
  color: #ffffff !important;
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  font-size: 0.8rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  white-space: nowrap !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.btn-export-green:hover {
  background: #047857 !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3) !important;
}

.btn-export-blue {
  background: #2563eb !important;
  border: 1.5px solid #1d4ed8 !important;
  color: #ffffff !important;
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  font-size: 0.8rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  white-space: nowrap !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.btn-export-blue:hover {
  background: #1d4ed8 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

.btn-export-purple {
  background: #7e22ce !important;
  border: 1.5px solid #6b21a8 !important;
  color: #ffffff !important;
  font-family: var(--font-title) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  font-size: 0.8rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  white-space: nowrap !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.btn-export-purple:hover {
  background: #6b21a8 !important;
  border-color: #581c87 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.3) !important;
}

.btn-cancel-red {
  background: #ffffff !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-family: var(--font-sans) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  font-size: 0.82rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transform: none !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.btn-cancel-red:hover {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Action Buttons Group for Tables */
.action-buttons-group {
  display: inline-flex;
  align-items: center;
  justify-content: center !important;
  gap: 0.35rem;
  white-space: nowrap;
  flex-wrap: wrap;
}

/* ==================== DROPDOWN DE AÇÕES NA TABELA DE DEVEDORES (OPÇÃO 2) ==================== */
.debtor-actions-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.actions-dropdown-container {
  position: relative;
  display: inline-block;
}

.btn-actions-more {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 0px;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.btn-actions-more:hover,
.btn-actions-more:focus {
  background: #faf8f5;
  border-color: var(--gold-primary);
  color: var(--gold-dark);
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.2);
  transform: none !important;
}

.actions-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  min-width: 210px;
  background: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 0.35rem 0;
  z-index: 999;
  text-align: left;
  animation: dropdownFadeIn 0.15s ease-out;
}

.actions-dropdown-menu.dropup {
  top: auto;
  bottom: calc(100% + 5px);
}

.actions-dropdown-menu.show {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: #faf8f5;
  color: var(--gold-dark);
}

.dropdown-item .dropdown-item-icon {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  display: inline-block;
}

.dropdown-item.item-danger {
  color: #dc2626;
}

.dropdown-item.item-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0.3rem 0;
}

.btn-action-confirm {
  background: var(--gold-gradient);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 0.38rem 0.75rem;
  border-radius: 0px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.btn-action-confirm:hover {
  filter: brightness(1.08);
}

.btn-action-counter {
  background: #ffffff !important;
  border: 1px solid var(--gold-border) !important;
  color: var(--gold-dark) !important;
  font-weight: 600;
  padding: 0.38rem 0.75rem;
  border-radius: 0px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.btn-action-counter:hover {
  background: #faf6ee !important;
  border-color: var(--gold-primary) !important;
  color: var(--gold-dark) !important;
}

.custom-table tbody tr.row-overdue-alert .btn-action-counter,
.custom-table tbody tr.row-overdue-alert:hover .btn-action-counter {
  background: #ffffff !important;
  border-color: var(--gold-border) !important;
  color: var(--gold-dark) !important;
}

.custom-table tbody tr.row-overdue-alert .btn-action-counter:hover,
.custom-table tbody tr.row-overdue-alert:hover .btn-action-counter:hover {
  background: #faf6ee !important;
  border-color: var(--gold-primary) !important;
  color: var(--gold-dark) !important;
}

.btn-action-edit {
  background: #fefce8;
  border: 1.5px solid #facc15;
  color: #a16207;
  font-weight: 700;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 0px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  box-sizing: border-box;
  transition: var(--transition);
}

.btn-action-edit svg {
  display: block;
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-action-edit:hover {
  background: #fef08a;
  border-color: #eab308;
  color: #713f12;
}

.btn-action-delete {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  color: #dc2626;
  font-weight: 700;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 0px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  box-sizing: border-box;
  transition: var(--transition);
}

.btn-action-delete svg {
  display: block;
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-action-delete:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

/* PIX Copy Wrapper */
.pix-copy-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.5rem;
  background: #fafaf9;
  border: 1.5px solid #d5cbbd;
  border-radius: 0px;
  cursor: pointer;
  transition: var(--transition);
  user-select: all;
}

.pix-copy-wrapper:hover {
  background: #fefce8;
  border-color: #d4af37;
  box-shadow: 0 1px 4px rgba(212, 175, 55, 0.2);
}

.pix-code-badge {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2c2825;
  background: transparent;
  padding: 0;
  border: none;
}

.btn-copy-pix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #78716c;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.pix-copy-wrapper:hover .btn-copy-pix-icon {
  color: #a16207;
}

.pix-copy-wrapper:active {
  transform: scale(0.97);
}

.btn-action-docs {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
  font-weight: 700;
  padding: 0.38rem 0.7rem;
  border-radius: 0px;
  font-size: 0.76rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.btn-action-fee-receive {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 0.32rem 0.65rem !important;
  border-radius: 0px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-action-fee-receive:hover {
  background: #d1fae5 !important;
}

.btn-action-fee-pending {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
  padding: 0.32rem 0.65rem !important;
  border-radius: 0px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-action-fee-pending:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 25, 20, 0.55);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
  z-index: 9999999 !important;
}

/* Modal de Confirmação de Senha: Prioridade Máxima Absoluta (Aparece na frente de todos os outros modais e painéis) */
#modal-confirm-password {
  z-index: 100000000 !important;
}

#modal-confirm-password.active {
  z-index: 100000000 !important;
}

#modal-confirm-password .modal-container {
  z-index: 100000001 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Modal de Contato WhatsApp: Prioridade e Visibilidade Absoluta */
#modal-whatsapp-contact {
  z-index: 100000000 !important;
}

#modal-whatsapp-contact.active {
  z-index: 100000000 !important;
  display: flex !important;
}

#modal-whatsapp-contact .modal-container {
  z-index: 100000001 !important;
}

/* Modais Institucionais JusMidas: Prioridade Máxima Absoluta na Tela de Login */
#modal-inst-about,
#modal-inst-services,
#modal-inst-portal,
#modal-inst-contact {
  z-index: 100000000 !important;
}

#modal-inst-about.active,
#modal-inst-services.active,
#modal-inst-portal.active,
#modal-inst-contact.active {
  z-index: 100000000 !important;
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-inst-about .modal-jusmidas-inst,
#modal-inst-services .modal-jusmidas-inst,
#modal-inst-portal .modal-jusmidas-inst,
#modal-inst-contact .modal-jusmidas-inst {
  z-index: 100000001 !important;
  position: relative;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 0px;
  width: 100%;
  max-width: 800px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -10px rgba(25, 20, 15, 0.35), 0 10px 25px -5px rgba(25, 20, 15, 0.15);
  position: relative;
  transform: scale(0.96);
  transition: var(--transition);
}

.modal-backdrop.active .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-title);
  font-family: var(--font-title);
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #b91c1c;
}

.modal-body {
  padding: 1.15rem 1.35rem;
}

.modal-body .form-input, .modal-body .select-input, .modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .modal-body select {
  padding: 0.45rem 0.75rem !important;
  font-size: 0.82rem !important;
  height: 36px !important;
  border: 1px solid var(--border-card);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 0px;
  width: 100%;
}

.modal-body textarea.form-input, .modal-body textarea {
  padding: 0.45rem 0.75rem !important;
  font-size: 0.82rem !important;
  height: auto !important;
  min-height: 58px !important;
  border: 1px solid var(--border-card);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 0px;
  width: 100%;
  resize: vertical;
}

.modal-body .form-input:focus, .modal-body select:focus, .modal-body textarea:focus {
  border-color: var(--gold-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(179, 138, 56, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.15rem;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.form-group.span-2 {
  grid-column: 1 / -1;
}

.form-group label, .input-label {
  font-size: 0.68rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-gold);
  font-weight: 700;
}

.modal-footer {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Status Toggle Component */
.status-toggle-container {
  display: inline-flex;
  align-items: center;
  background: #f6f3ee;
  border: 1px solid var(--border-card);
  border-radius: 0px;
  padding: 3px;
  gap: 3px;
}

.btn-status-pill {
  border: 1px solid transparent;
  background: transparent;
  padding: 0.3rem 0.75rem;
  border-radius: 0px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
}

.btn-status-pill.active.ativa, .btn-status-pill.active.ativo {
  background: #ffffff;
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.3);
  box-shadow: var(--shadow-sm);
}

.btn-status-pill.active.inativa, .btn-status-pill.active.inativo {
  background: #ffffff;
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
  box-shadow: var(--shadow-sm);
}

/* Calculation summary card */
.calc-summary-card {
  background: #fbf9f5;
  border: 1px solid var(--gold-border);
  border-radius: 0px;
  padding: 0.85rem;
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  text-align: center;
}

.calc-item-title {
  font-size: 0.66rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 600;
}

.calc-item-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-top: 0.15rem;
}

/* Toast Notifications (Prioridade Máxima Absoluta no Topo de Qualquer Modal) */
.toast-container,
.sys-toast,
.toast {
  position: fixed;
  z-index: 2147483647 !important;
  pointer-events: none;
}

.toast-container {
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px solid #d5cbbd;
  border-left: 5px solid #b38a38;
  padding: 0.85rem 1.35rem;
  border-radius: 0px !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: slideInRight 0.25s ease;
}

.toast.error {
  border-color: #fca5a5;
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Ocultar elementos exclusivos de Supremo por padrão */
.supremo-only {
  display: none;
}

/* ==================== ADAPTIVE RESPONSIVENESS & BREAKPOINTS (NOTEBOOKS & MOBILE) ==================== */

/* Notebooks e Telas Médias (1366px e 1280px - Padrão de Notebooks Dell/Lenovo/Acer) */
@media (max-width: 1366px) {
  :root {
    --sidebar-width: 220px;
  }
  .content-body {
    padding: 1.25rem 1.4rem;
  }
  .top-header {
    padding: 0 1.4rem;
    height: 56px;
  }
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
  }
  .kpi-card {
    padding: 1.1rem;
  }
  .custom-table th, .custom-table td {
    padding: 0.55rem 0.5rem;
    font-size: 0.78rem;
  }
  .page-title {
    font-size: 1.2rem;
  }
  .login-card-container,
  .login-box-card {
    max-width: 400px;
  }
  .login-card-body,
  .login-box-card {
    padding: 1.9rem 1.9rem;
  }
  .modal-container {
    max-width: 90vw;
  }
}

/* Telas Menores de Notebook / Tablets Grandes (1024px) */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 200px;
  }
  .content-body {
    padding: 1rem 1.15rem;
  }
  .top-header {
    padding: 0 1.15rem;
    height: auto;
    min-height: 52px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .header-system-title span:last-child {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .nav-item {
    font-size: 0.8rem;
    padding: 0.55rem 0.7rem;
  }
  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ==========================================================================
   RESPONSIVIDADE COMPLETA: TABLETS & SMARTPHONES (<= 768px & <= 480px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Prevenção de vazamento de largura horizontal global */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  body.mobile-sidebar-open {
    overflow: hidden !important;
  }

  /* Contêiner Geral do App */
  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Área Principal de Conteúdo */
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 0.5rem 2.5rem 0.5rem !important;
  }

  /* Menu Lateral Móvel (Off-Canvas Drawer Deslizante) */
  .btn-mobile-hamburger {
    display: flex !important;
  }

  .btn-sidebar-close-mobile {
    display: flex !important;
  }

  .sidebar-backdrop {
    display: block !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -295px !important;
    width: 290px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background-color: #fbf9f4 !important;
    border-right: 2px solid #d4af37 !important;
    box-shadow: none !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .sidebar.mobile-open {
    left: 0 !important;
    box-shadow: 12px 0 45px rgba(0, 0, 0, 0.45) !important;
  }

  .sidebar-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.1rem 1.25rem !important;
    border-bottom: 1.5px solid rgba(179, 138, 56, 0.28) !important;
  }

  .sidebar-header .sidebar-title,
  .sidebar-welcome-label,
  .sidebar-username-label,
  .sidebar-firm-footer,
  .sidebar-nav .nav-item span {
    display: inline-block !important;
  }

  .sidebar-nav {
    padding: 0.85rem 0 !important;
  }

  .sidebar-nav .nav-item {
    justify-content: flex-start !important;
    padding: 0.9rem 1.25rem !important;
    font-size: 0.88rem !important;
    gap: 0.85rem !important;
    border-left: 3px solid transparent !important;
  }

  .sidebar-nav .nav-item.active {
    border-left: 3px solid #b38a38 !important;
    background-color: #f2ede2 !important;
  }

  .sidebar-nav .nav-icon {
    font-size: 1.2rem !important;
  }

  /* Cabeçalho Superior Adaptado */
  .top-header {
    height: 56px !important;
    padding: 0 0.75rem !important;
    gap: 0.35rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .header-left-cluster {
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .header-system-title {
    font-size: 0.7rem !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .header-logo-horus {
    font-size: 0.96rem !important;
    letter-spacing: 2px !important;
  }

  .header-sep,
  .header-system-tag {
    display: none !important;
  }

  .header-clock-pill {
    display: none !important;
  }

  .user-profile-bar {
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .user-info-pill {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.76rem !important;
    max-width: 130px !important;
  }

  .user-info-pill .user-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .btn-header-maintenance {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.7rem !important;
  }

  .btn-header-envelope {
    width: 36px !important;
    height: 36px !important;
    padding: 0.35rem !important;
  }

  /* Cabeçalhos de Página & Botões de Ação */
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    margin-bottom: 1rem !important;
    padding: 0 0.2rem !important;
  }

  .page-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .page-header button {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  /* Tabelas de Dados com Rolagem Horizontal Contida */
  .table-card {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1.25rem !important;
    border-radius: 0px !important;
  }

  .custom-table {
    min-width: 650px !important;
    width: 100% !important;
  }

  .custom-table th,
  .custom-table td {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }

  /* Grids de KPI e Cartões */
  .kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .debtor-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .debtor-card-item {
    padding: 1rem !important;
  }

  .debtor-card-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .debtor-card-actions button {
    width: 100% !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  /* Formulários em Geral */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .form-group.span-2,
  .form-group.span-3,
  .form-group.full-width {
    grid-column: 1 / -1 !important;
  }

  /* Inputs com Tamanho Ergonômico de Toque e Prevenção de Zoom no iOS */
  input.form-input,
  select.select-input,
  textarea.form-input,
  .jusmidas-input {
    font-size: 16px !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
  }

  /* Modais no Mobile */
  .modal-container {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 92vh !important;
    margin: auto !important;
    padding: 0 !important;
    border-radius: 0px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-header {
    padding: 0.85rem 1rem !important;
    position: sticky !important;
    top: 0 !important;
    background: #ffffff !important;
    z-index: 10 !important;
  }

  .modal-title {
    font-size: 0.88rem !important;
    letter-spacing: 0.8px !important;
  }

  .modal-body {
    padding: 1rem !important;
  }

  .modal-footer {
    padding: 0.85rem 1rem !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    position: sticky !important;
    bottom: 0 !important;
    background: #ffffff !important;
    z-index: 10 !important;
  }

  .modal-footer button,
  .modal-footer .btn-cancel-red,
  .modal-footer .btn-primary,
  .modal-footer .btn-secondary {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  /* Modal de Cadastro de Devedor (2 Blocos Empilhados no Mobile) */
  #modal-debtor .modal-container.modal-debtor-expanded {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 92vh !important;
  }

  .debtor-two-col-layout {
    grid-template-columns: 1fr !important;
    max-height: calc(92vh - 120px) !important;
  }

  .col-debtor-info {
    border-right: none !important;
    border-bottom: 1.5px solid #e8dfd1 !important;
    padding: 1rem !important;
  }

  .col-debtor-docs {
    padding: 1rem !important;
  }

  .debtor-inner-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .debtor-file-upload-zone {
    padding: 1rem 0.75rem !important;
  }

  .debtor-file-preview-list-scroll {
    max-height: 220px !important;
  }

  /* Simulador de Propostas */
  .simulator-grid,
  .simulator-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Central de Mensagens / Webmail */
  #modal-messages-inbox .modal-container.aureus-webmail-container {
    width: 96vw !important;
    max-width: 96vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
  }

  /* Tela de Login Responsiva */
  .jusmidas-fullscreen-login {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
  }

  .jusmidas-hero-pane {
    height: auto !important;
    min-height: 200px !important;
    padding: 1.8rem 1.2rem !important;
    flex: none !important;
    width: 100% !important;
  }

  .jusmidas-hero-content {
    margin-top: 0 !important;
  }

  .jusmidas-hero-logo-img {
    max-width: 230px !important;
    width: 78% !important;
  }

  .jusmidas-hero-tagline {
    font-size: 0.66rem !important;
    letter-spacing: 1.2px !important;
  }

  .jusmidas-split-divider {
    width: 100% !important;
    height: 2px !important;
  }

  .jusmidas-form-pane {
    height: auto !important;
    min-height: auto !important;
    padding: 1.2rem 1rem 2.5rem 1rem !important;
    flex: none !important;
    width: 100% !important;
  }

  .jusmidas-top-navbar {
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-bottom: 1.2rem !important;
  }

  .jusmidas-nav-links {
    width: 100% !important;
    overflow-x: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    padding-bottom: 0.4rem !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
  }

  .btn-inst-nav {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.68rem !important;
    padding: 0.4rem 0.65rem !important;
    border: 1px solid rgba(179, 138, 56, 0.3) !important;
    background: #ffffff !important;
  }

  .inst-nav-sep {
    display: none !important;
  }

  .jusmidas-form-box {
    padding: 1.3rem 1.1rem !important;
    max-width: 100% !important;
  }

  .jusmidas-form-title {
    font-size: 1.1rem !important;
  }

  .jusmidas-form-pane-footer {
    padding: 1rem !important;
    font-size: 0.68rem !important;
    text-align: center !important;
  }
}

/* Telas Ultra-Estreitas (Smartphones Pequenos <= 480px) */
@media (max-width: 480px) {
  .top-header {
    padding: 0 0.5rem !important;
  }

  .user-info-pill {
    max-width: 100px !important;
  }

  .jusmidas-form-box {
    padding: 1.1rem 0.9rem !important;
  }
}

/* ==================== AUDITORIA & TELEMETRIA ==================== */
.telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.telemetry-badge.LOGIN {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.telemetry-badge.LOGOUT {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.telemetry-badge.NAVEGACAO {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.telemetry-badge.CADASTRO {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.telemetry-badge.EDICAO {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.telemetry-badge.EXCLUSAO {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.telemetry-badge.FINANCEIRO {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.telemetry-badge.DOCUMENTO {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.telemetry-badge.SISTEMA {
  background: #fdfaf3;
  color: var(--gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

/* Micro-Selo Discreto de Ações do Devedor (Inline compacto) */
.debtor-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 0px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
  vertical-align: middle;
  margin-left: 0;
  white-space: nowrap;
}

.debtor-action-pill.nao_enviada {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.debtor-action-pill.enviada {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.debtor-action-pill.vencendo_hoje {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulse-badge 2s infinite ease-in-out;
}

.debtor-action-pill.realizada {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.debtor-action-pill.frustrada {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==================== MASTER-DETAIL: CADASTRO DE DEVEDORES ==================== */

/* Mini-Cockpit de Indicadores */
.debtors-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.debtor-kpi-card {
  background: #ffffff;
  border: 1.5px solid #d5cbbd !important;
  border-top: 3.5px solid #d4af37 !important;
  border-radius: 0px !important;
  padding: 1rem 1.25rem;
  box-shadow: 0 3px 10px rgba(35, 25, 15, 0.05) !important;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.debtor-kpi-card:nth-child(1) { border-top-color: #d4af37 !important; }
.debtor-kpi-card:nth-child(1):hover { border-color: #d4af37 !important; border-top-color: #d4af37 !important; box-shadow: 0 0 14px rgba(212, 175, 55, 0.35) !important; }

.debtor-kpi-card:nth-child(2) { border-top-color: #f59e0b !important; }
.debtor-kpi-card:nth-child(2):hover { border-color: #f59e0b !important; border-top-color: #f59e0b !important; box-shadow: 0 0 14px rgba(245, 158, 11, 0.35) !important; }

.debtor-kpi-card:nth-child(3) { border-top-color: #10b981 !important; }
.debtor-kpi-card:nth-child(3):hover { border-color: #10b981 !important; border-top-color: #10b981 !important; box-shadow: 0 0 14px rgba(16, 185, 129, 0.35) !important; }

.debtor-kpi-card:nth-child(4) { border-top-color: #ca8a04 !important; }
.debtor-kpi-card:nth-child(4):hover { border-color: #ca8a04 !important; border-top-color: #ca8a04 !important; box-shadow: 0 0 14px rgba(202, 138, 4, 0.35) !important; }

.debtor-kpi-label {
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase !important;
  letter-spacing: 1px;
  color: #64748b;
}

.debtor-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #141210;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.debtor-kpi-val.gold {
  color: #9e7526;
}

.debtor-kpi-val.emerald {
  color: #15803d;
}

.debtor-kpi-val.amber {
  color: #b45309;
}

/* Master-Detail Layout Container */
.debtors-master-detail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.25rem;
  align-items: start;
  min-height: 600px;
}

@media (max-width: 1024px) {
  .debtors-master-detail {
    grid-template-columns: 1fr;
  }
}

/* Painel Esquerdo: Lista de Devedores */
.debtors-list-pane {
  background: #ffffff;
  border: 1.5px solid #cfc4b4 !important;
  border-radius: 0px !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(35, 25, 15, 0.06);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 120px);
  align-self: start;
}

.debtors-list-header {
  padding: 0.85rem 1.1rem;
  background: #faf8f5;
  border-bottom: 1.5px solid #d5cbbd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debtors-list-count {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase !important;
  letter-spacing: 0.8px;
  color: #8c6820;
}

.debtors-list-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 0.85rem;
  background: #f7f5f0 !important; /* Fundo contrastante para destacar cada cartão branco */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overscroll-behavior: contain;
}

/* Cartão do Devedor na Lista (Quadro Nítido e Marcado) */
.debtor-card-item {
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  border-left: 4px solid #b38a38 !important;
  border-radius: 0px !important;
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.05) !important;
}

.debtor-card-item:hover {
  background: #ffffff !important;
  border-color: #8c6820 !important;
  border-left: 5px solid #8c6820 !important;
  box-shadow: 0 4px 14px rgba(40, 30, 20, 0.1) !important;
}

.debtor-card-item.selected {
  background: #ffffff !important;
  border: 2px solid #b38a38 !important;
  border-left: 6px solid #b38a38 !important;
  box-shadow: 0 4px 16px rgba(179, 138, 56, 0.22) !important;
}

/* 1. FRUSTRADA (Vermelho Suave similar ao botão de Frustrada) */
.debtor-card-item.status-frustrada {
  background: #fef2f2 !important;
  border: 1.5px solid #fecaca !important;
  border-left: 4.5px solid #dc2626 !important;
}

.debtor-card-item.status-frustrada:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  border-left: 5.5px solid #b91c1c !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.14) !important;
}

.debtor-card-item.status-frustrada.selected {
  background: #fef2f2 !important;
  border: 2px solid #ef4444 !important;
  border-left: 6.5px solid #dc2626 !important;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.22) !important;
}

/* 2. ACORDO REALIZADO (Verde Suave na mesma cor de fundo do botão de Acordo Realizado) */
.debtor-card-item.status-realizada {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  border-left: 4.5px solid #059669 !important;
}

.debtor-card-item.status-realizada:hover {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
  border-left: 5.5px solid #047857 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14) !important;
}

.debtor-card-item.status-realizada.selected {
  background: #ecfdf5 !important;
  border: 2px solid #10b981 !important;
  border-left: 6.5px solid #059669 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.22) !important;
}

/* 3. ACORDOS ENVIADOS / PROPOSTA ENVIADA (Amarelo Suave) */
.debtor-card-item.status-enviada,
.debtor-card-item.status-vencendo_hoje {
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  border-left: 4.5px solid #d97706 !important;
}

.debtor-card-item.status-enviada:hover,
.debtor-card-item.status-vencendo_hoje:hover {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  border-left: 5.5px solid #b45309 !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.14) !important;
}

.debtor-card-item.status-enviada.selected,
.debtor-card-item.status-vencendo_hoje.selected {
  background: #fffbeb !important;
  border: 2px solid #f59e0b !important;
  border-left: 6.5px solid #d97706 !important;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.22) !important;
}

/* 4. SEM PROPOSTAS (status-nao_enviada) */
.debtor-card-item.status-nao_enviada {
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  border-left: 4px solid #b38a38 !important;
}

.debtor-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.debtor-card-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 800;
  color: #141210;
  text-transform: uppercase !important;
  letter-spacing: 0.4px;
  line-height: 1.25;
}

.debtor-card-creditor {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8c6820;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.debtor-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
  padding-top: 0.35rem;
  border-top: 1px solid #f1ece4;
}

.debtor-card-debt {
  font-size: 0.92rem;
  font-weight: 800;
  color: #141210;
  font-variant-numeric: tabular-nums;
}

.debtor-card-debt.has-overdue {
  color: #dc2626;
}

/* Painel Direito: Dossiê Executivo (Expansão Natural Sem Conflito de Scroll) */
.debtors-dossier-pane {
  background: #ffffff;
  border: 1.5px solid #cfc4b4 !important;
  border-radius: 0px !important;
  box-shadow: 0 6px 26px -3px rgba(35, 25, 15, 0.08);
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  min-height: 600px;
}

/* Empty State quando nada está selecionado */
.dossier-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: #94a3b8;
  height: 100%;
}

.dossier-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.dossier-empty-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase !important;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.dossier-empty-desc {
  font-size: 0.85rem;
  max-width: 420px;
  line-height: 1.5;
}

/* Header do Dossiê */
.dossier-header {
  padding: 1.35rem 1.6rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(179, 138, 56, 0.25);
  border-left: 5px solid #b38a38;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dossier-title-area {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dossier-client-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: #141210;
  text-transform: uppercase !important;
  letter-spacing: 1px;
  margin: 0;
}

.dossier-client-meta {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dossier-client-meta strong {
  color: #141210;
}

/* Barra de Ações Rápidas do Dossiê */
.dossier-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-dossier-action {
  background: #ffffff !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  color: #8c6820 !important;
  font-family: var(--font-title) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 0.55rem 0.95rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: none !important;
  white-space: nowrap;
  transform: none !important;
}

.btn-dossier-action:hover {
  background: #faf6ee !important;
  border-color: #d4af37 !important;
  color: #8c6820 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-dossier-action.primary-gold {
  background: #ffffff !important;
  border: 1.5px solid #d4af37 !important;
  color: #8c6820 !important;
}

.btn-dossier-action.primary-gold:hover {
  background: #faf6ee !important;
  border-color: #d4af37 !important;
  color: #8c6820 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-dossier-action.whatsapp {
  border-color: #10b981 !important;
  color: #047857 !important;
}

.btn-dossier-action.whatsapp:hover {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
}

.btn-dossier-action.danger {
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

.btn-dossier-action.danger:hover {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
}

.btn-dossier-action.frustrate-red {
  background: #fff5f5 !important;
  border: 1.5px solid #fca5a5 !important;
  color: #dc2626 !important;
}

.btn-dossier-action.frustrate-red:hover {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

.btn-dossier-action.reopen-gold {
  background: #fffdf5 !important;
  border: 1.5px solid rgba(179, 138, 56, 0.45) !important;
  color: #8c6820 !important;
}

.btn-dossier-action.reopen-gold:hover {
  background: #b38a38 !important;
  border-color: #8c6820 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(179, 138, 56, 0.3) !important;
}

/* Chips de Seleção Rápida de Motivo Frustrado */
.btn-frustrate-chip {
  background: #faf8f5 !important;
  border: 1.5px solid #d5cbbd !important;
  color: #475569 !important;
  font-family: var(--font-title) !important;
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  padding: 0.38rem 0.75rem !important;
  cursor: pointer !important;
  border-radius: 0px !important;
  transition: all 0.18s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.btn-frustrate-chip:hover {
  background: #f5efe6 !important;
  border-color: #b38a38 !important;
  color: #8c6820 !important;
}

.btn-frustrate-chip.active {
  background: #fef2f2 !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15) !important;
  font-weight: 800 !important;
}

/* Corpo e Grid de Seções do Dossiê */
.dossier-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.dossier-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .dossier-section-grid {
    grid-template-columns: 1fr;
  }
}

.dossier-block {
  background: #ffffff;
  border: 1.5px solid #d5cbbd !important;
  border-top: 3px solid #b38a38 !important;
  border-radius: 0px !important;
  padding: 1.25rem 1.45rem;
  box-shadow: 0 3px 12px rgba(35, 25, 15, 0.05) !important;
}

.dossier-block-title {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase !important;
  letter-spacing: 1px;
  color: #141210;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #e5dcce !important;
  padding-bottom: 0.55rem;
}

.dossier-data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee8df !important;
  font-size: 0.84rem;
}

.dossier-data-row:last-child {
  border-bottom: none;
}

.dossier-data-label {
  color: #64748b;
  font-weight: 600;
}

.dossier-data-value {
  font-weight: 700;
  color: #141210;
  text-align: right;
}

.dossier-data-value.gold {
  color: #9e7526;
  font-size: 1.05rem;
}

/* Galeria de Documentos Anexos no Dossiê */
.dossier-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.dossier-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #faf8f5;
  border: 1.5px solid #dcd4c7 !important;
  border-left: 3px solid #b38a38 !important;
  border-radius: 0px !important;
  gap: 0.75rem;
  font-size: 0.82rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.dossier-doc-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.dossier-doc-name {
  font-weight: 700;
  color: #1e1b18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-doc-download-pill {
  background: #ffffff;
  border: 1.5px solid #b38a38;
  color: #8c6820;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 0px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.btn-doc-download-pill:hover {
  background: #b38a38;
  color: #ffffff;
}

/* Timeline Compacta no Dossiê */
.dossier-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.65rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}

.dossier-timeline-entry {
  padding: 0.75rem 1rem;
  background: #faf8f5;
  border: 1.5px solid #dcd4c7 !important;
  border-left: 4px solid #b38a38 !important;
  border-radius: 0px !important;
  font-size: 0.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.dossier-timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #8c6820;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

/* ==================== MODAL DE DOCUMENTOS DO CLIENTE (LUXURY DOCS HUB) ==================== */
.docs-client-banner {
  background: #faf8f5;
  border: 1.5px solid #d5cbbd;
  border-left: 5px solid #b38a38;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  box-shadow: 0 2px 8px rgba(35, 25, 15, 0.04);
}

.docs-client-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 250px;
}

.docs-client-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #8c6820;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.docs-client-name {
  font-family: var(--font-title);
  font-size: 1.18rem;
  font-weight: 800;
  color: #141210;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.docs-client-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: #64748b;
  flex-wrap: wrap;
}

.docs-client-meta strong {
  color: #141210;
}

/* Botão Baixar Todos (.ZIP) */
.btn-docs-zip-luxury {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
  border: 1.5px solid #14532d !important;
  color: #ffffff !important;
  font-family: var(--font-title) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 0.65rem 1.15rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-docs-zip-luxury:hover {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%) !important;
  box-shadow: 0 6px 18px rgba(21, 128, 61, 0.35);
}

/* Caixa de Upload de Novos Documentos */
.docs-upload-box {
  background: #ffffff;
  border: 1.5px dashed #c8bdae;
  border-radius: 0px !important;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 6px rgba(35, 25, 15, 0.03);
}

.docs-upload-label {
  font-family: var(--font-title);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8c6820;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.docs-upload-subtext {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

.docs-upload-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.docs-file-input {
  flex: 1;
  background: #faf8f5 !important;
  border: 1.5px solid #d5cbbd !important;
  border-radius: 0px !important;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.8rem;
  color: #141210;
  cursor: pointer;
}

.btn-docs-upload-submit {
  background: #ffffff !important;
  border: 1.5px solid #b38a38 !important;
  color: #8c6820 !important;
  font-family: var(--font-title) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.btn-docs-upload-submit:hover {
  background: #b38a38 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(179, 138, 56, 0.25);
}

/* Item de Documento na Lista */
.docs-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  border-left: 4px solid #b38a38;
  border-radius: 0px !important;
  margin-bottom: 0.65rem;
  box-shadow: 0 2px 6px rgba(35, 25, 15, 0.04);
  gap: 1rem;
  transition: all 0.15s ease;
}

.docs-modal-item:hover {
  border-color: #8c6820;
  border-left-color: #8c6820;
  box-shadow: 0 4px 12px rgba(35, 25, 15, 0.08);
}

.docs-badge {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0px !important;
  letter-spacing: 0.6px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.docs-badge.pdf {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}

.docs-badge.img {
  background: #fef3c7;
  color: #b45309;
  border: 1.5px solid #fcd34d;
}

.docs-badge.doc {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
}

.docs-badge.other {
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

/* Botão Visualizar Individual (Apenas Ícone) */
.btn-doc-item-view {
  background: #ffffff !important;
  border: 1.5px solid #2563eb !important;
  color: #1d4ed8 !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 0px !important;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.btn-doc-item-view:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
  transform: translateY(-1px);
}

/* Botão Baixar Individual (Apenas Ícone) */
.btn-doc-item-download {
  background: #ffffff !important;
  border: 1.5px solid #b38a38 !important;
  color: #8c6820 !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 0px !important;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.btn-doc-item-download:hover {
  background: #b38a38 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(179, 138, 56, 0.3) !important;
  transform: translateY(-1px);
}

/* Botão Excluir Individual (Apenas Ícone) */
.btn-doc-item-delete {
  background: #ffffff !important;
  border: 1.5px solid #fca5a5 !important;
  color: #dc2626 !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 0px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.btn-doc-item-delete:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3) !important;
  transform: translateY(-1px);
}

/* Botão Fechar Modal / Cancelar Padronizado em Modais */
.modal-footer .btn-cancel-red,
.btn-modal-close-luxury {
  height: 42px !important;
  background: #ffffff !important;
  border: 1.5px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-family: var(--font-title) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.75px !important;
  padding: 0 1.6rem !important;
  border-radius: 0px !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.modal-footer .btn-cancel-red:hover,
.btn-modal-close-luxury:hover {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15) !important;
}

/* ==================== ALERTA DE PARCELAS EM ATRASO (LINHAS DE CONTORNO COM PULSO LUMINOSO VERMELHO) ==================== */
.overdue-alert-banner-red {
  background: linear-gradient(135deg, #701a1a 0%, #831427 100%) !important;
  border: 1.5px solid #dc2626 !important;
  border-left: 5px solid #d4af37 !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.45), 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  animation: alert-border-pulse-glow 2s infinite ease-in-out !important;
  color: #ffffff !important;
  border-radius: 0px !important;
  padding: 1rem 1.4rem !important;
  margin-bottom: 1.5rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.overdue-alert-banner-red:hover {
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.85), 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}

@keyframes alert-border-pulse-glow {
  0%, 100% {
    border-color: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.45), 0 3px 10px rgba(0, 0, 0, 0.12);
  }
  50% {
    border-color: #f87171;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.8), 0 0 6px rgba(248, 113, 113, 0.6), 0 4px 14px rgba(0, 0, 0, 0.2);
  }
}

/* ==================== BOTÕES DE SELEÇÃO RÁPIDA DO MODAL DE MANUTENÇÃO ==================== */
.maint-quick-btn {
  background: #fafaf9;
  border: 1.5px solid #d5cbbd;
  color: #44403c;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.55rem 0.4rem;
  border-radius: 0px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.maint-quick-btn:hover {
  background: #fefce8;
  border-color: #ca8a04;
  color: #854d0e;
}

.maint-quick-btn.active {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  border-color: #ca8a04;
  color: #713f12;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(202, 138, 4, 0.2);
}

/* ==================== TERMO OFICIAL DE QUITAÇÃO PLENA (GOMES & PHILYP) ==================== */
.discharge-doc-sheet {
  background: #ffffff;
  border: 1px solid #d4af37;
  border-radius: 0px;
  padding: 2.2rem 2.6rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  color: #1e1c1a;
  font-family: var(--font-sans);
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.65;
}

.discharge-doc-sheet::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(179, 138, 56, 0.25);
  pointer-events: none;
}

.status-pill.liquidado {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #6ee7b7 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.2) !important;
}

.btn-discharge-gold {
  background: var(--gold-gradient) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 0px !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.35) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.btn-discharge-gold:hover {
  filter: brightness(1.08) !important;
}

.btn-minuta-table {
  background: #fdfaf3 !important;
  border: 1.5px solid #d4af37 !important;
  color: #8c6820 !important;
  border-radius: 0px !important;
  padding: 0.3rem 0.65rem !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(179, 138, 56, 0.15) !important;
  transition: all 0.2s ease !important;
}

.btn-minuta-table:hover {
  background: var(--gold-gradient) !important;
  color: #ffffff !important;
  border-color: #b38a38 !important;
  box-shadow: 0 3px 8px rgba(179, 138, 56, 0.35) !important;
}

/* ==================== SUB-ABAS / FILTROS RÁPIDOS DE ACORDOS REALIZADOS ==================== */
.agreements-done-filter-pills {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #ffffff;
  color: #4b5563;
  border: 1.5px solid #d5cbbd;
  border-radius: 0px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filter-pill:hover {
  background: #faf8f5;
  border-color: #b38a38;
  color: #8c6820;
}

.btn-filter-pill.active {
  background: linear-gradient(135deg, #faf5ea 0%, #f4ebd9 100%) !important;
  color: #8c6820 !important;
  border: 1.5px solid #b38a38 !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 10px rgba(223, 183, 92, 0.15), 0 2px 8px rgba(179, 138, 56, 0.15) !important;
}

.btn-filter-pill .filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 0px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #d5cbbd;
  min-width: 20px;
}

.btn-filter-pill.active .filter-count-badge {
  background: #b38a38 !important;
  color: #ffffff !important;
  border: 1px solid #8c6820 !important;
  font-weight: 800 !important;
}

/* ==================== SUB-ABAS DE NAVEGAÇÃO GERAIS (EX: RELATÓRIOS DO SISTEMA) ==================== */
.btn-subtab {
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  color: #475569 !important;
  padding: 0.55rem 1.25rem !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-subtab:hover {
  background: #faf7f0 !important;
  border-color: #b38a38 !important;
  color: #8c6820 !important;
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.12);
}

.btn-subtab.active {
  background: linear-gradient(135deg, #faf5ea 0%, #f4ebd9 100%) !important;
  border: 1.5px solid #b38a38 !important;
  color: #8c6820 !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 10px rgba(223, 183, 92, 0.15), 0 2px 8px rgba(179, 138, 56, 0.15) !important;
}

/* ==================== TIMER E BOTÃO DO MODO MANUTENÇÃO NO HEADER (DEV) ==================== */
.header-maintenance-timer {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  border-radius: 0px !important;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%) !important;
  border: 1.5px solid #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  animation: pulse-glow-maintenance 2s infinite ease-in-out;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0 !important;
}

#header-maintenance-time-left {
  display: inline-block;
  width: 68px;
  text-align: center;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  font-family: monospace !important;
}

.header-maintenance-timer:hover {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%) !important;
  border-color: #fbbf24 !important;
}

.btn-header-maintenance {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  border-radius: 0px !important;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #d4af37;
  color: #8c6820;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0 !important;
  min-width: 138px;
}

.btn-header-maintenance .m-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  margin-right: 0.15rem;
}

.btn-header-maintenance:hover {
  background: #fffbeb !important;
  border-color: #d97706 !important;
  color: #b45309 !important;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.45) !important;
}

.btn-header-maintenance.active {
  background: linear-gradient(135deg, #78350f 0%, #b45309 100%) !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7), 0 0 25px rgba(217, 119, 6, 0.4) !important;
  animation: pulse-glow-maintenance 2s infinite ease-in-out !important;
}

.btn-header-maintenance.active .m-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 6px #ef4444 !important;
  animation: pulse-badge 1s infinite !important;
}

@keyframes pulse-glow-maintenance {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.95); }
}



/* ==================== RÉGUA DE COBRANÇA WHATSAPP ==================== */
.ruler-kpi-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#card-ruler-pre:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.4) !important;
}

#card-ruler-today:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

#card-ruler-recent:hover {
  border-color: #ea580c !important;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.4) !important;
}

#card-ruler-critical:hover {
  border-color: #dc2626 !important;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.4) !important;
}

.ruler-kpi-card.active {
  box-shadow: 0 0 0 2px #d4af37, 0 6px 16px rgba(212, 175, 55, 0.25) !important;
}

.btn-ruler-wa,
.btn-crm-timeline,
.btn-notif-pdf {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 0.65rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  transform: none !important;
}

.btn-ruler-wa {
  background: #15803d !important;
  border: 1px solid #166534 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.2) !important;
}

.btn-ruler-wa:hover {
  background: #16a34a !important;
  border-color: #15803d !important;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.45) !important;
}

.btn-crm-timeline {
  background: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  color: #1e40af !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
}

.btn-crm-timeline:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.45) !important;
}

.btn-notif-pdf {
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  color: #991b1b !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08) !important;
}

.btn-notif-pdf:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.45) !important;
}

/* ==================== TIMELINE / CRM FEED ==================== */
.timeline-item-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 0px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  border-left: 4px solid var(--gold-primary);
}

.timeline-item-card.promessa_pagamento { border-left-color: #10b981; }
.timeline-item-card.recusa { border-left-color: #ef4444; }
.timeline-item-card.negociacao { border-left-color: #f59e0b; }
.timeline-item-card.sem_contato { border-left-color: #6b7280; }
/* ==================== NOTIFICAÇÃO EXTRAJUDICIAL (TIPOGRAFIA NOBRE APTOS / CAMBRIA MATH) ==================== */
.notification-doc-sheet {
  font-family: 'Aptos Display', 'Aptos', 'Cambria Math', 'Cambria', 'Segoe UI', serif !important;
  color: #1e1c1a !important;
  line-height: 1.68 !important;
  letter-spacing: 0.15px !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.notification-doc-sheet h1,
.notification-doc-sheet h2,
.notification-doc-sheet strong.notif-brand-title {
  font-family: 'Cinzel', 'Aptos Display', 'Cambria Math', 'Cambria', serif !important;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #printable-discharge-area, #printable-discharge-area *,
  #printable-receipt-area, #printable-receipt-area *,
  #printable-notification-area, #printable-notification-area * {
    visibility: visible !important;
  }
  #printable-discharge-area,
  #printable-receipt-area,
  #printable-notification-area {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10mm 15mm !important;
    box-shadow: none !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ==================== BOTÃO ENVELOPE (TOP HEADER - MARFIM NOBRE & OURO ESCOVADO) ==================== */
.btn-header-envelope {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 36px !important;
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.btn-header-envelope:hover {
  background: #faf7f0 !important;
  border-color: #b38a38 !important;
  box-shadow: 0 0 10px rgba(179, 138, 56, 0.25) !important;
}

.header-envelope-svg {
  width: 22px !important;
  height: 22px !important;
  filter: none !important;
  transition: transform 0.2s ease !important;
}

.btn-header-envelope:hover .header-envelope-svg {
}

.envelope-badge {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 0px !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.5) !important;
  border: 1.5px solid #ffffff !important;
  animation: pulse-badge 1.5s infinite !important;
  z-index: 10 !important;
}

.envelope-badge.active,
.envelope-badge.visible {
  display: flex !important;
}

.envelope-badge.hidden,
.envelope-badge[style*="display: none"] {
  display: none !important;
}

/* ==================== CENTRAL DE MENSAGENS / WEBMAIL (MARFIM NOBRE & OURO ESCOVADO) ==================== */
#modal-messages-inbox.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

#modal-messages-inbox.modal-backdrop.active,
#modal-messages-inbox.modal-backdrop[style*="display: flex"] {
  display: flex !important;
}

#modal-messages-inbox .modal-container.aureus-webmail-container {
  background: #ffffff !important;
  border: 2px solid #d4af37 !important;
  border-radius: 0px !important;
  box-shadow: 0 25px 70px rgba(20, 18, 16, 0.25), 0 0 0 1px rgba(179, 138, 56, 0.3) !important;
  overflow: hidden !important;
  max-width: 1080px !important;
  width: 95% !important;
  height: 86vh !important;
  max-height: 740px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-header {
  height: 64px !important;
  min-height: 64px !important;
  background: #fbf9f4 !important;
  border-bottom: 1.5px solid #e8dfd1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 1.4rem !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-header-title {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

#modal-messages-inbox .webmail-header-envelope-svg {
  width: 32px !important;
  height: 32px !important;
  filter: none !important;
  flex-shrink: 0 !important;
  display: block !important;
}

#modal-messages-inbox .webmail-body {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  overflow: hidden !important;
  height: calc(100% - 64px) !important;
}

/* Coluna 1: Pastas & Ações (Esquerda) */
#modal-messages-inbox .webmail-sidebar-nav {
  width: 220px !important;
  min-width: 220px !important;
  background: #fbf9f4 !important;
  border-right: 1.5px solid #e8dfd1 !important;
  padding: 1.1rem 0.8rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.8rem !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .btn-webmail-compose {
  width: 100% !important;
  background: linear-gradient(135deg, #dfb75c 0%, #b88d36 100%) !important;
  color: #0d141c !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  border: none !important;
  padding: 0.75rem 0.9rem !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(179, 138, 56, 0.3) !important;
  transition: all 0.2s ease !important;
}

#modal-messages-inbox .btn-webmail-compose:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 6px 16px rgba(179, 138, 56, 0.45) !important;
}

#modal-messages-inbox .webmail-folders-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  flex: 1 !important;
}

#modal-messages-inbox .webmail-folder-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 0px !important;
  color: #475569 !important;
  text-decoration: none !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

#modal-messages-inbox .webmail-folder-item:hover {
  color: #8c6820 !important;
  background: #faf7f0 !important;
  border-color: #d4af37 !important;
}

#modal-messages-inbox .webmail-folder-item.active {
  color: #8c6820 !important;
  background: linear-gradient(90deg, #faf5ea 0%, #f7efe0 100%) !important;
  border: 1.5px solid #b38a38 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.08) !important;
}

#modal-messages-inbox .folder-badge {
  margin-left: auto !important;
  background: #b38a38 !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 0.12rem 0.5rem !important;
  border-radius: 0px !important;
}

#modal-messages-inbox .webmail-user-presence {
  margin-top: auto !important;
  border-top: 1.5px solid #e8dfd1 !important;
  padding-top: 0.8rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
}

#modal-messages-inbox .presence-dot-online {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #15803d !important;
  box-shadow: 0 0 6px rgba(21, 128, 61, 0.6) !important;
}

/* Coluna 2: Lista de Mensagens (Centro) */
#modal-messages-inbox .webmail-list-panel {
  width: 320px !important;
  min-width: 320px !important;
  background: #faf7f0 !important;
  border-right: 1.5px solid #e8dfd1 !important;
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-search-bar {
  padding: 0.75rem 0.9rem !important;
  border-bottom: 1.5px solid #e8dfd1 !important;
  background: #fbf9f4 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-search-bar input {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  color: #0f172a !important;
  padding: 0.55rem 0.75rem !important;
  font-size: 0.82rem !important;
  border-radius: 0px !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-search-bar input:focus {
  border-color: #b38a38 !important;
  box-shadow: 0 0 0 2px rgba(223, 183, 92, 0.2) !important;
}

#modal-messages-inbox .webmail-messages-scroll {
  flex: 1 !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

#modal-messages-inbox .webmail-msg-card {
  padding: 0.8rem 0.95rem !important;
  border-bottom: 1px solid #e8decb !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  position: relative !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

#modal-messages-inbox .webmail-msg-card:hover {
  background: #faf5ea !important;
}

#modal-messages-inbox .webmail-msg-card.active {
  background: #faf5ea !important;
  border-left: 4px solid #b38a38 !important;
}

#modal-messages-inbox .webmail-msg-card.unread {
  background: #fefcf5 !important;
}

#modal-messages-inbox .msg-card-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  background: #faf7f0 !important;
  border: 1.5px solid #b38a38 !important;
  color: #8c6820 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(179, 138, 56, 0.15) !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.5px !important;
}

#modal-messages-inbox .webmail-msg-card.active .msg-card-avatar {
  background: #b38a38 !important;
  color: #ffffff !important;
  border-color: #8c6820 !important;
}

#modal-messages-inbox .msg-card-content {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

#modal-messages-inbox .msg-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 0.2rem !important;
}

#modal-messages-inbox .msg-card-sender {
  font-size: 0.83rem !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 170px !important;
  font-weight: 700 !important;
}

#modal-messages-inbox .msg-card-date {
  font-size: 0.68rem !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

#modal-messages-inbox .msg-card-subject {
  font-size: 0.79rem !important;
  color: #334155 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0.15rem !important;
}

#modal-messages-inbox .webmail-msg-card.unread .msg-card-subject {
  color: #8c6820 !important;
  font-weight: 800 !important;
}

#modal-messages-inbox .msg-card-bottom-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

#modal-messages-inbox .msg-card-snippet {
  font-size: 0.74rem !important;
  color: #64748b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
}

#modal-messages-inbox .card-unread-pill {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 0.1rem 0.45rem !important;
  border-radius: 0px !important;
  min-width: 16px !important;
  text-align: center !important;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.5) !important;
  flex-shrink: 0 !important;
}

#modal-messages-inbox .webmail-empty-state {
  padding: 3rem 1.5rem !important;
  text-align: center !important;
  color: #64748b !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
}

/* Coluna 3: Painel de Conteúdo / Leitura / Resposta (Direita) */
#modal-messages-inbox .webmail-content-panel {
  flex: 1 !important;
  background: #fdfbf7 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  height: 100% !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
}

#modal-messages-inbox #webmail-view-reading,
#modal-messages-inbox #webmail-view-compose,
#modal-messages-inbox #webmail-message-detail {
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  box-sizing: border-box;
}

#modal-messages-inbox .webmail-placeholder-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  box-sizing: border-box;
}

#modal-messages-inbox .webmail-detail-header {
  padding: 1rem 1.4rem !important;
  border-bottom: 1.5px solid #e8dfd1 !important;
  background: #fbf9f4 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-detail-meta {
  display: flex !important;
  gap: 1.5rem !important;
  font-size: 0.78rem !important;
  color: #64748b !important;
  margin-top: 0.3rem !important;
  flex-wrap: wrap !important;
}

#modal-messages-inbox .webmail-detail-meta strong {
  color: #8c6820 !important;
}

#modal-messages-inbox .webmail-thread-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 1.2rem 1.4rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.95rem !important;
  box-sizing: border-box !important;
  background: #faf7f0 !important;
}

/* Divisor de Data Centralizado no Chat */
#modal-messages-inbox .chat-date-divider {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0.85rem 0 0.55rem 0 !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

#modal-messages-inbox .chat-date-pill {
  background: #ffffff !important;
  border: 1px solid #d5cbbd !important;
  color: #8c6820 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  padding: 0.28rem 1.1rem !important;
  border-radius: 0px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#modal-messages-inbox .webmail-thread-bubble {
  background: #ffffff !important;
  border: 1.5px solid #e8decb !important;
  padding: 0.75rem 1.05rem 0.55rem 1.05rem !important;
  border-radius: 0px !important;
  box-shadow: 0 2px 8px rgba(20, 18, 16, 0.05) !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  max-width: 78% !important;
  min-width: 170px !important;
  align-self: flex-start !important;
  transition: transform 0.15s ease !important;
}

#modal-messages-inbox .webmail-thread-bubble.is-mine {
  background: linear-gradient(135deg, #faf5ea 0%, #f7efe0 100%) !important;
  border: 1.5px solid #b38a38 !important;
  border-radius: 0px !important;
  box-shadow: 0 2px 10px rgba(179, 138, 56, 0.15) !important;
  align-self: flex-end !important;
}

#modal-messages-inbox .thread-bubble-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 0.35rem !important;
  padding-bottom: 0.15rem !important;
  border-bottom: none !important;
}

#modal-messages-inbox .thread-bubble-author {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #0284c7 !important;
}

#modal-messages-inbox .webmail-thread-bubble.is-mine .thread-bubble-author {
  color: #8c6820 !important;
  font-weight: 800 !important;
}

#modal-messages-inbox .thread-bubble-time {
  font-size: 0.68rem !important;
  color: #64748b !important;
}

#modal-messages-inbox .btn-thread-delete-msg {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  font-size: 0.72rem !important;
  padding: 0.1rem 0.3rem !important;
  opacity: 0 !important;
  transition: all 0.2s ease !important;
}

#modal-messages-inbox .webmail-thread-bubble:hover .btn-thread-delete-msg {
  opacity: 0.75 !important;
}

#modal-messages-inbox .btn-thread-delete-msg:hover {
  opacity: 1 !important;
  color: #ef4444 !important;
}

#modal-messages-inbox .btn-webmail-delete-thread {
  background: #fff5f5 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  padding: 0.3rem 0.75rem !important;
  cursor: pointer !important;
  border-radius: 0px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  transition: all 0.2s ease !important;
}

#modal-messages-inbox .btn-webmail-delete-thread:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25) !important;
}

#modal-messages-inbox .btn-card-quick-delete {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  font-size: 0.75rem !important;
  padding: 0 0.2rem !important;
  opacity: 0;
  transition: all 0.2s ease !important;
}

#modal-messages-inbox .webmail-msg-card:hover .btn-card-quick-delete {
  opacity: 0.7;
}

#modal-messages-inbox .btn-card-quick-delete:hover {
  opacity: 1 !important;
  color: #ef4444 !important;
}

#modal-messages-inbox .thread-bubble-body {
  font-size: 0.88rem !important;
  color: #1e293b !important;
  line-height: 1.6 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

#modal-messages-inbox .webmail-thread-bubble.is-mine .thread-bubble-body {
  color: #0f172a !important;
}

#modal-messages-inbox .thread-bubble-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  margin-top: 0.35rem !important;
  padding-top: 0.2rem !important;
}

#modal-messages-inbox .thread-bubble-footer-time {
  font-size: 0.68rem !important;
  color: #64748b !important;
}

#modal-messages-inbox .msg-status-ticks {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  transition: all 0.25s ease !important;
}

#modal-messages-inbox .msg-status-ticks svg {
  width: 16px !important;
  height: 15px !important;
  display: block !important;
  transition: all 0.25s ease !important;
}

#modal-messages-inbox .msg-status-ticks.ticks-sent {
  color: #94a3b8 !important;
}

#modal-messages-inbox .msg-status-ticks.ticks-sent svg {
  filter: drop-shadow(0 0 1px rgba(148, 163, 184, 0.3)) !important;
}

#modal-messages-inbox .msg-status-ticks.ticks-read {
  color: #15803d !important;
}

#modal-messages-inbox .msg-status-ticks.ticks-read svg {
  filter: drop-shadow(0 0 3px rgba(21, 128, 61, 0.4)) !important;
}

#modal-messages-inbox .webmail-reply-box {
  padding: 0.85rem 1.4rem !important;
  border-top: 1.5px solid #e8dfd1 !important;
  background: #fbf9f4 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 10 !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04) !important;
}

#modal-messages-inbox .webmail-reply-box textarea {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  color: #0f172a !important;
  padding: 0.65rem 0.85rem !important;
  font-size: 0.86rem !important;
  font-family: var(--font-sans) !important;
  border-radius: 0px !important;
  outline: none !important;
  resize: none !important;
  min-height: 48px !important;
  max-height: 70px !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .webmail-reply-box textarea:focus {
  border-color: #b38a38 !important;
  box-shadow: 0 0 0 2px rgba(223, 183, 92, 0.2) !important;
}

#modal-messages-inbox .btn-aureus-reply {
  background: linear-gradient(135deg, #dfb75c 0%, #b88d36 100%) !important;
  color: #0d141c !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  border: none !important;
  padding: 0.55rem 1.25rem !important;
  cursor: pointer !important;
  border-radius: 0px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(179, 138, 56, 0.3) !important;
}

#modal-messages-inbox .btn-aureus-reply:hover {
  background: #ffd978 !important;
  box-shadow: 0 0 12px rgba(223, 183, 92, 0.5) !important;
}

#modal-messages-inbox .aureus-select-custom,
#modal-messages-inbox .aureus-input-custom,
#modal-messages-inbox .aureus-textarea-custom {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  color: #0f172a !important;
  padding: 0.65rem 0.85rem !important;
  font-size: 0.86rem !important;
  font-family: var(--font-sans) !important;
  border-radius: 0px !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#modal-messages-inbox .aureus-select-custom:focus,
#modal-messages-inbox .aureus-input-custom:focus,
#modal-messages-inbox .aureus-textarea-custom:focus {
  border-color: #b38a38 !important;
  box-shadow: 0 0 0 2px rgba(223, 183, 92, 0.2) !important;
}

/* ==================== BOTÃO DE ALTERAÇÃO DE SENHA NO HEADER & SIDEBAR ==================== */
.btn-header-password {
  background: rgba(223, 183, 92, 0.12) !important;
  border: 1px solid rgba(223, 183, 92, 0.3) !important;
  color: #ffd978 !important;
  font-size: 0.95rem !important;
  height: 36px !important;
  width: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border-radius: 0px !important;
}

.btn-header-password:hover {
  background: rgba(223, 183, 92, 0.28) !important;
  border-color: #dfb75c !important;
  box-shadow: 0 0 10px rgba(223, 183, 92, 0.4) !important;
}

.user-info-pill {
  transition: all 0.2s ease !important;
}

.user-info-pill:hover {
  border-color: rgba(223, 183, 92, 0.5) !important;
  box-shadow: 0 0 12px rgba(223, 183, 92, 0.25) !important;
}

#modal-change-password .input-group input:focus {
  border-color: #dfb75c !important;
  box-shadow: 0 0 8px rgba(223, 183, 92, 0.35) !important;
}

/* ==================== CENTRAL DE CONFIGURAÇÕES & ABAS INSTITUCIONAIS ==================== */
.settings-main-tabs-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
  border-bottom: 2px solid rgba(223, 183, 92, 0.25);
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.settings-main-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.settings-main-tab-btn:hover {
  color: #8c6820;
  border-color: #b38a38;
  background: #faf7f0;
}

.settings-main-tab-btn.active {
  color: #8c6820;
  background: linear-gradient(135deg, #faf5ea 0%, #f4ebd9 100%);
  border-color: #b38a38;
  border-bottom: 3px solid #b38a38;
  font-weight: 800;
  box-shadow: inset 0 0 10px rgba(223, 183, 92, 0.15), 0 4px 12px rgba(179, 138, 56, 0.15);
}

.settings-main-tab-btn .tab-icon {
  font-size: 1.15rem;
}

/* Sub-abas do Portal Institucional */
.inst-subtabs-nav {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  background: #f4f1ea;
  padding: 0.45rem;
  border: 1.5px solid var(--gold-border);
}

.inst-subtab-btn {
  flex: 1 1 auto;
  min-width: 180px;
  text-align: center;
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.inst-subtab-btn:hover {
  background: #faf7f0;
  border-color: #b38a38;
  color: #8c6820;
}

.inst-subtab-btn.active {
  background: linear-gradient(135deg, #faf5ea 0%, #f4ebd9 100%) !important;
  color: #8c6820 !important;
  border: 1.5px solid #b38a38 !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 10px rgba(223, 183, 92, 0.15), 0 2px 8px rgba(179, 138, 56, 0.15) !important;
}

.inst-card-spacious {
  background: #ffffff;
  border: 1.5px solid var(--gold-border);
  padding: 2.2rem 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.inst-field-title-large {
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 1rem !important;
  height: 44px !important;
  border: 1.5px solid var(--border-subtle) !important;
  box-sizing: border-box !important;
}

.inst-field-title-large:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px rgba(223, 183, 92, 0.2) !important;
}

.inst-field-textarea-large {
  font-size: 0.94rem !important;
  line-height: 1.6 !important;
  padding: 1rem 1.1rem !important;
  min-height: 180px !important;
  border: 1.5px solid var(--border-subtle) !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

.inst-field-textarea-large:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px rgba(223, 183, 92, 0.2) !important;
}

/* ==========================================================================
   TELA DE MANUTENÇÃO TÉCNICA PROGRAMADA (MARFIM NOBRE & OURO ESCOVADO JUSMIDAS)
   ========================================================================== */
.maintenance-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: #faf7f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 999999999;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

.maintenance-bg-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.aureus-maint-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 500px;
  background: radial-gradient(circle, rgba(223, 183, 92, 0.18) 0%, rgba(250, 247, 240, 0) 70%);
}

.maintenance-card-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aureus-maint-box {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #d4af37;
  box-shadow: 0 20px 50px rgba(20, 18, 16, 0.08), 0 0 0 1px rgba(179, 138, 56, 0.2);
  padding: 1.8rem 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 0px !important;
  box-sizing: border-box;
}

.aureus-maint-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.9rem;
}

.maint-brand-logo {
  width: 158px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(179, 138, 56, 0.35));
  margin-bottom: 0.6rem;
}

.aureus-maint-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #8c6820;
  margin: 0 0 0.2rem 0;
}

.aureus-maint-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #64748b;
}

.aureus-maint-badge-header {
  margin-bottom: 0.9rem;
}

.aureus-maint-badge {
  display: inline-block;
  background: #faf5ea;
  border: 1px solid #d4af37;
  color: #8c6820;
  padding: 0.35rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 0px !important;
  font-family: 'Montserrat', sans-serif;
}

.aureus-maint-text-block {
  margin-bottom: 1.1rem;
  max-width: 540px;
}

.aureus-maint-text-block h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.6px;
  margin: 0 0 0.4rem 0;
  text-transform: uppercase;
}

.aureus-maint-text-block p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

.maint-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1.1rem;
}

.maint-pillar-card {
  background: #faf7f0;
  border: 1px solid #e8decb;
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  border-radius: 0px !important;
}

.maint-pillar-card:hover {
  border-color: #d4af37;
  box-shadow: 0 3px 12px rgba(179, 138, 56, 0.14);
}

.maint-pillar-icon {
  font-size: 1.25rem;
}

.maint-pillar-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.maint-pillar-info strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 800;
}

.maint-pillar-info span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.35;
}

.aureus-countdown-card {
  width: 100%;
  background: #faf7f0;
  border: 1.5px solid #d5cbbd;
  padding: 0.95rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
  border-radius: 0px !important;
  box-sizing: border-box;
}

.countdown-header-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #8c6820;
}

.countdown-timer-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.countdown-time-card {
  background: #ffffff;
  border: 1.5px solid #b38a38;
  min-width: 62px;
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 8px rgba(179, 138, 56, 0.12);
  border-radius: 0px !important;
}

.time-digit {
  font-family: 'Montserrat', monospace, sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: #8c6820;
  line-height: 1;
  letter-spacing: 0.5px;
}

.time-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  margin-top: 0.2rem;
}

.countdown-separator {
  font-size: 1.4rem;
  font-weight: 900;
  color: #b38a38;
  line-height: 1;
}

.aureus-card-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 1rem;
}

.aureus-maint-dev-block {
  width: 100%;
}

.btn-aureus-dev-access {
  width: 100%;
  background: linear-gradient(135deg, #d4af37 0%, #ca8a04 50%, #b88d36 100%) !important;
  border: 1.5px solid #a16207 !important;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.80rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease !important;
  border-radius: 0px !important;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3) !important;
  transform: none !important;
}

.btn-aureus-dev-access:hover {
  background: linear-gradient(135deg, #dfbc4b 0%, #d4af37 50%, #c49a2b 100%) !important;
  border-color: #8c6820 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.5) !important;
  transform: none !important;
}

.maint-office-footer {
  margin-top: 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
}

.maint-office-title {
  font-family: 'Cinzel', serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: #8c6820;
}

.maint-office-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #b38a38;
}

@media (max-width: 640px) {
  .aureus-maint-box {
    padding: 1.4rem 1.1rem;
  }
  .maint-pillars-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .countdown-timer-grid {
    gap: 0.4rem;
  }
  .countdown-time-card {
    min-width: 52px;
    padding: 0.35rem 0.45rem;
  }
  .time-digit {
    font-size: 1.35rem;
  }
}

/* Centralização e Destaque do Botão Gerar Proposta Oficial */
.sim-propose-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  margin: 1.5rem auto 0 auto !important;
  padding: 0.5rem 0 !important;
}

#btn-convert-simulation {
  margin: 0 auto !important;
  align-self: center !important;
}

/* ==========================================================================
   MODAL DE CONFIRMAÇÃO DE SENHA / BAIXA DE PARCELA - INTER ULTRA-HD DEFINITION
   ========================================================================== */
#modal-confirm-password,
#modal-confirm-password * {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}

#modal-confirm-password .modal-title {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.98rem !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
}

#modal-confirm-password p,
#modal-confirm-password label,
#modal-confirm-password span,
#modal-confirm-password div,
#modal-confirm-password strong,
#modal-confirm-password input,
#modal-confirm-password button {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

#modal-confirm-password .btn-cancel-red {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 600 !important;
  font-size: 0.84rem !important;
}

#modal-confirm-password .btn-confirm-green {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
}

#modal-confirm-password input[type="password"] {
  letter-spacing: 2px !important;
}

#modal-confirm-password input[type="text"],
#modal-confirm-password input[type="date"],
#modal-confirm-password input[type="password"] {
  font-size: 0.90rem !important;
}


/* ==========================================================================
   MODAL DEVEDOR: LAYOUT EXPANDIDO EM 2 BLOCOS (INFORMAÇÕES + ANEXAR DOCUMENTOS)
   ========================================================================== */
#modal-debtor .modal-container.modal-debtor-expanded {
  max-width: 1280px !important;
  width: 96% !important;
  max-height: 94vh !important;
  border: 1.5px solid #d4af37 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(179, 138, 56, 0.25) !important;
}

.debtor-two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr; /* Região de anexar documentação ainda mais larga e espaçosa */
  background: #ffffff;
  overflow-y: auto;
  max-height: calc(94vh - 130px);
}

/* Coluna 1: Dados do Devedor */
.col-debtor-info {
  padding: 1.4rem 1.6rem;
  border-right: 1.5px solid #e8dfd1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: #ffffff;
  box-sizing: border-box;
}

.debtor-col-header {
  margin-bottom: 0.2rem;
}

.debtor-col-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8c6820;
  background: #faf5ea;
  border: 1px solid #e8d7b5;
  padding: 0.35rem 0.75rem;
  border-radius: 0px !important;
}

.debtor-inner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}

/* Coluna 2: Anexar Documentos */
.col-debtor-docs {
  padding: 1.4rem 1.6rem;
  background: #fbf9f4;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-sizing: border-box;
}

.docs-panel-box {
  background: #ffffff;
  border: 1.5px solid #d5cbbd;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.docs-meta-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.docs-meta-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.45;
}

.docs-meta-limits {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8c6820;
  background: #faf5ea;
  border: 1px solid #e8d7b5;
  padding: 0.28rem 0.6rem;
  width: fit-content;
  border-radius: 0px !important;
}

.upload-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.upload-file-input {
  flex: 1;
  background: #ffffff !important;
  border: 1.5px solid #d5cbbd !important;
  padding: 0.35rem 0.65rem !important;
  font-size: 0.8rem !important;
  cursor: pointer;
  height: 38px !important;
  box-sizing: border-box;
}

.btn-upload-action {
  background: linear-gradient(135deg, #dfb75c 0%, #b88d36 100%) !important;
  color: #0d141c !important;
  font-family: var(--font-title) !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  border: none !important;
  padding: 0 1.25rem !important;
  height: 38px !important;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(179, 138, 56, 0.3) !important;
  transition: all 0.15s ease !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px !important;
}

.btn-upload-action:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(179, 138, 56, 0.45) !important;
}

.debtor-docs-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-height: 0;
}

.docs-preview-header {
  font-size: 0.74rem;
  font-weight: 800;
  color: #8c6820;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debtor-file-preview-list-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 220px;
  background: #faf7f0;
  border: 1.5px dashed #d5cbbd;
  padding: 0.85rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.docs-legal-hint {
  display: flex;
  gap: 0.6rem;
  background: #faf7f0;
  border: 1px solid #e8decb;
  border-left: 3.5px solid #b38a38;
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.45;
  border-radius: 0px !important;
  margin-top: auto;
}

/* ==========================================================================
   MODAL DOCUMENTOS DO CLIENTE (EXPANDIDO / HARMONIZADO)
   ========================================================================== */
#modal-debtor-documents .modal-container {
  max-width: 830px !important;
  width: 95% !important;
  border: 1.5px solid #d4af37 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(179, 138, 56, 0.25) !important;
}

/* ==========================================================================
   RODAPÉ DO MODAL DE DEVEDOR: BOTÕES PADRONIZADOS EM ALTURA (42px)
   ========================================================================== */
#modal-debtor .modal-footer {
  padding: 1.1rem 1.6rem !important;
  background: #fbf9f4 !important;
  border-top: 1.5px solid #e8dfd1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.85rem !important;
}

#modal-debtor .modal-footer .btn-cancel-red,
#modal-debtor .modal-footer button[type="button"] {
  height: 42px !important;
  background: #ffffff !important;
  border: 1.5px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-family: var(--font-title) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.75px !important;
  text-transform: uppercase !important;
  padding: 0 1.6rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  border-radius: 0px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

#modal-debtor .modal-footer .btn-cancel-red:hover,
#modal-debtor .modal-footer button[type="button"]:hover {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
  transform: translateY(-1px) !important;
}

/* Botão Salvar Devedor (Fundo Verde Claro no repouso, Verde mais Verde e Efeito Luminoso no Hover) */
#modal-debtor .modal-footer button[type="submit"],
#modal-debtor #btn-save-debtor {
  height: 42px !important;
  background: #a7f3d0 !important;
  color: #064e3b !important;
  font-family: var(--font-title) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.75px !important;
  text-transform: uppercase !important;
  border: 1.5px solid #10b981 !important;
  outline: none !important;
  padding: 0 1.75rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.15) !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  border-radius: 0px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

#modal-debtor .modal-footer button[type="submit"]:hover,
#modal-debtor #btn-save-debtor:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-1px) !important;
}

#modal-debtor .modal-footer button[type="submit"]:active,
#modal-debtor #btn-save-debtor:active {
  background: #047857 !important;
  color: #ffffff !important;
  transform: translateY(0px) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 960px) {
  .debtor-two-col-layout {
    grid-template-columns: 1fr;
    max-height: 80vh;
  }
  .col-debtor-info {
    border-right: none;
    border-bottom: 1.5px solid #e8dfd1;
    padding: 1.1rem 1.2rem;
  }
  .col-debtor-docs {
    padding: 1.1rem 1.2rem;
  }
}

