/* Cards Premium */
.card {
  background-color: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  margin-bottom: var(--spacing-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card:active {
  transform: scale(0.98);
}

/* Títulos das seções de Card */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

/* Valor Monetário em Destaque */
.amount-display {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: var(--spacing-xs);
}

/* Modals / Bottom Sheets */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end; /* Mobile friendly: bottom sheet */
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.05);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.4s;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.modal-content::-webkit-scrollbar {
  display: none;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* Alça do Modal para dar affordance de arraste */
.modal-handle {
  width: 40px;
  height: 5px;
  background-color: var(--divider);
  border-radius: 5px;
  margin: 0 auto var(--spacing-md) auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s;
}

.close-btn:active {
  background-color: var(--bg-color);
}

/* Formulários & Inputs */
.input-group {
  margin-bottom: var(--spacing-md);
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--divider);
  background-color: var(--bg-color);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.4s;
}

.input-field:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-shadow);
}

/* Badges e Tags */
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); }
.badge-gold { background-color: var(--accent-green-shadow); color: var(--accent-green); }

/* Listas de Transações */
.transaction-list {
  list-style: none;
}

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--divider);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
}

.transaction-icon svg { width: 24px; height: 24px; stroke: var(--text-muted); stroke-width: 1.5; fill: none; }
.transaction-details { flex: 1; }
.transaction-title { font-weight: 600; font-size: 1rem; color: var(--text-main); }
.transaction-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.transaction-amount { font-weight: 700; font-size: 1.05rem; }
.transaction-amount.positive { color: var(--success); }
.transaction-amount.negative { color: var(--text-main); }

/* Sistema de Notificacoes */
.notification-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  width: 100%;
  max-width: 400px;
  padding: 0 16px;
}
.notification {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-main);
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
  font-weight: 500;
  pointer-events: auto;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}
.notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Dropdown Customizado Select Premium */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    margin-bottom: var(--spacing-md);
}
.custom-select-trigger {
    padding: 14px 16px;
    background: var(--bg-color);
    border: 1px solid var(--divider);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 8px;
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10;
    overflow-y: auto;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}
.custom-select-wrapper.open {
    z-index: 100;
}
.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.custom-select-options div {
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
    color: var(--text-main);
}
.custom-select-options div:hover {
    background: var(--bg-color);
}

/* Micro Animações Sofisticadas */
.slide-up {
  opacity: 0;
  animation: slideUpAttr 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpAttr {
  0% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.scale-in {
  opacity: 0;
  animation: scaleInAttr 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes scaleInAttr {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Modificações Desktop para Componentes */
@media (min-width: 768px) {
  .amount-display {
    font-size: 2.5rem;
  }
  
  /* SaaS Bento Box Cards */
  .card {
    padding: 36px;
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.3s ease, box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s;
  }
  .card:hover {
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.08), inset 0 0 40px rgba(255,255,255,0.02);
    border-color: rgba(16, 185, 129, 0.25);
  }

  .modal-overlay {
    align-items: center; /* Center horizontally/vertically */
    padding: 40px;
  }
  .modal-content {
    border-radius: var(--border-radius-lg); /* full border radius rather than just top */
    max-height: 85vh;
  }
  .modal-handle {
    display: none;
  }
  
  /* Spread transaction items to feel like a Data Table */
  .transaction-item {
    gap: 20px;
  }
  .transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .transaction-subtitle {
     width: 180px; /* fixed size for grid emulation */
     justify-content: flex-end;
  }
}

/* SaaS Dashboard Grid */
.dashboard-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}
@media (min-width: 768px) {
    .dashboard-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
}


