/* ==========================================================================
   Trackflow · Work item — details panel (right column only), v2: minimal.
   Every field from the original panel stays visible; nothing is collapsed.
   Plain-language section headings, one line per field, 13px readable text.
   Left column is Trackflow's original markup, untouched.
   ========================================================================== */

.wd {
  min-width: 0;
  display: flex; flex-direction: column;
  font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
  font-size: 13px; line-height: 1.45; color: var(--nv-body); scrollbar-width: thin;
  border-left: 1px solid var(--nv-hairline); padding-left: 20px;
}
.wd *, .wd *::before, .wd *::after { box-sizing: border-box; }
.wd button, .wd input, .wd textarea { font-family: inherit; }
.wd :focus-visible { outline: 2px solid var(--nv-green); outline-offset: 1px; }
.wd p { margin: 0; }
.faint { color: var(--nv-stone); }

/* ---- headings: sentence case, readable, not mono caps ---- */
.wd-h { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--nv-ink); letter-spacing: -.005em; }
.wd-sub { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--nv-ink); }
.wd-sec { padding: 14px 0 10px; border-top: 1px solid var(--nv-hairline); }
.wd-log + .wd-sec { border-top: 0; padding-top: 18px; }

/* ---- 1. Log your time: the only boxed area, because it is the main action ---- */
.wd-log { background: var(--nv-surface); border: 1px solid var(--nv-hairline); border-radius: 2px; padding: 16px; margin-bottom: 4px; display: flex; flex-direction: column; gap: 12px; }
.wd-log .wd-h { margin: 0; }
.wd-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--nv-hairline); border: 1px solid var(--nv-hairline); border-radius: 2px; overflow: hidden; }
.wd-sum > div { background: var(--nv-soft); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.wd-sum span { font-size: 12px; color: var(--nv-stone); }
.wd-sum b { font-size: 18px; font-weight: 600; color: var(--nv-ink); letter-spacing: -.01em; line-height: 1.2; }
.wd-sum .wd-link { position: absolute; top: 10px; right: 12px; font-size: 12px; }
.wd-note { font-size: 12.5px; color: var(--nv-mute); margin-top: -4px; }
.wd-form { display: flex; flex-direction: column; }
.wd-flabel { font-size: 12.5px; font-weight: 500; color: var(--nv-ink); margin: 10px 0 5px; }
.wd-flabel:first-child { margin-top: 0; }
.wd-flabel .req { color: var(--nv-crit); }
.wd-input { width: 100%; height: 36px; padding: 0 10px; background: var(--nv-canvas); border: 1px solid var(--nv-hairline); border-radius: 2px; color: var(--nv-ink); font-size: 13px; }
html.light .wd-input { background: #fff; }
.wd-input::placeholder { color: var(--nv-stone); }
.wd-input:hover { border-color: var(--nv-hairline-strong); }
.wd-input:focus { outline: none; border-color: var(--nv-green); box-shadow: 0 0 0 1px var(--nv-green); }
.wd-input[aria-invalid="true"] { border-color: var(--nv-crit); box-shadow: 0 0 0 1px var(--nv-crit); }
.wd-input[type="date"] { color-scheme: inherit; }
textarea.wd-input { height: auto; min-height: 56px; padding: 8px 10px; resize: vertical; }
.wd-hint { font-size: 12px; color: var(--nv-stone); margin-top: 5px; }
.wd-hint.err { color: var(--nv-crit); }
.wd-submit { margin-top: 14px; height: 36px; width: 100%; border: 0; border-radius: 2px; background: var(--nv-green); color: var(--nv-on-green); font-size: 13px; font-weight: 600; cursor: pointer; }
.wd-submit:hover { background: var(--nv-green-press); color: #fff; }
.wd-entries { border-top: 1px solid var(--nv-hairline); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wd-empty { font-size: 12.5px; color: var(--nv-stone); }

/* ---- field rows: label left, value right, one line each ---- */
.wd-dl { margin: 0; }
.wd-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 32px; }
.wd-row > dt { font-size: 12.5px; color: var(--nv-stone); }
.wd-row > dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.wd-static { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--nv-ink); white-space: nowrap; }
.wd-static.faint { color: var(--nv-stone); }
.wd-val { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; height: 28px; padding: 0 8px; margin-left: -8px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--nv-ink); font-size: 13px; cursor: pointer; text-align: left; text-decoration: none; }
.wd-val:hover, .wd-val[aria-expanded="true"] { border-color: var(--nv-hairline); background: var(--nv-soft); }
.wd-val .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-val .chev { width: 12px; height: 12px; color: var(--nv-stone); flex: none; }
.wd-val.empty { color: var(--nv-stone); }
.wd-parent { color: var(--nv-green-text); }
.wd-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--nv-stone); }
.wd-dot.done { background: var(--nv-good); }
.wd-dot.prog { background: #3b82f6; }
.wd-dot.rev { background: #a855f7; }
.wd-pri { font-size: 12px; color: var(--nv-stone); width: 14px; text-align: center; }
.wd-pri.high { color: var(--nv-warn); } .wd-pri.urgent { color: var(--nv-crit); }
.wd-av { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; flex: none; background: var(--nv-elevated); color: var(--nv-ink); border: 1px solid var(--nv-hairline); }
.wd-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 4px 0; }
.wd-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--nv-hairline); border-radius: 2px; font-size: 12px; color: var(--nv-body); }
.wd-tag button { background: none; border: 0; padding: 0; color: var(--nv-stone); cursor: pointer; font-size: 13px; line-height: 1; }
.wd-acts { display: inline-flex; gap: 6px; }

