/* Estilos principales para Agenda Alegre */
:root {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #f4f7ff, #fef6ff);
  color: #1f1f2b;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  gap: 16px;
  background: #ffffff;
  border-bottom: 1px solid #e4e7f1;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.hero__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 26px;
  padding: 12px;
  background: #fff6e7;
  border-radius: 18px;
  border: 1px solid #ffe3b3;
}

.hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #76839d;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1 {
  font-size: 32px;
  margin-top: 4px;
}

.hero__subtitle {
  color: #4c5972;
  margin-top: 6px;
}

.hero__today {
  text-align: left;
  color: #4c5972;
}

.hero__today-date {
  font-size: 18px;
  font-weight: 700;
  color: #1f1f2b;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: #ffffff;
  border: 1px solid #e4e7f1;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(31, 47, 89, 0.06);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 8px;
  background: #f5f7ff;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #7a88a6;
  text-transform: uppercase;
  font-weight: 700;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-label {
  font-weight: 700;
  color: #1f1f2b;
}

.calendar {
  border: 1px solid #e8ecf7;
  border-radius: 16px;
  overflow: hidden;
  background: #f9fbff;
}

.calendar__weekdays {
  display: flex;
  flex-wrap: wrap;
}

.calendar__weekdays span {
  flex: 1 0 calc(100% / 7);
  padding: 10px 4px;
  text-align: center;
  font-weight: 700;
  color: #6d7893;
  font-size: 12px;
  background: #eef2ff;
}

.calendar__grid {
  display: flex;
  flex-wrap: wrap;
}

.calendar__grid button {
  flex: 1 0 calc(100% / 7);
  min-width: calc(100% / 7);
  height: 72px;
  border: 1px solid #eef1fa;
  background: #ffffff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.calendar__grid button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(31, 47, 89, 0.1);
}

.calendar__grid button:disabled {
  background: #f5f6fb;
  color: #c1c6d6;
  cursor: default;
}

.calendar__grid .day-number {
  font-weight: 700;
}

.calendar__grid .today {
  color: #2d6bff;
}

.calendar__grid .selected {
  border-color: #7c95ff;
  background: #eef2ff;
}

.calendar__grid .badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 12px;
  font-size: 11px;
  color: #fff;
  background: #6b7bff;
}

.calendar__grid .markers {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.marker--task { background: #52c759; }
.marker--habit { background: #9a5ce8; }

.day-summary {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #4c5972;
}

.pill {
  background: #eef2ff;
  color: #2c3a8c;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #f2f4f8;
  color: #4c5972;
}

.chip--task { background: #e8f9eb; color: #1f7a2d; }
.chip--habit { background: #f4e8ff; color: #5b2fa7; }

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form label {
  font-weight: 700;
  color: #2f3d5f;
}

.form input {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbe1ef;
  background: #f9fbff;
  font-size: 15px;
}

.form input:focus {
  outline: 2px solid #9bb2ff;
  border-color: #9bb2ff;
}

.form__error {
  color: #d7263d;
  min-height: 18px;
  font-size: 13px;
}

.primary {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c95ff, #5f7dff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(92, 122, 255, 0.25);
}

.ghost {
  border: 1px solid #dbe1ef;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.counter {
  background: #eef2ff;
  color: #2c3a8c;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  padding: 12px;
  border: 1px solid #e4e7f1;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  background: #fdfdff;
}

.item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.item__title {
  font-weight: 700;
}

.item__meta {
  font-size: 13px;
  color: #6d7893;
}

.item--done {
  opacity: 0.7;
  text-decoration: line-through;
}

.item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #2c3a8c;
  font-size: 12px;
}

.progress {
  height: 12px;
  background: #eef1fa;
  border-radius: 8px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: linear-gradient(135deg, #9a5ce8, #b37fff);
}

.footer {
  text-align: center;
  padding: 16px;
  color: #6d7893;
}

@media (min-width: 720px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .layout {
    padding: 20px;
  }
}

@media (min-width: 960px) {
  .layout {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .calendar-card {
    flex: 1 1 100%;
  }

  .tasks-card,
  .habits-card {
    flex: 1 1 320px;
  }
}
