:root {
  color: #382525;
  background: #fff4f2;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --muted: #8d7371;
  --line: #ecd5d2;
  --accent: #c91532;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.agenda {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 48px 36px 28px;
}

.page-header,
.week-panel,
.week-navigation,
.week-stats,
.section-heading,
.actions,
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header {
  padding-bottom: 28px;
}

.eyebrow,
.week-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  font-size: 42px;
  font-weight: 650;
  letter-spacing: -1.5px;
}

.subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.header-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #f0c5c9;
  border-radius: 50%;
  background: #fde5e7;
  color: #c91532;
  font-size: 27px;
}

.week-panel {
  min-height: 108px;
  padding: 18px 24px;
  border: 1px solid #ecd5d2;
  border-radius: 12px;
  background: #fff;
}

.week-navigation {
  gap: 17px;
}

.week-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4a3030;
  font-size: 26px;
  line-height: 1;
}

.week-arrow:hover,
.button.secondary:hover {
  background: #fce9e8;
}

.week-range {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 600;
  text-transform: capitalize;
}

.week-stats {
  gap: 32px;
}

.week-stats div {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.week-stats strong {
  color: #713438;
  font-size: 19px;
}

.week-stats span {
  color: var(--muted);
  font-size: 11px;
}

.tasks-section {
  margin-top: 34px;
}

.section-heading {
  gap: 18px;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  font-weight: 650;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  justify-content: flex-end;
  gap: 9px;
}

.button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: #a70f28;
}

.button.secondary {
  border-color: #e8cecc;
  background: #fff;
  color: #55534e;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: 34px minmax(130px, 1.4fr) minmax(120px, 1fr) minmax(84px, 0.7fr) minmax(95px, 0.8fr) minmax(74px, 0.6fr) minmax(120px, 0.9fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 100px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.task-card:focus-within {
  border-color: #e58b98;
  box-shadow: 0 0 0 3px rgb(201 21 50 / 12%);
}

.task-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #fde5e7;
  color: #b71932;
  font-size: 11px;
  font-weight: 650;
}

.task-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.task-field > span {
  color: #96928a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.task-field input,
.task-field select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #fff8f7;
  color: #493333;
  font-size: 12px;
}

.task-field input:focus,
.task-field select:focus {
  border-color: #df7584;
  outline: 2px solid rgb(201 21 50 / 13%);
}

.task-date input[type="date"] {
  padding-inline: 5px;
  font-size: 11px;
}

.task-date small {
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}

.task-duration strong {
  padding-inline: 7px;
  color: #70484b;
  font-size: 12px;
}

.task-status select {
  border-color: #e7e4dd;
  background: #fff;
  cursor: pointer;
}

.status-completo .task-status select {
  border-color: #efc2c7;
  background: #fff0f1;
  color: #a21830;
}

.status-en-curso .task-status select {
  border-color: #edb4bb;
  background: #fdebed;
  color: #b31832;
}

.status-pendiente .task-status select {
  border-color: #eaa2aa;
  background: #fbe1e3;
  color: #a5122b;
}

.task-delete {
  display: grid;
  width: 24px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aaa69e;
  font-size: 21px;
}

.task-delete:hover {
  background: #fbe1e3;
  color: #c91532;
}

.empty-state {
  display: grid;
  min-height: 235px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px dashed #dedbd3;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.empty-state > span {
  color: #c91532;
  font-size: 24px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 650;
}

.empty-state p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.page-footer {
  gap: 16px;
  margin-top: 21px;
  color: #918d84;
  font-size: 10px;
}

.page-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.page-footer i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c91532;
}

.storage-message {
  min-height: 18px;
  margin-top: 8px;
  color: #a5122b;
  font-size: 11px;
}

@media (max-width: 850px) {
  .agenda {
    padding: 32px 22px;
  }

  .task-card {
    grid-template-columns: 30px repeat(3, minmax(100px, 1fr));
    gap: 12px;
  }

  .task-title,
  .task-date {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .agenda {
    padding: 24px 15px;
  }

  h1 {
    font-size: 34px;
  }

  .week-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 17px;
  }

  .week-stats {
    width: 100%;
    justify-content: space-around;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 27px;
  }

  .actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .task-card {
    grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .task-title,
  .task-date {
    grid-column: span 2;
  }

  .task-delete {
    grid-column: 3;
    justify-self: end;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .agenda {
    width: 100%;
    padding: 0;
  }

  .week-arrow,
  .actions,
  .task-delete {
    display: none;
  }

  .week-panel,
  .task-card {
    break-inside: avoid;
  }
}