/* ---- buttons & links ---- */
.wd-btn { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 10px; border: 1px solid var(--nv-hairline); background: transparent; color: var(--nv-ink); border-radius: 2px; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.wd-btn:hover { border-color: var(--nv-hairline-strong); background: var(--nv-soft); }
.wd-btn[aria-pressed="true"] { border-color: var(--nv-green); color: var(--nv-green-text); background: var(--nv-green-tint); }
.wd-link { background: none; border: 0; padding: 0; color: var(--nv-green-text); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.wd-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---- dropdown menu ---- */
.wd-menu { position: fixed; z-index: 300; min-width: 180px; padding: 4px; background: var(--nv-elevated); border: 1px solid var(--nv-hairline-strong); border-radius: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
html.light .wd-menu { background: #fff; box-shadow: 0 8px 24px rgba(20,22,15,.12); }
.wd-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 2px; background: transparent; color: var(--nv-ink); font-size: 13px; text-align: left; cursor: pointer; }
.wd-menu button:hover, .wd-menu button:focus-visible { background: var(--nv-soft); outline: none; }
.wd-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--nv-green-text); font-size: 12px; }

/* ---- responsive: below 1024px the panel drops under the task as its own section ---- */
@media (max-width: 1023px) {
  .wd { border-left: 0; padding-left: 0; border-top: 1px solid var(--nv-hairline); padding-top: 20px; }
  .wd > * { max-width: 640px; }
}
@media (max-width: 640px) {
  .wd-row { grid-template-columns: 104px minmax(0, 1fr); min-height: 40px; }
  .wd-input, .wd-submit { height: 40px; font-size: 14px; }
  .wd-log { padding: 14px; }
}

/* ---- screen switcher (bottom-right, prototype navigation) ---- */
.scr-switch { position: fixed; right: 20px; bottom: 20px; z-index: 250; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: var(--nv-elevated); border: 1px solid var(--nv-hairline-strong); border-radius: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.35); font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif; }
html.light .scr-switch { background: #fff; box-shadow: 0 8px 24px rgba(20,22,15,.12); }
.scr-lbl { font-family: var(--font-geist-mono), ui-monospace, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--nv-stone); }
.scr-seg { display: flex; border: 1px solid var(--nv-hairline); border-radius: 2px; }
.scr-seg button { height: 30px; padding: 0 12px; border: 0; background: transparent; color: var(--nv-mute); font-size: 12.5px; font-weight: 500; cursor: pointer; font-family: inherit; }
.scr-seg button + button { border-left: 1px solid var(--nv-hairline); }
.scr-seg button:hover { color: var(--nv-ink); background: var(--nv-soft); }
.scr-seg button[aria-pressed="true"] { background: var(--nv-green); color: var(--nv-on-green); }
.scr-seg button:focus-visible { outline: 2px solid var(--nv-green); outline-offset: 1px; }
@media (max-width: 640px) { .scr-switch { right: 12px; bottom: 12px; left: 12px; justify-content: space-between; } }
.toast { bottom: 76px; }
[data-view] { padding-bottom: 64px; }

