/* ViaCliente — Folha de Estilos Canônica */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --brand: #0E5A4F;
  --brand-dark: #0A463E;
  --brand-light: #13786A;
  --amber: #F2B04A;
  --red: #D24B3F;
  --wa: #25A35A;
  --ok: #2F8F5B;
  --bg: #F4F6F5;
  --card: #FFFFFF;
  --line: #E3E8E6;
  --text: #13201C;
  --muted: #6A7774;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #0b0f0e;
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

@media (min-width: 640px) {
  body {
    background-color: #e6eae8;
    padding: 32px 16px;
  }
}

/* Moldura do Smartphone / Container PWA */
.phone-frame {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .phone-frame {
    min-height: 800px;
    height: 840px;
    border-radius: 40px;
    box-shadow: 0 24px 50px -15px rgba(10, 30, 25, 0.45);
    border: 8px solid #0b0f0e;
  }
}

/* Tipografia */
h1, h2, h3, .font-display {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Badges e Pílulas */
.badge-piloto {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-piloto-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #D97706;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Status Tags */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.tag-red { background: #FBE3E0; color: #A8352B; }
.tag-amber { background: #FCEFD6; color: #8A5A0C; }
.tag-green { background: #DCF1E4; color: #1F6C42; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  font-size: 12px;
}
.btn:active { transform: scale(0.98); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1f874a; }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { background: #f8faf9; }

/* Bottom Nav */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px 4px 16px;
  flex-shrink: 0;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.nav-item.active {
  color: var(--brand);
}
.nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
}

/* Sheet Modal */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 18, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 100;
}
.modal-sheet {
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 16px 18px 24px;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, 0.4);
}
.grabber {
  width: 36px;
  height: 4px;
  background: var(--line);
  border-radius: 3px;
  margin: 0 auto 12px;
}

/* Pastas Coloridas do Drive (Tela 04) */
.folders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.folder-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.folder-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14,90,79,0.3);
  box-shadow: 0 4px 12px -3px rgba(0,0,0,0.06);
}
.folder-tab {
  width: 32px;
  height: 6px;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
}
.folder-body-bar {
  height: 24px;
  border-radius: 0 6px 6px 6px;
  margin-bottom: 8px;
  opacity: 0.15;
}
.folder-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}
.folder-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Pastas com Cores Temáticas */
.f-purple .folder-tab, .f-purple .folder-body-bar { background-color: #7C3AED; }
.f-amber .folder-tab, .f-amber .folder-body-bar { background-color: #D97706; }
.f-blue .folder-tab, .f-blue .folder-body-bar { background-color: #2563EB; }
.f-green .folder-tab, .f-green .folder-body-bar { background-color: #059669; }
.f-teal .folder-tab, .f-teal .folder-body-bar { background-color: #0E5A4F; }
.f-gray .folder-tab, .f-gray .folder-body-bar { background-color: #475569; }

/* Lista de Arquivos Recentes */
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.doc-item:hover {
  border-color: rgba(14,90,79,0.3);
  background: #fafcfb;
}
.doc-badge-pdf {
  width: 32px;
  height: 36px;
  border-radius: 8px;
  background: #D24B3F;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 9.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(210,75,63,0.3);
}

/* Linha do Tempo Societária (Tela 05) */
.timeline-container {
  position: relative;
  padding-left: 20px;
  margin-top: 14px;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.timeline-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.timeline-card::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg);
}
.timeline-card.ativo {
  border: 1.5px solid var(--brand);
  background: #fcfdfd;
}
.timeline-card.ativo::before {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(14,90,79,0.2);
}

/* Visualizador de PDF (Tela 07) */
.pdf-viewer-overlay {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
}
.pdf-viewer-header {
  background: var(--brand);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.pdf-viewer-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #525659;
}
