/* ==========================================================================
   PORTAL IMOBILIÁRIA ESTRELA - ESTILO LUXO TORELA (GRAMADO/CANELA STYLE)
   ========================================================================== */

:root {
  --bg-torela: #103346;          /* Azul Petróleo Nobre / Assinatura Torela */
  --bg-torela-dark: #0a202c;
  --bg-torela-card: #174259;
  --torela-accent: #38bdf8;      /* Azul Celeste Elegante */
  --torela-gold: #e2c08d;        /* Ouro Champanhe / Areia Gramado */
  --torela-gold-hover: #cbb07c;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebd5a;
  --success: #10b981;
  --danger: #ef4444;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: rgba(255, 255, 255, 0.15);
  --border-light: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(16, 51, 70, 0.1);
  --shadow-lg: 0 20px 40px rgba(16, 51, 70, 0.2);
  --font-serif: 'Prata', 'Playfair Display', Georgia, serif;
  --font-sans: 'Lato', 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-torela);
  color: #ffffff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* HEADER TORELA MINIMALISTA & LUXO */
.torela-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(16, 51, 70, 0.92);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.torela-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  cursor: pointer;
}

.brand-symbol {
  font-size: 26px;
  color: var(--torela-gold);
  filter: drop-shadow(0 0 10px rgba(226, 192, 141, 0.4));
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand-text p {
  font-size: 0.65rem;
  color: var(--torela-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.torela-nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.torela-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.torela-nav a:hover,
.torela-nav a.active {
  color: var(--bg-torela-dark) !important;
  background: var(--torela-gold) !important;
  border-color: var(--torela-gold) !important;
  box-shadow: 0 4px 12px rgba(226, 192, 141, 0.35);
}

.btn-torela-nav {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 7px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-torela-nav:hover,
.btn-torela-nav.active {
  background: var(--torela-gold);
  color: var(--bg-torela-dark);
  border-color: var(--torela-gold);
  box-shadow: 0 4px 12px rgba(226, 192, 141, 0.35);
}

.torela-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-torela-gold {
  background: var(--torela-gold);
  color: var(--bg-torela-dark);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 22px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-torela-gold:hover {
  background: var(--torela-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(226, 192, 141, 0.3);
}

.btn-torela-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-torela-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* HERO SECTION COM SLIDER E GLASS SEARCH BOX */
.torela-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px 20px;
  background: linear-gradient(rgba(16, 51, 70, 0.75), rgba(10, 32, 44, 0.9)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
}

.hero-content-grid {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 420px;
  gap: 40px;
  align-items: center;
}

.hero-typography h2 {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-typography h2 span {
  display: block;
  color: var(--torela-gold);
}

.hero-typography p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  line-height: 1.6;
}

/* GLASS SEARCH BOX TORELA */
.torela-search-card {
  background: rgba(23, 66, 89, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.torela-tabs-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.tab-switch-btn {
  padding: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-switch-btn.active {
  color: #ffffff;
  border-bottom: 2px solid var(--torela-gold);
  background: rgba(255, 255, 255, 0.08);
}

.torela-search-body {
  padding: 24px;
}

.torela-field {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 0;
  margin-bottom: 16px;
}

.torela-field label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--torela-gold);
  margin-bottom: 4px;
  font-weight: 700;
}

.torela-select, .torela-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
}

.torela-select option {
  background: var(--bg-torela-dark);
  color: #ffffff;
}

.btn-torela-search {
  width: 100%;
  background: var(--torela-gold);
  color: var(--bg-torela-dark);
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
}

.btn-torela-search:hover {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

/* VITRINE DE IMÓVEIS TORELA */
/* VITRINE DE IMÓVEIS PADRÃO THAIS IMOBILIÁRIA (LUXO & CONTEMPORÂNEO) */
.torela-properties-section {
  background: #f8fafc;
  color: var(--text-main);
  padding: 80px 20px;
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.torela-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 35px;
  flex-wrap: wrap;
  gap: 20px;
}

.torela-section-header .tag-section {
  display: inline-block;
  background: rgba(16, 51, 70, 0.08);
  color: var(--bg-torela);
  padding: 4px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.torela-section-header h3 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--bg-torela);
  font-weight: 400;
  margin: 0;
}

.torela-grid, #propertiesCardsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
}

.property-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(16, 51, 70, 0.14);
  border-color: #cbd5e1;
}

.property-thumb {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.property-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

.thumb-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.badge-codigo {
  background: var(--bg-torela);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-tag {
  background: rgba(255, 255, 255, 0.95);
  color: var(--bg-torela);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.thumb-footer {
  position: relative;
  z-index: 2;
}

.thumb-location {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.property-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.property-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bg-torela);
}

.property-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.property-condo {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.property-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1rem;
}

.property-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 18px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

.spec-item strong {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 2px;
}

.property-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-card-proposta {
  flex: 1;
  background: #f1f5f9;
  color: var(--bg-torela);
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-card-proposta:hover {
  background: var(--bg-torela);
  color: #ffffff;
  border-color: var(--bg-torela);
}

.btn-card-whatsapp {
  flex: 1.3;
  background: var(--whatsapp);
  color: #ffffff;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-card-whatsapp:hover {
  background: var(--whatsapp-hover);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* WIDGET FLUTUANTE IA WHATSAPP DO JARVIS */
.whatsapp-ia-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none; /* Deixa cliques passarem livremente quando o balão não está ativo */
}

.whatsapp-ia-btn {
  pointer-events: auto; /* O botão continua sempre clicável */
}

.ia-speech-bubble {
  background: #ffffff;
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  margin-bottom: 14px;
  max-width: 300px;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid var(--border-light);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

/* Mostra o balão apenas no hover sobre o widget ou quando clicado */
.whatsapp-ia-widget:hover .ia-speech-bubble,
.ia-speech-bubble.bubble-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ia-speech-bubble strong {
  color: var(--bg-torela);
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-serif);
}

/* CARDS DE CIDADES E REGIÕES (PADRÃO THAIS IMOBILIÁRIA) */
.city-card {
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.city-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.city-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 51, 70, 0.1) 0%, rgba(16, 51, 70, 0.9) 100%);
  transition: all 0.3s ease;
}

.city-card:hover .city-overlay {
  background: linear-gradient(180deg, rgba(16, 51, 70, 0.3) 0%, rgba(16, 51, 70, 0.95) 100%);
}

.city-info {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.city-info h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 4px 0;
  color: #ffffff;
}

.city-info p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* CARDS DO BLOG IMOBILIÁRIO (PADRÃO THAIS) */
.blog-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(16, 51, 70, 0.12);
  border-color: #cbd5e1;
}

.blog-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 12px;
}

.blog-badge-tag {
  background: var(--bg-torela);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bg-torela);
  line-height: 1.35;
  margin-bottom: 8px;
}

.blog-excerpt {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* TOUR VIRTUAL 360º ESTILOS */
.tour-pan-view {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  cursor: grab;
  transition: transform 0.1s ease-out, background-image 0.5s ease-in-out;
  animation: panoramaAutoScroll 45s infinite alternate linear;
}

.tour-pan-view:active {
  cursor: grabbing;
}

@keyframes panoramaAutoScroll {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-tour-nav {
  background: rgba(16, 51, 70, 0.8);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tour-nav:hover, .btn-tour-nav.active {
  background: var(--torela-gold);
  color: var(--bg-torela);
  border-color: var(--torela-gold);
  font-weight: 700;
}

.btn-card-tour {
  flex: 1.1;
  background: #f1f5f9;
  color: var(--bg-torela);
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-card-tour:hover {
  background: var(--bg-torela);
  color: var(--torela-gold);
  border-color: var(--bg-torela);
}

.whatsapp-ia-btn {
  background: var(--whatsapp);
  color: #ffffff;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.whatsapp-ia-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

/* PAINEL INQUILINO, PROPRIETÁRIO & FUNCIONÁRIO (GLASS TORELA THEME PADRONIZADO) */
.main-container {
  width: 100%;
  max-width: 1560px;
  margin: 100px auto 40px auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.glass-panel {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 26px 32px;
  margin-bottom: 30px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 51, 70, 0.1);
  color: var(--bg-torela);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 20px;
  border-radius: var(--radius-md);
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bg-torela);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pago { background: #d1fae5; color: #065f46; }
.status-aberto { background: #fef3c7; color: #92400e; }
.status-locado { background: #dbeafe; color: #1e40af; }
.status-disponivel { background: #d1fae5; color: #065f46; }

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--bg-torela);
  border-bottom-color: var(--bg-torela);
  font-weight: 700;
}

/* FOOTER TORELA */
.torela-footer {
  background: var(--bg-torela-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 40px 30px 40px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto 40px auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-inner h4 {
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.footer-inner p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-copyright {
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 25px;
}

/* MODAIS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 32, 44, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--bg-torela);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-family: inherit;
  background: #f8fafc;
}

.form-section-title {
  background: #f1f5f9;
  border-left: 4px solid var(--bg-torela);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg-torela);
  margin: 20px 0 14px 0;
  border-radius: 2px;
}

.form-input:focus {
  outline: none;
  border-color: var(--bg-torela);
  background: #ffffff;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  width: 100%;
}

.btn-primary { background: var(--bg-torela); color: #ffffff; }
.btn-primary:hover { background: var(--bg-torela-dark); }

.doc-preview-modal {
  max-width: 940px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  padding: 26px 36px;
  border-radius: 12px;
  transition: max-width 0.25s ease;
}

.doc-preview-modal.is-landscape {
  max-width: 1340px;
  width: 96%;
}

.document-sheet {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  padding: 10px 5px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm 8mm;
  }
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }
  
  /* Remove completamente o layout do site durante a impressão */
  header, footer, nav, main, .torela-header, .portal-main, .whatsapp-ia-widget, .no-print,
  body > *:not(#modalDocumento) {
    display: none !important;
  }
  
  /* Exibe exclusivamente o documento oficial na folha A4 */
  #modalDocumento {
    display: block !important;
    position: static !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  #modalDocumento .modal-content {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .document-sheet, .document-sheet * {
    page-break-inside: avoid !important;
  }

  .dimob-page-sheet, .report-page-sheet {
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
  }

  .dimob-page-sheet:last-child, .report-page-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  table, tr, td, th {
    page-break-inside: avoid !important;
  }

  .no-print {
    display: none !important;
  }
}

/* ELEMENTOS DE SENHA COM OLHINHO E AÇÕES DE EQUIPE */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper .form-input,
.password-wrapper input {
  padding-right: 42px !important;
  width: 100%;
}

.btn-eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 2;
}

.btn-eye-toggle:hover {
  color: var(--bg-torela);
  background: rgba(16, 51, 70, 0.08);
  transform: translateY(-50%) scale(1.1);
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-action-delete:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-table-eye {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--bg-torela);
  transition: all 0.2s;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-table-eye:hover {
  background: var(--bg-torela);
  color: #ffffff;
  border-color: var(--bg-torela);
}

.pass-masked-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
}

.pass-masked-cell .pass-dots {
  font-size: 0.95rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 900px) {
  .torela-nav { display: none; }
  .hero-content-grid { grid-template-columns: 1fr; }
  .hero-typography h2 { font-size: 2.6rem; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   🏢 LAYOUT ERP OPERACIONAL DO ADMINISTRADOR / FUNCIONÁRIOS (SUPERLÓGICA STYLE)
   ========================================================================== */
.main-container-erp {
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  background: #080e1a;
}

.admin-erp-wrapper {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* 📌 MENU LATERAL FIXO NO CANTO ESQUERDO */
.admin-erp-sidebar {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  background: #0a1120;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 20px 14px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  box-shadow: 4px 0 24px rgba(2, 6, 23, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  z-index: 100;
}

.admin-erp-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-erp-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* 📌 CONTEÚDO PRINCIPAL COM SCROLL INDEPENDENTE */
.admin-erp-main {
  margin-left: 250px;
  flex: 1;
  min-width: 0;
  padding: 20px 24px;
  min-height: 100vh;
  box-sizing: border-box;
  background: #0b1324;
}

.admin-erp-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-erp-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

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

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.4));
}

.brand-name {
  display: block;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.sidebar-nav-item:hover {
  background: rgba(30, 41, 59, 0.6);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, #1e293b 0%, #172033 100%) !important;
  border: 1.5px solid #3b82f6 !important;
  border-left: 4px solid #0284c7 !important;
  box-shadow: 0 4px 14px -2px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.sidebar-nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0 6px 0;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1px;
  padding: 4px 10px;
  text-transform: uppercase;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px;
  background: #080d19;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

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

.user-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eab308;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.3);
}

.user-info-mini strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 700;
}

.user-info-mini small {
  display: block;
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-sidebar-logout {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.95rem;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.btn-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.08);
}

/* 📌 PAINEL PRINCIPAL (DIREITA) */
.admin-erp-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* 🔍 TOP SEARCH & COMMAND BAR (DESTAQUE SUPERLÓGICA) */
.admin-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  border: 1.5px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-search-wrapper {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 14px;
  width: 100%;
  max-width: 600px;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-search-wrapper:focus-within {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.search-lens {
  font-size: 1.1rem;
  color: #4f46e5;
}

.admin-search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  font-family: inherit;
}

.admin-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.86rem;
}

.btn-admin-search {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-admin-search:hover {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.admin-top-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-quick-links {
  display: flex;
  gap: 8px;
}

.btn-top-quick {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  color: #334155;
  transition: all 0.2s;
}

.btn-top-quick:hover {
  background: #f1f5f9;
}

.btn-top-gold {
  background: #103346;
  color: #ffffff;
  border-color: #103346;
}

.btn-top-gold:hover {
  background: #0b2533;
}

.admin-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.profile-icon {
  font-size: 1rem;
}

.profile-text strong {
  display: block;
  font-size: 0.78rem;
  color: #0f172a;
  line-height: 1.1;
}

.profile-text small {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
}

.btn-chip-logout {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-chip-logout:hover {
  background: #dc2626;
  color: #ffffff;
}

/* 📊 CARDS DE INDICADORES (KPIs) */
.admin-kpi-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.kpi-card-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.kpi-cobrancas-body {
  display: grid;
  grid-template-columns: 190px 1fr 190px;
  gap: 20px;
  align-items: center;
}

.kpi-circle-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-symbol {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
}

.stat-green .stat-symbol {
  background: #dcfce7;
  color: #16a34a;
}

.stat-red .stat-symbol {
  background: #fee2e2;
  color: #dc2626;
}

.stat-pct {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.stat-sub {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.kpi-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-progress-bar {
  height: 22px;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  background: #e2e8f0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  transition: width 0.4s ease;
}

.seg-green { background: #22c55e; }
.seg-yellow { background: #eab308; }
.seg-red { background: #ef4444; }

.kpi-legend-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #475569;
  flex-wrap: wrap;
  gap: 6px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}

.dot-green { background: #22c55e; }
.dot-yellow { background: #eab308; }
.dot-red { background: #ef4444; }

.kpi-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1.1fr;
  gap: 12px;
}

.kpi-metric-cols {
  display: flex;
  justify-content: space-between;
  text-align: center;
  gap: 8px;
  margin-top: 6px;
}

.metric-col {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 8px 4px;
}

.metric-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.metric-desc {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.kpi-action-banner {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #334155;
  flex-wrap: wrap;
  gap: 6px;
}

.banner-buttons {
  display: flex;
  gap: 6px;
}

.btn-banner-ghost {
  background: transparent;
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
}

.btn-banner-solid {
  background: #6366f1;
  color: #ffffff;
  border: 1px solid #6366f1;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
}

.kpi-taxa-body {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.taxa-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  padding: 8px 10px;
  border-radius: 6px;
  flex: 1;
}

.taxa-icon {
  font-size: 1.2rem;
}

.taxa-val {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.taxa-sub {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   📊 KPI ROWS 2 & 3 — TAXA ADM / CHECKLIST / REPASSES / DESPESAS / MÉTRICAS
   ═══════════════════════════════════════════════════════ */

/* Grade de 3 colunas iguais para as fileiras 2 e 3 */
.kpi-row3 {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 12px;
}

/* Coluna empilhada (dois cards um sobre o outro) */
.kpi-stack-col {
  display: flex;
  flex-direction: column;
}

/* Card pequeno dentro da coluna empilhada */
.kpi-sm-card {
  flex: 1;
}

.kpi-sm-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.kpi-sm-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.kpi-sm-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.kpi-sm-sub {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* Valor "Nenhum" em tom acinzentado */
.kpi-val-muted {
  color: #94a3b8 !important;
  font-style: italic;
}

/* Corpo centralizado dos cards grandes (Checklist, Repasses, Despesas) */
.kpi-checklist-body,
.kpi-repasse-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 0 4px;
  gap: 4px;
}

/* Ícone de checklist */
.checklist-icon-wrap {
  font-size: 2rem;
  margin-bottom: 4px;
}

/* Ícone grande de repasse */
.repasse-icon {
  font-size: 1.8rem;
  color: #94a3b8;
  font-weight: 900;
}

/* Valor XL dos cards Checklist / Repasses / Despesas */
.kpi-xl-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.kpi-xl-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

/* Footer de alertas (atrasados) */
.kpi-alert-footer {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.kpi-alert-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}

.kpi-alert-warn {
  background: #fef3c7;
  color: #d97706;
}

.kpi-alert-ok {
  background: #dcfce7;
  color: #16a34a;
}

/* Card MÉTRICAS */
.kpi-metricas-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 10px 0 4px;
}

.metricas-icon {
  font-size: 2.4rem;
}

.kpi-metricas-desc {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}

.btn-metricas-acessar {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-metricas-acessar:hover {
  background: #16a34a;
}

/* ═══════════════════════════════════════════════════════
   🎯 CARD BOLETOS DE LOCAÇÃO PARA COBRANÇA (Arcos SVG)
   ═══════════════════════════════════════════════════════ */

.kpi-boletos-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-boletos-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.boletos-icon-wrap {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-boletos-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #374151;
  line-height: 1.3;
}

.kpi-boletos-circles {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 0;
}

.boleto-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.boleto-circle-wrap:hover {
  transform: scale(1.07);
}

.boleto-circle-outer {
  position: relative;
  width: 70px;
  height: 70px;
}

.boleto-arc {
  width: 70px;
  height: 70px;
  transform: rotate(-90deg);
}

/* Anel de fundo */
.arc-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 7;
}

/* Arco preenchido */
.arc-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.arc-red  { stroke: #ef4444; }
.arc-blue { stroke: #3b82f6; }

/* Número central */
.boleto-circle-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 900;
  color: #374151;
  pointer-events: none;
}

.boleto-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.boleto-label-red  { color: #ef4444; }
.boleto-label-blue { color: #3b82f6; }


/* 📌 WORKSPACE PANEL & TABELAS (PADRÃO ALFRED CARD) */

.admin-workspace-panel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  min-height: calc(100vh - 210px);
  box-sizing: border-box;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.workspace-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--bg-torela);
  margin-top: 4px;
  margin-bottom: 0;
}

.workspace-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ws-ghost {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--bg-torela);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ws-ghost:hover {
  background: #f8fafc;
}

.btn-ws-gold {
  background: var(--torela-gold);
  color: #0f172a;
  border: 1px solid var(--torela-gold);
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
}

.btn-ws-gold:hover {
  background: #e6b840;
}

.workspace-tabs-nav {
  display: none !important;
  gap: 6px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 16px;
  overflow-x: auto;
}

.ws-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.ws-tab-btn:hover {
  color: #0f172a;
}

.ws-tab-btn.active {
  color: #0f172a;
  border-bottom-color: #6366f1;
  font-weight: 800;
}

.tab-filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-filter {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
}

.btn-filter.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.admin-erp-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-erp-table th {
  background: #f8fafc;
  color: #1e293b !important;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-erp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a !important;
  font-size: 0.88rem;
}

.admin-erp-table td strong {
  color: #0f172a !important;
}

.admin-erp-table tbody tr:hover {
  background: #f8fafc;
}

@media (max-width: 1200px) {
  .admin-erp-wrapper {
    grid-template-columns: 1fr;
  }
  .admin-erp-sidebar {
    position: static;
  }
  .kpi-cobrancas-body {
    grid-template-columns: 1fr;
  }
  .kpi-secondary-row {
    grid-template-columns: 1fr;
  }
}
/* 🔐 CARDS DE PERMISSÕES POR MÓDULO */
.modulo-perm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.modulo-perm-card:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.modulo-perm-card:has(input:checked) {
  border-color: #eab308;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.modulo-perm-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #eab308;
  cursor: pointer;
  flex-shrink: 0;
}

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

.modulo-perm-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.modulo-perm-info > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modulo-perm-info strong {
  font-size: 0.85rem;
  color: #1e293b;
  font-weight: 700;
}

.modulo-perm-info small {
  font-size: 0.72rem;
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════════
   🪄 PAINEL & EDITOR WYSIWYG DE CONTRATOS MESTRE (CLEAN PURPLE/BLUE THEME)
   ══════════════════════════════════════════════════════════════ */
.contract-editor-container {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  border: 1.5px solid #e2e8f0;
}

.contract-editor-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.magic-icon-circle {
  width: 48px;
  height: 48px;
  background: #38bdf8;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.contract-editor-header-text h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  font-family: var(--font-sans);
}

.contract-editor-header-text small {
  font-size: 0.8rem;
  color: #64748b;
}

.form-label-clean {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.form-input-clean {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  color: #1e293b;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input-clean:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-clean-danger {
  padding: 8px 20px;
  background: #ff5722;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  height: 38px;
  transition: background 0.2s;
}

.btn-clean-danger:hover {
  background: #e64a19;
}

.btn-clean-secondary {
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-clean-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* WYSIWYG Wrapper */
.editor-wysiwyg-wrapper {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.editor-toolbar {
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.toolbar-select {
  padding: 4px 8px;
  font-size: 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.toolbar-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.82rem;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

.contract-editable-content {
  min-height: 420px;
  max-height: 600px;
  overflow-y: auto;
  padding: 24px 32px;
  background: #ffffff;
  color: #334155;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}

.contract-editable-content p {
  margin-bottom: 12px;
  text-align: justify;
}

.contract-editable-content strong {
  color: #0f172a;
}

/* RODAPÉ DE AÇÕES */
.contract-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.btn-clean-action {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-clean-export {
  background: #cbd5e1;
  color: #1e293b;
}
.btn-clean-export:hover {
  background: #94a3b8;
  color: #ffffff;
}

.btn-clean-print {
  background: #94a3b8;
  color: #ffffff;
}
.btn-clean-print:hover {
  background: #64748b;
}

.btn-clean-primary {
  background: #6366f1;
  color: #ffffff;
}
.btn-clean-primary:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-clean-close {
  background: #e2e8f0;
  color: #475569;
}
.btn-clean-close:hover {
  background: #cbd5e1;
}

/* ══════════════════════════════════════════════════════════════
   🏢 ALFRED PREMIUM MODALS (CADASTRO DE IMÓVEL & INQUILINO)
   ══════════════════════════════════════════════════════════════ */
.alfred-modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  padding: 0 !important;
  border: none;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.alfred-modal-header {
  background: #0f172a;
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alfred-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.alfred-modal-header p {
  margin: 3px 0 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.alfred-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.alfred-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.alfred-modal-body {
  padding: 24px 28px;
  max-height: calc(88vh - 140px);
  overflow-y: auto;
}

.alfred-modal-body::-webkit-scrollbar {
  width: 6px;
}

.alfred-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.alfred-section-divider {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f172a;
  margin: 20px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alfred-form-grid {
  display: grid;
  gap: 14px;
}

.alfred-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.alfred-form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.alfred-form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.88rem;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.alfred-form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.alfred-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1.5px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.btn-alfred-cancel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-alfred-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-alfred-submit {
  background: #0284c7;
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.2s;
}

.btn-alfred-submit:hover {
  background: #0369a1;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.alfred-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  gap: 4px;
}

.alfred-toggle-pill {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b;
  transition: all 0.2s;
}

.alfred-toggle-pill.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.alfred-foto-box {
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
}

.alfred-foto-box:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

/* ══════════════════════════════════════════════════════════════
   🏛️ HARMONIZAÇÃO DOS EDITORES DE RECIBOS, CONTRATOS & RELATÓRIOS
   ══════════════════════════════════════════════════════════════ */
.contract-editor-container {
  background: #0f172a !important;
  border: 1.5px solid #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

.contract-editor-header-text h3 {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.contract-editor-header-text small {
  color: #94a3b8 !important;
}

.contract-editor-container .form-label-clean {
  color: #cbd5e1 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
}

.contract-editor-container .form-input-clean {
  background: #1e293b !important;
  border: 1.5px solid #334155 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
}

.contract-editor-container .form-input-clean:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25) !important;
}

.contract-editor-container .form-input-clean option {
  background: #0f172a !important;
  color: #ffffff !important;
}

.editor-wysiwyg-wrapper {
  border: 1.5px solid #334155 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}

.editor-toolbar {
  background: #1e293b !important;
  border-bottom: 1.5px solid #334155 !important;
  padding: 10px 14px !important;
}

.toolbar-select {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #475569 !important;
  border-radius: 6px !important;
}

.toolbar-btn {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border: 1px solid #475569 !important;
  border-radius: 6px !important;
}

.toolbar-btn:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.toolbar-divider {
  background: #334155 !important;
}

/* Folha em formato papel A4 límpido com tipografia de alta legibilidade */
.contract-editable-content {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 36px 44px !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.06) !important;
  border-radius: 0 0 8px 8px !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
}

.contract-editor-footer {
  border-top: 1.5px solid #1e293b !important;
  padding-top: 18px !important;
}

.btn-clean-export {
  background: #334155 !important;
  color: #ffffff !important;
  border: 1px solid #475569 !important;
}
.btn-clean-export:hover {
  background: #475569 !important;
}

.btn-clean-print {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0284c7 !important;
}
.btn-clean-print:hover {
  background: #0369a1 !important;
}

.btn-clean-primary {
  background: #10b981 !important;
  color: #ffffff !important;
  border: 1px solid #10b981 !important;
}
.btn-clean-primary:hover {
  background: #059669 !important;
}

.btn-clean-close {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}
.btn-clean-close:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════
   📊 PAINÉIS DE RELATÓRIOS OFICIAIS (REAJUSTES, RENOVAÇÕES & CNR)
   PADRÃO VISUAL TORELA / ALFRED DARK LUXO
   ══════════════════════════════════════════════════════════════ */
#tabModelosContabeis, #tabRenovacoes, #tabBaixasAluguel {
  color: #1e293b;
}

/* Harmonização dos Cards de Relatórios */
.relatorio-card-box,
#tabModelosContabeis > div > div[style*="background: #ffffff"],
#tabRenovacoes > div > div[style*="background: #ffffff"],
#tabBaixasAluguel > div[style*="background: #ffffff"] {
  border-radius: 14px !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
  background: #ffffff !important;
}

/* Fieldsets organizados com visual clean moderno */
fieldset {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 10px 16px !important;
  transition: border-color 0.2s;
}

fieldset:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1) !important;
}

legend {
  font-weight: 800 !important;
  color: #0369a1 !important;
  padding: 0 8px !important;
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Botões de Ação de Relatórios */
button[onclick*="gerarPdf"],
button[onclick*="gerarRelatorio"] {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3) !important;
  font-weight: 800 !important;
  transition: all 0.2s ease !important;
}

button[onclick*="gerarPdf"]:hover,
button[onclick*="gerarRelatorio"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(2, 132, 199, 0.4) !important;
}

/* ══════════════════════════════════════════════════════════════
   🏦 TABELA DE CONCILIAÇÃO CNR 100% ORGANIZADA & RESPONSIVA
   ══════════════════════════════════════════════════════════════ */
#containerResultadoCnr,
#containerGridBoletosPeriodo {
  border-radius: 14px !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  margin-top: 20px !important;
}

#containerResultadoCnr table,
#containerGridBoletosPeriodo table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#containerResultadoCnr table th,
#containerGridBoletosPeriodo table th {
  background: #0b192c !important;
  color: #f8fafc !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 14px !important;
  border-bottom: 2px solid #0284c7 !important;
  white-space: nowrap !important;
}

#containerResultadoCnr table td,
#containerGridBoletosPeriodo table td {
  padding: 12px 14px !important;
  font-size: 0.83rem !important;
  color: #1e293b !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}

#containerResultadoCnr table tbody tr:nth-child(even),
#containerGridBoletosPeriodo table tbody tr:nth-child(even) {
  background: #f8fafc !important;
}

#containerResultadoCnr table tbody tr:hover,
#containerGridBoletosPeriodo table tbody tr:hover {
  background: #f0f9ff !important;
  transition: background 0.15s ease !important;
}

/* Badges de Status de Conciliação */
.badge-cnr-ok {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.badge-cnr-pendente {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.badge-status-pago {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1.5px solid #86efac !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.3px !important;
}

.badge-status-avencer {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1.5px solid #fde68a !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.3px !important;
}

.badge-status-vencido {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1.5px solid #fca5a5 !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: 0.3px !important;
}

/* ══════════════════════════════════════════════════════════════
   🏛️ TABELA DE PRÉ-CONFERÊNCIA COM CABEÇALHO OFICIAL DO CNR
   ══════════════════════════════════════════════════════════════ */
.cnr-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 0.82rem;
  background: #ffffff;
}

.cnr-preview-table thead tr {
  background: #0b192c !important;
  color: #ffffff !important;
}

.cnr-preview-table th {
  padding: 9px 12px;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 2px solid #0284c7;
  white-space: nowrap;
}

.cnr-preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.cnr-preview-table tbody tr:hover {
  background: #f8fafc;
}

.cnr-image-full-container {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

.cnr-image-full-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* 🏷️ BADGES PARA TIPO DE LIQUIDAÇÃO NO HISTÓRICO */
.badge-tipo-manual {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  letter-spacing: 0.3px !important;
}

.badge-tipo-automatica {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  letter-spacing: 0.3px !important;
}


