:root {
  --paper: #f7f1e4;
  --ink: #1f2520;
  --muted: #6f756a;
  --line: #d9cfb8;
  --fern: #206b4f;
  --fern-dark: #114632;
  --coral: #e56f4a;
  --amber: #d69b2d;
  --white: #fffaf0;
  --shadow: 0 24px 70px rgba(44, 37, 25, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(31, 37, 32, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(31, 37, 32, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  min-height: 250px;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid rgba(31, 37, 32, 0.14);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(32, 107, 79, 0.08) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(241, 225, 191, 0.84));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -72px auto;
  width: 360px;
  height: 180px;
  border: 28px solid rgba(32, 107, 79, 0.15);
  transform: rotate(-14deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--fern);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.7rem, 9vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 520px;
  margin-bottom: 0;
  color: #4e574b;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.status-card {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 190px;
  padding: 18px;
  border: 1px solid rgba(31, 37, 32, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.84);
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 7px rgba(214, 155, 45, 0.16);
}

.status-dot.is-online {
  background: var(--fern);
  box-shadow: 0 0 0 7px rgba(32, 107, 79, 0.16);
}

.status-dot.is-offline {
  background: var(--coral);
  box-shadow: 0 0 0 7px rgba(229, 111, 74, 0.16);
}

.status-label {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.workspace {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  margin-top: 24px;
}

.summary-panel,
.task-panel {
  border: 1px solid rgba(31, 37, 32, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 18px 55px rgba(44, 37, 25, 0.12);
}

.summary-panel {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 18px;
}

.metric {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6e5;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.9rem;
  line-height: 1;
}

.metric p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.metric.accent {
  color: var(--white);
  background: var(--fern);
}

.metric.accent p {
  color: rgba(255, 250, 240, 0.78);
}

.task-panel {
  padding: clamp(18px, 4vw, 30px);
}

.board-grid {
  display: grid;
  gap: 24px;
}

.optimization-panel {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(245, 237, 220, 0.9)),
    rgba(255, 250, 240, 0.9);
}

.optimization-panel .eyebrow {
  color: #9a4f2f;
}

.optimization-panel .primary-button {
  background: var(--fern-dark);
}

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

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.ghost-button,
.primary-button,
.danger-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ghost-button {
  padding: 0 18px;
  color: var(--fern-dark);
  background: #e5ead5;
}

.primary-button {
  padding: 0 22px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 25px rgba(31, 37, 32, 0.18);
}

.danger-button {
  width: 42px;
  color: var(--coral);
  background: rgba(229, 111, 74, 0.1);
}

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

.task-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6e5;
}

.field {
  display: grid;
  gap: 7px;
}

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

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc4ab;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 10px;
}

input:focus,
select:focus {
  border-color: var(--fern);
  box-shadow: 0 0 0 4px rgba(32, 107, 79, 0.14);
}

.message {
  min-height: 28px;
  padding: 12px 2px 0;
  color: var(--fern-dark);
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.task-item.is-done {
  background: #ecf0df;
}

.toggle-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--fern);
  border-radius: 50%;
  color: transparent;
  background: transparent;
}

.task-item.is-done .toggle-button {
  color: var(--white);
  background: var(--fern);
}

.task-title {
  margin-bottom: 6px;
  font-size: 1.04rem;
  font-weight: 850;
}

.task-item.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.task-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty {
  padding: 32px 18px;
  border: 1px dashed #b8ad93;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 246, 229, 0.72);
}

@media (max-width: 820px) {
  .hero-panel,
  .workspace,
  .task-form {
    grid-template-columns: 1fr;
  }

  .status-card {
    width: 100%;
  }

  .summary-panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 24px;
  }

  .hero-panel {
    min-height: auto;
    padding: 24px;
  }

  h1 {
    font-size: 3.3rem;
  }

  .summary-panel {
    grid-template-columns: 1fr;
  }

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

  .task-item {
    grid-template-columns: auto 1fr;
  }

  .danger-button {
    grid-column: 2;
    width: 100%;
  }
}
