/* =============================================================
   PMS — Components (p-* namespace)
   ============================================================= */

/* ─── Card ─── */
.p-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.p-card--glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.p-card--bordered { border-color: var(--border-strong); }
.p-card--aurora:hover {
  border-color: var(--border-indigo);
  background-image: var(--aurora);
  background-size: 200% 200%;
  animation: p-aurora-shift 6s ease infinite;
}

.p-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.p-card__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.p-card__head h3 i { color: var(--indigo); font-size: 13px; }

.p-card__body { padding: 16px; }

/* ─── KPI ─── */
.p-kpi {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
  cursor: pointer;
}
.p-kpi:hover {
  border-color: var(--border-indigo);
  transform: translateY(-1px);
  background-image: var(--aurora);
}

.p-kpi__icon {
  width: 36px; height: 36px;
  border-radius: var(--r);
  background: var(--indigo-soft);
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(129,140,248,0.20);
}
.p-kpi__icon--violet { background: var(--violet-soft); color: var(--violet); box-shadow: 0 0 14px rgba(167,139,250,0.20); }
.p-kpi__icon--teal   { background: var(--teal-soft);   color: var(--teal);   box-shadow: 0 0 14px rgba(45,212,191,0.20); }
.p-kpi__icon--rose   { background: var(--rose-soft);   color: var(--rose);   box-shadow: 0 0 14px rgba(251,113,133,0.20); }
.p-kpi__icon--amber  { background: var(--st-review-soft); color: var(--st-review); box-shadow: 0 0 14px rgba(251,191,36,0.20); }
.p-kpi__icon--blue   { background: var(--st-progress-soft); color: var(--st-progress); box-shadow: 0 0 14px rgba(96,165,250,0.20); }

