/* Work page. Dense on purpose: the list uses the full width of the window and
   one line per item. Controls here are smaller than the app's defaults. */
.container.wk-page { max-width: none; padding: 0 16px; }

.wk-page .form-control, .wk-drawer .form-control {
  padding: 0.3rem 0.5rem; border-width: 1px; border-color: #cbd5e1; border-radius: 0.375rem; font-size: 0.85rem; min-height: 0;
}
.wk-page .btn-sm, .wk-drawer .btn-sm { padding: 0.3rem 0.7rem; min-height: 0; border-radius: 0.375rem; font-size: 0.78rem; }

.wk-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 0.25rem 0 0.5rem; }
.wk-header h1 { margin: 0; font-size: 1.35rem; }
.wk-stats { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; font-size: 0.8rem; color: #64748b; }
.wk-stats strong { color: #1e293b; font-variant-numeric: tabular-nums; }
.wk-tools { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.wk-page .wk-filter { width: 180px; }
.wk-show-done { font-size: 0.8rem; color: #475569; white-space: nowrap; align-items: center; margin: 0; }

/* Add bar: number, name, optional client and project, on one line. */
.wk-add { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem; }
.wk-add .form-control { width: auto; flex: 0 1 190px; height: 30px; }
.wk-add .btn-sm { height: 30px; }
.wk-add .wk-add-number { flex: 0 0 110px; }
.wk-add .wk-add-title { flex: 1 1 260px; }

.wk-panel { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.375rem; margin: 0 0 1rem; min-width: 0; box-shadow: none; }
.wk-empty { padding: 1.5rem 1rem; color: #64748b; font-size: 0.85rem; }
.wk-caption { font-size: 0.78rem; color: #64748b; margin: 0; }
.wk-count { font-size: 0.72rem; font-weight: 400; color: #64748b; margin-left: 0.35rem; }

/* The list. Fixed layout: every column has a set width except the work item
   and the latest note, which share what is left. One line per row. */
.wk-list { table-layout: fixed; width: 100%; min-width: 980px; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.wk-list th, .wk-list td { padding: 0.25rem 0.5rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #eef2f7; }
.wk-list th { background: #f8fafc; border-bottom-color: #e2e8f0; position: sticky; top: 0; }
.wk-list tbody tr { cursor: pointer; }
.wk-list tbody tr:hover td { background: #f1f5f9; }
.wk-list tbody tr:last-child td { border-bottom: 0; }
.wk-list th.wk-num, .wk-list td.wk-num { text-align: right; }
.wk-list td { color: #334155; }
.wk-sort { background: none; border: 0; padding: 0; font: inherit; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b; cursor: pointer; white-space: nowrap; }
.wk-sort:hover { color: #1e293b; }
.wk-w-number { width: 96px; }
.wk-w-client { width: 130px; }
.wk-w-project { width: 140px; }
.wk-w-type { width: 96px; }
.wk-w-status { width: 128px; }
.wk-w-date { width: 104px; }
.wk-w-hours { width: 58px; }
.wk-w-pay { width: 74px; }
.wk-w-count { width: 62px; }
.wk-list td.wk-w-number { font-weight: 600; color: #1e293b; }
.wk-item-title { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.wk-row-done td { color: #94a3b8; }
.wk-row-done .wk-item-title, .wk-row-done td.wk-w-number { color: #94a3b8; text-decoration: line-through; }

@media (max-width: 1599px) { .wk-hide-a { display: none; } }
@media (max-width: 1479px) { .wk-hide-b { display: none; } }
@media (max-width: 1099px) { .wk-hide-c { display: none; } }

/* Status: a colored dot and the word. */
.wk-state { display: inline-flex; align-items: center; gap: 0.35rem; }
.wk-state::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #94a3b8; flex: none; }
.wk-state-in-progress::before { background: #2563eb; }
.wk-state-testing::before { background: #7c3aed; }
.wk-state-scheduled::before { background: #0891b2; }
.wk-state-waiting-on-client::before { background: #d97706; }
.wk-state-complete::before { background: #16a34a; }

.wk-link { background: none; border: 0; padding: 0; font: inherit; font-weight: inherit; color: #1d4ed8; cursor: pointer; text-align: left; }
.wk-link:hover { text-decoration: underline; }
.wk-link-quiet { color: #64748b; font-size: 0.78rem; }
.wk-link:focus-visible, .wk-close:focus-visible, .wk-sort:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.wk-pill { display: inline-block; font-size: 0.7rem; border-radius: 999px; padding: 0.05rem 0.5rem; background: #eef2f7; color: #475569; white-space: nowrap; }
.wk-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; }

/* Side panel for one item: a fixed header, then cards on a light background. */
.wk-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 1000; display: flex; justify-content: flex-end; }
.wk-overlay[hidden] { display: none; }
.wk-drawer { background: #f1f5f9; width: min(760px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(15, 23, 42, 0.18); }
.wk-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1.1rem 0.75rem; background: #ffffff; border-bottom: 1px solid #e2e8f0; }
.wk-head-main { flex: 1; min-width: 0; display: grid; gap: 0.3rem; }
.wk-head-top { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.wk-crumb { font-size: 0.78rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-number, .wk-number-input { font-size: 0.78rem; font-weight: 600; color: #1e293b; background: #eef2f7; border: 1px solid transparent; border-radius: 0.3rem; padding: 0.15rem 0.45rem; }
.wk-number-input { width: 120px; flex: none; }
.wk-title { font-size: 1.2rem; font-weight: 700; margin: 0; color: #0f172a; overflow-wrap: anywhere; }
.wk-title-input { font-size: 1.2rem; font-weight: 700; color: #0f172a; width: 100%; border: 1px solid transparent; border-radius: 0.3rem; padding: 0.1rem 0.35rem; margin-left: -0.35rem; background: transparent; }
.wk-title-input:hover, .wk-number-input:hover { border-color: #cbd5e1; }
.wk-title-input:focus, .wk-number-input:focus { border-color: #2563eb; background: #ffffff; outline: none; }
.wk-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: #64748b; cursor: pointer; padding: 0 0.25rem; }
.wk-close:hover { color: #0f172a; }

.wk-drawer-body { flex: 1; overflow-y: auto; padding: 0.9rem 1.1rem 1.5rem; display: grid; gap: 0.75rem; align-content: start; }
.wk-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.wk-facts label, .wk-fact { display: grid; gap: 0.2rem; align-content: start; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.5rem 0.65rem; margin: 0; min-width: 0; }
.wk-facts label, .wk-fact span, .wk-log-form label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.wk-fact strong { font-size: 0.95rem; color: #0f172a; font-variant-numeric: tabular-nums; }
.wk-facts .form-control { text-transform: none; letter-spacing: 0; font-weight: 500; width: 100%; }

.wk-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.75rem 0.85rem; display: grid; gap: 0.6rem; min-width: 0; }
.wk-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 0.75rem; }
.wk-card-head h3 { font-size: 0.85rem; font-weight: 700; color: #0f172a; margin: 0; }
.wk-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wk-composer { display: grid; gap: 0.4rem; justify-items: end; }
.wk-composer textarea, .wk-card > textarea { width: 100%; resize: vertical; }
.wk-drawer textarea { font-family: inherit; line-height: 1.45; }
.wk-notes { display: grid; gap: 0.6rem; }
.wk-note-item { border-left: 3px solid #cbd5e1; padding-left: 0.65rem; }
.wk-note-meta { font-size: 0.72rem; color: #64748b; }
.wk-note-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #1e293b; font-size: 0.87rem; line-height: 1.45; }
.wk-checks { display: grid; gap: 0.3rem; }
.wk-checks:empty { display: none; }
.wk-check-done span { color: #94a3b8; text-decoration: line-through; }
.wk-inline { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.wk-inline .form-control { flex: 1 1 200px; width: auto; }
.wk-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.85rem; }
.wk-files li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.wk-drop { display: block; border: 1px dashed #94a3b8; border-radius: 0.5rem; padding: 0.6rem; color: #64748b; font-size: 0.8rem; cursor: pointer; margin: 0; }
.wk-drop input { display: block; margin-bottom: 0.3rem; max-width: 100%; }
.wk-log-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; align-items: end; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.65rem; }
.wk-log-form[hidden] { display: none; }
.wk-log-form label { display: grid; gap: 0.2rem; margin: 0; }
.wk-log-form .form-control { text-transform: none; letter-spacing: 0; font-weight: 400; }
.wk-log-form .wk-wide { grid-column: 1 / -1; }
.wk-log-form button { justify-self: start; }
.wk-candidates { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.65rem; display: grid; gap: 0.5rem; }
#wk-candidate-list:empty { display: none; }
.wk-scroll { max-height: 280px; overflow-y: auto; margin: 0; box-shadow: none; border: 1px solid #eef2f7; border-radius: 0.375rem; }
.wk-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.wk-table td { padding: 0.3rem 0.5rem; white-space: nowrap; border-bottom: 1px solid #eef2f7; color: #334155; vertical-align: top; }
.wk-table tr:last-child td { border-bottom: 0; }
.wk-table td.wk-num { text-align: right; }
.wk-table td.wk-desc { white-space: normal; min-width: 180px; overflow-wrap: anywhere; }
.wk-remove { display: grid; gap: 0.5rem; justify-items: start; padding: 0 0.1rem; }
.wk-confirm { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.83rem; color: #1e293b; }
.wk-confirm[hidden] { display: none; }

@media (max-width: 640px) {
  .wk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-tools { margin-left: 0; }
}
