/* OpenTaskly milestone 1. Visual ideas only (off-white page, indigo accent, compact rows). */
:root {
  --bg: #f6f3ee;
  --sidebar: #ece7df;
  --card: #fffdf9;
  --text: #1c1917;
  --muted: #57534e;
  --line: #e4ddd3;
  --accent: #3b4bd4;
  --accent-soft: #e8eaff;
  --danger: #b42318;
  --radius: 8px;
  --sidebar-width: 252px;
  --gutter: 24px;
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--text); background: var(--bg); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 15px;
  padding: 0 10px 8px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.6); text-decoration: none; }
.sidebar nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-section {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px 4px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-footer button, .linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.content { flex: 1; padding: var(--gutter); max-width: 960px; }

h1 { font-size: 22px; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 650; }
h2 { font-size: 16px; margin: 24px 0 10px; font-weight: 650; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
}

.quick-add, .panel, .form-stack { padding: 14px; margin-bottom: 16px; }
.quick-add form, .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.form-stack { display: flex; flex-direction: column; gap: 10px; }

input, select, textarea, button {
  font: inherit;
  color: inherit;
}
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
}
input[type="text"], input[type="email"], input[type="date"], textarea { width: 100%; }
textarea { min-height: 140px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.quick-add input[type="text"] { flex: 1; min-width: 200px; width: auto; }
.quick-add select { width: auto; }

button, .button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
}
button:hover, .button:hover { filter: brightness(1.05); text-decoration: none; }
button.secondary, .button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.flash {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.error { background: #fdecea; color: var(--danger); }

.list { overflow: hidden; }
.row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 140px 90px 110px;
  gap: 12px;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #faf7f2; text-decoration: none; }
.row .title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-chip, .status-chip, .tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-chip { background: #f3f0ea; color: var(--text); }
.due { color: var(--muted); font-size: 12.5px; }
.due.overdue { color: var(--danger); font-weight: 600; }
.muted { color: var(--muted); }
.empty { padding: 20px 14px; color: var(--muted); }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login .card { width: min(420px, 100%); padding: 28px; }
.login h1 { margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }

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

.members { width: 100%; border-collapse: collapse; }
.members th, .members td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  height: 40px;
}
.members th { color: var(--muted); font-weight: 550; }

@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; }
  .row { grid-template-columns: 80px minmax(0, 1fr); }
  .row .due, .row .priority { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
