:root {
  --ink: #101828;
  --muted: #5d6678;
  --line: #dbe2ea;
  --paper: #f6f8fb;
  --white: #ffffff;
  --blue: #11539c;
  --blue-dark: #25295f;
  --navy: #071c2f;
  --teal: #14a0a8;
  --gold: #d6a34a;
  --soft: #eef6f8;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 24px 70px rgba(16, 24, 40, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(219, 226, 234, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  min-width: 184px;
  line-height: 1;
}

.brand span {
  color: var(--blue-dark);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand strong {
  margin-top: 5px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 800;
}

.nav a:hover {
  color: var(--blue);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  padding: 0 18px;
  border: 0;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(17, 83, 156, 0.22);
}

.secondary-button,
.ghost-button {
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 410px);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(54px, 8vw, 110px) clamp(18px, 6vw, 76px);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(7, 28, 47, 0.96), rgba(17, 83, 156, 0.92) 58%, rgba(20, 160, 168, 0.82)),
    radial-gradient(circle at 72% 28%, rgba(214, 163, 74, 0.28), transparent 32%);
}

.hero-copy {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 6.1rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-panel,
.panel,
.day-card,
.validation-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.hero-panel {
  padding: 28px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.panel-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 900;
}

.hero-panel strong,
.progress-panel strong {
  display: block;
  color: var(--blue);
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 1;
}

.hero-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 999px;
  background: #e6edf3;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 240ms ease;
}

.progress-track.large {
  height: 14px;
}

.section {
  padding: clamp(58px, 8vw, 100px) 0;
  background: var(--white);
}

.section.soft {
  background: var(--soft);
}

.section-heading,
.input-form,
.plan-grid,
.progress-layout {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.compact {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: end;
}

.section-heading h2 {
  margin-bottom: 12px;
  color: var(--blue-dark);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.section-heading p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.6;
}

.input-form {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
}

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

.panel-head h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.panel-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-grid,
.textarea-grid,
.cartilla-grid {
  display: grid;
  gap: 14px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.textarea-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cartilla-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.45;
}

.cartilla-grid textarea {
  min-height: 150px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(20, 160, 168, 0.18);
  border-color: var(--teal);
}

.action-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
}

.validation-box {
  min-height: 64px;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.45;
}

.validation-box strong {
  color: var(--blue-dark);
}

.validation-box.error {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fff3f0;
  color: #7a271a;
}

.validation-box.ok {
  border-color: rgba(6, 118, 71, 0.28);
  background: #f0fdf4;
  color: #075e3d;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

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

.empty-plan {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #b8c4d1;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.day-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.day-card[data-status="completado"] {
  border-color: rgba(6, 118, 71, 0.35);
  background: #f0fdf4;
}

.day-card[data-status="en-proceso"] {
  border-color: rgba(214, 163, 74, 0.42);
  background: #fffaf0;
}

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

.day-number {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-select {
  max-width: 150px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.day-card textarea {
  min-height: 82px;
}

.day-card .action-field textarea {
  min-height: 112px;
  color: var(--blue-dark);
  font-weight: 800;
}

.origin {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  background: #f5f8fb;
  font-size: 0.88rem;
  line-height: 1.42;
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
}

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

.status-grid article {
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.status-grid span {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  font-weight: 900;
}

.status-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-header {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .hero,
  .section-heading.compact,
  .progress-layout,
  .action-strip {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    flex: 1;
  }
}

@media (max-width: 680px) {
  .app-header {
    gap: 12px;
  }

  .brand {
    min-width: 140px;
  }

  .brand span {
    font-size: 0.86rem;
  }

  .brand strong {
    font-size: 0.62rem;
  }

  .nav {
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 58px;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .hero-actions,
  .field-grid,
  .textarea-grid,
  .cartilla-grid,
  .plan-grid,
  .status-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .panel-head,
  .day-top {
    align-items: stretch;
    flex-direction: column;
  }

  .status-select {
    max-width: none;
  }
}
