:root {
  --primary: #00E676;
  --primary-hover: #00C853;
  --bg-dark: #0A0F0D;
  --bg-card: #1C1F1E;
  --text-muted: #B0B3B2;
  --text-light: #FFFFFF;
  --danger: #FF5252;
  --danger-hover: #FF1744;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary);
}

.text-danger {
  color: var(--danger);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 230, 118, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: rgba(0, 230, 118, 0.1);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 16px;
  font-family: var(--font-family);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}

.form-control::placeholder {
  color: #555;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Auth Pages (Login/Register) */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-logo i {
  color: var(--primary);
}

/* Topbar / Context Selector */
.topbar {
  background-color: var(--bg-card);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.context-selector {
  display: flex;
  background-color: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.context-tab {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.context-tab.active {
  background-color: var(--primary);
  color: var(--bg-dark);
  box-shadow: 0 2px 8px rgba(0, 230, 118, 0.2);
}

/* Dashboard Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

.metric-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.05);
}

.metric-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
}

/* Recent Transactions */
.section-title {
  font-size: 18px;
  margin: 30px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
}

.transaction-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.icon-entrada {
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--primary);
}

.icon-saida {
  background-color: rgba(255, 82, 82, 0.1);
  color: var(--danger);
}

.transaction-details h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.transaction-details p {
  font-size: 12px;
  color: var(--text-muted);
}

.transaction-amount {
  font-weight: 600;
  font-size: 16px;
}

/* Floating Action Button - integrado na barra inferior */
.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.5);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  top: -16px;
  flex-shrink: 0;
}

.fab:hover {
  transform: scale(1.05);
  background-color: var(--primary-hover);
  color: var(--bg-dark);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.05);
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  flex: 1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item i {
  font-size: 20px;
}

/* Item Sair no bottom-nav */
.nav-item-logout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--danger);
  font-size: 12px;
  flex: 1;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.nav-item-logout i {
  font-size: 20px;
}

.nav-item-logout:hover {
  color: var(--danger-hover);
}

/* Desktop Styles */
@media (min-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .auth-card {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
  }
  
  .btn {
    width: auto;
    min-width: 150px;
  }
  
  .btn-full {
    width: 100%;
  }

  /* Adjust body padding for bottom nav on mobile, remove on desktop */
  body.has-bottom-nav {
    padding-bottom: 0;
    padding-left: 100px;
  }
  
  .bottom-nav {
    top: 0;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 100px;
    border-top: none;
    border-right: 1px solid rgba(255,255,255,0.05);
  }

  .nav-item {
    margin-bottom: 30px;
  }
  
  /* Topbar needs to account for sidebar */
  .topbar {
    margin-left: 100px;
  }
}

/* Utility Classes */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.text-light { color: var(--text-light); }
.btn-full { width: 100% !important; }

/* Nav com 5 itens - fontes menores no mobile */
@media (max-width: 767px) {
  .nav-item span { font-size: 10px; }
  .nav-item i    { font-size: 18px; }
  .fab { width: 50px; height: 50px; font-size: 20px; top: -12px; }
}

