:root {
  --green: #3c8c4e;
  --light-green: #d0f3c9;
  --lime: #b7ff6d;
  --beige: #fff8f0;
  --dark: #1f2e23;
  --text: #2b2a2a;
  --border: #e2e8e0;
  --shadow: 0 20px 45px rgba(27, 61, 39, 0.08);
  font-size: 16px;
}

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

body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--beige);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

/* Tela de Acesso Restrito */
.access-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1f8c4c, #3ec08d);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  min-height: 100vh;
}

.access-card {
  background: #fff;
  border-radius: 2rem;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.access-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.access-card h1 {
  color: var(--dark);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.access-card > p {
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.access-form {
  margin-bottom: 1.5rem;
}

.access-form label {
  display: block;
  text-align: left;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.access-form input {
  width: 100%;
  padding: 0.9rem;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.access-form input:focus {
  outline: none;
  border-color: var(--green);
}

.access-error {
  color: #c53030;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  min-height: 1.5rem;
  text-align: center;
}

.access-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text);
}

.access-divider::before,
.access-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.access-divider span {
  padding: 0 1rem;
  font-size: 0.9rem;
}

.access-purchase {
  margin-top: 1.5rem;
}

.access-purchase p {
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
  background: var(--light-green);
  border-color: var(--green);
  transform: translateX(-2px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 5vw, 3rem) 1rem;
  background: linear-gradient(120deg, #1f8c4c, #3ec08d);
  box-shadow: 0 20px 40px rgba(21, 81, 49, 0.25);
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
}

.hero-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logout-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  flex: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.9;
}

.logo strong {
  font-size: 1.4rem;
  display: block;
  line-height: 1.2;
}

.logo small {
  font-size: 0.9rem;
  opacity: 0.95;
  font-weight: 400;
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #dcffe0;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 600;
}

.app-tabs {
  background: #fff;
  border-radius: 2rem;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  gap: 0.35rem;
  overflow-x: auto;
}

.app-tabs::-webkit-scrollbar {
  display: none;
}

.app-tabs a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--dark);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  background: transparent;
  transition: border 0.2s, background 0.2s;
}

.app-tabs a:hover {
  border-color: #cdeccf;
  background: #f4fff4;
}

.tab-icon {
  font-size: 1rem;
}

.tab-bonus {
  background: rgba(255, 230, 128, 0.2);
  border-color: rgba(255, 197, 92, 0.4);
}

nav a {
  text-decoration: none;
  color: var(--dark);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--green);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn.primary {
  background: linear-gradient(130deg, var(--green), #6cd45f);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
}

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

.btn:hover {
  transform: translateY(-2px);
}

main {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 6vw, 6vw);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.welcome-card {
  background: #fff;
  border-radius: 1.75rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.welcome-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.welcome-tags span {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #f0fff4;
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.quick-card {
  font: inherit;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 0.9rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
  min-height: 100px;
}

@media (min-width: 768px) {
  .quick-card {
    flex-direction: row;
    text-align: left;
    padding: 1rem;
    gap: 0.85rem;
  }
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(27, 61, 39, 0.08);
}

.quick-card .icon {
  font-size: 1.5rem;
}

.quick-card strong {
  display: block;
}

.quick-card small {
  color: #5c6759;
}

.cta-banner {
  background: linear-gradient(135deg, #1d6f3f, #2fb471);
  border-radius: 1.9rem;
  padding: 2rem;
  color: #f6fff5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 25px 45px rgba(27, 61, 39, 0.25);
}

.cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.info-panels {
  align-items: stretch;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: var(--dark);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  flex: 1 1 200px;
}

.hero-card {
  background: #fff;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-card ul {
  list-style: none;
  margin: 1rem 0;
}

.hero-card li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--green);
  font-size: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid article,
.panel {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.panel.soft {
  background: #f4fff4;
}

.panel header {
  margin-bottom: 1.5rem;
}

.panel-content.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.ingredients,
.steps,
.checks,
ol {
  margin-left: 1.25rem;
}

.ingredients li,
.steps li,
.checks li,
ol li {
  margin-bottom: 0.6rem;
}

.checks {
  list-style: "✔️ ";
}

.steps {
  list-style: "• ";
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.cards article {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.4rem;
}

.cards.night article {
  background: #fff;
}

.step-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--light-green);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.alert {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: #f0fff4;
  border: 1px solid #c6f6d5;
}

.alert.critical {
  background: #fff1f0;
  border: 1px solid #ffb4b4;
}

.tracker {
  background: #f7fffa;
  border: 1px solid #daf0e1;
  border-radius: 1.25rem;
  padding: 1.2rem;
}

.tracker label {
  display: block;
  margin-bottom: 0.5rem;
}

.accordion article {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #fff;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7fff6;
  border: none;
  padding: 1.4rem 1.8rem;
  cursor: pointer;
  font-size: 1rem;
}

.accordion-trigger span {
  font-size: 1.5rem;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.8rem;
}

.accordion-content.active {
  padding: 1.8rem;
}

.note {
  font-size: 0.9rem;
  color: #5f6b5f;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(27, 61, 39, 0.08);
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e5f5e0, #c8e6c3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.video-placeholder p {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.video-placeholder small {
  font-size: 0.85rem;
  opacity: 0.7;
}

.video-card h3 {
  padding: 1rem 1.25rem 0.5rem;
  color: var(--dark);
  font-size: 1.1rem;
}

.video-card p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  background: #000;
}

.video-card video {
  width: 100%;
  height: auto;
  border: none;
  display: block;
  background: #000;
  border-radius: 1rem 1rem 0 0;
  object-fit: contain;
}

/* Modal da Água */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #fff;
  border-radius: 1.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  color: var(--dark);
  font-size: 1.5rem;
  margin: 0;
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
}

.water-highlight {
  background: linear-gradient(135deg, #e0f7ed, #c8f0d9);
  border: 2px solid var(--green);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.water-highlight strong {
  display: block;
  font-size: 1.2rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.water-highlight p {
  color: var(--text);
  margin: 0;
  font-weight: 500;
}

.water-benefits {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.water-benefits li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f7fff6;
  border-left: 4px solid var(--green);
  border-radius: 0.5rem;
}

.water-benefits li strong {
  color: var(--green);
  display: block;
  margin-bottom: 0.4rem;
}

.water-tips {
  background: #fff8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.water-tips h3 {
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.water-tips ul {
  margin: 0;
  padding-left: 1.25rem;
}

.water-tips li {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.footer {
  padding: 0.75rem 4vw;
  background: var(--dark);
  color: #f4fff4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .grid {
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    position: absolute;
    top: calc(100% - 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 1.25rem 4vw;
    border-bottom: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  nav.open {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.75rem;
  }
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .panel,
  .grid article {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .quick-card {
    padding: 0.75rem;
    min-height: 90px;
  }

  .quick-card .icon {
    font-size: 1.3rem;
  }

  .quick-card strong {
    font-size: 0.9rem;
  }

  .quick-card small {
    font-size: 0.75rem;
  }

  .footer {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .footer .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .cards {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 75%);
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
  }

  .cards article {
    scroll-snap-align: start;
  }
}

@media (max-width: 540px) {
  .panel,
  .grid article {
    padding: 1.25rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-content {
    max-width: 100%;
    margin: 0.5rem;
    max-height: 95vh;
  }

  .modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .modal-body {
    padding: 1rem 1.5rem 1.5rem;
  }

  .modal-icon {
    font-size: 2.5rem;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }

  .water-benefits li {
    padding: 0.85rem;
  }
}

