:root {
  --bg-cream: #f8f2e8;
  --bg-warm: #eadcc4;
  --card: rgba(255, 250, 242, 0.88);
  --text-main: #1f1a16;
  --text-muted: #675c50;
  --accent: #c85f34;
  --accent-strong: #9f431d;
  --line: rgba(122, 99, 76, 0.18);
  --success: #2f8b59;
  --shadow: 0 20px 44px rgba(52, 36, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 245, 214, 0.95), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(247, 216, 188, 0.8), transparent 26%),
    linear-gradient(160deg, var(--bg-cream), var(--bg-warm));
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.background-glow {
  position: fixed;
  right: -140px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(200, 95, 52, 0.2), transparent 68%);
  pointer-events: none;
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

.hero,
.overview-card,
.add-form,
.preset-panel,
.stats article,
.progress-card,
.list-panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 28px;
  animation: rise 520ms ease;
}

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

.eyebrow,
.card-kicker {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.12em;
  font-size: 1rem;
  color: var(--accent);
}

h1,
.card-title,
.section-title,
.form-title,
.day-name {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.subhead {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn,
.row-btn,
.text-btn,
.pill {
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.btn:hover,
.row-btn:hover,
.text-btn:hover,
.pill:hover {
  transform: translateY(-1px);
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  font-weight: 800;
}

.btn-primary,
.btn-accent {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(159, 67, 29, 0.26);
}

.btn-muted {
  color: var(--text-main);
  background: rgba(239, 224, 197, 0.88);
}

.overview-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.15fr 0.85fr;
}

.overview-card {
  border-radius: 22px;
  padding: 1.1rem 1.2rem;
}

.spotlight-card {
  background:
    linear-gradient(135deg, rgba(255, 244, 222, 0.95), rgba(255, 250, 242, 0.86)),
    var(--card);
}

.planner-card {
  position: relative;
  overflow: hidden;
}

.planner-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -55px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 139, 89, 0.17), transparent 68%);
}

.card-title {
  margin: 0.25rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
}

.card-copy {
  position: relative;
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
  z-index: 1;
}

.control-panel {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(239, 221, 191, 0.9);
  border: 1px solid rgba(122, 99, 76, 0.12);
}

.pill {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.pill.active {
  background: #fff9f0;
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(44, 34, 24, 0.14);
}

.view-caption,
.section-note,
.progress-detail {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.add-form {
  border-radius: 22px;
  padding: 1rem;
}

.preset-panel {
  border-radius: 22px;
  padding: 1rem;
}

.form-heading,
.section-heading,
.progress-topline,
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.form-title,
.section-title,
.day-name {
  margin: 0.12rem 0 0;
  line-height: 0.95;
}

.form-title,
.section-title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 800;
  padding: 0.25rem 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(110px, 0.7fr) minmax(150px, 0.9fr) auto;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(151, 122, 94, 0.28);
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  background: rgba(255, 253, 248, 0.95);
  color: var(--text-main);
}

input:focus,
select:focus,
.btn:focus-visible,
.pill:focus-visible,
.row-btn:focus-visible,
.text-btn:focus-visible,
.complete-checkbox:focus-visible {
  outline: 2px solid rgba(200, 95, 52, 0.42);
  outline-offset: 2px;
}

.stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stats article {
  border-radius: 20px;
  padding: 1rem 1.05rem;
}

.stats h2 {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats p {
  margin: 0.3rem 0 0;
  font-size: clamp(1.8rem, 3.7vw, 2.45rem);
  font-weight: 800;
}

.progress-card {
  margin-top: 0.75rem;
  border-radius: 20px;
  padding: 1rem 1.05rem;
}

.preset-feedback {
  margin: 0.85rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(47, 139, 89, 0.2);
  background: rgba(47, 139, 89, 0.1);
  color: #24593b;
  font-weight: 700;
}

.preset-library {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.preset-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.88);
  border: 1px solid rgba(122, 99, 76, 0.14);
}

.preset-card-header {
  display: grid;
  gap: 0.3rem;
}

.preset-card-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  line-height: 0.95;
}

.preset-card-copy,
.preset-meta,
.preset-list li {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.preset-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.preset-action {
  justify-self: flex-start;
}

.progress-track {
  margin-top: 0.8rem;
  height: 14px;
  border-radius: 999px;
  background: rgba(207, 186, 157, 0.45);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--success), #3ca56c);
  transition: width 220ms ease;
}

.list-panel {
  margin-top: 1rem;
  border-radius: 24px;
  padding: 1rem;
}

.workout-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.95rem;
}

.day-group {
  background: rgba(255, 252, 247, 0.84);
  border: 1px solid rgba(122, 99, 76, 0.12);
  border-radius: 20px;
  padding: 0.9rem;
}

.day-meta {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.day-name {
  font-size: 1.75rem;
}

.day-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.workout-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(122, 99, 76, 0.16);
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(44, 34, 24, 0.08);
  animation: fadeIn 260ms ease;
}

.workout-item.dragging {
  opacity: 0.55;
}

.workout-item.completed {
  border-color: rgba(47, 139, 89, 0.24);
  background: linear-gradient(135deg, rgba(244, 252, 247, 0.98), rgba(255, 253, 248, 0.98));
}

.drag-handle {
  color: #8f806e;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: grab;
  user-select: none;
}

.workout-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.complete-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--success);
  flex-shrink: 0;
}

.text-wrap {
  min-width: 0;
}

.workout-name,
.workout-meta {
  display: block;
}

.workout-name {
  font-weight: 800;
}

.workout-meta {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.workout-item.completed .workout-name {
  color: #5d7a68;
  text-decoration: line-through;
}

.workout-item.completed .workout-meta {
  color: #547261;
}

.workout-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-btn {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0.52rem 0.72rem;
  font-weight: 800;
}

.edit-btn {
  background: rgba(200, 95, 52, 0.1);
  border-color: rgba(200, 95, 52, 0.15);
  color: var(--accent-strong);
}

.delete-btn {
  background: rgba(125, 49, 24, 0.9);
  color: #fff;
}

.empty-state {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(200, 95, 52, 0.35);
  background: rgba(255, 244, 226, 0.82);
  color: var(--text-muted);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

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

@media (max-width: 920px) {
  .hero,
  .form-heading,
  .progress-topline,
  .section-heading,
  .day-header {
    align-items: flex-start;
  }

  .hero,
  .toolbar,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .toolbar,
  .overview-grid,
  .form-heading,
  .section-heading,
  .day-header {
    display: grid;
  }

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

  .preset-library {
    grid-template-columns: 1fr;
  }

  #submitWorkoutBtn {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 1rem 0.85rem 2.5rem;
  }

  .hero,
  .overview-card,
  .add-form,
  .stats article,
  .progress-card,
  .list-panel {
    border-radius: 18px;
  }

  .stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  #submitWorkoutBtn {
    grid-column: auto;
  }

  .workout-item {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: flex-start;
  }

  .workout-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}
