:root {
  color-scheme: light;
  --ink: #202326;
  --muted: #68727d;
  --line: #dfe5e4;
  --soft: #f6f8f6;
  --panel: #ffffff;
  --jessy: #c84f77;
  --wessel: #1e7281;
  --together: #65723b;
  --green: #2f7d55;
  --yellow: #f2c94c;
  --danger: #b64242;
  --shadow: 0 20px 55px rgba(30, 45, 52, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(216, 234, 224, 0.88), rgba(244, 216, 145, 0.42)),
    #edf3ef;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  gap: 18px;
  width: min(1240px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(100%, 420px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-message {
  padding: 12px;
  border: 1px solid #efb8b8;
  border-radius: 8px;
  background: #fff4f4;
  color: var(--danger);
  font-weight: 750;
}

.login-message.warning {
  border-color: #efd88c;
  background: #fff8df;
  color: #7b5900;
}

.sidebar,
.workspace {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.brand,
.workspace-header,
.section-title,
.user-card,
.summary-grid article,
.task-item {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  padding: 4px 2px 10px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
}

h1 {
  font-size: 1.35rem;
}

.brand p,
.eyebrow,
.section-title span,
.summary-grid p,
small,
label,
.task-notes,
.task-meta {
  color: var(--muted);
}

.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.panel h2,
.panel h3 {
  font-size: 1rem;
}

.user-switch {
  display: grid;
  gap: 8px;
}

.user-card {
  gap: 11px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.user-card.active {
  border-color: currentColor;
  background: #f2faf6;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 850;
}

.avatar-jessy {
  background: var(--jessy);
}

.avatar-wessel {
  background: var(--wessel);
}

.avatar-together {
  background: var(--together);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 750;
}

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

input,
textarea {
  padding: 11px 12px;
}

select {
  padding: 0 10px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #5a968c;
  box-shadow: 0 0 0 3px rgba(90, 150, 140, 0.18);
}

.ghost-button,
.primary-action,
.restore-button,
.delete-button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 800;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.full-button {
  width: 100%;
}

.primary-action {
  min-height: 46px;
  border: 0;
  background: var(--ink);
  color: #fff;
}

.workspace-header {
  justify-content: space-between;
  gap: 16px;
}

.workspace-header h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.date-pill {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-grid article {
  justify-content: space-between;
  min-height: 84px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.metric {
  font-size: 2.1rem;
  font-weight: 850;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
}

.section-title .warning {
  color: var(--danger);
  font-weight: 800;
}

.task-form {
  display: grid;
  gap: 12px;
}

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

.item-list {
  display: grid;
  gap: 10px;
  min-height: 120px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-item {
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-item.archived {
  opacity: 0.72;
}

.complete-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #9fb7ad;
  border-radius: 50%;
  background: #fff;
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 900;
}

.complete-button:hover {
  border-color: var(--green);
  background: #edf8f1;
}

.task-content {
  min-width: 0;
  flex: 1;
}

.task-title {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-notes {
  margin-top: 5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.priority-high {
  background: #fff3cf;
  color: #7b5900;
}

.task-actions {
  display: grid;
  gap: 7px;
}

.restore-button,
.delete-button {
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.delete-button {
  color: var(--danger);
}

.empty-state {
  padding: 22px;
  border: 1px dashed #b4c4c1;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell,
  .task-layout {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 20px, 760px);
  }
}

@media (max-width: 640px) {
  .sidebar,
  .workspace,
  .panel {
    padding: 14px;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .task-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}
