:root {
  color: #35254f;
  background: #fffbe6;
  font-family: "Nunito", "Baloo 2", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 211, 78, 0.55), transparent 16rem),
    radial-gradient(circle at 88% 0%, rgba(89, 205, 255, 0.45), transparent 18rem),
    radial-gradient(circle at 82% 88%, rgba(255, 128, 171, 0.28), transparent 22rem),
    linear-gradient(135deg, #fffbe6 0%, #e8f4fd 58%, #fff0f7 100%);
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 191, 0.95));
  box-shadow: 0 1rem 0 #f3d35f, 0 1.4rem 2rem rgba(91, 62, 20, 0.12);
}

.hero::after {
  position: absolute;
  right: clamp(0.5rem, 2vw, 1.5rem);
  bottom: -0.35rem;
  content: "🤖";
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  opacity: 0.22;
  transform: rotate(-8deg);
}

.hero__label {
  margin: 0 0 0.35rem;
  color: #7a3bd1;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 1000;
}

h1 {
  margin: 0;
  color: #2b2157;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero__date {
  margin: 0.5rem 0 0;
  color: #7a3bd1;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 1000;
}

.hero__text {
  max-width: 45rem;
  margin: 1rem 0 0;
  color: #513f7c;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.45;
}

.progress-summary {
  position: relative;
  display: grid;
  min-width: 14rem;
  min-height: 12rem;
  place-items: center;
  padding: 1rem;
  border: 5px solid #ffffff;
  border-radius: 2rem;
  color: #3b2b00;
  text-align: center;
  background: linear-gradient(160deg, #ffd84d, #ffb703);
  box-shadow: 0 0.75rem 0 #d58f00, 0 1.1rem 1.5rem rgba(125, 84, 0, 0.22);
  transform: rotate(1.5deg);
}

.trophy {
  font-size: 2.75rem;
  line-height: 1;
}

.progress-summary strong {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1;
}

.progress-summary span {
  font-size: 1.1rem;
  font-weight: 1000;
}

.star-road {
  display: flex;
  gap: 0.2rem;
  justify-content: center;
}

.star {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.35rem;
  text-shadow: 0 2px 0 rgba(113, 70, 0, 0.22);
}

.star--filled {
  color: #fff7a6;
  animation: star-pop 500ms ease-out;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.zone-card {
  --card-color: #ff6b8a;
  --card-light: #ffe5eb;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 30rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  overflow: hidden;
  border: 5px solid #ffffff;
  border-radius: 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--card-light) 100%);
  box-shadow: 0 0.7rem 0 color-mix(in srgb, var(--card-color) 72%, #6d4b00), 0 1.1rem 1.5rem rgba(57, 37, 86, 0.14);
  transform-style: preserve-3d;
}

.zone-card--coral {
  --card-color: #ff6b8a;
  --card-light: #ffe8ee;
}

.zone-card--blue {
  --card-color: #4dabf7;
  --card-light: #e1f3ff;
}

.zone-card--purple {
  --card-color: #9b5de5;
  --card-light: #f0e4ff;
}

.zone-card--pink {
  --card-color: #f15bb5;
  --card-light: #ffe2f4;
}

.zone-card--orange {
  --card-color: #ff9f1c;
  --card-light: #fff0d6;
}

.zone-card--lime {
  --card-color: #8ac926;
  --card-light: #efffdb;
}

.zone-card__stripe {
  position: absolute;
  inset: 0 0 auto;
  height: 1rem;
  background: var(--card-color);
}

.zone-card--active {
  animation: active-glow 1600ms ease-in-out infinite alternate;
}

.zone-card--finished::after {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  content: "✨";
  font-size: 2.4rem;
  animation: star-pop 650ms ease-out;
}

.zone-card--finished {
  border-color: #fff7a6;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 166, 0.94)),
    repeating-linear-gradient(-35deg, var(--card-light) 0 1rem, #ffffff 1rem 2rem);
  box-shadow: 0 0.7rem 0 #c08a00, 0 0 0 0.35rem rgba(255, 216, 77, 0.6), 0 1.2rem 1.7rem rgba(57, 37, 86, 0.18);
  transform: rotateY(4deg) rotateZ(-0.8deg);
}

.zone-card--finished .zone-card__top,
.zone-card--finished .zone-details {
  opacity: 0.78;
}

.zone-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.6rem;
}

.zone-card__top > div {
  min-width: 0;
}

.zone-icon {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border: 4px solid #ffffff;
  border-radius: 1.4rem;
  background: var(--card-color);
  box-shadow: 0 0.35rem 0 rgba(57, 37, 86, 0.18);
  font-size: 2.35rem;
}

.zone-card h2 {
  margin: 0;
  color: #271f4a;
  font-size: clamp(1.65rem, 2.35vw, 2.35rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.assignment {
  margin: 0.4rem 0 0;
  color: #5d4b80;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.3;
}

.active-badge,
.confetti-badge {
  align-self: flex-start;
  margin: 0.75rem 0 0;
  padding: 0.45rem 0.8rem;
  border: 3px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: #ff4d6d;
  box-shadow: 0 0.3rem 0 rgba(77, 45, 0, 0.16);
  font-weight: 1000;
}

.confetti-badge {
  color: #3c2c00;
  background: #ffe45e;
}

.done-stamp {
  display: grid;
  min-height: 8.5rem;
  place-items: center;
  align-self: stretch;
  margin: 1rem 0;
  padding: 1rem;
  border: 0.45rem dashed #23c552;
  border-radius: 1.5rem;
  color: #083d1b;
  text-align: center;
  background: rgba(213, 255, 225, 0.9);
  box-shadow: inset 0 0 0 0.35rem #ffffff, 0 0.4rem 0 rgba(18, 130, 51, 0.16);
}

.done-stamp span {
  font-size: clamp(3.8rem, 8vw, 5.75rem);
  line-height: 1;
  animation: star-pop 650ms ease-out;
}

.done-stamp strong {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.progress-ring {
  display: grid;
  width: 5.75rem;
  height: 5.75rem;
  place-items: center;
  align-self: center;
  margin: 0.9rem 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--card-color) var(--progress), rgba(255, 255, 255, 0.72) 0);
  box-shadow: inset 0 0 0 5px #ffffff, 0 0.35rem 0 rgba(57, 37, 86, 0.16);
}

.progress-ring span {
  color: #2c2354;
  font-size: 1.15rem;
  font-weight: 1000;
}

.zone-details {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.zone-details div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.72);
}

.zone-details dt {
  color: #5b4a80;
  font-weight: 1000;
}

.zone-details dd {
  margin: 0;
  color: #2d2455;
  font-weight: 1000;
  text-align: right;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: #2d2455;
  background: #ffffff;
}

.status--en-progreso {
  color: #063d25;
  background: #b7f7cf;
}

.status--pausada {
  color: #543800;
  background: #ffe29a;
}

.status--terminada {
  color: #46256f;
  background: #e9d5ff;
}

.zone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.primary-action,
.done-action,
.assignment-link,
.logout-button {
  min-height: 4.25rem;
  border: 0;
  border-radius: 1.25rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 1000;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary-action {
  color: #3b2b00;
  background: #ffdf3f;
  box-shadow: 0 0.35rem 0 #d69f00;
}

.primary-action--more-time {
  color: #ffffff;
  background: #7a3bd1;
  box-shadow: 0 0.35rem 0 #4b2481;
}

.done-action {
  color: #ffffff;
  background: #23c552;
  box-shadow: 0 0.35rem 0 #128233;
}

.done-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.assignment-link {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  border: 4px solid var(--card-color);
  color: #33285f;
  background: #ffffff;
  box-shadow: 0 0.35rem 0 rgba(57, 37, 86, 0.18);
}

.zone-actions--finished {
  grid-template-columns: 1fr;
}

.zone-actions--finished .assignment-link {
  grid-column: auto;
}

.primary-action:active,
.done-action:active,
.assignment-link:active,
.logout-button:active,
.primary-action:hover,
.done-action:hover,
.assignment-link:hover,
.logout-button:hover {
  transform: translateY(0.1rem) scale(1.015);
}

.helper-panel {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 4px solid #ffffff;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0.5rem 0 rgba(255, 183, 3, 0.4);
}

.helper-panel p {
  margin: 0;
  color: #4e4074;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.logout-button {
  min-width: 15rem;
  border: 4px solid #c7b7df;
  color: #4a3a73;
  background: #f7f0ff;
  box-shadow: 0 0.3rem 0 #c7b7df;
}

button:focus-visible,
a:focus-visible {
  outline: 0.35rem solid #00b4d8;
  outline-offset: 0.2rem;
}

@keyframes active-glow {
  from {
    box-shadow: 0 0.7rem 0 color-mix(in srgb, var(--card-color) 72%, #6d4b00), 0 0 0 0.15rem rgba(255, 255, 255, 0.8);
  }

  to {
    box-shadow: 0 0.7rem 0 color-mix(in srgb, var(--card-color) 72%, #6d4b00), 0 0 0 0.45rem rgba(255, 94, 98, 0.33), 0 1.2rem 1.7rem rgba(57, 37, 86, 0.18);
  }
}

@keyframes star-pop {
  0% {
    transform: scale(0.55) rotate(-18deg);
  }

  70% {
    transform: scale(1.25) rotate(10deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

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

  .progress-summary {
    min-height: 8rem;
    transform: none;
  }

}

@media (max-width: 640px) {
  :root {
    font-size: 16px;
  }

  .page-shell {
    padding: 0.75rem;
  }

  .helper-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .helper-panel form {
    width: 100%;
  }

  .logout-button {
    width: 100%;
    min-width: 0;
  }
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.auth-card {
  width: min(42rem, 100%);
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 5px solid #ffffff;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.85rem 0 #f3d35f, 0 1.4rem 2rem rgba(91, 62, 20, 0.14);
}

.auth-card__text,
.auth-card__note,
.auth-card__status {
  color: #513f7c;
  font-weight: 850;
  line-height: 1.45;
}

.auth-card__text {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
}

.auth-card__note,
.auth-card__status {
  font-size: 1rem;
}

.auth-card__status:empty {
  display: none;
}

.google-button {
  width: 100%;
  min-height: 4.75rem;
  margin: 1rem 0;
  border: 0;
  border-radius: 1.25rem;
  color: #3b2b00;
  background: #ffdf3f;
  box-shadow: 0 0.35rem 0 #d69f00;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 1000;
  touch-action: manipulation;
}

.google-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.google-button:active {
  transform: translateY(0.1rem) scale(1.01);
}

.teacher-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.teacher-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 4px solid #fff;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
}

.teacher-nav div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.teacher-nav__home,
.teacher-nav__link,
.teacher-button {
  display: inline-grid;
  min-height: 3rem;
  place-items: center;
  padding: 0.65rem 1rem;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #2b2157;
  background: #ffdf3f;
  box-shadow: 0 0.25rem 0 #d69f00;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
}

.teacher-button--secondary {
  background: #e8f4fd;
  box-shadow: 0 0.25rem 0 #9fc9e8;
}

.teacher-header,
.teacher-panel,
.summary-card,
.teacher-card {
  padding: 1.25rem;
  border: 4px solid #fff;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.55rem 0 rgba(155, 93, 229, 0.18);
}

.teacher-header {
  margin-bottom: 1rem;
}

.summary-grid,
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 2.5rem;
}

.teacher-card {
  display: grid;
  min-height: 9rem;
  align-content: center;
  color: #2b2157;
  text-decoration: none;
}

.teacher-card strong {
  font-size: 1.5rem;
}

.teacher-form,
.platform-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teacher-form input,
.teacher-form select,
.teacher-form textarea,
.platform-row input {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
  padding: 0.6rem;
  border: 3px solid #d8cdf4;
  border-radius: 0.9rem;
  font: inherit;
}

.checkbox-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.checkbox-row input {
  width: 1.5rem;
  min-height: 1.5rem;
}

.teacher-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 1rem;
}

.teacher-table th,
.teacher-table td {
  padding: 0.8rem;
  border-bottom: 2px solid #efe8ff;
  text-align: left;
  vertical-align: top;
}

.teacher-error {
  padding: 1rem;
  border-radius: 1rem;
  color: #5c1d1d;
  background: #ffe2e2;
  font-weight: 900;
}

.teacher-status {
  padding: 1rem;
  border-radius: 1rem;
  color: #194221;
  background: #ddffd6;
  font-weight: 900;
}

body.teacher-page {
  color: #1f2937;
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

.teacher-page h1 {
  color: #111827;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.teacher-page h2 {
  margin: 0 0 1rem;
  color: #111827;
  font-size: 1.15rem;
  line-height: 1.3;
}

.teacher-page p {
  color: #4b5563;
}

.teacher-page .teacher-shell {
  width: min(1120px, 100%);
  padding: clamp(1rem, 2.5vw, 2rem);
}

.teacher-page .teacher-nav {
  gap: 1rem;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
}

.teacher-page .teacher-nav__home,
.teacher-page .teacher-nav__link,
.teacher-page .teacher-button {
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  color: #374151;
  background: #ffffff;
  box-shadow: none;
  font-weight: 650;
}

.teacher-page .teacher-nav__home {
  border-color: transparent;
  color: #111827;
  background: transparent;
  font-weight: 750;
}

.teacher-page .teacher-button {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
}

.teacher-page .teacher-button--secondary {
  color: #374151;
  border-color: #d1d5db;
  background: #ffffff;
}

.teacher-page .teacher-header,
.teacher-page .teacher-panel,
.teacher-page .summary-card,
.teacher-page .teacher-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.teacher-page .teacher-header {
  padding: 1.25rem 0 0.75rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.teacher-page .teacher-header p {
  margin: 0.35rem 0 0;
}

.teacher-page .teacher-overview + .teacher-overview {
  margin-top: 1rem;
}

.teacher-page .summary-grid,
.teacher-page .teacher-grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-bottom: 0;
}

.teacher-page .summary-card {
  padding: 1rem;
}

.teacher-page .summary-card span,
.teacher-page .teacher-card span {
  color: #6b7280;
}

.teacher-page .summary-card strong {
  margin-top: 0.35rem;
  color: #111827;
  font-size: 1.9rem;
  line-height: 1;
}

.teacher-page .teacher-card {
  min-height: 7rem;
  align-content: start;
  gap: 0.35rem;
  color: #111827;
}

.teacher-page .teacher-card strong {
  font-size: 1.05rem;
}

.teacher-page .teacher-form input,
.teacher-page .teacher-form select,
.teacher-page .teacher-form textarea,
.teacher-page .platform-row input {
  min-height: 2.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
}

.teacher-page .teacher-table th,
.teacher-page .teacher-table td {
  border-bottom: 1px solid #e5e7eb;
}

.checkbox-finish {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  align-self: stretch;
  min-height: 5.75rem;
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  border: 5px solid #ffffff;
  border-radius: 1.5rem;
  color: #2d2455;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0.35rem 0 rgba(57, 37, 86, 0.16);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 1000;
  touch-action: manipulation;
}

.checkbox-finish input {
  width: 3.1rem;
  height: 3.1rem;
  accent-color: var(--card-color);
  cursor: pointer;
}

.checkbox-finish--checked {
  color: #063d25;
  background: #b7f7cf;
}

.checkbox-finish--checked input {
  cursor: not-allowed;
}

.zone-actions--checkbox {
  grid-template-columns: 1fr;
}

.confirmation-list {
  display: grid;
  gap: 0.75rem;
  min-width: 24rem;
}

.confirmation-zone {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(12rem, 1fr) auto auto;
  padding: 0.75rem;
}

.confirmation-zone > div,
.confirmation-zone form {
  display: grid;
  gap: 0.25rem;
}

.confirmation-zone a {
  color: #2563eb;
  font-weight: 700;
}

.confirm-badge {
  background: #fee2e2;
  border-radius: 999px;
  color: #991b1b;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  text-align: center;
  white-space: nowrap;
}

.confirm-badge--yes {
  background: #dcfce7;
  color: #166534;
}

.teacher-filter-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

.teacher-filter-form label {
  min-width: 12rem;
}

.inline-confirm-form {
  margin: 0;
}
