@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

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

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded' !important;
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

:root {
  /* HSL-based Harmonious Color System for Light Mode from perfil-do-usuario */
  --bg: #f7f7fc;
  --text: #1a163a;
  --text-muted: #625f87;
  --primary: #1a163a;
  --secondary: #ffffff;

  /* Brand Accent colors */
  --accent: #6d28d9;
  --accent-light: rgba(109, 40, 217, 0.08);
  --border: rgba(61, 43, 181, 0.08);
  --shadow: rgba(61, 43, 181, 0.05);
  --shadow-outer: rgba(0, 0, 0, 0.06);

  /* Cards, Inputs & Bottom Nav */
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --nav-bg: #ffffff;
  --nav-shadow: 0 -6px 24px rgba(61, 43, 181, 0.05);
  --nav-btn-shadow: rgba(61, 43, 181, 0.15);
  --dropdown-bg: #ffffff;
  --dropdown-shadow: 0 12px 48px rgba(61, 43, 181, 0.08);

  /* Status and Badge Colors */
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.1);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --pending: #f59e0b;
  --pending-light: rgba(245, 158, 11, 0.1);

  /* Animations */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Button text colors */
  --primary-btn-text: #ffffff;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition:
    background-color var(--transition),
    color var(--transition);
}

.mobile-container {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px 120px 24px;
  position: relative;
  background-color: var(--bg);
  border-left: 1px solid rgba(128, 128, 128, 0.1);
  border-right: 1px solid rgba(128, 128, 128, 0.1);
}

.btn {
  width: 100%;
  min-height: 56px; /* High accessibility touch target */
  padding: 12px 24px;
  border-radius: 16px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 16px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-btn-text);
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.39);
}

.btn-secondary {
  background-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: var(--accent-light);
  color: var(--accent);
}

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

.card {
  background-color: var(--secondary);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 48px; /* Aumentado para 48px */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

input {
  width: 100%;
  min-height: 56px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 16px;
  border: 2px solid rgba(128, 128, 128, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 1.1rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  font-weight: 800;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px); /* Reduzi a margem lateral para expandir o menu */
  max-width: 396px; /* Aumentei em relação aos 380px anteriores */
  background: var(--nav-bg);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px 0;
  border-radius: 24px;
  z-index: 1000;
  box-shadow: var(--nav-shadow);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
  text-decoration: none;
  opacity: 0.5;
  font-size: 0.7rem;
  transition: 0.2s;
}

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

.nav-item.center-btn {
  opacity: 1;
  margin-top: -32px;
}

.nav-item.center-btn .icon-circle {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid var(--nav-bg);
  box-shadow: 0 8px 20px var(--nav-btn-shadow);
  color: white;
  margin-bottom: 2px;
  transition: transform 0.2s;
}

.nav-item.center-btn:active .icon-circle {
  transform: scale(0.9);
}

.nav-item.center-btn span:not(.material-symbols-rounded) {
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-container {
  width: 100%;
  margin: 24px 0;
}

.progress-bar {
  width: 100%;
  height: 16px;
  background: rgba(128, 128, 128, 0.2);
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 8px;
  transition: width 1s ease-out;
}

.event-selector h1 {
  font-size: 1.2rem !important;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-bottom: 0;
}

.event-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid rgba(128, 128, 128, 0.1);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--dropdown-shadow);
  margin-top: 8px;
}

.event-dropdown.show {
  display: flex;
}

.event-option {
  padding: 16px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  cursor: pointer;
  font-weight: 500;
}

.event-option:active {
  background: rgba(128, 128, 128, 0.1);
}

.event-option:last-child {
  border-bottom: none;
}

.welcome-msg {
  font-size: 0.9rem;
  margin-bottom: 4px;
  opacity: 0.7;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.profile-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  font-weight: 700;
}

.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px; /* Aumentado para 48px */
}

.stat-card {
  background: var(--secondary);
  padding: 16px;
  border-radius: 20px;
}

.stat-card p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.stat-card h2 {
  color: var(--primary);
  margin-bottom: 0;
}

.chart-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.item-card {
  background: var(--secondary);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.item-info {
  display: flex;
  flex-direction: column;
}

.item-info span {
  font-size: 0.8rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-price {
  font-weight: 700;
  color: var(--primary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px; /* Aumentado de 16px para 24px */
  margin-top: 8px;
}

.participants-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.participant-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.participant-circle.active {
  border-color: var(--primary);
}

.btn-icon-only {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.btn-small {
  min-height: 40px;
  width: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
  margin-bottom: 0;
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Layout Sidebar e Wrapper Desktop ===== */
.app-wrapper {
  width: 100%;
  display: flex;
}

.sidebar {
  display: none;
}
