:root {
  --navy: #192C46;
  --navy-dark: #0F1A2A;
  --navy-light: #2A3F63;
  --white: #ffffff;
  --light: #f5f7fa;
  --light-gray: #e8ecf1;
  --accent: #4A90E2;
  --accent-hover: #357ABD;
  --success: #4CAF50;
  --danger: #F44336;
  --warning: #FF9800;
  --radius: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navbar Simplificada e Unificada */
.topbar {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 0 24px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.logo {
  height: 40px;
  width: auto;
}

.title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-item {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
}

/* Responsividade para Celulares */
@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
  }

  .title {
    font-size: 1rem;
    display: none;
  }

  .brand .title {
    display: block;
  }

  .nav-item span {
    display: none;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 1.2rem;
  }
}

@media (max-width: 400px) {
  .brand .title {
    display: none;
  }
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  height: 48px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

main {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 100px;
}

.card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h2 {
  margin: 0 0 16px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cup-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--white);
  border: none;
  padding: 18px 24px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cup-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.cup-btn:active {
  transform: translateY(0);
}

.menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--navy-dark) 0%, var(--navy) 100%);
  display: flex;
  justify-content: space-around;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.menu button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  opacity: 0.8;
}

.menu button:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
  transform: translateY(-2px);
}

.menu button:active {
  transform: translateY(0);
}

/* Melhorias gerais */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  padding: 0;
  margin: 0;
}

button {
  transition: all 0.3s ease;
}

button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input,
textarea,
select {
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--navy-light);
  border-radius: 4px;
}

/* Modal Moderno */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 26, 42, 0.6);
  /* Navy dark com transparência */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  background: var(--white);
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal.hidden .modal-content {
  transform: translateY(20px);
}

.modal-large {
  max-width: 800px;
}

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

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: var(--danger);
}