/* ============================
   TOKENS & DESIGN SYSTEM
   ============================ */
:root {
  --clr-primary: #003366;
  /* Azul Institucional */
  --clr-primary-light: #004a94;
  --clr-primary-dark: #001f3d;

  --clr-accent: #f59e0b;
  /* Laranja do Print */
  --clr-accent-light: #fef3c7;
  --clr-accent-dark: #b45309;

  --clr-secondary: #28a745;
  /* Verde para valores pagos */
  --clr-secondary-light: #d4edda;
  --clr-secondary-dark: #1e7e34;

  --clr-warning: #ffc107;
  --clr-danger: #dc3545;

  --clr-bg: #f8f9fa;
  /* Cinza claro fundo */
  --clr-surface: #ffffff;
  --clr-border: #dee2e6;

  --clr-text-main: #212529;
  --clr-text-muted: #6c757d;
  --clr-text-light: #adb5bd;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 51, 102, 0.1);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-main: 'Inter', 'Open Sans', 'Roboto', sans-serif;
}

/* ============================
   RESET & BASE
   ============================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--clr-bg);
  color: var(--clr-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================
   HEADER / HERO
   ============================ */
.header {
  background: var(--clr-surface);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header::before {
  display: none;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.header-divider {
  width: 1px;
  height: 40px;
  background: #e2e8f0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.convenium-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.convenium-subtitle {
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.portal-brand {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.portal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: -0.02em;
}

.portal-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 4px;
}

.municipality-tag {
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.instrument-id {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--clr-accent);
  color: var(--clr-accent-dark);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.hero {
  background: linear-gradient(to bottom, #f59e0b 0%, #ffffff 100%);
  color: var(--clr-primary);
  padding: 4rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  display: none;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--clr-primary);
  opacity: 0.9;
  max-width: none;
  margin: 0 auto 1.5rem;
  border-left: 4px solid var(--clr-primary);
  padding-left: 1rem;
  display: inline-block;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--status {
  background: var(--clr-accent);
  color: white;
}

/* MUDADO PARA LARANJA */
.badge--contract {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.section-marker {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 20;
}

.section-label {
  display: inline-block;
  background: transparent;
  color: var(--clr-primary);
  padding: 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  border-left: 6px solid var(--clr-accent);
  padding-left: 1.5rem;
  position: relative;
}

.section-label::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 1.5rem;
  width: 100px;
  height: 4px;
  background: var(--clr-accent);
  border-radius: 2px;
}

/* ============================
   KPI DASHBOARD
   ============================ */
.dashboard {
  margin-top: 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--clr-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.kpi-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.kpi-card--primary {
  border-bottom-color: var(--clr-primary);
}

.kpi-card--accent {
  border-bottom-color: var(--clr-accent);
}

/* MUDADO PARA LARANJA */
.kpi-card--warning {
  border-bottom-color: var(--clr-warning);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: block;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--clr-text-main);
  display: block;
}

.kpi-value--currency {
  color: var(--clr-primary);
}

/* ============================
   PROGRESS SECTION
   ============================ */
.progress-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: white;
  padding: 4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 4rem;
}

.progress-header {
  margin-bottom: 2rem;
}

.progress-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-primary);
  margin-bottom: 0.5rem;
}

.progress-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.chart-box {
  position: relative;
  width: 220px;
  height: 220px;
}

.chart-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--clr-primary);
}

.progress-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.progress-bar-group {
  width: 100%;
}

.progress-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.progress-bar-bg {
  height: 14px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-accent) 0%, var(--clr-accent-dark) 100%);
  /* MUDADO PARA LARANJA */
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease;
}

/* ============================
   DOCUMENT LIST (Style from Reference)
   ============================ */
.doc-section {
  padding: 2rem 0 6rem;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(90deg, #fffcf0 0%, #ffffff 100%);
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.doc-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--clr-accent);
  border-radius: 4px 0 0 4px;
}

.doc-item:hover {
  box-shadow: 0 8px 15px rgba(245, 158, 11, 0.1);
  transform: translateX(5px);
  border-color: var(--clr-accent);
}

.doc-number {
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--clr-text-muted);
  min-width: 45px;
  text-align: center;
  letter-spacing: 0.05em;
}

.doc-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.doc-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--clr-text-main);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.doc-date {
  font-size: 0.75rem;
  color: var(--clr-text-light);
  font-weight: 500;
}

.btn-doc-visualizar {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  color: #84cc16;
  /* Verde como no print */
  border: 1.5px solid #84cc16;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-doc-visualizar:hover {
  background: #84cc16;
  color: white;
  box-shadow: 0 4px 10px rgba(132, 204, 22, 0.3);
}

@media (max-width: 768px) {
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
  }

  .btn-doc-visualizar {
    width: 100%;
    justify-content: center;
  }
}

/* ============================
   DETAILS SECTION
   ============================ */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.details-card {
  background: var(--clr-surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
}

.details-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--clr-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--clr-bg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.details-title svg {
  color: var(--clr-accent);
  /* MUDADO PARA LARANJA */
}

.details-item {
  margin-bottom: 1.25rem;
}

.details-item:last-child {
  margin-bottom: 0;
}

.details-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.details-value {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-text-main);
  border-left: 3px solid var(--clr-accent);
  /* ADICIONADO BARRA LARANJA */
  padding-left: 0.75rem;
}

/* ============================
   TABLE SECTION
   ============================ */
.table-section {
  background: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 4rem;
  overflow-x: auto;
}

.table-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-primary);
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th {
  background: var(--clr-bg);
  text-align: left;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--clr-border);
}

td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

.val-currency {
  font-weight: 700;
  color: var(--clr-primary);
}

.status-pago {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1e7e34;
  font-weight: 700;
  background: #d4edda;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

/* ============================
   DOWNLOADS / FOOTER
   ============================ */
.downloads {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 6rem;
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--clr-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
}

.btn-download:hover {
  background: var(--clr-primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}

.btn-download--alt {
  background: white;
  color: var(--clr-accent);
  /* MUDADO PARA LARANJA */
  border: 2px solid var(--clr-accent);
  /* MUDADO PARA LARANJA */
  box-shadow: none;
}

.btn-download--alt:hover {
  background: var(--clr-accent-light);
  border-color: var(--clr-accent-dark);
}

.footer {
  background: white;
  padding: 2rem 0;
  border-top: 1px solid #eee;
  text-align: center;
}

.footer-copyright {
  color: #999;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-brand-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.footer-logo-main {
  height: 55px;
  width: auto;
}

.footer-consultant {
  position: relative;
  width: 75px;
  height: 75px;
}

.consultant-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #f8f9fa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wpp-icon-overlay {
  position: absolute;
  bottom: 2px;
  right: -5px;
  background: #25d366;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 5px;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating WhatsApp */
.wpp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--transition);
}

.wpp-float:hover {
  transform: scale(1.1) rotate(10deg);
}

/* Responsive */
@media (max-width: 768px) {
  .progress-section {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide {
  animation: slideUp 0.8s ease both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}