﻿:root {
  --bg: #f3f4f6;
  --ink: #1f2937;
  --muted: #6b7280;
  --card: #ffffff;
  --accent: #ef5a5a;
  --accent-2: #2563eb;
  --line: #e5e7eb;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfe 0%, #eef2f7 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.12;
  z-index: 0;
}

.orb-1 {
  background: #fee2e2;
  top: -120px;
  left: -120px;
}

.orb-2 {
  background: #dbeafe;
  bottom: -160px;
  right: -160px;
}

.grid-noise {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-text {
  display: grid;
  align-content: start;
  gap: 8px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 10px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
}

.sub {
  margin: 0;
  color: var(--muted);
  max-width: 480px;
  font-size: 15px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero-actions .ghost,
.hero-actions .primary {
  min-height: 40px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.trust span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--line);
}

.hero-card {
  min-width: 220px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.hero-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.hero-badges span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.highlight {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-height: 140px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.highlight h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stat span {
  font-size: 32px;
  font-weight: 700;
}

.stat small {
  color: var(--muted);
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
}

.grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  grid-template-areas:
    "form schedule"
    "export schedule";
}

.form-panel + .export-panel {
  margin-top: -20px;
}

.form-panel {
  grid-area: form;
  margin-bottom: -14px;
}

.export-panel {
  grid-area: export;
  margin-top: -14px;
}

.schedule-panel {
  grid-area: schedule;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.view-hint {
  font-size: 12px;
  color: var(--muted);
}

.toggle-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--line);
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}

.toggle-btn.active {
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  color: #111827;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 {
  margin: 0;
  font-size: 20px;
}

.chip {
  background: #f3f4f6;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
}

form .primary {
  width: 100%;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input,
select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 90, 90, 0.2);
}

.primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(239, 90, 90, 0.3);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: #374151;
}

.ghost.small {
  padding: 6px 10px;
  font-size: 12px;
}

.ghost.tiny {
  padding: 4px 8px;
  font-size: 11px;
  color: #6b7280;
}

.ghost:hover {
  background: #f3f4f6;
}

.ghost.small:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

.color-picker {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.day-picker {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.day-option {
  position: relative;
  cursor: pointer;
}

.day-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-option span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #111827;
  background: #ffffff;
}

.day-option input:checked + span {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  background: #eff6ff;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.color-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-option span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d1d5db;
  display: inline-block;
}

.color-option input:checked+span {
  box-shadow: 0 0 0 2px var(--accent-2);
}

.color-option.color-coral span {
  background: #f87171;
}

.color-option.color-teal span {
  background: #10b981;
}

.color-option.color-amber span {
  background: #f59e0b;
}

.color-option.color-indigo span {
  background: #6366f1;
}

.color-option.color-green span {
  background: #22c55e;
}

.schedule {
  display: grid;
  gap: 16px;
}

.schedule.compact .day-list {
  gap: 6px;
  grid-template-columns: 1fr;
}

.day {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  animation: fadeUp 0.4s ease;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.day-head h3 {
  margin: 0;
  font-size: 17px;
}

.day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease;
  color: var(--block-text, var(--ink));
  gap: 8px;
  position: relative;
  padding-right: 70px;
}

.item:hover {
  transform: translateY(-2px);
  border-color: #d1d5db;
}

.item-asig {
  display: block;
  font-size: 15px;
  text-transform: capitalize;
}

.item-meta {
  display: block;
  color: var(--block-meta, var(--muted));
  font-size: 13px;
  margin-top: 4px;
}

.item-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  gap: 6px;
}

.icon-btn {
  position: static;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #6b7280;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-btn:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  border: 1px solid #111827;
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Timetable grid */
.timetable {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
}

.timetable-panel {
  display: none;
}

.timetable-panel.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f7 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
}

.timetable-panel.open {
  display: flex;
  flex-direction: column;
}

.timetable-panel.open .panel-head {
  flex: 0 0 auto;
}

.timetable-panel.open .timetable {
  flex: 1 1 auto;
  min-height: 0;
}

.timetable-panel.open .timetable-body {
  height: auto;
  min-height: 0;
}

.timetable-scroll {
  min-height: 0;
  overflow-y: auto;
}

.timetable-header {
  display: grid;
  grid-template-columns: 88px repeat(5, minmax(0, 1fr));
  gap: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px 4px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  position: sticky;
  top: 0;
  z-index: 2;
}

