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

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fdf6f0;
  color: #4a3b3b;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.app {
  width: 100%;
  max-width: 480px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.6rem;
  color: #d6557a;
}

.subtitle {
  color: #8a7575;
  margin-top: 4px;
  text-transform: capitalize;
}

.habitos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.habito-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  border: 2px solid transparent;
}

.habito-card.feito {
  background: #fdeef2;
  border-color: #f3b6c6;
}

.habito-card:active {
  transform: scale(0.98);
}

.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #fdeef2 0%, #f6d8e2 100%);
  z-index: 100;
}

.login-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 12px 40px rgba(232, 136, 156, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.login-logo {
  font-size: 3rem;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #c25d76;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #f0d4dd;
  border-radius: 14px;
  font-size: 1rem;
  box-sizing: border-box;
  text-align: center;
}

.login-card input:focus {
  outline: none;
  border-color: #e8889c;
}

.login-card button {
  margin-top: 4px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #e8889c;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-card button:active {
  transform: scale(0.98);
}

.login-erro {
  margin: 0;
  min-height: 1.2em;
  color: #d23f5e;
  font-size: 0.9rem;
}

.btn-sair {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #c25d76;
  cursor: pointer;
}

header {
  position: relative;
}

.habito-emoji {
  font-size: 2rem;
}

.habito-info {
  flex: 1;
}

.habito-info-full {
  width: 100%;
}

.habito-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copos {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.copo {
  flex: 1;
  text-align: center;
  font-size: 1.4rem;
  padding: 8px 0;
  border-radius: 10px;
  background: #f5e8ec;
  opacity: 0.35;
  filter: grayscale(1);
  transition: opacity 0.15s, filter 0.15s, transform 0.1s;
  cursor: pointer;
}

.copo.preenchido {
  opacity: 1;
  filter: none;
  background: #fdeef2;
}

.copo:active {
  transform: scale(0.92);
}

.habito-nome {
  font-weight: 600;
  font-size: 1.05rem;
}

.habito-streak {
  font-size: 0.85rem;
  color: #b56b7e;
  margin-top: 2px;
}

.habito-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e8889c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.habito-card.feito .habito-check {
  background: #e8889c;
  color: #fff;
}

.streaks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.streak-item {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.streak-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #d6557a;
}

.streak-label {
  font-size: 0.7rem;
  color: #8a7575;
}

.historico {
  margin-bottom: 24px;
}

.historico h2,
.lembretes h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #d6557a;
}

.historico-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.historico-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 1fr;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 4px 0;
  border-bottom: 1px solid #f5e8ec;
}

.historico-row:last-child {
  border-bottom: none;
}

.historico-row .dia {
  color: #8a7575;
  text-transform: capitalize;
}

.marca {
  text-align: center;
  font-size: 1.1rem;
}

.lembretes {
  margin-bottom: 24px;
}

.hint {
  font-size: 0.8rem;
  color: #8a7575;
  margin-bottom: 10px;
}

.lembrete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lembrete-item span {
  font-weight: 600;
}

.lembrete-item input[type="time"] {
  border: 1px solid #f3b6c6;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.btn-secundario {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #e8889c;
  background: #fff;
  color: #d6557a;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-secundario:active {
  transform: scale(0.98);
}
