.entity-select { display:inline-flex; position:relative; width:100%; min-width:0; vertical-align:middle; }
select.entity-select-native { position:absolute!important; width:1px!important; height:1px!important; min-width:0!important; padding:0!important; margin:0!important; opacity:0; pointer-events:none; overflow:hidden; }
.entity-select-trigger { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-width:0; min-height:38px; padding:0 10px; color:var(--text); border:1px solid #353a4b; border-radius:9px; background:#141720; font-family:inherit; font-size:12px; text-align:left; cursor:pointer; }
.entity-select-trigger>span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.entity-select-trigger>span:last-child { flex:none; color:var(--muted); }
.entity-select-trigger.table-status { min-width:125px; min-height:30px; padding:6px 8px; font-size:10px; background:#171a23; }
.entity-select-trigger:focus-visible,.entity-select-panel input:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.entity-select-trigger:disabled { opacity:.5; cursor:default; }
.entity-select-panel { position:fixed; inset:auto; margin:0; padding:8px; z-index:100; display:flex; flex-direction:column; gap:8px; box-sizing:border-box; border:1px solid #554b73; border-radius:11px; background:#191c27; color:var(--text); box-shadow:0 12px 35px #0007; }
.entity-select-panel input { box-sizing:border-box; width:100%; height:35px; min-height:35px; padding:0 10px; border:1px solid #353a4b; border-radius:7px; color:var(--text); background:#11131b; font:12px system-ui,sans-serif; }
.entity-select-list { overflow-y:auto; min-height:0; overscroll-behavior:contain; }
.entity-select-option { padding:9px 10px; border-radius:7px; font:12px/1.4 system-ui,sans-serif; overflow-wrap:anywhere; cursor:pointer; }
.entity-select-option:hover,.entity-select-option.is-active { background:#30294c; }
.entity-select-option[aria-selected=true] { color:#cbb8ff; font-weight:650; }
.entity-select-empty { margin:8px; font-size:12px; color:var(--muted); }

.project-card { position:relative; }
.project-title-link { color:inherit; text-decoration:none; }
.project-title-link::after { content:''; position:absolute; inset:0; border-radius:16px; }
.project-card button { position:relative; z-index:1; }
.project-card:has(.project-title-link:focus-visible) { outline:2px solid var(--accent); outline-offset:3px; }
.project-title-link:focus-visible { outline:none; }
.project-card:hover { border-color:#514773; }
.task-open-link { color:inherit; text-decoration:none; overflow-wrap:anywhere; }
.task-open-link:hover { text-decoration:underline; text-underline-offset:3px; }
.task-open-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:3px; }
.task-card { position:relative; }
.task-card>.task-open-link { display:block; }
.task-card>.task-open-link::after { content:''; position:absolute; inset:0; border-radius:12px; }
.task-card button { position:relative; z-index:1; }
.task-card:has(.task-open-link:focus-visible) { outline:2px solid var(--accent); outline-offset:3px; }
.task-detail-heading,.task-detail-badges { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.task-detail-heading { margin-bottom:12px; }
.task-detail-badges { justify-content:flex-start; flex-wrap:wrap; }
.task-detail-description { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; font-size:13px; line-height:1.6; }
#source-task-title { overflow-wrap:anywhere; }
.task-detail-metadata { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:6px 0; }
.task-detail-metadata dt { color:var(--muted); font-size:11px; margin-bottom:5px; }
.task-detail-metadata dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
.task-detail-actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:16px; border-top:1px solid #353a4b; }
.task-detail-actions .task-delete { color:#ff929a; }
#task-share-url { box-sizing:border-box; width:100%; margin-top:12px; }
.task-form-error { color:#ff929a; font-size:13px; }
.task-edit-conflicts { margin:0 0 18px; padding:12px; border:1px solid #b78d4b; border-radius:9px; min-width:0; font-size:12px; }
.task-edit-conflicts legend { padding:0 6px; color:#f5cb73; }
.task-edit-choice { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:start; margin-top:8px; }
.task-edit-choice pre { grid-column:2; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; max-height:150px; overflow:auto; }
@media(max-width:420px) { .task-detail-actions .button { flex:1 1 auto; } }
.page-heading>div { min-width:0; max-width:100%; }
.project-view-controls { display:flex; gap:8px; flex-wrap:wrap; }
.project-view-controls>.entity-select { flex:1; width:auto; min-width:min(320px,100%); max-width:100%; }
.project-view-select { max-width:100%; }
.milestone-detail-head { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.milestone-detail-heading { min-width:0; overflow-wrap:anywhere; }
.milestone-detail-actions { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:flex-end; gap:8px; max-width:330px; }
.milestone-detail-actions .button { white-space:nowrap; }
.milestone-row { grid-template-columns:40px minmax(160px,1.3fr) minmax(90px,.7fr) minmax(110px,1.1fr) 105px 160px; }
.milestone-open-link,.stage-task-title { min-width:0; overflow-wrap:anywhere; }
.stage-task-actions { flex-wrap:wrap; }
@media(max-width:1100px) {
  .milestone-detail-head { grid-template-columns:minmax(0,1fr); }
  .milestone-detail-actions { justify-content:flex-start; max-width:none; }
  .milestone-row { grid-template-columns:30px minmax(120px,1fr) 100px 160px; }
  .milestone-next,.milestone-date { display:none; }
}
@media(max-width:680px) {
  .milestone-row { grid-template-columns:24px minmax(0,1fr) 90px; }
  .milestone-row-actions { grid-column:2 / -1; justify-content:flex-start; flex-wrap:wrap; }
  .milestone-detail-actions .button { min-height:36px; }
  .stage-task-row { grid-template-columns:minmax(0,1fr) 130px; }
  .stage-task-actions { justify-content:flex-start; }
}
