* { box-sizing: border-box; }
:root { --rail: 58px; --sidebar: 225px; --top: 65px; }
body { margin: 0; color: var(--black); background: var(--ink-50); font: 14px/1.45 var(--font-sans); }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
svg { display: inline-block; vertical-align: middle; flex: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--lime-deep); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.late { color: #a32e21; }
.running { color: #255c3a; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { margin: 3rem; color: var(--text-muted); }

.shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr); }
.rail, .sidebar { position: sticky; top: 0; height: 100dvh; }
.rail { z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 14px; color: var(--white); background: var(--black); }
.symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 15px; }
.symbol img { width: 31px; height: 31px; object-fit: contain; }
.rail-divider { width: 24px; height: 1px; background: var(--ink-700); margin: 7px 0; }
.rail-link, .rail .icon-btn { display: grid; place-items: center; width: 39px; height: 39px; border-radius: var(--radius-md); color: var(--ink-300); }
.rail-link:hover, .rail .icon-btn:hover { color: var(--white); background: var(--ink-800); text-decoration: none; }
.rail-link.current { color: var(--lime); background: #252919; }
.rail .rail-new { color: var(--black); background: var(--lime); }
.rail .rail-new:hover { color: var(--black); background: var(--lime-bright); }
.rail .rail-new svg { width: 20px; height: 20px; }
.rail-bottom { margin-top: auto; }
.rail-toggle { display: none !important; }
.sidebar { background: var(--white); border-right: 1px solid var(--border-default); display: flex; flex-direction: column; overflow-y: auto; }
.wordmark { height: var(--top); display: flex; align-items: center; gap: 10px; flex: none; padding: 0 19px; border-bottom: 1px solid var(--border-default); }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 106px; height: 30px; object-fit: contain; object-position: left; }
.wordmark span { font: 700 10px/1 var(--font-mono); letter-spacing: .1em; background: var(--ink-100); padding: 5px 6px; border-radius: var(--radius-sm); }
.sidebar nav { padding: 19px 12px; }
.side-heading { margin: 3px 10px 9px; text-transform: uppercase; font: 700 10px/1.3 var(--font-mono); letter-spacing: .1em; color: var(--text-muted); }
.secondary-heading { margin-top: 25px; }
.nav-link { display: flex; gap: 9px; align-items: center; min-height: 38px; margin-bottom: 2px; padding: 7px 9px; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-body); }
.nav-link > svg { color: var(--text-muted); }
.nav-link:hover { background: var(--ink-50); text-decoration: none; }
.nav-link.current { background: #f0f5e0; border-color: #e1e9c9; color: var(--black); }
.nav-link.current svg { color: var(--lime-ink); }
.nav-link i, .environment i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--lime); border: 1px solid var(--lime-deep); margin-left: auto; }
.environment { display: flex; align-items: center; gap: 7px; margin: auto 13px 18px; padding: 11px 9px 0; border-top: 1px solid var(--border-default); color: var(--text-muted); font-size: 11px; }
.environment i { margin: 0; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; height: var(--top); background: var(--white); border-bottom: 1px solid var(--border-default); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--text-muted); font-size: 13px; }
.breadcrumbs span { color: var(--black); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 600; }
.top-actions, .account { position: relative; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.top-divider { height: 22px; width: 1px; background: var(--border-default); }
.account { border: 0; background: none; padding: 0 0 0 1px; font-weight: 600; gap: 8px; font-size: 13px; }
.avatar { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink-100); color: var(--black); font: 700 10px/1 var(--font-mono); flex: none; }
.avatar.olive { background: #e7efcb; color: #475629; }
.avatar.blue { background: #e5edf9; color: #294973; }
.avatar.pink { background: #f5e8ee; color: #723e55; }
.avatar.sand { background: #f1e9db; color: #6c4d2a; }
.avatar.account-avatar { width: 31px; height: 31px; }
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.popover { position: absolute; background: var(--white); color: var(--black); border: 1px solid var(--border-default); border-radius: var(--radius-md); box-shadow: 0 8px 24px #0002; min-width: 168px; padding: 7px; z-index: 25; }
.popover strong, .popover small { display: block; padding: 5px 8px; }
.popover small { color: var(--text-muted); }
.popover .button { width: 100%; justify-content: flex-start; }
.new-menu { left: calc(100% - 5px); top: 78px; }
.account-menu { right: 0; top: calc(100% + 12px); }
.notification-trigger { position: relative; }
.notification-count { position: absolute; inset: -4px -5px auto auto; min-width: 16px; padding: 0 3px; border-radius: 12px; background: var(--lime); color: var(--black); font-size: 10px; font-weight: 800; line-height: 16px; }
.notification-menu { right: 0; top: calc(100% + 12px); width: min(340px, 76vw); white-space: normal; }
.notification-menu p { padding: 8px; }
.notification-heading { display: flex; align-items: center; justify-content: space-between; }
.notification-heading .button { width: auto; }
.notification-menu ul { list-style: none; padding: 0; margin: 0; max-height: min(420px, 55vh); overflow: auto; }
.notification-menu li a { display: grid; padding: 6px 8px; border-top: 1px solid var(--border-default); text-decoration: none; }
.notification-menu li a:hover, .notification-menu li a.unread { background: var(--ink-50); }
.notification-menu li strong, .notification-menu li small { padding: 2px 0; }

.content { max-width: 1740px; margin: 0 auto; padding: 26px 28px 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.page-heading h1 { font: 900 clamp(26px, 3.3vw, 42px)/1.03 var(--font-display); letter-spacing: -.045em; text-transform: uppercase; overflow-wrap: anywhere; }
.page-heading h1, .dialog-heading h2, .login h1 { font-stretch: 110%; }
.page-heading p { margin-top: 7px; color: var(--text-muted); font-size: 13px; }
.heading-actions, .toolbar-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.button { border: 1px solid var(--border-default); border-radius: var(--radius-sm); min-height: 35px; padding: 6px 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--white); white-space: nowrap; font-size: 12px; font-weight: 650; }
.button:hover { background: var(--ink-50); border-color: var(--ink-300); }
.button.primary { color: var(--black); background: var(--lime); border-color: var(--black); box-shadow: 2px 2px 0 var(--black); padding-inline: 13px; }
.button.primary:hover { background: var(--lime-bright); }
.button.primary:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--black); }
.button.quiet { border-color: transparent; }
.button.pressed { background: var(--ink-100); }
.button.danger { color: #a32e21; }
.button.danger.primary { background: #a32e21; color: var(--white); border-color: #a32e21; }
.icon-btn { border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--ink-600); }
.icon-btn:hover:not(:disabled), .icon-btn.active { background: var(--ink-100); color: var(--black); }
.icon-btn.favorite { color: var(--lime-ink); background: #f0f5e0; }
.icon-btn.favorite svg { fill: var(--lime); }
.text-btn { border: 0; background: none; padding: 0; text-align: left; }
.text-btn:hover { text-decoration: underline; text-underline-offset: .15em; }

.task-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 9px; min-height: 58px; text-align: left; padding: 8px 12px; background: var(--white); border: 1px solid var(--border-default); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); }
.metric:hover { border-color: var(--ink-300); color: var(--black); }
.metric-icon { display: grid; place-items: center; width: 29px; height: 29px; color: var(--ink-700); border-radius: var(--radius-md); background: var(--ink-100); }
.metric strong { font: 800 24px/1 var(--font-sans); color: var(--black); letter-spacing: -.03em; }
.metric-late .metric-icon { color: #a32e21; background: #fceeea; }
.metric-late strong { color: #a32e21; }
.record-panel { border: 1px solid var(--border-default); background: var(--white); border-radius: var(--radius-md); min-width: 0; }
.panel-header, .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--border-default); }
.panel-header { min-height: 49px; }
.tabs { display: flex; align-self: stretch; min-width: 0; overflow-x: auto; gap: 16px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 10px 0 9px; white-space: nowrap; font-size: 12px; color: var(--text-muted); font-weight: 550; }
.tabs button:hover { color: var(--black); }
.tabs button.selected { border-color: var(--lime-deep); color: var(--black); font-weight: 750; }
.view-switch { display: inline-flex; flex: none; gap: 2px; background: var(--ink-50); border: 1px solid var(--border-default); padding: 2px; border-radius: var(--radius-md); }
.view-switch .icon-btn { width: 28px; height: 26px; }
.view-switch .icon-btn.active { background: var(--black); color: var(--white); }
.toolbar { padding-block: 10px; min-height: 54px; }
.search { height: 34px; display: flex; align-items: center; gap: 7px; width: min(100%, 330px); padding: 0 8px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-muted); }
.search:focus-within { outline: 2px solid var(--lime-deep); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 3px 0; font-size: 12px; background: transparent; color: var(--black); }
.search kbd { padding: 1px 5px; background: var(--ink-50); border: 1px solid var(--border-default); border-radius: var(--radius-sm); font: 11px var(--font-mono); }
.sort select, .pagination select { border: 1px solid var(--border-default); background: var(--white); border-radius: var(--radius-sm); min-height: 35px; padding: 0 7px; font-size: 12px; }
.filter-panel { display: flex; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px; gap: 10px; border-bottom: 1px solid var(--border-default); background: var(--ink-50); }
.filter-panel label { min-width: 122px; flex: 1 0 126px; max-width: 230px; }
.filter-panel input, .filter-panel select { min-width: 0; width: 100%; }
label:has(> input:not([type=search])), label:has(> select), label:has(> textarea) { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.filter-panel input, .filter-panel select, .info-card select, form input, form select, form textarea { border: 1px solid var(--ink-200); border-radius: var(--radius-sm); min-height: 34px; padding: 6px 9px; font-size: 13px; font-weight: 400; background: var(--white); }
textarea { resize: vertical; }
.table-scroll { overflow: auto; }
.data-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
.data-table th { background: var(--ink-50); color: var(--text-muted); font: 700 10px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .025em; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-muted); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 15px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 13px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafaf9; }
.task-table .task-name { width: 38%; min-width: 178px; max-width: 360px; white-space: normal; }
.task-type { display: flex; align-items: center; gap: 4px; width: fit-content; margin-bottom: 2px; color: var(--text-muted); font: 400 9px/1.15 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.activity-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.activity-title-line .task-type { flex: none; margin: 0; }
.activity-title-line .record-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.record-title { display: block; font-weight: 750; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.record-link { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.record-client { color: var(--ink-500); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-pill); background: #f0f0ef; color: var(--ink-700); padding: 4px 7px; font-size: 10px; font-weight: 650; line-height: 1; white-space: nowrap; }
.badge i, .priority i, .stage-marker { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.blue { background: #e7effb; color: #274b81; }
.badge.gold { background: #f8efdc; color: #6d490e; }
.badge.green { background: #eaf3e8; color: #255c3a; }
.priority { display: inline-flex; align-items: center; gap: 5px; color: var(--text-body); font-size: 11px; }
.priority.high i { background: #bb4934; }
.priority.medium i { background: #bb851c; }
.priority.low i { background: #868686; }
.data-table .date, .data-table .timer { font-size: 11px; }
.data-table small { display: block; font: 10px/1.4 var(--font-sans); color: var(--text-muted); }
.data-table .late small { color: inherit; }
.data-table .running { color: #255c3a; }
.row-actions { display: flex; gap: 1px; }
.row-actions .icon-btn { width: 26px; height: 26px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 49px; padding: 6px 14px; border-top: 1px solid var(--border-default); color: var(--text-muted); font-size: 11px; }
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination label:has(select) { flex-direction: row; align-items: center; font-size: 11px; font-weight: 400; gap: 5px; }
.pagination select { min-height: 26px; }
.empty { min-height: 160px; display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; padding: 20px; color: var(--text-muted); text-align: center; }
.empty strong { color: var(--black); }
.empty span { font-size: 12px; }

.kanban { display: grid; grid-template-columns: repeat(var(--columns), minmax(184px, 1fr)); gap: 10px; overflow-x: auto; padding: 13px; align-items: start; }
.kanban-col { background: var(--ink-50); border: 1px solid var(--border-muted); padding: 8px; border-radius: var(--radius-md); min-height: 150px; }
.kanban-heading { display: flex; align-items: center; gap: 6px; margin: 1px 1px 8px; min-height: 25px; }
.kanban-heading h2 { font-size: 12px; font-weight: 750; }
.stage-marker { background: var(--ink-400); }
.stage-1 { background: #4877b6; }
.stage-2 { background: #45895e; }
.stage-3 { background: #bc8e2d; }
.stage-4 { background: var(--lime-deep); }
.count { margin-left: auto; color: var(--text-muted); font: 11px var(--font-mono); }
.task-card { display: flex; flex-direction: column; gap: 5px; background: var(--white); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: 8px; margin-bottom: 7px; min-width: 0; }
.task-card[draggable] { cursor: grab; }
.card-meta, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.card-date { font-size: 11px; color: var(--text-muted); }
.card-date.late { color: #a32e21; }
.card-footer .timer { font-size: 10px; }
.blank-column { padding: 9px 2px; font-size: 12px; }
.block-view, .layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); padding: 14px; gap: 12px; }
.block-view .task-card { margin-bottom: 0; padding: 12px; }
.timeline { width: max-content; min-width: 100%; }
.timeline-row { display: grid; grid-template-columns: 192px minmax(0, 1fr); border-bottom: 1px solid var(--border-muted); min-height: 40px; }
.timeline-row > strong, .timeline-label { position: sticky; left: 0; z-index: 1; background: var(--white); padding: 8px 12px; border-right: 1px solid var(--border-default); font-size: 12px; }
.timeline-grid { display: grid; grid-template-columns: repeat(var(--days), 41px); background: repeating-linear-gradient(to right, transparent 0 40px, var(--border-muted) 40px 41px); align-items: center; }
.timeline-grid span { padding: 3px 2px; text-align: center; font: 10px var(--font-mono); }
.timeline-grid .is-today { background: #eef7c4; }
.timeline-bar { grid-row: 1; margin: 2px; border: 1px solid #d0df93; background: #e7f3b6; color: var(--lime-ink); border-radius: var(--radius-sm); padding: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.timeline-bar.late-bar { background: #fceeea; border-color: #f0cabf; color: #a32e21; }
.timeline-note { padding: 8px 12px; font-size: 11px; }

.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.info-card, .layout-card { padding: 14px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); min-width: 0; }
.info-card h2 { margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.info-card select { max-width: 100%; }
.info-card.wide { grid-column: span 2; }
.info-pair { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; font-size: 12px; }
.progress { display: flex; gap: 7px; align-items: center; font-size: 11px; }
progress { appearance: none; width: 65px; height: 5px; border: 0; background: var(--ink-100); }
progress::-webkit-progress-bar { background: var(--ink-100); }
progress::-webkit-progress-value { background: var(--lime-deep); }
progress::-moz-progress-bar { background: var(--lime-deep); }
.person-line { display: flex; gap: 7px; align-items: center; }
.metric-value { font-size: 23px; overflow-wrap: anywhere; }
.section-tools, .detail-body, .inline-form { padding: 13px 14px; }
.activity-toolbar { border-bottom: 1px solid var(--border-default); }
.project-activities { display: grid; gap: 10px; padding: 12px; }
.activity-section { border: 1px solid var(--border-default); border-radius: var(--radius-md); min-width: 0; }
.activity-section-header { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 7px 8px; background: var(--ink-50); }
.activity-group-toggle { display: inline-flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 4px 0; }
.activity-actions { display: flex; align-items: center; gap: 5px; }
.activity-create { position: relative; display: inline-block; }
.activity-create summary, .follower-field summary { cursor: pointer; }
.activity-create summary { list-style: none; }
.activity-create summary::-webkit-details-marker { display: none; }
.activity-create-options { position: absolute; left: 0; z-index: 5; min-width: 140px; background: var(--white); border: 1px solid var(--border-default); box-shadow: 0 4px 12px #0002; }
.activity-section .activity-create-options { left: auto; right: 0; }
.activity-create-options .button { width: 100%; justify-content: flex-start; }
.activity-grip { cursor: grab; width: 22px; color: var(--text-muted); }
.activity-dragging { opacity: .55; }
.activity-empty { margin: 0; padding: 12px; }
[data-drop-preview="before"] { box-shadow: inset 0 3px #778c30; }
[data-drop-preview="after"] { box-shadow: inset 0 -3px #778c30; }
[data-drop-preview="inside"] { outline: 2px solid #778c30; outline-offset: -2px; }
.detail-body h2 { font-size: 16px; margin-bottom: 8px; }
.detail-body p, .feed p { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px; }
.detail-body dd { margin: 0; }
.detail-body dt { color: var(--text-muted); }
.inline-form { display: flex; flex-direction: column; align-items: start; gap: 8px; }
.inline-form label { width: 100%; }
.feed { list-style: none; padding: 0; margin: 0 14px 14px; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--border-muted); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.feed time { white-space: nowrap; color: var(--text-muted); font: 10px var(--font-mono); }
.layout-card .layout-mark { display: flex; align-items: center; justify-content: space-between; background: var(--ink-50); padding: 9px; margin-bottom: 8px; }
.layout-card a { display: inline-block; margin-top: 7px; font-size: 11px; }
.calendar-tools h2 { font-size: 15px; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-grid.one-day { grid-template-columns: 1fr; }
.calendar-weekday, .calendar-day { padding: 7px; border-right: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
.calendar-weekday { text-align: center; background: var(--ink-50); font-size: 11px; }
.calendar-day { min-height: 107px; }
.calendar-grid.one-day .calendar-day { min-height: 240px; }
.calendar-day.is-today { background: #f7faea; }
.calendar-day.out-month { color: var(--text-muted); background: var(--ink-50); }
.calendar-date { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.calendar-date .icon-btn { width: 21px; height: 21px; }
.calendar-event { display: block; width: 100%; text-align: left; background: var(--white); border: 1px solid var(--ink-200); padding: 4px; margin: 2px 0; border-radius: var(--radius-sm); font-size: 11px; overflow-wrap: anywhere; }
.calendar-event time { display: block; font: 10px var(--font-mono); color: var(--text-muted); }

dialog { width: min(590px, calc(100% - 24px)); padding: 0; max-height: min(94dvh, 800px); border: 1px solid var(--black); border-radius: var(--radius-md); background: var(--white); color: var(--black); box-shadow: 5px 5px 0 var(--black); }
dialog::backdrop { background: #0007; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border-default); }
.dialog-heading h2 { font: 900 21px/1 var(--font-display); text-transform: uppercase; letter-spacing: -.03em; }
.dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; padding: 13px 14px 8px; }
.dialog-fields .full { grid-column: 1 / -1; }
.dialog-fields input, .dialog-fields select { width: 100%; }
.details-fields { margin: 0; border: 0; min-width: 0; }
.read-only :is([data-new], [data-time], [data-favorite], [data-task-action], [data-move-row], [data-remove],
  [data-edit-kind="projects"], [data-edit-kind="groups"], .activity-create, .activity-grip,
  form[data-kind="comments"], form[data-kind="projects"] button[type="submit"]) { display: none; }
.client-field { position: relative; min-width: 0; }
.client-suggestions { position: absolute; z-index: 5; inset: 100% 0 auto; max-height: 190px; overflow: auto; background: var(--white); border: 1px solid var(--border-default); box-shadow: 0 4px 14px #0002; }
.client-suggestions button { display: block; width: 100%; padding: 7px 9px; border: 0; background: var(--white); text-align: left; color: inherit; font: inherit; overflow-wrap: anywhere; }
.client-suggestions button:hover, .client-suggestions button[aria-selected="true"] { background: var(--ink-50); }
.client-suggestions button small { display: block; color: var(--text-muted); }
.catalog-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.catalog-actions label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.catalog-table :is(th, td) { padding: 4px 8px; line-height: 1.3; vertical-align: middle; }
.catalog-table td:nth-child(2), .catalog-table td:nth-child(3) { white-space: normal; overflow-wrap: anywhere; }
.catalog-table td:nth-child(2) { width: 32%; }
.catalog-table td:nth-child(3) { width: 48%; }
.catalog-group { border-top: 1px solid var(--border-muted); }
.catalog-group > summary { padding: 10px 14px; cursor: pointer; font-size: 13px; }
.catalog-group > summary:hover { background: var(--ink-50); }
.catalog-group > summary .muted { margin-inline-start: 8px; font-size: 12px; }
.catalog-values { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; }
.catalog-values span { max-width: 100%; }
.catalog-values strong { font-variant-numeric: tabular-nums; }
.catalog-row-actions { display: flex; gap: 2px; }
.catalog-row-actions .button { min-height: 25px; padding: 2px 6px; }
.activity-assignees { display: flex; flex-wrap: wrap; gap: 4px; }
.piece-workflow-toggle { width: 23px; height: 23px; flex: none; order: -1; }
.task-table .project-workflow-row > td { padding: 6px 14px 8px 35px; background: var(--ink-50); white-space: normal; }
.project-workflow { list-style: none; margin: 0; padding: 0; }
.project-workflow li + li { border-top: 1px solid var(--border-muted); }
.project-workflow-stage { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 1fr) auto auto; gap: 6px 10px; align-items: start; padding: 6px 0; }
.project-workflow-stage > strong, .project-workflow-stage > span, .project-workflow-stage > .button { align-self: start; margin-top: 5px; }
.project-workflow-stage .form-error { grid-column: 1 / -1; margin: 0; }
.project-workflow-stage .form-error:empty { display: none; }
.stage-save-status, .activity-save-status { color: var(--text-muted); font-size: 12px; }
.stage-save-status { align-self: center; }
.activity-save-status { margin: 0 14px 8px; }
.activity-save-status:empty { display: none; }
@media (max-width: 720px) {
  .project-workflow-stage { grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr); }
}
.workflow-editor { border: 1px solid var(--border-muted); border-radius: var(--radius-sm); min-width: 0; }
.workflow-editor > summary { cursor: pointer; padding: 8px 10px; font-weight: 650; }
.assignment-picker { min-width: 0; }
.assignment-picker label, .member-photo-field label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.assignment-picker input[type="search"] { min-width: 0; width: 100%; }
.assignee-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.assignee-chips:not(:empty) { margin-top: 5px; }
.assignee-chip { display: inline-flex; align-items: center; gap: 2px; }
.assignee-chip button { border: 0; background: transparent; padding: 2px 4px; color: var(--text-muted); }
.assignee-results { max-height: 148px; overflow: auto; border: 1px solid var(--border-muted); background: var(--white); }
.assignee-results button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 4px 7px; border: 0; background: transparent; color: inherit; text-align: left; }
.assignee-results button:hover, .assignee-results button:focus-visible { background: var(--ink-50); }
.assignee-results p { margin: 6px; font-size: 12px; }
.member-photo-field { display: flex; align-items: end; gap: 10px; }
.member-photo-field .avatar { width: 40px; height: 40px; }
.remove-member-photo:has(> input) { flex-direction: row; align-items: center; }
.remove-member-photo input { width: auto; min-height: 0; }
.workflow-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto 64px auto; gap: 5px; align-items: start; padding: 6px; border-top: 1px solid var(--border-muted); }
.workflow-stage-model { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 53px 64px auto; }
.workflow-stage input:not([type="hidden"]) { min-width: 0; min-height: 28px; padding: 3px 5px; font-size: 12px; }
.workflow-stage .row-actions { gap: 0; }
.workflow-stage .row-actions .icon-btn { width: 23px; height: 28px; }
.assignment-picker-compact { display: flex; flex-wrap: wrap; align-items: start; gap: 3px; }
.assignment-picker-compact label { flex: 1 1 0; min-width: 0; }
.assignment-picker-compact .assignee-results:not([hidden]) { flex: 0 0 100%; order: 2; }
.assignment-picker-compact .assignee-chips { flex-wrap: nowrap; max-width: 48%; overflow: auto; margin: 0; }
.assignment-picker-compact .assignee-chip { flex: none; }
.assignment-picker-compact .avatar { width: 23px; height: 23px; }
.stage-calendar { position: relative; display: inline-flex; align-self: start; }
.stage-calendar > .icon-btn { width: 28px; height: 28px; border-color: var(--border-muted); }
.stage-calendar > .has-deadline { color: var(--black); background: var(--ink-100); }
.stage-calendar > input[type="date"] { position: absolute; inset: 0; width: 100%; opacity: 0; pointer-events: none; }
.stage-calendar-fallback > input[type="date"] { width: 125px; inset: 100% 0 auto auto; opacity: 1; pointer-events: auto; z-index: 3; }
.workflow-editor > .button { margin: 4px 10px 8px; }
.catalog-price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 8px 0; }
[data-new-piece-fields] { margin-top: 10px; padding: 10px; border: 1px solid var(--border-muted); }
.follower-field { margin: 0; min-width: 0; border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 5px 9px 8px; }
.follower-field legend { padding: 0 3px; font-size: 12px; font-weight: 700; }
.follower-options { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 6px; }
.follower-options label { display: inline-flex; align-items: center; gap: 4px; }
.follower-options input { width: auto; min-height: 0; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; padding: 9px 14px 13px; }
.spacer { flex: 1; }
.form-error { color: #a32e21; font-size: 12px; min-height: 1em; }
.import-results:empty { display: none; }
.import-results ul { max-height: 220px; overflow: auto; padding-left: 20px; }
dialog .form-error { padding-inline: 14px; }
.task-comments { padding: 10px 14px; border-top: 1px solid var(--border-default); }
.task-comments h3 { font-size: 14px; margin-bottom: 6px; }
.task-comments .feed { margin: 5px 0; }
.toast { position: fixed; z-index: 30; bottom: 16px; right: 16px; max-width: min(380px, 88vw); padding: 10px 13px; border: 1px solid var(--black); background: var(--black); color: var(--white); box-shadow: 3px 3px 0 var(--lime); border-radius: var(--radius-sm); }
.toast.error { box-shadow: 3px 3px 0 var(--danger); }
.login { display: grid; min-height: 100dvh; place-items: center; padding: 20px; }
.login-panel { width: min(100%, 390px); background: var(--white); padding: 22px; border: 1px solid var(--black); box-shadow: 5px 5px 0 var(--black); }
.login-panel img { width: 108px; }
.login h1 { font: 900 27px/1 var(--font-display); text-transform: uppercase; margin: 12px 0; }
.login form { display: grid; gap: 8px; }

@media (max-width: 1180px) {
  :root { --sidebar: 195px; }
  .topbar, .content { padding-inline: 17px; }
  .task-table th, .task-table td { padding-inline: 8px; }
  .tabs { gap: 11px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; left: var(--rail); width: 222px; z-index: 15; box-shadow: 10px 0 20px #0001; }
  .sidebar.sidebar-open { display: flex; }
  .rail-toggle { display: grid !important; }
}
@media (max-width: 630px) {
  :root { --rail: 43px; --top: 49px; }
  .rail-link, .rail .icon-btn { width: 34px; height: 34px; }
  .rail { padding-top: 7px; }
  .symbol { margin-bottom: 7px; width: 34px; height: 30px; }
  .symbol img { width: 25px; height: 25px; }
  .topbar, .content { padding-inline: 10px; }
  .top-actions { gap: 4px; }
  .account > span:not(.avatar) { display: none; }
  .content { padding-top: 16px; }
  .page-heading { align-items: start; flex-direction: column; margin-bottom: 14px; }
  .page-heading h1 { font-size: 25px; }
  .task-overview, .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .metric { padding: 6px; gap: 5px; grid-template-columns: 22px 1fr auto; font-size: 10px; min-height: 44px; }
  .metric strong { font-size: 17px; }
  .metric-icon { width: 22px; height: 22px; }
  .panel-header, .toolbar { padding-inline: 7px; gap: 5px; }
  .panel-header { flex-wrap: wrap; }
  .view-switch { margin-bottom: 4px; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search { width: 100%; }
  .table-footer { flex-wrap: wrap; }
  .calendar-grid { min-width: 440px; }
  .record-panel:has(.calendar-grid) { overflow-x: auto; }
  .dialog-fields { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