.p-kpi__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.p-kpi__value {
  font-family: var(--en);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.p-kpi__label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.p-kpi__delta {
  font-family: var(--en);
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.p-kpi__delta--up   { color: var(--st-done); }
.p-kpi__delta--down { color: var(--st-blocked); }
.p-kpi__delta--flat { color: var(--text-dim); }

.p-kpi__spark {
  position: absolute;
  bottom: 8px; right: 10px;
  width: 60px; height: 18px;
  opacity: 0.55;
  pointer-events: none;
}
.p-kpi__spark path { fill: none; stroke: var(--indigo); stroke-width: 1.5; stroke-linejoin: round; }

/* ─── Status Chip (5종) ─── */
.p-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.p-status-chip__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.p-status-chip--wait     { background: var(--st-wait-soft);     color: var(--st-wait);     border-color: rgba(148,163,184,0.30); }
.p-status-chip--progress { background: var(--st-progress-soft); color: var(--st-progress); border-color: rgba(96,165,250,0.30); }
.p-status-chip--progress .p-status-chip__dot { animation: p-pulse 1.6s ease-in-out infinite; box-shadow: 0 0 6px currentColor; }
.p-status-chip--review   { background: var(--st-review-soft);   color: var(--st-review);   border-color: rgba(251,191,36,0.30); }
.p-status-chip--done     { background: var(--st-done-soft);     color: var(--st-done);     border-color: rgba(52,211,153,0.30); }
.p-status-chip--blocked  { background: var(--st-blocked-soft);  color: var(--st-blocked);  border-color: rgba(248,113,113,0.30); }

/* ─── Priority Chip (4종) ─── */
.p-pri-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--en);
}
.p-pri-chip--urgent { background: var(--pri-urgent); color: #fff; box-shadow: 0 0 10px rgba(244,63,94,0.45); animation: p-pulse 1.8s ease-in-out infinite; }
.p-pri-chip--high   { background: var(--pri-high);   color: #fff; }
.p-pri-chip--mid    { background: var(--pri-mid);    color: #fff; }
.p-pri-chip--low    { background: var(--pri-low);    color: #fff; }

/* soft variant */
.p-pri-chip--soft.p-pri-chip--urgent { background: var(--pri-urgent-soft); color: var(--pri-urgent); box-shadow: none; animation: none; }
.p-pri-chip--soft.p-pri-chip--high   { background: var(--pri-high-soft);   color: var(--pri-high); }
.p-pri-chip--soft.p-pri-chip--mid    { background: var(--pri-mid-soft);    color: var(--pri-mid); }
.p-pri-chip--soft.p-pri-chip--low    { background: var(--pri-low-soft);    color: var(--pri-low); }

/* ─── Tag ─── */
.p-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.p-tag--indigo { background: var(--indigo-soft); color: var(--indigo); }
.p-tag--violet { background: var(--violet-soft); color: var(--violet); }
.p-tag--teal   { background: var(--teal-soft);   color: var(--teal); }
.p-tag--rose   { background: var(--rose-soft);   color: var(--rose); }
.p-tag--solid {
  background: var(--indigo-grad);
  color: #fff;
  box-shadow: var(--indigo-glow);
}

/* ─── Progress ─── */
.p-progress {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.p-progress__fill {
  height: 100%;
  background: var(--indigo-grad);
  border-radius: 3px;
  transition: width var(--t-slow) var(--ease);
}
.p-progress--gradient .p-progress__fill {
  background: linear-gradient(90deg, var(--indigo) 0%, var(--violet) 100%);
}
.p-progress--lg { height: 8px; border-radius: 4px; }
.p-progress--lg .p-progress__fill { border-radius: 4px; }

.p-progress--segment {
  display: flex;
  gap: 2px;
  background: transparent;
  height: 8px;
}
.p-progress--segment .p-progress__seg {
  flex: 1;
  background: var(--surface-3);
  border-radius: 2px;
}
.p-progress--segment .p-progress__seg.is-on { background: var(--indigo); box-shadow: 0 0 6px var(--indigo); }

/* ─── Avatar ─── */
.p-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--indigo-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid var(--bg-elevated);
  flex-shrink: 0;
}
.p-avatar--xs { width: 22px; height: 22px; font-size: 9px; border-width: 1.5px; }
.p-avatar--sm { width: 26px; height: 26px; font-size: 10px; }
.p-avatar--md { width: 32px; height: 32px; font-size: 12px; }
.p-avatar--lg { width: 40px; height: 40px; font-size: 14px; }

.p-avatar--violet { background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%); }
.p-avatar--teal   { background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 100%); color: #022; }
.p-avatar--rose   { background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%); color: #401; }
.p-avatar--amber  { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%); color: #321; }

.p-avatar-stack {
  display: inline-flex;
  align-items: center;
}
.p-avatar-stack .p-avatar { margin-left: -8px; }
.p-avatar-stack .p-avatar:first-child { margin-left: 0; }
.p-avatar-stack__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  border: 2px solid var(--bg-elevated);
  margin-left: -8px;
}

/* ─── Table ─── */
.p-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
}
.p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.p-table thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.p-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-faint);
  color: var(--text);
  vertical-align: middle;
}
.p-table tbody tr {
  transition: background var(--t-fast) var(--ease);
}
.p-table tbody tr:hover { background: var(--surface); }
.p-table tbody tr:last-child td { border-bottom: none; }

.p-table .--code   { font-family: var(--mono); font-size: 11px; color: var(--text-muted); letter-spacing: -0.01em; }
.p-table .--num    { font-family: var(--en); font-variant-numeric: tabular-nums; text-align: right; }
.p-table .--center { text-align: center; }
.p-table .--right  { text-align: right; }

.p-table--compact tbody td { padding: 7px 12px; }
.p-table--clickable tbody tr { cursor: pointer; }
.p-table--clickable tbody tr:hover { background: var(--indigo-soft); box-shadow: inset 3px 0 0 var(--indigo); }

/* ─── Filter Tabs ─── */
.p-filter-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  gap: 2px;
}
.p-filter-tabs button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 5px;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.p-filter-tabs button:hover { color: var(--text); }
.p-filter-tabs button.is-active {
  background: var(--indigo-soft);
  color: var(--indigo);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.p-filter-tabs button .p-tag {
  background: var(--surface-3);
  font-size: 9px;
  padding: 1px 5px;
}
.p-filter-tabs button.is-active .p-tag { background: var(--indigo); color: #fff; }

/* ─── Select ─── */
.p-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 32px 0 12px;
  height: 32px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23a3a3a3' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all var(--t-fast) var(--ease);
}
.p-select:hover { border-color: var(--border-strong); }
.p-select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: var(--ring-indigo);
}
.p-select option,
.p-form-group select option {
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
}
.p-select option:checked,
.p-form-group select option:checked {
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 600;
}

