/* rocks + milestones screens. Owned by the "Rocks" build session; shared tokens and classes are in app.css. */

.rocks-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rocks-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .rocks-layout { grid-template-columns: minmax(0, 1fr); } }

/* list */
.rocks-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.rocks th.title { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); white-space: normal; font-weight: 400; min-width: 220px; }
table.rocks thead th.title { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.rocks td.status { width: 1%; }
table.rocks td.owner, table.rocks td.due { white-space: nowrap; }
table.rocks td.progress { width: 1%; }
.rock-open { color: var(--text); text-decoration: none; text-align: left; font-weight: 600; }
.rock-open:hover { text-decoration: underline; color: var(--link); }
.overdue { color: var(--danger); font-weight: 600; }
.tag.rock-company { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }

/* status select + pills */
select.rock-status { width: auto; min-height: 30px; padding: .2rem 1.6rem .2rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.rock-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; margin: 0 .3rem .3rem 0; }
.s-on_track:is(select, .rock-pill) { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.s-off_track:is(select, .rock-pill) { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.s-done:is(select, .rock-pill) { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.s-not_done:is(select, .rock-pill) { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.s-draft:is(select, .rock-pill), .s-canceled:is(select, .rock-pill) { background: var(--surface-2); color: var(--muted); }
select.rock-status option { background: var(--surface); color: var(--text); }

/* milestone progress bar */
.ms-bar { display: flex; align-items: center; gap: .45rem; min-width: 110px; }
.ms-bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 50px; }
.ms-bar-fill { height: 100%; background: #899d40; }

/* completion summary */
.rock-summary h2 { margin-bottom: .2rem; }
table.rock-completion { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rock-completion th, .rock-completion td { padding: .3rem .25rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rock-completion th { text-align: left; font-weight: 500; }
.rock-completion td.pct { font-weight: 600; width: 3.2rem; }
.rock-completion td.bar { width: 70px; }
.rock-completion tr.total th, .rock-completion tr.total td { font-weight: 700; border-bottom: 0; }
.rock-status-counts { margin: .75rem 0 0; }

/* dialog */
dialog.rock-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
dialog.rock-dialog::backdrop { background: rgba(20, 14, 10, .45); }
.rock-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rock-dialog-head h2 { font-size: 1.2rem; margin: .2rem 0 .6rem; }
.rock-head-actions { display: flex; gap: .3rem; flex-shrink: 0; }
.rock-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: .75rem; font-size: .9rem; }
.rock-meta .tag { margin: 0; }
.rock-desc { white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: .6rem .8rem; }
.rock-dialog .actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.rock-dialog .actions .grow { flex: 1; }
.rock-foot { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1rem !important; }

.rock-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 .8rem; }
@media (max-width: 640px) { .rock-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
fieldset.rock-teams { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem .6rem; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
fieldset.rock-teams legend { font-size: .82rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; }
fieldset.rock-teams .hint { flex-basis: 100%; margin: 0; }

.rock-section { margin-top: 1.1rem; }
.rock-section-head { display: flex; align-items: baseline; gap: .7rem; }
.rock-section-head h3 { margin: 0 0 .4rem; }
.empty-row { padding: .3rem 0; }

/* milestones */
.milestone { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 130px 140px 2rem; gap: .4rem; align-items: center; padding: .2rem 0; }
.milestone > div:last-child:not(:only-child) { grid-column: 1 / -1; }
.milestone > div:empty { display: none; }
ul.milestones li + li { margin-top: 0; }
.milestone input[type=checkbox] { width: 1.05rem; height: 1.05rem; justify-self: center; accent-color: #475b2a; }
.milestone input[type=text], .milestone select, .milestone input[type=date] { min-height: 32px; padding: .25rem .45rem; font-size: .9rem; }
.milestone input.ms-title { border-color: transparent; background: transparent; }
.milestone input.ms-title:hover, .milestone input.ms-title:focus { border-color: var(--line); background: var(--surface); }
.milestone.done input.ms-title { text-decoration: line-through; color: var(--muted); }
.milestone input.ms-due.overdue { color: var(--danger); font-weight: 600; }
.milestone-new { margin-top: .3rem; padding-top: .45rem; border-top: 1px dashed var(--line); grid-template-columns: 1.4rem minmax(0, 1fr) 130px 140px 4rem; }
@media (max-width: 640px) {
  .milestone, .milestone-new { grid-template-columns: 1.4rem minmax(0, 1fr) 2rem; }
  .milestone .ms-owner, .milestone .ms-due { grid-column: 2; }
  .milestone-new .btn { grid-column: 2; justify-self: start; }
}

/* comments + issues */
.rock-comment { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.rock-comment-body { white-space: pre-wrap; margin-top: .15rem; }
.comment-new { margin-top: .5rem; }
.rock-issues li { padding: .15rem 0; }
.issue-drop { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .3rem; }
.issue-drop input[type=text] { flex: 1 1 260px; width: auto; }
.issue-drop select { width: auto; }
.issue-drop > div { flex-basis: 100%; }
