/* ========================================================
   Design System - Controle de Cartão (Estilo Fintech / Asaas)
   ======================================================== */

:root {
  --color-primary: #0030b9;
  --color-primary-light: #1e4fff;
  --color-primary-bg: #eff6ff;
  --color-success: #1fbf75;
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-bg-app: #f5f7fa;
  --color-card: #ffffff;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom, 80px);
}

/* Espaçamento para a barra de navegação inferior */
.page-container {
  padding-bottom: 140px !important;
}

/* Cards padrão Fintech */
.card-fintech {
  background: var(--color-card);
  border-radius: 1.25rem; /* 20px */
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Botões primários com efeito de toque */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.875rem;
  padding: 0.75rem 1.25rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

/* Bottom Navigation Bar Fixa */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.bottom-nav-item.active {
  color: var(--color-primary);
  font-weight: 700;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

/* Botão Flutuante Central de Nova Compra */
.nav-fab-center {
  position: relative;
  top: -16px;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 48, 185, 0.35);
  border: 4px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-fab-center:active {
  transform: scale(0.92);
}

/* Chips de Status */
.badge-pago {
  background-color: var(--color-success-bg);
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-pendente {
  background-color: var(--color-warning-bg);
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Toast de Notificação */
#toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.info { background: #1e3a8a; }

/* Animação Suave para Modais */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
}

.modal-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Ocultar scrollbar mantendo scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