/* ─── Input ─── */
.p-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 12px;
  height: 32px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.p-input:hover { border-color: var(--border-strong); }
.p-input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: var(--ring-indigo);
}
.p-input::placeholder { color: var(--text-faint); }

/* ─── Button ─── */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.p-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.p-btn:active { transform: translateY(1px); }
.p-btn i { font-size: 11px; }

.p-btn--primary {
  background: var(--indigo-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--indigo-glow);
}
.p-btn--primary:hover {
  background: var(--indigo-grad);
  filter: brightness(1.08);
  border-color: transparent;
}

.p-btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.p-btn--ghost:hover { color: var(--indigo); border-color: var(--border-indigo); background: var(--indigo-soft); }

.p-btn--danger {
  background: var(--rose-soft);
  border-color: rgba(251,113,133,0.30);
  color: var(--rose);
}
.p-btn--danger:hover { background: rgba(251,113,133,0.16); }

.p-btn--aurora {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #34d399 100%);
  background-size: 200% 200%;
  border-color: transparent;
  color: #fff;
  animation: p-aurora-shift 5s ease infinite;
}

.p-btn--sm  { height: 26px; padding: 0 10px; font-size: 11px; }
.p-btn--lg  { height: 40px; padding: 0 18px; font-size: 13px; }
.p-btn--icon { padding: 0; width: 32px; }

/* ─── Toast ─── */
.p-toast-stack {
  position: fixed;
  top: calc(var(--topbar-h) + 14px);
  right: 14px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 360px;
}
.p-toast {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  animation: p-fade-up 240ms var(--ease);
  min-width: 240px;
}
.p-toast i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.p-toast b { display: block; font-weight: 700; color: var(--text); }
.p-toast__sub { color: var(--text-dim); font-size: 11px; margin-top: 2px; }

.p-toast--info { border-left: 3px solid var(--indigo); }
.p-toast--info i { color: var(--indigo); }
.p-toast--ok   { border-left: 3px solid var(--st-done); }
.p-toast--ok i { color: var(--st-done); }
.p-toast--warn { border-left: 3px solid var(--st-review); }
.p-toast--warn i { color: var(--st-review); }
.p-toast--err  { border-left: 3px solid var(--rose); }
.p-toast--err i { color: var(--rose); }

/* ─── Empty state ─── */
.p-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.p-empty i { font-size: 36px; margin-bottom: 12px; color: var(--text-faint); }
.p-empty b  { display: block; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.p-empty span { font-size: 11px; }

/* ─── Kanban ─── */
.p-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.p-kanban__col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  transition: border-color var(--t-base);
}
.p-kanban__col.is-drop-target {
  border-color: var(--indigo);
  box-shadow: var(--shadow-indigo);
}
.p-kanban__col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.p-kanban__col-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--st-wait);
  border-radius: 2px 2px 0 0;
}
.p-kanban__col[data-status="progress"] .p-kanban__col-head::before { background: var(--st-progress); }
.p-kanban__col[data-status="review"]   .p-kanban__col-head::before { background: var(--st-review); }
.p-kanban__col[data-status="done"]     .p-kanban__col-head::before { background: var(--st-done); }
.p-kanban__col-head h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.p-kanban__col-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: var(--r-pill);
}
.p-kanban__wip {
  font-family: var(--en);
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.p-kanban__wip.is-over { color: var(--rose); }

.p-kanban__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
}

