Files
task-inventory/public/style.css
mikael-lovqvists-claude-agent fa2b5bda18 Improve mode toggle and flat mode row layout
- Segmented control (Tree | Flat) replaces the toggle button
- Expand arrow hidden in flat mode
- Arrow listener only attached in tree mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 19:10:05 +00:00

404 lines
7.9 KiB
CSS

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: system-ui, sans-serif;
font-size: 14px;
background: #1a1a1a;
color: #e0e0e0;
min-height: 100vh;
}
header {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 0.75rem 1.25rem;
background: #242424;
border-bottom: 1px solid #333;
}
header h1 {
font-size: 1rem;
font-weight: 600;
color: #fff;
}
nav { display: flex; gap: 0.5rem; }
.nav-btn {
padding: 0.3rem 0.75rem;
border: 1px solid #444;
border-radius: 4px;
background: transparent;
color: #aaa;
cursor: pointer;
font-size: 13px;
}
.segmented-control {
display: flex;
border: 1px solid #444;
border-radius: 4px;
overflow: hidden;
}
.segmented-control button {
border: none;
border-radius: 0;
padding: 0.3rem 0.75rem;
background: transparent;
color: #777;
font-size: 13px;
}
.segmented-control button + button { border-left: 1px solid #444; }
.segmented-control button.active { background: #383838; color: #fff; }
.segmented-control button:hover:not(.active) { color: #bbb; }
.nav-btn.active, .nav-btn:hover {
background: #333;
color: #fff;
border-color: #555;
}
main { padding: 1.25rem; }
/* Toolbar */
.toolbar {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.toolbar h2 { font-size: 1rem; flex: 1; }
/* Filter bar */
.filter-bar {
display: flex;
gap: 0.5rem;
margin-bottom: 0.75rem;
flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
padding: 0.3rem 0.5rem;
background: #2a2a2a;
border: 1px solid #444;
border-radius: 4px;
color: #e0e0e0;
font-size: 13px;
}
/* Task list */
.task-list { display: flex; flex-direction: column; gap: 1px; }
.task-node + .task-node { margin-top: 1px; }
.task-node { display: flex; flex-direction: column; }
.task-children {
margin-left: 1rem;
padding-left: 0.75rem;
border-left: 1px solid #2d2d2d;
display: flex;
flex-direction: column;
gap: 1px;
}
.task-row {
display: grid;
grid-template-columns: 1.25rem 2.5rem 5rem 4.5rem 1fr auto auto;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
background: #242424;
border-radius: 4px;
border-left: 3px solid transparent;
}
.task-list.flat-mode .task-row {
padding-left: calc(0.75rem + var(--depth, 0) * 1.5rem);
}
.task-row[data-priority='high'] { border-left-color: #e05555; }
.task-row[data-priority='normal'] { border-left-color: #5588e0; }
.task-row[data-priority='low'] { border-left-color: #555; }
.task-row[data-status='done'] { opacity: 0.5; }
.task-row[data-status='cancelled'] { opacity: 0.4; text-decoration: line-through; }
.task-id { color: #666; font-size: 12px; }
.task-title { font-weight: 500; }
.task-status, .task-priority {
font-size: 11px;
padding: 0.15rem 0.4rem;
border-radius: 3px;
text-align: center;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.task-status[data-val='open'] { background: #1e3a5f; color: #6ab0f5; }
.task-status[data-val='done'] { background: #1a3a1a; color: #6ad06a; }
.task-status[data-val='cancelled'] { background: #2a1a1a; color: #c06060; }
.task-status[data-val='deferred'] { background: #2a2a1a; color: #c0b060; }
.task-priority[data-val='high'] { background: #3a1a1a; color: #e08080; }
.task-priority[data-val='normal'] { background: transparent; color: #777; }
.task-priority[data-val='low'] { background: transparent; color: #555; }
.task-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.tag {
font-size: 11px;
padding: 0.1rem 0.35rem;
background: #2a2a3a;
border-radius: 3px;
color: #8899cc;
}
.task-actions { display: flex; gap: 0.4rem; }
.btn-expand {
width: 1.25rem;
height: 1.25rem;
padding: 0;
font-size: 9px;
background: transparent;
color: #555;
border: none;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
}
.btn-expand:hover { color: #aaa; background: #333; }
.btn-sub { font-size: 12px; padding: 0.2rem 0.5rem; color: #6a9; }
/* Buttons */
button {
cursor: pointer;
border: none;
border-radius: 4px;
font-size: 13px;
padding: 0.3rem 0.7rem;
background: #333;
color: #ccc;
}
button:hover { background: #444; color: #fff; }
.btn-primary {
background: #2a4a7a;
color: #8bb8f0;
}
.btn-primary:hover { background: #335a90; color: #c0d8ff; }
.btn-danger { background: #4a1a1a; color: #e08080; }
.btn-danger:hover { background: #5a2020; color: #ffaaaa; }
.btn-edit { font-size: 12px; padding: 0.2rem 0.5rem; }
.btn-delete { font-size: 12px; padding: 0.2rem 0.5rem; }
/* Dialog */
dialog {
margin: auto;
background: #242424;
border: 1px solid #444;
border-radius: 8px;
color: #e0e0e0;
padding: 1.5rem;
width: 480px;
max-width: 95vw;
}
dialog::backdrop { background: rgba(0,0,0,0.6); }
dialog h2 { margin-bottom: 1rem; font-size: 1rem; }
dialog label {
display: flex;
flex-direction: column;
gap: 0.3rem;
margin-bottom: 0.75rem;
font-size: 12px;
color: #999;
}
dialog input, dialog textarea, dialog select {
padding: 0.4rem 0.6rem;
background: #1a1a1a;
border: 1px solid #444;
border-radius: 4px;
color: #e0e0e0;
font-size: 13px;
font-family: inherit;
resize: vertical;
}
dialog input:focus, dialog textarea:focus, dialog select:focus {
outline: none;
border-color: #5588e0;
}
.dialog-buttons {
display: flex;
gap: 0.5rem;
justify-content: flex-end;
margin-top: 1rem;
}
/* Parent section in dialog */
.parent-section {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
font-size: 12px;
}
.parent-section-label { color: #999; min-width: 3rem; }
.parent-display { color: #ccc; flex: 1; }
/* Task picker dialog */
.task-picker-dialog {
width: 420px;
max-width: 95vw;
}
.task-picker-dialog h2 { margin-bottom: 0.75rem; font-size: 1rem; }
.picker-search {
width: 100%;
padding: 0.4rem 0.6rem;
background: #1a1a1a;
border: 1px solid #444;
border-radius: 4px;
color: #e0e0e0;
font-size: 13px;
margin-bottom: 0.5rem;
}
.picker-search:focus { outline: none; border-color: #5588e0; }
.picker-list {
max-height: 280px;
overflow-y: auto;
border: 1px solid #333;
border-radius: 4px;
margin-bottom: 0.75rem;
}
.picker-item {
padding: 0.4rem 0.6rem;
cursor: pointer;
font-size: 13px;
border-bottom: 1px solid #2a2a2a;
}
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: #2e2e2e; color: #fff; }
.empty-state {
color: #555;
padding: 2rem;
text-align: center;
}
/* Markdown inline in task list */
.task-title.markup, .task-body.markup {
padding: 0;
font-size: 14px;
overflow: visible;
}
.task-title.markup p { margin: 0; display: inline; }
.task-title.markup > *:first-child { margin-top: 0; }
.task-body.markup {
margin-top: 0.25rem;
font-size: 12px;
color: #aaa;
max-height: 3.5em;
overflow: hidden;
}
.task-body.markup > *:first-child { margin-top: 0; }
.task-body.markup > *:last-child { margin-bottom: 0; }
/* Field with edit/preview tabs */
.field-with-tabs {
margin-bottom: 0.75rem;
}
.tab-bar {
display: flex;
align-items: center;
gap: 2px;
margin-bottom: 0;
border-bottom: 1px solid #444;
padding-bottom: 0;
}
.tab-btn {
padding: 0.25rem 0.75rem;
border-radius: 4px 4px 0 0;
border: 1px solid transparent;
border-bottom: none;
background: transparent;
color: #888;
font-size: 12px;
margin-bottom: -1px;
}
.tab-btn.active {
background: #1a1a1a;
color: #e0e0e0;
border-color: #444;
border-bottom-color: #1a1a1a;
}
.tab-btn:hover:not(.active) { color: #ccc; }
.tab-label {
margin-left: auto;
font-size: 11px;
color: #666;
padding-right: 0.25rem;
}
.tab-pane textarea {
width: 100%;
padding: 0.4rem 0.6rem;
background: #1a1a1a;
border: 1px solid #444;
border-top: none;
border-radius: 0 0 4px 4px;
color: #e0e0e0;
font-size: 13px;
font-family: monospace;
resize: vertical;
}
.tab-pane textarea:focus {
outline: none;
border-color: #5588e0;
}
.preview-content {
min-height: 8rem;
padding: 0.6rem 0.75rem;
background: #1a1a1a;
border: 1px solid #444;
border-top: none;
border-radius: 0 0 4px 4px;
font-size: 13px;
overflow: auto;
}
.preview-content.loading { color: #555; font-style: italic; }