/* ---- v3: role-based panels ---- */
/* entries: who · how long · when, then the note */

/* the estimate cell is itself the control (no separate green link) */
.wd-sum-btn { background: var(--nv-soft); border: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; font-family: inherit; position: relative; }
.wd-sum-btn:hover, .wd-sum-btn[aria-expanded="true"] { background: var(--nv-elevated); }
html.light .wd-sum-btn:hover, html.light .wd-sum-btn[aria-expanded="true"] { background: var(--nv-track); }
.wd-sum-btn .chev { position: absolute; top: 12px; right: 10px; width: 12px; height: 12px; color: var(--nv-stone); }

/* secondary full-width button (remind, change status) */
.wd-sec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; width: 100%; border: 1px solid var(--nv-hairline-strong); border-radius: 2px; background: transparent; color: var(--nv-ink); font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; }
.wd-sec-btn:hover, .wd-sec-btn[aria-expanded="true"] { background: var(--nv-soft); border-color: var(--nv-ink); }
.wd-sec-btn .chev { width: 12px; height: 12px; color: var(--nv-stone); }

/* "+ Add" as the value itself, quiet (not a green link) */
.wd-add { height: 24px; padding: 0 8px; margin-left: -8px; border: 1px dashed transparent; border-radius: 2px; background: none; color: var(--nv-stone); font-size: 12.5px; cursor: pointer; font-family: inherit; }
.wd-add:hover { border-color: var(--nv-hairline-strong); color: var(--nv-ink); }

/* read-only note for the employee */
.wd-lock { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--nv-stone); margin: -2px 0 6px; }
.wd-lock svg { width: 12px; height: 12px; flex: none; }

/* employee: status card */
.wd-log + .wd-log { margin-top: 12px; }
.wd-st-now { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: var(--nv-ink); letter-spacing: -.01em; }
.wd-st-now .wd-dot { width: 10px; height: 10px; }
.wd-st-acts { display: flex; flex-direction: column; gap: 8px; }
.wd-st-acts .wd-submit { margin-top: 0; }

.wd-menu button[disabled] { color: var(--nv-stone); cursor: default; opacity: .6; }
.wd-menu button[disabled]:hover { background: transparent; }
@media (min-width: 1100px) { .scr-seg button { padding: 0 14px; } }
@media (max-width: 640px) { .scr-lbl { display: none; } .scr-seg { flex: 1; } .scr-seg button { flex: 1; padding: 0 6px; font-size: 12px; } }
.wd-sum b.none { font-size: 14px; font-weight: 500; color: var(--nv-stone); line-height: 1.6; }

/* ---- time entries v4: note first, who/when quiet, duration right-aligned ---- */
.wd-entries { gap: 4px; }
.wd-entries .wd-sub { display: flex; justify-content: space-between; margin-bottom: 2px; }
.wd-entries .wd-sub .faint { font-weight: 400; font-size: 12px; }
.wd-tl { list-style: none; margin: 0; padding: 0; }
.wd-tl li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; }
.wd-tl li + li { border-top: 1px solid var(--nv-hairline); }
.wd-tl-main { min-width: 0; flex: 1; }
.wd-tl-note { font-size: 13px; color: var(--nv-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-tl-meta { font-size: 12px; color: var(--nv-stone); margin-top: 2px; }
.wd-tl-dur { flex: none; font-size: 13px; font-weight: 600; color: var(--nv-ink); font-variant-numeric: tabular-nums; }

/* PM reminder: a real button, filled */
.wd-remind { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; width: 100%; border: 0; border-radius: 2px; background: var(--nv-green); color: var(--nv-on-green); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.wd-remind:hover { background: var(--nv-green-press); color: #fff; }
.wd-remind svg { width: 15px; height: 15px; }
.wd-remind:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }

/* ---- time entries v5: the time leads ---- */
.wd-tl li { justify-content: flex-start; gap: 14px; padding: 10px 0; }
.wd-tl-dur { order: 0; min-width: 64px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--nv-green-text); line-height: 1.3; }
.wd-tl-note { font-size: 12.5px; color: var(--nv-mute); font-weight: 400; }
.wd-tl-meta { font-size: 12px; color: var(--nv-stone); }