.p-kanban__card {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  cursor: grab;
  transition: all var(--t-fast) var(--ease);
  position: relative;
}
.p-kanban__card:hover {
  border-color: var(--border-indigo);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.p-kanban__card.is-dragging { opacity: 0.4; cursor: grabbing; }
.p-kanban__card--blocked { border-left: 3px solid var(--rose); animation: p-blocked-pulse 2.4s ease-in-out infinite; }
.p-kanban__card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.p-kanban__card h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.p-kanban__card footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-dim);
}
.p-kanban__card footer .p-avatar { margin-right: 0; }
.p-kanban__card footer span { display: inline-flex; align-items: center; gap: 4px; }
.p-kanban__card-age {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  margin-left: auto;
}
.p-kanban__card-age.is-stale { color: var(--st-review); }
.p-kanban__card-age.is-old   { color: var(--rose); }

/* ─── Gantt ─── */
.p-gantt-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elevated);
}
.p-gantt__tree {
  border-right: 1px solid var(--border);
  background: var(--bg-deep);
}
.p-gantt__tree-head {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.p-gantt__tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-faint);
}
.p-gantt__tree-row.is-group { font-weight: 700; background: var(--surface); }
.p-gantt__tree-row.is-sub { padding-left: 32px; color: var(--text-muted); font-size: 11px; }

