* {
  box-sizing: border-box;
}

:root {
  --pink: #e8b7c5;
  --rose: #c9879d;
  --lavender: #c9bddb;
  --cream: #fffaf6;
  --sage: #b9c9b8;
  --plum: #4b3b47;
  --text: #403841;
  --muted: #827681;
  --white: #ffffff;
  --border: #eadfe3;
  --shadow: 0 5px 18px rgba(80, 55, 70, 0.09);
}

body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app {
  width: 100%;
  max-width: 900px;
  margin: auto;
  min-height: 100vh;
  padding-bottom: 90px;
}

.header {
  background: linear-gradient(135deg, #f7dce4, #e5d9ed);
  padding: 25px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--rose);
}

h1 {
  margin: 0;
  font-size: 30px;
  color: var(--plum);
}

h2 {
  margin: 0;
  font-size: 24px;
  color: var(--plum);
}

h3 {
  margin-top: 0;
  color: var(--plum);
}

.header p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.menu-btn {
  border: none;
  background: rgba(255,255,255,.75);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 22px;
  color: var(--plum);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  gap: 8px;
  padding: 12px 15px;
  overflow-x: auto;
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav button,
footer button {
  border: none;
  background: var(--white);
  color: var(--plum);
  padding: 10px 15px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(80,55,70,.06);
}

main {
  padding: 15px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.welcome-card {
  background: linear-gradient(135deg, #fff, #f9edf1);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.welcome-card h2 {
  margin: 5px 0 8px;
}

#nextTask {
  margin: 0;
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.quick-grid button {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 18px;
  min-height: 82px;
  padding: 12px 6px;
  color: var(--plum);
  font-size: 22px;
  box-shadow: var(--shadow);
}

.quick-grid span {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.page-title {
  margin: 10px 4px 18px;
}

.page-title p {
  color: var(--muted);
  margin: 5px 0 0;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fffdfc;
  color: var(--text);
  padding: 12px 13px;
  border-radius: 13px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201,135,157,.12);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.primary {
  border: none;
  background: var(--rose);
  color: white;
  padding: 12px 18px;
  border-radius: 13px;
  font-weight: 700;
}

.primary:active {
  transform: scale(.98);
}

.item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(80,55,70,.06);
}

.item.done {
  opacity: .55;
}

.item.done .item-title {
  text-decoration: line-through;
}

.item-title {
  font-weight: 700;
  color: var(--plum);
  margin-bottom: 5px;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.item-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.small-btn {
  border: 1px solid var(--border);
  background: #fffafc;
  color: var(--plum);
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
}

.priority {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 20px;
  background: #f3e7ef;
  color: var(--plum);
  font-size: 11px;
  font-weight: 700;
}

.file-label {
  display: block;
  background: var(--lavender);
  color: var(--plum);
  padding: 13px;
  text-align: center;
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
}

.file-label input {
  display: none;
}

.small-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 20px 10px;
  font-size: 14px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  background: rgba(255,250,246,.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  padding: 10px;
  border-top: 1px solid var(--border);
  z-index: 10;
}

footer button {
  font-weight: 600;
}

@media (max-width: 500px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  h1 {
    font-size: 27px;
  }

  main {
    padding: 12px;
  }
}