.timetable-header .day-col,
.timetable-header .time-col {
  font-weight: 600;
  color: #111827;
}

.timetable-header>div {
  padding: 0 10px;
}

.timetable-header .time-col {
  padding-right: 12px;
  text-align: right;
}

.timetable-body {
  position: relative;
  display: grid;
  grid-template-columns: 88px repeat(5, minmax(0, 1fr));
  gap: 0;
  min-height: 520px;
  padding: 10px 12px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f2f4f8 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-image:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 100% calc(var(--slot-height, 32px) * 2), 100% var(--slot-height, 32px);
  background-origin: content-box;
  background-clip: content-box;
}

.time-col {
  text-align: right;
  padding-right: 6px;
}

.time-track {
  position: relative;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 0;
  padding: 0 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.time-track span {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 6px;
  line-height: 1;
  transform: translateY(-40%);
  color: rgba(15, 23, 42, 0.6);
}

.time-track span:first-child {
  transform: translateY(0);
}

.time-track span.hour {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.time-track span.half {
  color: transparent;
}

.day-track {
  position: relative;
  padding: 0 10px;
  background: transparent;
}

.time-block {
  position: absolute;
  left: 0;
  right: 0;
  padding: 12px 12px;
  border-radius: 8px;
  background: var(--block-bg, #fee2e2);
  border: 1px solid var(--block-border, #fca5a5);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  display: grid;
  gap: 4px;
  line-height: 1.25;
  color: var(--block-text, #7f1d1d);
  word-break: break-word;
}

.time-block strong {
  font-size: 13px;
  text-transform: capitalize;
}

.time-block .meta {
  color: var(--block-meta, #7f1d1d);
}

.color-coral {
  --block-bg: #fee2e2;
  --block-border: #f87171;
  --block-text: #7f1d1d;
  --block-meta: #9f1239;
}

.color-teal {
  --block-bg: #d1fae5;
  --block-border: #10b981;
  --block-text: #065f46;
  --block-meta: #047857;
}

.color-amber {
  --block-bg: #fef3c7;
  --block-border: #f59e0b;
  --block-text: #7c2d12;
  --block-meta: #92400e;
}

.color-indigo {
  --block-bg: #e0e7ff;
  --block-border: #6366f1;
  --block-text: #312e81;
  --block-meta: #4338ca;
}

.color-green {
  --block-bg: #dcfce7;
  --block-border: #22c55e;
  --block-text: #166534;
  --block-meta: #15803d;
}

.item.color-coral,
.item.color-teal,
.item.color-amber,
.item.color-indigo,
.item.color-green {
  background: var(--block-bg);
  border-color: var(--block-border);
}

.export-panel .panel-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.export-actions {
  display: grid;
  gap: 10px;
}

.export-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.export-actions .ghost,
.export-actions .primary {
  width: 100%;
  justify-content: center;
}

.panel-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tips-panel .panel-head {
  margin-bottom: 16px;
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

.step strong {
  display: block;
  margin-bottom: 4px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.faq {
  margin-top: 24px;
}

.seo-article {
  margin-top: 24px;
}

.seo-article h2 {
  margin: 0 0 10px;
}

.seo-article h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.seo-article p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.faq h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.faq p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-card {
    width: 100%;
  }

  .page {
    padding: 20px 16px 50px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
    grid-template-areas: "form" "export" "schedule";
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .ghost,
  .hero-actions .primary {
    width: 100%;
    justify-content: center;
  }

  .trust {
    gap: 8px;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .item {
    flex-direction: column;
    align-items: flex-start;
  }

  .item button {
    align-self: flex-start;
  }

  .day-list {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-actions {
    width: 100%;
  }

  .footer-actions .ghost {
    width: 100%;
  }

  .toggle-group {
    width: 100%;
    justify-content: space-between;
  }

  .export-row {
    grid-template-columns: 1fr;
  }

  .timetable-header {
    grid-template-columns: 70px repeat(5, minmax(0, 1fr));
    font-size: 11px;
  }

  .timetable-body {
    grid-template-columns: 70px repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

  .sub {
    font-size: 14px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .view-toggle .ghost {
    width: 100%;
  }

  .toggle-group {
    width: 100%;
  }
}
