/* ── Dashboard layout ──────────────────────────────────────────────────── */

.db-body { background: var(--bg); min-height: 100vh; }

.db-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.db-nav-inner .wordmark { text-decoration: none; }

.db-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ── Section labels ────────────────────────────────────────────────────── */

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

/* ── AI Rank button ────────────────────────────────────────────────────── */

.btn-rank {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-rank:hover { opacity: 0.85; }
.btn-rank:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Spotlight: top-3 ──────────────────────────────────────────────────── */

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.spotlight-empty {
  color: var(--fg-muted);
  font-size: 14px;
  padding: 40px 0;
}

.spotlight-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Rank-specific accent stripe */
.spotlight-card.rank-1 { border-color: rgba(232,255,74,0.35); }
.spotlight-card.rank-2 { border-color: rgba(96,165,250,0.25); }
.spotlight-card.rank-3 { border-color: rgba(240,237,232,0.12); }

.spotlight-card.rank-1::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}

.spotlight-card.rank-2::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--week);
}

.spotlight-rank {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
}

.rank-1 .spotlight-rank { color: var(--accent); }
.rank-2 .spotlight-rank { color: var(--week); }
.rank-3 .spotlight-rank { color: var(--fg-muted); }

.spotlight-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 8px;
}

.spotlight-deadline {
  font-size: 12px;
  font-weight: 600;
  color: var(--blocked);
  margin-bottom: 8px;
}

.spotlight-reason {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.spotlight-score {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ── List section ──────────────────────────────────────────────────────── */

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.list-header .section-label { margin-bottom: 0; }

/* ── Add form ──────────────────────────────────────────────────────────── */

.add-form {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-form.hidden { display: none; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
}

.input-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.input-text:focus { border-color: rgba(232,255,74,0.4); }
.input-text::placeholder { color: var(--fg-muted); }
.input-date { color-scheme: dark; }

.input-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  width: 100%;
}

.input-textarea:focus { border-color: rgba(232,255,74,0.4); }
.input-textarea::placeholder { color: var(--fg-muted); }

.form-actions { display: flex; gap: 8px; }

.btn-primary {
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--fg-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover { border-color: rgba(232,255,74,0.3); color: var(--fg); }

/* ── Task list rows ────────────────────────────────────────────────────── */

.task-list { display: flex; flex-direction: column; gap: 4px; }

.task-list-empty {
  color: var(--fg-muted);
  font-size: 14px;
  padding: 32px 0;
}

.tl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.tl-row:hover { border-color: rgba(232,255,74,0.15); }

.tl-row.status-done { opacity: 0.5; }
.tl-row.status-blocked { border-color: rgba(248,113,113,0.2); }

.tl-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.tl-rank {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-muted);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.tl-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tl-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-done { text-decoration: line-through; color: var(--fg-muted); }

.tl-deadline {
  font-size: 11px;
  color: var(--blocked);
  font-weight: 600;
}

.tl-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.status-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--fg-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.btn-delete {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.btn-delete:hover { color: var(--blocked); background: rgba(248,113,113,0.1); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .db-main { padding: 88px 16px 48px; }
  .form-row { grid-template-columns: 1fr; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .tl-title { max-width: 160px; }
}
