/* Proyek - papan kerja internal holding. Gaya ringkas selaras mitra.css. */
* { box-sizing: border-box; margin: 0; }
:root {
  --py-green: #165f49;
  --py-green-dark: #0e4534;
  --py-bg: #f1f5f4;
  --py-card: #ffffff;
  --py-border: #e2e8f0;
  --py-text: #1f2937;
  --py-muted: #6b7280;
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--py-bg); color: var(--py-text); min-height: 100vh; }

.py-header {
  background: var(--py-green); color: #fff; padding: 0.8rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 20;
}
.py-header h1 { font-size: 1.05rem; font-weight: 700; }
.py-header h1 a { color: inherit; text-decoration: none; }
.py-header .sub { font-size: 0.72rem; opacity: 0.85; }
.py-header button {
  background: rgba(255,255,255,0.14); color: #fff; border: none; border-radius: 0.5rem;
  padding: 0.45rem 0.9rem; font-size: 0.8rem; cursor: pointer;
}
.py-container { max-width: 1080px; margin: 0 auto; padding: 1.2rem; }
.py-container-wide { max-width: none; padding: 1.2rem; }

.py-loading { text-align: center; color: var(--py-muted); padding: 3rem 0; }
.py-boot-error { background: #fff; border: 1px solid #fecaca; border-radius: 0.8rem; padding: 1.4rem; margin: 2rem auto; max-width: 560px; color: #991b1b; }
.py-boot-error .sub { color: var(--py-muted); font-size: 0.85rem; margin-top: 0.5rem; }

.py-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; }
.py-card {
  background: var(--py-card); border: 1px solid var(--py-border); border-radius: 0.8rem;
  padding: 1rem; text-decoration: none; color: inherit; display: block; transition: box-shadow 0.15s;
}
.py-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.py-card h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.py-card p { font-size: 0.8rem; color: var(--py-muted); }
.py-card .chip { display: inline-block; font-size: 0.68rem; border-radius: 0.4rem; padding: 0.1rem 0.45rem; background: #ecfdf5; color: #047857; margin-top: 0.5rem; }
.py-card-new { border-style: dashed; text-align: center; color: var(--py-muted); cursor: pointer; background: transparent; width: 100%; font-size: 0.9rem; padding: 1.6rem 1rem; border-radius: 0.8rem; border: 2px dashed var(--py-border); }
.py-card-new:hover { color: var(--py-green); border-color: var(--py-green); }

.py-section-title { font-size: 0.85rem; font-weight: 600; color: var(--py-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 1.4rem 0 0.7rem; }

/* Kanban board */
.py-board-scroll { overflow-x: auto; padding-bottom: 1rem; }
.py-board { display: flex; gap: 0.9rem; align-items: flex-start; min-height: 60vh; }
.py-list {
  background: #e8eeec; border-radius: 0.8rem; width: 290px; flex: 0 0 290px;
  padding: 0.7rem; display: flex; flex-direction: column; gap: 0.55rem; max-height: 78vh;
}
.py-list-head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0 0.2rem; }
.py-list-head h4 { font-size: 0.86rem; font-weight: 700; }
.py-list-head button { background: none; border: none; color: var(--py-muted); cursor: pointer; font-size: 0.78rem; }
.py-list-cards { display: flex; flex-direction: column; gap: 0.5rem; overflow-y: auto; }
.py-kcard {
  background: #fff; border-radius: 0.6rem; border: 1px solid var(--py-border);
  padding: 0.6rem 0.7rem; font-size: 0.84rem; cursor: pointer;
}
.py-kcard:hover { border-color: var(--py-green); }
.py-kcard .meta { display: flex; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.7rem; color: var(--py-muted); flex-wrap: wrap; }
.py-kcard .label-dot { display: inline-block; width: 26px; height: 7px; border-radius: 4px; margin-right: 3px; }
.py-kcard.done { opacity: 0.65; }
.py-kcard.done .title { text-decoration: line-through; }
.py-add-inline { background: none; border: none; color: var(--py-muted); text-align: left; padding: 0.3rem 0.2rem; font-size: 0.8rem; cursor: pointer; border-radius: 0.4rem; }
.py-add-inline:hover { background: rgba(0,0,0,0.05); color: var(--py-text); }
.py-list-new { background: rgba(232,238,236,0.6); border: 2px dashed var(--py-border); color: var(--py-muted); border-radius: 0.8rem; width: 290px; flex: 0 0 290px; padding: 0.9rem; cursor: pointer; font-size: 0.85rem; text-align: center; }

/* Modal */
.py-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
.py-modal {
  position: fixed; z-index: 50; left: 50%; top: 6%; transform: translateX(-50%);
  width: min(620px, 94vw); max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 0.9rem; padding: 1.2rem; box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}
.py-modal h3 { font-size: 1rem; margin-bottom: 0.7rem; }
.py-modal label { display: block; font-size: 0.76rem; color: var(--py-muted); margin: 0.7rem 0 0.25rem; }
.py-input, .py-textarea, .py-select {
  width: 100%; border: 1px solid var(--py-border); border-radius: 0.5rem;
  padding: 0.5rem 0.65rem; font-size: 0.86rem; font-family: inherit; background: #fff;
}
.py-textarea { min-height: 70px; resize: vertical; }
.py-btn {
  background: var(--py-green); color: #fff; border: none; border-radius: 0.5rem;
  padding: 0.5rem 1rem; font-size: 0.84rem; cursor: pointer;
}
.py-btn:disabled { opacity: 0.5; cursor: default; }
.py-btn-ghost { background: #fff; color: var(--py-text); border: 1px solid var(--py-border); }
.py-btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.py-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.py-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.py-checklist-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; font-size: 0.85rem; }
.py-checklist-item input[type="checkbox"] { accent-color: var(--py-green); }
.py-checklist-item.checked span { text-decoration: line-through; color: var(--py-muted); }
.py-label-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: #fff; border-radius: 0.4rem; padding: 0.15rem 0.5rem; margin: 0 0.25rem 0.25rem 0; }
.py-label-chip button { background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; font-size: 0.7rem; padding: 0; }
.py-member-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; background: #eef2ff; color: #3730a3; border-radius: 0.4rem; padding: 0.15rem 0.5rem; margin: 0 0.25rem 0.25rem 0; }

.py-toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 60;
  padding: 0.6rem 1.1rem; border-radius: 0.6rem; font-size: 0.85rem; color: #fff;
}
.py-toast-ok { background: #047857; }
.py-toast-err { background: #b91c1c; }
.hidden { display: none; }
.mr-2 { margin-right: 0.5rem; }
