:root {
  --paper: #FAFBF8;
  --ink: #1E3027;
  --green: #284D3C;
  --green-hover: #1F3E30;
  --muted: #526155;
  --sage-accent: #708660;
  --sage: #DFE6D8;
  --line: #DCE3DA;
  --lime: #DCE9B4;
  --white: #FFFFFF;
  --card-agenda: #E5EADB;
  --card-financas: #EEE9DD;
  --card-notas: #F0E9DB;
  --card-casa: #E2E8DD;
  --card-sono: #E7E7EE;
  --card-movimento: #E7EBDA;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background-color: #ECEFE8;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .heading-font {
  font-family: 'Manrope', 'DM Sans', sans-serif;
  letter-spacing: -0.04em;
}

em {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--sage-accent);
}

input, textarea {
  user-select: text;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Transições de ecrã */
@keyframes screenEnter {
  from { opacity: 0.35; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.tab-animate {
  animation: screenEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes navBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.18) translateY(-2px); }
  75% { transform: scale(0.96); }
  100% { transform: scale(1.02) translateY(-1px); }
}
.nav-active-anim .nav-icon {
  animation: navBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Pulso do microfone */
@keyframes pulse-ring {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(40, 77, 60, 0.6); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(40, 77, 60, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(40, 77, 60, 0); }
}
.mic-recording {
  animation: pulse-ring 1.4s infinite;
}

@keyframes modalPop {
  0% { opacity: 0; transform: translateY(16px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-animate {
  animation: modalPop 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Gestos de Swipe para Cartões de Tarefas */
.swipe-item {
  position: relative;
  touch-action: pan-y;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.swipe-item.swiping {
  transition: none;
}
.swipe-item.swiped-right {
  transform: translateX(110%);
  opacity: 0;
}
.swipe-item.swiped-left {
  transform: translateX(-110%);
  opacity: 0;
}

/* Estilo do menu inferior de 7 botões simétricos */
.nav-bar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto repeat(3, 1fr);
  align-items: center;
  gap: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation: none !important;
    transition: none !important;
  }
}
