:root {
  --bg: #0f1f17;
  --primary: #4caf50;
  --secondary: #a8cb7a;
  --card: #182b24;
  --text: #f5f5f5;
  --text-secondary: #a5d6a7;
  --border: #2e473c;
  --button: #1b3f3c;
  --input: #264038;
  --lime: #c0ff3e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body.login-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.background-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/background_leaf.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.welcome-text h1 {
  font-size: 2.8rem;
  text-align: center;
  color: white;
}

.welcome-text p {
  color: white;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-box {
  background-color: var(--primary);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.login-box h2 {
  text-align: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.login-box label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: white;
}

.login-box input {
  width: 100%;
  padding: 0.75rem;
  border: none;
  margin-bottom: 1rem;
  border-radius: 8px;
  background-color: var(--input);
  color: white;
  font-size: 1rem;
}

.login-box button {
  width: 100%;
  background-color: var(--button);
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.login-box button:hover {
  background-color: var(--border);
}

.register-text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: white;
}

.register-text a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

.register-text a:hover,
.register-text a:focus {
  color: var(--lime);
  text-decoration: underline;
}

/* ========================= DASHBOARD ========================= */
.dashboard-screen {
  padding: 1rem;
  padding-bottom: 6rem;
  max-width: 480px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.profile-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--bg);
  box-shadow: 0 0 5px rgba(192, 255, 62, 0.6);
}

.history-btn {
  background-color: var(--secondary);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  color: var(--bg);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s ease;
}

.saldo-container {
  margin-bottom: 1.2rem;
}

.saldo-container p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.saldo-container h2 {
  font-size: 2.2rem;
  color: var(--secondary);
  font-weight: bold;
}

.btns-topo {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.btns-topo button {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: 0.3s;
}

.btn-loja {
  background-color: var(--secondary);
  color: var(--bg);
}

.btn-agendar-dashboard {
  background-color: var(--secondary);
  color: var(--bg);
}

.btn-confirmar-agendamento {
  background-color: var(--secondary);
  color: var(--bg);
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}
.btn-confirmar-agendamento:hover {
  background-color: var(--lime);
}

.btns-topo button:hover,
.history-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(192, 255, 62, 0.25);
  background-color: var(--lime);
  color: var(--bg);
}

.img-banner {
  background-color: var(--card);
  border-radius: 12px;
  height: 130px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.action-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.action-cards .card {
  background-color: var(--primary);
  height: 70px;
  flex: 1;
  border-radius: 16px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background-color: var(--button);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.bottom-nav button {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--lime);
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.bottom-nav button:hover {
  transform: translateY(-3px);
}

i.fas,
i.fa-solid {
  color: inherit;
  font-size: 1.2rem;
  vertical-align: middle;
}

/* Alerts */
.error-box,
.success-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideIn 0.4s ease-out;
  color: white;
}

.error-box {
  background-color: #e74c3c;
}
.success-box {
  background-color: #2ecc71;
}

.error-box button.close-error,
.success-box .close-msg {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
}

.success-box .loader {
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top: 2px solid var(--lime);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsivo */
@media (min-width: 769px) {
  .dashboard-screen {
    max-width: 1024px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
  }

  .dashboard-header {
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }

  .dashboard-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  .saldo-container,
  .btns-topo,
  .img-banner,
  .action-cards {
    grid-column: span 2;
  }
}

/* ========================= AGENDAR VISITA ========================= */
.agendar-screen {
  background-color: var(--bg);
  height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.voltar-btn {
  position: absolute;
  top: 20px;
  left: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  z-index: 10;
}

.mapa-fake {
  width: 30rem;
  height: 250px;
  background: url('../img/gps.jpg') no-repeat center center;
  background-size: cover;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
}

.agendar-container {
  background-color: var(--primary);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  padding: 2rem 1.5rem;
  margin-top: -32px;
  z-index: 2;
  position: relative;
  color: #fff;
  max-width: 30rem;
}

.barra-deslizante {
  width: 40px;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  margin: 0 auto 1rem auto;
}

.agendar-container h2 {
  text-align: left;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.form-agendar label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.form-agendar input,
.form-agendar select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 8px;
  background-color: var(--button);
  color: white;
  font-size: 1rem;
}

.form-agendar select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,0 140,0 70,80' fill='%23ffffff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.dupla {
  display: flex;
  gap: 1rem;
}

.dupla > div {
  flex: 1;
}

.btn-agendar {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 12px;
  background-color: var(--lime);
  color: var(--bg);
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.btn-agendar:hover {
  background-color: #d4ff70;
}
.lista-historico {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-visita {
  background-color: #ffdddd;
  border: 1px solid #ff6b6b;
  color: #222;
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-visita span {
  font-size: 0.95rem;
  font-weight: bold;
  color: #333;
}

.card-visita button.cancelar-btn {
  background-color: transparent;
  border: none;
  color: #c0392b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem;
  transition: transform 0.2s;
}

.card-visita button.cancelar-btn:hover {
  transform: scale(1.1);
}

.voltar-btn.esquerda {
  position: absolute;
  top: 20px;
  left: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 9999;
}

.voltar-btn.direita {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 9999;
  display: block;
  margin: 0;
  padding: 0;
  text-align: right;
}

/* ========================= LOJA ========================= */
.shop-screen {
  background-color: var(--bg);
  height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.shop-header {
  width: 100%;
  padding: 1rem 1rem 1rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search {
  display: flex;
  padding-right: 2rem;
  width: 100%;
  max-width: 35rem;
}

.search-input {
  width: 100%;
  max-width: 30rem;
  padding: 0.8rem;
  border: none;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  background-color: var(--input);
  color: white;
  font-size: 1rem;
}

.search-btn {
  padding: 0.8rem;
  border: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  background-color: var(--secondary);
  color: var(--bg);
  font-size: 1rem;
  cursor: pointer;
}

.search-btn:hover {
  background-color: var(--lime);
}

.cart {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ofertas {
  width: 100%;
  max-width: 65rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.listItens {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.oferta-item {
  width: min-content;
  background-color: var(--primary);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.offer-title {
  width: 50%;
  font-size: 1.5rem;
  color: #000;
  margin-bottom: 0.5rem;
}

.titleLime {
  color: var(--lime);
}

.card-item {
  color: var(--text);
  width: auto;
  cursor: pointer;
}

.img-offer {
  background-color: var(--text-secondary);
  border-radius: 1rem;
  display: flex;
  position: relative;
  height: 222px;
}

.bag-shop {
  width: 2rem;
  height: 2rem;
  background-color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 1.2rem;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
}

/* ========================= HISTORICO ========================= */

.historico-screen {
  background-color: var(--bg);
  height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
}

.historico-container {
  width: 100%;
  background-color: var(--primary);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  padding: 2rem 1.5rem;
  color: #fff;
}

.historico-container h2 {
  text-align: left;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
