/* ─── Projects Layout ───────────────────────────────────────── */
body { padding-top: 68px; }

.proj-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
  max-width: 1400px;
  margin: 0 auto;
}
.proj-main { padding: 28px 32px; background: var(--slate-pale); }

.proj-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.proj-header h1 {
  font-family: var(--font-serif); font-size: 26px;
  font-weight: 800; color: var(--text); margin-bottom: 2px;
}
.proj-header p { font-size: 13px; color: var(--text-3); }
.proj-header-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ─── Project Card ───────────────────────────────────────────── */
#proj-list { display: flex; flex-direction: column; gap: 16px; }

.proj-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.proj-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.proj-card-header {
  padding: 20px 24px 0;
  display: flex; align-items: flex-start; gap: 16px;
}
.proj-status-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.proj-status-icon.active    { background: #dcfce7; }
.proj-status-icon.completed { background: var(--blue-pale); }
.proj-status-icon.paused    { background: var(--gold-pale); }

.proj-card-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin-bottom: 4px; line-height: 1.3;
}
.proj-card-lead { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.proj-card-desc {
  padding: 0 24px 14px;
  font-size: 14px; color: var(--text-2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--slate-pale);
}
.proj-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.proj-card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); flex-shrink: 0; }

/* ─── Milestone posts ────────────────────────────────────────── */
.milestone-banner {
  background: linear-gradient(135deg, var(--blue-pale), var(--emerald-pale));
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 10px;
}
.milestone-icon { font-size: 20px; flex-shrink: 0; }
.milestone-body { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.milestone-body strong { color: var(--text); }
.milestone-date { font-size: 11px; color: var(--text-4); margin-top: 3px; }

.update-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.update-item:last-child { border-bottom: none; }
.update-meta { font-size: 11px; color: var(--text-4); margin-bottom: 4px; }

/* ─── Celebrate banner ───────────────────────────────────────── */
.celebrate-card {
  background: linear-gradient(135deg, var(--blue) 0%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 16px;
  color: #fff;
}
.celebrate-icon { font-size: 40px; margin-bottom: 10px; }
.celebrate-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.celebrate-card p { font-size: 14px; opacity: .85; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .proj-layout { grid-template-columns: 1fr; }
  .proj-main { padding: 20px 16px; }
}

.drawer-backdrop.hidden,
.modal-backdrop.hidden,
.entity-modal.hidden    { display: none; }

/* ─── Form fields ────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.form-field .req { color: var(--blue); margin-left: 2px; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,79,214,.1);
}
.form-field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.form-error { font-size: 13px; color: #dc2626; min-height: 18px; }

/* ─── New Project Modal ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
}
.entity-modal {
  position: fixed; inset: 0;
  z-index: 201;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.entity-modal-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  pointer-events: all;
  overflow: hidden;
}
.entity-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.entity-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--text-3);
  padding: 4px 8px; border-radius: 6px; line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--slate-pale); }
.entity-modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--slate-pale);
}

/* ─── Vertical chip picker ──────────────────────────────────── */
.vp-group { margin-bottom: 12px; }
.vp-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 8px;
}
.vp-group-label.spiritual { color: var(--blue); }
.vp-group-label.physical  { color: var(--emerald); }
.vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-chip { cursor: pointer; user-select: none; }
.vp-chip input { display: none; }
.vp-chip span {
  display: inline-block;
  padding: 5px 12px;
  border: 1.5px solid var(--border-2);
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  background: var(--white);
  transition: all .15s;
}
.vp-chip input:checked + span {
  background: var(--blue-pale);
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}