.p-gantt {
  display: block;
  width: 100%;
  height: auto;
}
.p-gantt__bar {
  fill: var(--indigo-soft);
  stroke: var(--indigo);
  stroke-width: 1;
  rx: 4;
}
.p-gantt__progress {
  fill: var(--indigo);
  filter: drop-shadow(0 0 6px rgba(129,140,248,0.40));
  rx: 4;
}
.p-gantt__bar--blocked { fill: rgba(248,113,113,0.20); stroke: var(--rose); }
.p-gantt__bar--done { fill: rgba(52,211,153,0.18); stroke: var(--st-done); }
.p-gantt__label {
  font-family: var(--kr);
  font-size: 10px;
  font-weight: 600;
  fill: var(--text);
  pointer-events: none;
}
.p-gantt__dep {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
  marker-end: url(#p-gantt-arrow);
}
.p-gantt__milestone {
  fill: var(--st-review);
  filter: drop-shadow(0 0 6px var(--st-review));
}
.p-gantt__today {
  stroke: var(--rose);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.p-gantt__today-label {
  font-family: var(--en);
  font-size: 9px;
  font-weight: 800;
  fill: var(--rose);
  letter-spacing: 0.10em;
}
.p-gantt__grid { stroke: var(--border-faint); stroke-width: 1; }
.p-gantt__grid--strong { stroke: var(--border); stroke-width: 1; }
.p-gantt__date {
  font-family: var(--en);
  font-size: 9px;
  font-weight: 700;
  fill: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ─── Burndown / Velocity / CFD chart shared ─── */
.p-chart {
  width: 100%;
  height: 280px;
  display: block;
}
.p-chart__axis      { stroke: var(--border); stroke-width: 1; }
.p-chart__grid      { stroke: var(--border-faint); stroke-width: 1; stroke-dasharray: 2 4; }
.p-chart__label     { font-family: var(--mono); font-size: 9px; fill: var(--text-faint); letter-spacing: 0.04em; }

/* Burndown */
.p-burndown__ideal  { fill: none; stroke: var(--text-faint); stroke-width: 1.5; stroke-dasharray: 4 4; }
.p-burndown__actual { fill: none; stroke: var(--indigo); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(129,140,248,0.4)); }
.p-burndown__area-ahead  { fill: rgba(52,211,153,0.10); }
.p-burndown__area-behind { fill: rgba(251,113,133,0.10); }
.p-burndown__dot { fill: var(--indigo); stroke: var(--bg-elevated); stroke-width: 2; r: 3; }

/* Velocity */
.p-velocity__bar { fill: url(#p-velocity-grad); }
.p-velocity__avg { stroke: var(--violet); stroke-width: 1.5; stroke-dasharray: 4 4; }

/* CFD */
.p-cfd__area-wait     { fill: rgba(148,163,184,0.45); }
.p-cfd__area-progress { fill: rgba(96,165,250,0.55); }
.p-cfd__area-review   { fill: rgba(251,191,36,0.55); }
.p-cfd__area-done     { fill: rgba(52,211,153,0.55); }

/* ─── Risk Matrix (5×5) ─── */
.p-risk-matrix {
  display: grid;
  grid-template-columns: 28px repeat(5, 1fr);
  grid-template-rows: repeat(5, 56px) 28px;
  gap: 4px;
  padding: 14px;
}
.p-risk-matrix__cell {
  border-radius: var(--r-sm);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}
.p-risk-matrix__cell:hover { transform: scale(1.05); z-index: 5; }
.p-risk-matrix__cell--lv1 { background: rgba(52,211,153,0.20);  color: var(--st-done); }
.p-risk-matrix__cell--lv2 { background: rgba(125,211,252,0.20); color: var(--st-progress); }
.p-risk-matrix__cell--lv3 { background: rgba(251,191,36,0.22);  color: var(--st-review); }
.p-risk-matrix__cell--lv4 { background: rgba(251,146,60,0.25);  color: #fb923c; }
.p-risk-matrix__cell--lv5 { background: rgba(248,113,113,0.30); color: var(--rose); }
.p-risk-matrix__lbl {
  font-family: var(--en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Workload Gauge (반원) ─── */
.p-workload {
  position: relative;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 2 / 1;
}
.p-workload svg { width: 100%; height: 100%; display: block; }
.p-workload__track { stroke: var(--surface-3); stroke-width: 10; fill: none; stroke-linecap: round; }
.p-workload__fill  { stroke: var(--st-done); stroke-width: 10; fill: none; stroke-linecap: round; transition: stroke-dasharray var(--t-slow) var(--ease), stroke var(--t-base); filter: drop-shadow(0 0 8px currentColor); }
.p-workload__fill.is-amber { stroke: var(--st-review); }
.p-workload__fill.is-red   { stroke: var(--rose); }
.p-workload__value {
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%);
  font-family: var(--en);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.p-workload__label {
  position: absolute;
  left: 50%; bottom: -16px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ─── Timeline (수평 마일스톤) ─── */
.p-timeline {
  position: relative;
  height: 110px;
  padding: 30px 14px 14px;
}
.p-timeline__track {
  position: absolute;
  left: 14px; right: 14px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--surface-3), var(--border-strong), var(--surface-3));
  border-radius: 1px;
}
.p-timeline__node {
  position: absolute;
  top: calc(50% - 8px);
  width: 16px; height: 16px;
  background: var(--bg);
  border: 2px solid var(--indigo);
  transform: rotate(45deg);
  cursor: pointer;
  transition: all var(--t-base);
  z-index: 2;
}
.p-timeline__node.is-done    { background: var(--st-done); border-color: var(--st-done); box-shadow: 0 0 8px var(--st-done); }
.p-timeline__node.is-current { background: var(--indigo); box-shadow: var(--indigo-glow); }
.p-timeline__node.is-late    { background: var(--rose); border-color: var(--rose); animation: p-pulse 1.6s ease-in-out infinite; }
.p-timeline__node:hover { transform: rotate(45deg) scale(1.3); z-index: 5; }
.p-timeline__node-label {
  position: absolute;
  left: 50%; bottom: calc(100% + 6px);
  transform: rotate(-45deg) translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}
.p-timeline__today {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--rose);
  box-shadow: 0 0 6px var(--rose);
  pointer-events: none;
  z-index: 3;
}
.p-timeline__today::after {
  content: 'TODAY';
  position: absolute;
  top: 4px; left: 4px;
  font-family: var(--en);
  font-size: 9px;
  font-weight: 800;
  color: var(--rose);
  letter-spacing: 0.10em;
}

/* ─── Sparkline (KPI 내부) ─── */
.p-spark { width: 100%; height: 22px; display: block; }
.p-spark__line { fill: none; stroke: var(--indigo); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.p-spark__area { fill: url(#p-spark-grad); }

/* ─── Section Title ─── */
.p-section-title {
  font-family: var(--en);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

/* ─── Heatmap Cell (팀 매트릭스용) ─── */
.p-heatmap {
  display: grid;
  gap: 3px;
}
.p-heatmap__cell {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: 3px;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.p-heatmap__cell:hover { transform: scale(1.15); z-index: 2; }
.p-heatmap__cell.--lv1 { background: rgba(129,140,248,0.16); }
.p-heatmap__cell.--lv2 { background: rgba(129,140,248,0.32); }
.p-heatmap__cell.--lv3 { background: rgba(129,140,248,0.50); }
.p-heatmap__cell.--lv4 { background: rgba(129,140,248,0.70); }
.p-heatmap__cell.--lv5 { background: var(--indigo); box-shadow: 0 0 8px var(--indigo); }

/* ─── List Row (활동 타임라인) ─── */
.p-activity {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.p-activity__row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-faint);
  position: relative;
}
.p-activity__row:last-child { border-bottom: none; }
.p-activity__icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}
.p-activity__body { flex: 1; min-width: 0; }
.p-activity__body b { font-weight: 700; }
.p-activity__time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─── Modal ─── */
.p-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: p-fade-in 200ms var(--ease);
}
.p-modal-backdrop.is-open { display: flex; }

.p-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: p-pop 240ms var(--ease);
}
.p-modal--lg { max-width: 720px; }
.p-modal--xl { max-width: 960px; }
.p-modal--sm { max-width: 440px; }

.p-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.p-modal__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-modal__head h3 i { color: var(--indigo); font-size: 13px; }
.p-modal__close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.p-modal__close:hover { background: var(--surface-2); color: var(--text); }

.p-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.p-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  flex-shrink: 0;
}

/* 폼 그리드 (모달 내부) */
.p-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.p-form-grid > .--full { grid-column: 1 / -1; }
.p-form-group { display: flex; flex-direction: column; gap: 6px; }
.p-form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.p-form-group label span { color: var(--rose); margin-left: 2px; }
.p-form-group input,
.p-form-group select,
.p-form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  padding: 8px 10px;
  transition: all var(--t-fast);
}
.p-form-group input:focus,
.p-form-group select:focus,
.p-form-group textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: var(--ring-indigo);
}
.p-form-group textarea { resize: vertical; min-height: 70px; font-family: inherit; }

/* 상세 정의 리스트 */
.p-def-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}
.p-def-grid > .--full { grid-column: 1 / -1; }
.p-def {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.p-def__lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.p-def__val { font-size: 13px; color: var(--text); }

/* 상태 변경 버튼 그룹 */
.p-status-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.p-status-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.p-status-btn i { font-size: 13px; }
.p-status-btn:hover { border-color: var(--border-indigo); color: var(--text); }
.p-status-btn.is-active {
  background: var(--indigo-soft);
  border-color: var(--indigo);
  color: var(--indigo);
  box-shadow: var(--shadow-indigo);
}

/* 코멘트 */
.p-comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 240px;
  overflow-y: auto;
}
.p-comment {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--r);
}
.p-comment__body { flex: 1; min-width: 0; }
.p-comment__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}
.p-comment__meta b { font-weight: 700; }
.p-comment__meta span { color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
.p-comment__text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.p-comment-form {
  display: flex;
  gap: 8px;
}
.p-comment-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  padding: 0 12px;
  height: 34px;
}
.p-comment-form input:focus {
  outline: none; border-color: var(--indigo); box-shadow: var(--ring-indigo);
}

/* ─── Pagination ─── */
.p-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 20px 0 0;
}
.p-page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--en);
  cursor: pointer;
  transition: all var(--t-fast);
}
.p-page-btn:hover { color: var(--text); border-color: var(--border-strong); }
.p-page-btn.is-active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: var(--indigo-glow);
}

/* ─── Mobile PC notice ─── */
.p-mobile-pc-toast {
  display: none;
  position: fixed;
  top: 12px; left: 12px; right: 12px;
  z-index: 99999;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-radius: var(--r-md);
  border: 1px solid var(--border-indigo);
  box-shadow: var(--shadow-md);
  font-size: 12px;
}
.p-mobile-pc-toast i:first-child { color: var(--indigo); flex-shrink: 0; }
.p-mobile-pc-toast span { color: var(--text); flex: 1; font-weight: 600; }
.p-mobile-pc-toast button {
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  padding: 4px 6px; border-radius: 4px;
}
.p-mobile-pc-toast button:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 768px) {
  .p-mobile-pc-toast { display: flex; }
}
