/* design polish: Project Management 40K View, New task, task popup (loaded after app.css) */

/* 1. page frame */
.main.pm { padding-bottom: var(--dock-clear, 144px); }
.main.pm .pm-head { margin-bottom: 32px; }

/* 2. the + beside the read-out: a small secondary pill */
.pm-head-right .pm-new { width: auto; min-width: var(--btn-h-sm, 36px); height: var(--btn-h-sm, 36px); padding: 0 12px; border: 1px solid var(--btn-border, rgba(255, 255, 255, .22)); border-radius: 999px; background: none; color: var(--text); box-shadow: none; transition: background-color .15s; }
.pm-head-right .pm-new svg { width: 18px; height: 18px; }
@media (hover: hover) {
  .pm-head-right .pm-new:hover { background: rgba(255, 255, 255, .06); background-color: rgba(255, 255, 255, .06); }
}

/* 3. tip cards */
.pm-principles { gap: 12px; margin-top: 32px; }
.pm-principles > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: none; }
.pm-principles .pm-label { color: var(--muted); font-size: var(--fs-cap, 11px); line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pm-principles p { margin-top: 6px; font-size: var(--fs-meta, 13px); line-height: 20px; }

/* 4-5. 40K cards */
.pm-card { border-radius: var(--r-md, 14px); }
.pm-card .pm-cyc { white-space: nowrap; flex: none; }
.pm-card-top { min-width: 0; }
.pm-next b { margin-right: 4px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.pm-prog { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.pm-prog i { min-width: 6px; border-radius: inherit; }

/* 6. lanes */
.pm-lanes-wrap { border-radius: var(--r-lg, 20px); }
.pm-area { padding: 12px 0; }
.pm-cell:not(:has(.pm-card)) { background: rgba(255, 255, 255, .015); }
.pm-cell.over { border-color: var(--accent); background: rgba(52, 211, 153, .06); }

/* 7. key in the same order as the bar: Done, In motion, Waiting, Up next */
.pm-key span:nth-child(4) { order: -1; }
.pm-key span:nth-child(1) { order: 1; }

/* 8. one field height, one label style, one notes box (New task + task popup) */
.pm-compose-row.bottom select,
.pm-compose-row.bottom .btn,
.pm-ed input:not([type=checkbox]),
.pm-ed select,
.pm-place select,
.pm-ed-title .pm-title-in { height: var(--field-h, 44px); }
.pm-add-modal .field label.pm-label,
.pm-compose .field label.pm-label,
.pm-ed .pm-flabel label { margin-bottom: 0; color: var(--muted); font-size: var(--label-fs, 13px); font-weight: 500; line-height: 18px; }
.pm-compose .field, .pm-add-modal .field, .pm-ed .field { gap: 6px; } /* the field's gap is the 6px label-to-field space */
.pm-compose textarea, .pm-notes #pmf-note { border-color: var(--field-border, rgba(255, 255, 255, .16)); background: var(--field-bg, rgba(255, 255, 255, .06)); resize: none; }

/* 9. checkboxes */
.pm-check-row input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; margin: 0; border: 1.5px solid var(--field-border-hover, rgba(255, 255, 255, .28)); border-radius: 6px; background: rgba(255, 255, 255, .04); cursor: pointer; transition: background-color .15s, border-color .15s; }
.pm-check-row input[type=checkbox]:checked { border-color: transparent; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e0f12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pm-check-row input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-check-row input[type=checkbox]:disabled { cursor: default; opacity: .5; }

/* 11. the Tile box nested inside More: a divider, not a box in a box */
.pm-more .pm-more { margin: 4px -14px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.pm-more .pm-more > .pm-ed { padding: 2px 14px 0; }

/* 12. task popup poster number */
.pm-big b { color: var(--accent); font-family: var(--display); font-size: 64px; font-weight: 400; line-height: .9; letter-spacing: .01em; }
.pm-big span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* 13. footer: Delete as the quiet tertiary, beside Finish at the same height */
.pm-notes-foot #pm-delete { height: var(--btn-h-sm, 36px); padding: 0 14px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; transition: color .15s, border-color .15s; }
@media (hover: hover) {
  .pm-notes-foot #pm-delete:hover { border-color: rgba(240, 138, 138, .4); background: none; color: var(--danger); }
}
.pm-notes-foot .pm-finish { height: var(--btn-h-sm, 36px); }

/* 14. long map paths end in … instead of running under the arrow */
.pm-place select { text-overflow: ellipsis; }
@supports (appearance: base-select) {
  select > button, select selectedcontent { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 15. popups */
.pm-modal, .pm-add-modal { border-radius: var(--r-lg, 20px); }

/* ---- phone ---- */
@media (max-width: 860px) {
  .pm-poster::after { background: var(--scrim-v, linear-gradient(180deg, rgba(10, 15, 28, .9) 0%, rgba(10, 15, 28, .72) 60%, rgba(10, 15, 28, .5) 100%)); }
}
@media (max-width: 700px) {
  .main.pm { padding-bottom: var(--dock-clear, 144px); }
  .main.pm .pm-head { margin-bottom: 24px; }
  .pm-head-right { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .pm-head-right .pm-read { flex: 1; min-width: 0; }
  .pm-principles { gap: 8px; }
  .pm-principles > div { padding: 12px 14px; }
  .pm-lanes-head { align-items: center; flex-wrap: nowrap; }
  .pm-lanes-head .pm-label { display: none; }
  .pm-lanes-head .btn { width: auto; margin-left: auto; }
  .pm-lanes .pm-area { margin-top: 18px; padding: 4px 0 0; }
  .pm-big b { font-size: 52px; }
}
@media (max-width: 560px) {
  .pm-mic { width: 52px; }
  .pm-compose textarea { min-height: 112px; }
  .pm-more .pm-more { margin: 4px -10px 0; }
  .pm-more .pm-more > .pm-ed { padding: 2px 10px 0; }
}
