:root {
    color-scheme: light;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-muted: #f1f4f8;
    --line: #d8e0ea;
    --line-strong: #b8c8dc;
    --text: #20242b;
    --muted: #6c7480;
    --blue: #2f86ff;
    --blue-soft: #e8f2ff;
    --green: #2bbf63;
    --orange: #ff8a2a;
    --red: #ff4d55;
    --purple: #d83df0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}

body.auth-required .app-shell {
    display: none;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 1px solid var(--line);
    background: #e9edf3;
    color: var(--text);
    border-radius: 7px;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #dde5ef;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

button.primary-action {
    border-color: #1d67c6;
    background: var(--blue);
    color: white;
}

button.primary-action:hover {
    background: #1677f8;
}

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(180deg, #edf5ff, #f7f9fc);
}

.login-panel {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(32, 36, 43, 0.12);
}

.login-panel h1 {
    font-size: 26px;
}

.login-panel p {
    color: var(--muted);
    font-weight: 650;
}

.login-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.login-panel input {
    min-height: 38px;
}

.login-panel button {
    min-height: 38px;
    background: var(--blue);
    color: white;
}

.login-panel button:hover {
    background: #1677f8;
}

.login-mark {
    width: 52px;
    height: 52px;
}

.login-error {
    min-height: 18px;
    color: var(--red);
    font-weight: 800;
}

.app-shell {
    min-width: 1360px;
    padding: 8px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 14px 20px;
    border: 1px solid #bad4f7;
    border-radius: 16px;
    background: linear-gradient(180deg, #edf5ff, #e8f1ff);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--blue);
    display: grid;
    grid-template-columns: repeat(2, 8px);
    grid-template-rows: repeat(2, 8px);
    gap: 4px;
    place-content: center;
    flex: 0 0 auto;
}

.brand-mark span {
    border-radius: 2px;
    background: white;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 25px;
    line-height: 1.1;
}

h2 {
    font-size: 15px;
}

.hero p,
.panel-header span,
.sync-status {
    color: var(--muted);
    font-weight: 650;
}

.hero-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.task-action-bar .user-label {
    margin-left: auto;
    padding: 0 8px;
}

.config-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr) 180px auto;
    gap: 10px;
    align-items: end;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.config-panel label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

input,
select {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    padding: 6px 9px;
}

.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 4px 7px;
}

.view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #b9c9dd;
    border-radius: 10px;
    background: linear-gradient(180deg, #eef4fb, #e6edf6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    flex-basis: 100%;
    width: fit-content;
}

.view-switch button {
    min-height: 30px;
    padding: 5px 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 7px;
    font-size: 12px;
    letter-spacing: 0;
}

.view-switch button.active {
    background: var(--blue);
    color: white;
    box-shadow: 0 3px 8px rgba(47, 134, 255, 0.24);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 330px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    padding: 0 10px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
}

.sync-status {
    margin-left: auto;
}

.metrics {
    display: none;
    gap: 8px;
    margin: 0 0 8px 4px;
}

.metrics div {
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-muted);
}

.metrics span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.metrics strong {
    display: block;
    margin-top: 3px;
    color: var(--blue);
    font-size: 20px;
}

.metrics div:nth-child(2) strong {
    color: var(--green);
}

.metrics div:nth-child(3) strong {
    color: var(--orange);
}

.dashboard-view {
    display: grid;
    gap: 10px;
    margin: 0 0 10px;
}

.dashboard-view[hidden],
.workspace-grid[hidden],
.equipment-view[hidden]{
    display: none;
}

.dashboard-hero,
.dashboard-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(32, 36, 43, 0.05);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(180deg, #edf5ff, #f7fbff);
}

.dashboard-hero > div:first-child > span,
.dashboard-card-header p,
.panel-header p,
.dashboard-focus-item span {
    color: var(--muted);
    font-weight: 650;
}

.dashboard-hero h2 {
    margin-top: 4px;
    font-size: 24px;
    line-height: 1.15;
}

.dashboard-hero p {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 650;
}

.dashboard-hero-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 8px;
}

.dashboard-metric {
    min-width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.dashboard-metric span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-metric strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    line-height: 1;
}

.dashboard-metric.blue strong { color: var(--blue); }
.dashboard-metric.green strong { color: var(--green); }
.dashboard-metric.orange strong { color: var(--orange); }
.dashboard-metric.purple strong { color: var(--purple); }

.dashboard-distribution {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-panel {
    padding: 12px;
}

.dashboard-donut-card {
    min-height: 184px;
    padding: 16px 18px;
    border-radius: 18px;
}

.dashboard-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-card-header strong {
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
}

.dashboard-total {
    margin: 12px 0 12px;
    color: var(--text);
    font-weight: 800;
}

.dashboard-total strong {
    font-weight: 900;
}

.dashboard-donut-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.dashboard-donut {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--donut-gradient, #e7edf5 0 360deg));
}

.dashboard-donut > div {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.dashboard-donut strong {
    color: var(--text);
    font-size: 23px;
    line-height: 1;
}

.dashboard-legend {
    display: grid;
    gap: 10px;
}

.dashboard-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.dashboard-legend-row > span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--legend-color, var(--blue));
}

.dashboard-legend-row strong {
    color: var(--text);
}

.dashboard-legend-row b {
    color: #7a8596;
}

.dashboard-bars {
    display: grid;
    gap: 9px;
}

.dashboard-bar-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    color: var(--muted);
    font-weight: 750;
}

.dashboard-bar-row strong {
    color: var(--text);
}

.dashboard-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    overflow: hidden;
}

.dashboard-bar span {
    display: block;
    width: var(--bar-width, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--bar-color, var(--blue));
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.7fr);
    align-items: stretch;
    gap: 10px;
}

.dashboard-progress-panel {
    min-width: 0;
}

.dashboard-grid > .dashboard-panel {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 390px);
}

.dashboard-table-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-table-actions button {
    width: 28px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    border-radius: 7px;
    font-size: 18px;
    line-height: 1;
}

.dashboard-table-scroll {
    flex: 1;
    max-height: none;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: grab;
    scrollbar-gutter: stable;
}

.dashboard-table-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.dashboard-table-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.dashboard-table-scroll::-webkit-scrollbar-thumb {
    border: 3px solid white;
    border-radius: 999px;
    background: #a9b8ca;
}

.dashboard-table-scroll::-webkit-scrollbar-track {
    background: #eef3f8;
}

.dashboard-progress-table {
    width: auto;
    min-width: 1640px;
}

.dashboard-progress-table th,
.dashboard-progress-table td {
    height: 36px;
}

.dashboard-focus-list {
    display: grid;
    flex: 1;
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow: auto;
}

.dashboard-focus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--focus-color, var(--blue));
    border-radius: 8px;
    background: #fbfdff;
}

.dashboard-focus-item strong,
.dashboard-focus-item span {
    display: block;
}

.dashboard-focus-item b {
    color: var(--text);
    font-size: 22px;
}

.dashboard-empty {
    min-height: 72px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 750;
}

.workspace-grid {
    display: block;
}

.equipment-view {
    display: block;
}

.table-panel,
.task-workspace-page,
.equipment-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    min-height: calc(100vh - 304px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.project-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.project-panel-actions span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.project-panel-actions button {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.table-scroll {
    overflow: auto;
    height: calc(100vh - 348px);
}

.task-scroll {
    height: calc(100vh - 512px);
    min-height: 330px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

#projectsTable {
    min-width: 0;
}

.task-workspace-full .data-table {
    width: auto;
    min-width: 1680px;
}

.data-table th,
.data-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 7px 9px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.column-resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    bottom: 0;
    width: 7px;
    cursor: col-resize;
    z-index: 5;
}

.column-resize-handle:hover {
    background: rgba(47, 134, 255, 0.22);
}

.data-table th:first-child,
.data-table td:first-child {
    width: 70px;
}

.data-table tr {
    height: 40px;
}

#projectsTable th:nth-child(1),
#projectsTable td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 305px;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
}

#projectsTable thead th:nth-child(1) {
    z-index: 6;
    background: #f7f9fc;
}

#projectsTable tbody tr:nth-child(even) td:nth-child(1) {
    background: #fbfdff;
}

#projectsTable tbody tr.selected td:nth-child(1),
#projectsTable tbody tr:hover td:nth-child(1) {
    background: var(--blue-soft);
}

#projectsTable tbody tr:nth-child(even) {
    background: #fbfdff;
}

#projectsTable tbody tr.selected td {
    background: var(--blue-soft);
}

.project-columns-menu {
    position: absolute;
    z-index: 80;
    width: 220px;
    max-height: min(620px, calc(100vh - 40px));
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.project-columns-menu-title {
    padding: 6px 10px 8px;
    color: #a0a6b0;
    font-size: 14px;
    font-weight: 850;
}

.project-column-option {
    display: grid;
    grid-template-columns: 24px 1fr;
    width: 100%;
    padding: 5px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-size: 14px;
    font-weight: 700;
}

.project-column-option:hover {
    background: var(--blue-soft);
}

.project-column-check {
    color: var(--blue);
    font-weight: 900;
}

.project-metric-cell {
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.remarks-input {
    min-width: 180px;
}

.group-row td {
    position: sticky;
    left: 0;
    z-index: 2;
    height: 34px;
    padding: 6px 12px;
    background: #dcecff;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.group-row.status td {
    background: #ffe7cc;
}

.group-row.done td {
    background: #dff4e8;
}

.group-row.alert td {
    background: #ffe1e5;
}

.group-row.info td {
    background: #d7e9ff;
}

.group-row.purple td {
    background: #f3d1f7;
}

.group-row .group-pill {
    display: inline-flex;
    align-items: center;
    min-width: 115px;
    min-height: 22px;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 11px;
    background: rgba(47, 134, 255, 0.16);
    color: var(--blue);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.group-row .group-toggle {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.group-row .group-toggle:hover {
    color: var(--ink);
}

.group-row strong {
    margin-left: 14px;
    color: var(--muted);
    font-weight: 800;
}

.data-table tbody tr {
    cursor: pointer;
}

.data-table tbody tr:hover,
.data-table tbody tr.selected {
    background: var(--blue-soft);
}

.data-table tbody tr:hover td {
    background: var(--blue-soft);
}

.data-table td:first-child,
.data-table th:first-child {
    border-left: 1px solid var(--line);
}

.project-name {
    font-weight: 850;
}

.project-name-cell {
    padding: 0 8px;
}

.project-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px auto 24px;
    align-items: center;
    gap: 7px;
    min-height: 100%;
}

.project-title-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
}

.project-tree-indent {
    flex: 0 0 auto;
}

.project-tree-marker {
    width: 14px;
    flex: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.project-tree-marker.interactive {
    cursor: pointer;
    color: #7e8794;
}

.project-tree-marker.interactive:hover {
    color: var(--blue);
}

.project-title-block {
    min-width: 0;
}

.child-project-row .project-name-cell {
    background: #f8fbff;
}

.child-project-row .project-name {
    font-size: 12.5px;
}

.parent-project-row .project-name {
    letter-spacing: 0;
}

.project-inline-button {
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    font-weight: 500;
}

.project-inline-button:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.project-delete-button {
    color: #a1a8b3;
}

.project-delete-button:hover {
    background: #ffecef;
    color: var(--red);
}

.open-button {
    min-height: 24px;
    padding: 3px 8px;
    border: 0;
    background: #dceaff;
    color: var(--blue);
    font-size: 12px;
    text-transform: uppercase;
}

.subtext {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    margin-top: 3px;
}

.task-table .subtext,
.task-workspace-full .subtext {
    max-width: 100%;
}

.category-display-cell {
    padding-top: 5px;
    padding-bottom: 5px;
}

.category-display {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
}

.category-display + .category-display {
    margin-top: 6px;
}

.category-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 999px;
}

.category-lines {
    min-width: 0;
}

.category-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 850;
}

.category-detail {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.editable-category-cell {
    position: relative;
    padding-right: 32px;
}

.editable-category-cell:not(.locked) {
    cursor: pointer;
}

.editable-category-cell .category-display {
    max-width: calc(100% - 6px);
}

.editable-category-cell.locked {
    cursor: default;
}

.category-action-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: transparent;
    opacity: 0;
    outline: 0;
    cursor: pointer;
}

.category-action-select:hover,
.category-action-select:focus {
    opacity: 0.08;
    background: var(--blue);
}

.category-action-select option {
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    border-radius: 6px;
    padding: 3px 7px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
}

td .pill {
    vertical-align: middle;
}

.pill.status {
    color: var(--orange);
    background: #fff2e8;
}

.pill.done {
    color: var(--green);
    background: #e9f8ef;
}

.pill.alert {
    color: var(--red);
    background: #ffecef;
}

.pill.info {
    color: var(--blue);
    background: var(--blue-soft);
}

.pill.purple {
    color: var(--purple);
    background: #fdeafd;
}

.editable-select-cell {
    padding-top: 5px;
    padding-bottom: 5px;
}

.table-cell-input,
.table-cell-select {
    width: 100%;
    min-width: 0;
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 750;
    outline: 0;
}

.table-cell-input {
    padding: 3px 6px;
}

.table-cell-select {
    padding: 3px 22px 3px 7px;
}

.table-cell-input:hover,
.table-cell-input:focus,
.table-cell-select:hover,
.table-cell-select:focus {
    border-color: var(--line-strong);
    background: #fff;
}

.project-pill-input {
    color: var(--purple);
    background: #fdeafd;
}

.project-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(34, 42, 55, 0.46);
}

.project-editor-panel {
    width: min(980px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(28, 37, 50, 0.28);
}

.project-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.project-editor-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.project-editor-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.project-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 20px;
}

.project-editor-grid label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.project-editor-grid label.wide {
    grid-column: 1 / -1;
}

.project-editor-grid input,
.project-editor-grid select,
.project-editor-grid textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    padding: 8px 10px;
    outline: 0;
}

.project-editor-grid textarea {
    resize: vertical;
}

.project-editor-grid input:focus,
.project-editor-grid select:focus,
.project-editor-grid textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47, 134, 255, 0.14);
}

.project-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}

.editable-project-select,
.editable-status-select {
    max-width: 100%;
    min-height: 24px;
    border: 0;
    border-radius: 6px;
    padding: 3px 24px 3px 7px;
    outline: 0;
    font-weight: 850;
    cursor: pointer;
}

.editable-project-select:disabled,
.editable-status-select:disabled {
    cursor: wait;
    opacity: 0.65;
}

.editable-project-select.status,
.editable-status-select.status {
    color: var(--orange);
    background-color: #fff2e8;
}

.editable-project-select.done,
.editable-status-select.done {
    color: var(--green);
    background-color: #e9f8ef;
}

.editable-project-select.alert,
.editable-status-select.alert {
    color: var(--red);
    background-color: #ffecef;
}

.editable-project-select.info,
.editable-status-select.info {
    color: var(--blue);
    background-color: var(--blue-soft);
}

.editable-project-select.purple,
.editable-status-select.purple {
    color: var(--purple);
    background-color: #fdeafd;
}

.editable-project-select.teal,
.editable-status-select.teal {
    color: #00999f;
    background-color: #e4fbfb;
}

.progress-cell {
    position: relative;
    background: #edf7ef;
    font-weight: 850;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.progress-cell::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress, 0%);
    background: rgba(43, 191, 99, 0.32);
    min-width: var(--progress-min, 0);
}

.progress-cell span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
}

.empty-row td {
    color: var(--muted);
    text-align: center;
    height: 92px;
}

.task-title {
    font-weight: 750;
}

.task-name-cell {
    padding-left: 0;
}

.task-name-wrap {
    display: grid;
    grid-template-columns: 22px 16px minmax(0, 1fr) 22px 22px;
    align-items: center;
    gap: 5px;
    padding-left: var(--task-indent, 0);
}

.inline-child-task-button,
.inline-delete-task-button {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 17px;
    font-weight: 650;
}

.inline-child-task-button:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.inline-delete-task-button:hover {
    color: var(--red);
    background: #ffecef;
}

.delivery-icon {
    display: inline-grid;
    place-items: center;
    position: relative;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.delivery-icon.delivered::before,
.delivery-icon.ready::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 2px;
    transform: rotate(30deg) skewY(-8deg);
    box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.16);
}

.delivery-icon.delivered::before {
    background: var(--green);
}

.delivery-icon.ready::before {
    background: var(--blue);
}

.delivery-icon.parent {
    color: var(--text);
}

.delivery-icon.parent::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 2px;
    height: 11px;
    border-radius: 1px;
    background: currentColor;
}

.delivery-icon.parent::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 9px;
    height: 7px;
    border-radius: 1px 2px 2px 1px;
    background: currentColor;
}

.parent-task-cell .task-title {
    font-weight: 760;
}

.task-disclosure {
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}

.task-disclosure:not(:disabled):hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.task-disclosure:disabled {
    opacity: 0;
    cursor: default;
}

.project-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: #eef6ff;
}

.project-toolbar h2 {
    font-size: 24px;
}

.project-toolbar span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 700;
}

.task-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 5px 14px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.task-action-bar button {
    min-height: 27px;
    padding: 4px 10px;
}

.task-action-bar button:disabled {
    opacity: 0.48;
    cursor: default;
}

body.arf-scoped .task-action-bar button:disabled {
    display: none;
}

.pod-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.36);
}

.pod-panel {
    width: min(1240px, calc(100vw - 44px));
    max-height: calc(100vh - 44px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #f4f6f9;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.pod-panel.has-saved-notes {
    width: min(1440px, calc(100vw - 44px));
}

.pod-panel-header,
.pod-panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
}

.pod-panel-header {
    border-bottom: 1px solid var(--line);
}

.pod-panel-header h2 {
    font-size: 22px;
}

.pod-panel-header p {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 700;
}

.pod-panel-header button {
    margin-left: auto;
}

.pod-panel-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
    padding: 16px;
}

.pod-saved-notes {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pod-saved-notes-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
}

.pod-saved-notes-header h3 {
    margin: 0;
    font-size: 15px;
}

.pod-saved-notes-header span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pod-saved-notes-header button {
    min-width: 44px;
    font-size: 18px;
    line-height: 1;
}

.pod-saved-notes-list {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 8px 10px;
}

.pod-saved-empty {
    height: 100%;
    min-height: 240px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.pod-saved-note {
    width: 100%;
    display: grid;
    gap: 3px;
    margin-bottom: 6px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.pod-saved-note:hover,
.pod-saved-note.selected {
    border-color: #b9cdf1;
    background: #edf4ff;
}

.pod-saved-note strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.pod-saved-note span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pod-saved-notes-actions {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.pod-document {
    overflow: auto;
    padding: 16px;
    background: white;
}

.pod-panel-body .pod-document {
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.pod-panel-body .pod-section {
    margin: 16px;
}

.pod-section {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    overflow: visible;
}

.pod-section h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.pod-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pod-section-title h3 {
    margin: 0;
}

.pod-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.pod-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pod-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pod-grid label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.pod-items {
    min-width: 1120px;
    overflow: visible;
}

.pod-item-row {
    display: grid;
    grid-template-columns: 132px 150px minmax(280px, 1fr) 170px 78px 92px 86px;
    border-top: 1px solid var(--line);
}

.pod-item-row > * {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
}

.pod-item-row > *:last-child {
    border-right: 0;
}

.pod-item-header {
    min-height: 34px;
    align-items: center;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.pod-item-header span {
    padding: 8px;
}

.pod-item-row textarea,
.pod-section textarea {
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 9px;
    font: inherit;
}

.pod-item-row textarea {
    border: 0;
    border-radius: 0;
}

.pod-item-row input[readonly],
.pod-item-row textarea[readonly] {
    background: #f8fafc;
    color: var(--text);
    cursor: default;
}

.pod-serial-menu {
    position: relative;
    z-index: 40;
    background: #fff;
}

.pod-serial-menu > summary {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 62px;
    align-items: center;
    overflow: hidden;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.pod-serial-menu > summary::-webkit-details-marker {
    display: none;
}

.pod-serial-menu.no-options > summary {
    justify-content: center;
    color: var(--muted);
    cursor: default;
    pointer-events: none;
}

.pod-serial-options {
    position: absolute;
    z-index: 10020;
    top: calc(100% + 2px);
    left: 0;
    display: none;
    min-width: 190px;
    max-height: 320px;
    overflow: auto;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.pod-serial-menu[open] .pod-serial-options {
    display: grid;
    gap: 2px;
}

.pod-serial-options button,
.pod-serial-options label {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.pod-serial-options button:hover,
.pod-serial-options label:hover {
    background: #e8f1ff;
}

.pod-serial-options input {
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.pod-serial-clear {
    margin-bottom: 4px;
    color: #2563eb !important;
}

.pod-panel-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.pod-delivered {
    margin-right: auto;
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 900px) {
    .pod-panel-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .pod-saved-notes {
        min-height: 240px;
    }

    .pod-panel-body .pod-document {
        overflow: visible;
    }
}

.task-title-block {
    min-width: 360px;
}

.task-status-strip {
    margin-left: auto;
    display: flex;
    align-items: end;
    gap: 12px;
}

.task-status-count {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 34px;
}

.task-status-count strong {
    display: grid;
    place-items: center;
    width: 18px;
    min-height: 34px;
    border-radius: 5px;
    background: #6b7280;
    color: white;
    font-size: 11px;
    font-weight: 850;
}

.task-status-count span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.task-status-count.status strong {
    background: var(--orange);
}

.task-status-count.done strong {
    background: var(--green);
}

.task-status-count.alert strong {
    background: var(--red);
}

.workspace-hero {
    padding: 8px 14px 12px;
    border-bottom: 1px solid var(--line);
    background: #edf5ff;
}

.task-subpage-tabs,
.task-project-mode-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfcff;
}

.task-subpage-tabs button,
.task-project-mode-tabs button {
    min-width: 86px;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    background: #e8ebef;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.task-subpage-tabs button.active,
.task-project-mode-tabs button.active {
    background: #dbeafe;
    color: var(--blue);
}

.task-toolbar-divider {
    width: 1px;
    height: 28px;
    margin: 0 6px;
    background: var(--line);
}

.task-format-control,
.task-color-button,
.task-subpage-tabs .task-format-toggle,
.task-subpage-tabs #taskManualButton,
.task-subpage-tabs #taskAutoButton {
    height: 28px;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    background: #e8ebef;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.task-format-control {
    min-width: 150px;
    padding: 0 28px 0 12px;
}

.task-format-control.small {
    min-width: 74px;
}

.task-format-control.percent {
    min-width: 86px;
}

.task-format-control.menu {
    min-width: 92px;
}

.task-subpage-tabs .task-format-toggle {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.task-subpage-tabs #taskManualButton,
.task-subpage-tabs #taskAutoButton {
    min-width: 70px;
    padding: 0 12px;
}

.task-subpage-tabs .task-format-toggle.active,
.task-subpage-tabs #taskManualButton.active,
.task-subpage-tabs #taskAutoButton.active {
    background: #dbeafe;
    color: var(--blue);
}

.task-color-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 104px;
    padding: 0 10px;
    cursor: pointer;
    white-space: nowrap;
}

.task-color-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.color-swatch {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex: 0 0 auto;
}

.color-swatch.highlight {
    background: #ffd328;
}

.color-swatch.text {
    background: #000000;
}

.task-color-button:has(input:disabled),
.task-format-control:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.task-subpage {
    min-height: calc(100vh - 298px);
}

.project-subpage {
    padding: 10px 10px 16px;
    background: #fbfcfe;
}

.task-project-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.task-project-heading h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.task-project-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 850;
}

.task-project-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.task-project-mode-tabs {
    padding: 0;
    margin-bottom: 14px;
    border: 0;
    background: transparent;
}

.task-project-mode-tabs button {
    width: 170px;
}

.project-info-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
    gap: 12px;
    align-items: start;
}

.project-info-card,
.project-doc-card,
.empty-task-subpage {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.project-info-card {
    padding: 12px;
}

.project-info-card h3,
.project-doc-section h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 900;
}

.project-info-fields {
    display: grid;
    gap: 8px;
}

.project-field-row {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 28px;
}

.project-field-row > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.project-field-row input,
.project-field-row select,
.project-field-row textarea,
.project-field-row output {
    width: 100%;
    min-width: 0;
    min-height: 26px;
    border: 1px solid #d9e2ef;
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    padding: 4px 8px;
}

.project-field-row output {
    display: flex;
    align-items: center;
    background: #f8fafc;
    color: var(--muted);
}

.project-field-row input:disabled {
    background: #f1f3f5;
    color: var(--muted);
}

.project-field-row select.done,
.project-field-row select.info,
.project-field-row select.warning,
.project-field-row select.purple,
.project-field-row select.alert,
.project-field-row select.status {
    border-color: transparent;
}

.project-field-row select.status {
    color: var(--orange);
    background-color: #fff2e8;
}

.project-field-row select.done {
    color: var(--green);
    background-color: #e9f8ef;
}

.project-field-row select.alert {
    color: var(--red);
    background-color: #ffecef;
}

.project-field-row select.info {
    color: var(--blue);
    background-color: var(--blue-soft);
}

.project-field-row select.purple {
    color: var(--purple);
    background-color: #fdeafd;
}

.project-field-row select.warning {
    color: var(--orange);
    background-color: #fff2e8;
}

.notes-row {
    align-items: start;
}

.notes-row textarea {
    min-height: 280px;
    resize: vertical;
}

.project-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
}

.project-toggle input {
    width: auto;
}

.status-date-row > div {
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr) 48px;
    align-items: center;
    gap: 8px;
}

.status-date-row input[type="checkbox"] {
    width: auto;
}

.project-category-lines {
    display: grid;
    gap: 4px;
}

.project-category-lines b,
.project-category-lines small {
    min-height: 24px;
    border-radius: 6px;
    padding: 4px 8px;
}

.project-category-lines b {
    background: #eef2ff;
    color: var(--blue);
    font-size: 12px;
}

.project-category-lines small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.project-inline-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
}

.project-doc-section {
    margin-top: 18px;
}

.project-child-section {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.project-child-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.project-child-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
}

.project-child-header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.project-child-section table {
    width: 100%;
    border-collapse: collapse;
}

.project-child-section th,
.project-child-section td {
    height: 34px;
    border-bottom: 1px solid var(--line);
    padding: 6px 10px;
    text-align: left;
    font-size: 12px;
}

.project-child-section th {
    background: #f7f9fc;
    color: var(--muted);
    font-weight: 900;
}

.project-child-section td span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 850;
}

.project-doc-card {
    padding: 10px;
}

.project-doc-card h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 900;
}

.project-doc-grid {
    display: grid;
    grid-template-columns: 280px 280px minmax(420px, 1fr);
    gap: 14px;
    align-items: start;
}

.project-doc-grid h5 {
    margin: 0 0 6px;
    font-size: 13px;
}

.project-doc-grid b,
.doc-file-header b {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.doc-list,
.doc-empty {
    min-height: 118px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f6f8;
    padding: 5px;
}

.doc-list {
    display: grid;
    align-content: start;
    gap: 4px;
}

.doc-list button {
    justify-content: flex-start;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    background: #e9ecef;
    text-align: left;
}

.doc-list button.selected {
    background: #dbeafe;
    color: var(--blue);
}

.doc-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.doc-add-row,
.doc-file-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.doc-add-row input {
    flex: 1;
    min-height: 26px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 8px;
}

.doc-file-header {
    justify-content: flex-end;
    margin: 0 0 8px;
}

.doc-file-header b {
    margin-right: auto;
    margin-bottom: 0;
}

.empty-task-subpage {
    padding: 22px;
}

.reports-subpage {
    padding: 18px;
    background: #fbfcfe;
}

.reports-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.reports-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 900;
}

.reports-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 14px;
}

.report-card {
    min-height: 230px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px;
}

.report-card-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
}

.report-card-header h3 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 900;
}

.report-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
}

.report-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
}

.report-icon.blue {
    color: var(--blue);
    background: var(--blue-soft);
}

.report-icon.orange {
    color: var(--orange);
    background: #fff2e8;
}

.report-icon.green {
    color: var(--green);
    background: #e9f8ef;
}

.report-icon.purple {
    color: var(--purple);
    background: #fdeafd;
}

.report-menu-actions {
    display: flex;
    gap: 6px;
}

.report-depth-row {
    display: grid;
    grid-template-columns: auto 310px minmax(120px, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.report-depth-row span,
.report-depth-row small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.report-depth-row select {
    width: 100%;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #eef2f7;
    font-size: 12px;
    font-weight: 800;
}

.report-row-list {
    display: grid;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.report-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    min-height: 34px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.report-row span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.report-row strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-row strong.done {
    color: var(--green);
}

.report-row strong.warning {
    color: var(--orange);
}

.report-row strong.alert {
    color: var(--red);
}

.report-row strong.info {
    color: var(--blue);
}

.report-row strong.purple {
    color: var(--purple);
}

.task-summary-widget {
    display: grid;
    grid-template-columns: 160px 190px 520px 430px;
    align-items: start;
    justify-content: start;
    gap: 18px;
    max-width: 1360px;
}

.task-summary-widget section {
    min-width: 0;
}

.summary-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.summary-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-progress-row strong {
    font-size: 30px;
    line-height: 1;
}

.progress-ring {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: conic-gradient(var(--green) calc(var(--progress) * 1%), #dfe7f0 0);
    position: relative;
    display: inline-block;
}

.progress-ring::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: #edf5ff;
}

.timeline-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.timeline-control button {
    min-width: 34px;
    min-height: 24px;
    padding: 2px 8px;
}

.status-columns {
    display: flex;
    align-items: end;
    gap: 16px;
    min-height: 74px;
}

.status-column {
    display: grid;
    justify-items: center;
    gap: 3px;
}

.status-column strong {
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
}

.status-column.status strong {
    color: var(--orange);
}

.status-column.done strong {
    color: var(--green);
}

.status-column.alert strong {
    color: var(--red);
}

.status-column span:last-child {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.status-bar {
    display: block;
    width: 20px;
    min-height: 16px;
    border-radius: 5px;
    background: #5e6570;
}

.status-column.status .status-bar {
    background: var(--orange);
}

.status-column.done .status-bar {
    background: var(--green);
}

.status-column.alert .status-bar {
    background: var(--red);
}

.date-pair {
    display: flex;
    gap: 26px;
    margin-bottom: 8px;
    font-weight: 850;
}

.date-pair small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.schedule-bar-row {
    display: grid;
    grid-template-columns: 64px minmax(150px, 1fr) 42px;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.schedule-track {
    height: 13px;
    border-radius: 999px;
    background: white;
    overflow: hidden;
}

.schedule-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.schedule-track i.done {
    background: var(--green);
}

.schedule-track i.status {
    background: var(--orange);
}

.schedule-bar-row strong {
    color: var(--muted);
    font-size: 11px;
}

.summary-schedule p {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 850;
}

.summary-schedule p span {
    color: var(--muted);
    font-weight: 700;
}

.summary-schedule .on-track {
    color: var(--green);
}

.summary-schedule .delayed {
    color: var(--red);
}

.valve-counts {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.valve-counts div {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 38px;
}

.valve-counts strong {
    font-size: 18px;
    line-height: 1;
    color: var(--blue);
}

.valve-counts span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.valve-counts .status strong {
    color: var(--orange);
}

.valve-counts .info strong {
    color: var(--blue);
}

.valve-counts .alert strong {
    color: var(--red);
}

.valve-counts .done strong {
    color: var(--green);
}

.summary-compact strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-stat {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.hero-stat span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.hero-stat strong {
    display: block;
    margin-top: 4px;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-workspace-full {
    padding: 0;
}

.task-workspace-full .panel-header {
    border-bottom: 1px solid var(--line);
}

.task-timeline-strip {
    display: grid;
    grid-template-columns: 92px minmax(720px, 1fr) 92px;
    align-items: stretch;
    gap: 0;
    min-height: 74px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    overflow: hidden;
}

.timeline-edge-label {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
}

.timeline-edge-label:last-child {
    border-left: 1px solid var(--line);
    border-right: 0;
}

.timeline-grid {
    display: grid;
    grid-template-rows: 24px 24px 26px;
    min-width: calc(var(--timeline-days, 30) * 28px);
}

.timeline-month-row,
.timeline-week-row,
.timeline-day-row {
    display: grid;
    grid-template-columns: repeat(var(--timeline-days, 30), minmax(28px, 1fr));
}

.timeline-month-row span,
.timeline-week-row span,
.timeline-day-row span {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.timeline-day-row span.today {
    border-left: 2px solid var(--green);
    border-right: 2px solid var(--green);
    background: #e9f8ef;
    color: var(--green);
}

.full-task-scroll {
    height: calc(100vh - 356px);
    border: 0;
}

.task-workspace-full th:nth-child(1),
.task-workspace-full td:nth-child(1) {
    width: 72px;
}

.task-workspace-full th:nth-child(2),
.task-workspace-full td:nth-child(2) {
    width: 76px;
}

.task-workspace-full th:nth-child(3),
.task-workspace-full td:nth-child(3) {
    width: 420px;
}

.task-workspace-full th:nth-child(4),
.task-workspace-full td:nth-child(4) {
    width: 130px;
}

.task-workspace-full th:nth-child(5),
.task-workspace-full td:nth-child(5) {
    width: 150px;
}

.task-workspace-full th:nth-child(6),
.task-workspace-full td:nth-child(6) {
    width: 110px;
}

.task-workspace-full th:nth-child(7),
.task-workspace-full td:nth-child(7),
.task-workspace-full th:nth-child(8),
.task-workspace-full td:nth-child(8),
.task-workspace-full th:nth-child(9),
.task-workspace-full td:nth-child(9),
.task-workspace-full th:nth-child(10),
.task-workspace-full td:nth-child(10),
.task-workspace-full th:nth-child(11),
.task-workspace-full td:nth-child(11) {
    width: 140px;
    max-width: 140px;
}

.task-workspace-full th:nth-child(12),
.task-workspace-full td:nth-child(12) {
    width: 300px;
    max-width: 300px;
}

.task-workspace-full tr.selected-row td {
    background: #e3f0ff;
}

.task-spreadsheet-cell {
    position: relative;
    user-select: none;
}

.task-workspace-full tr.selected-row .task-spreadsheet-cell {
    background: #e3f0ff;
}

.task-workspace-full .task-spreadsheet-cell.cell-selected {
    background: #d9ebff;
    box-shadow: inset 0 0 0 1px #8dbdff;
}

.task-workspace-full .task-spreadsheet-cell.cell-active {
    box-shadow: inset 0 0 0 2px #2f86ff;
}

.task-workspace-full .task-spreadsheet-cell[data-editable="false"].cell-selected {
    background: #eef5ff;
}

body.task-cell-range-selecting,
body.task-cell-range-selecting * {
    user-select: none !important;
}

.task-spreadsheet-cell.cell-selected input,
.task-spreadsheet-cell.cell-selected select,
.task-spreadsheet-cell.cell-selected textarea {
    background: transparent;
}

.task-marker-cell {
    color: var(--muted);
    text-align: center;
}

.task-marker-cell input {
    width: auto;
    margin: 0 6px;
}

.drag-handle {
    color: #7b8491;
    font-weight: 900;
}

.task-mode-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--green);
}

.task-mode-dot.child {
    background: var(--blue);
}

.task-title-input,
.editable-task-text-cell input,
.new-task-row input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.new-task-name-wrap {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding-left: var(--task-indent, 0);
}

.new-task-name-wrap > span {
    color: var(--muted);
    font-size: 17px;
    font-weight: 650;
    text-align: center;
}

.task-title-input:focus,
.editable-task-text-cell input:focus,
.new-task-row input:focus {
    outline: 1px solid #7fb2ff;
    border-radius: 4px;
    background: #ffffff;
}

.parent-task-cell .task-title-input {
    font-weight: 900;
}

.new-task-row td {
    color: var(--muted);
    font-weight: 750;
}

.new-subtask-row td {
    background: #fbfcfe;
}

.reports-view {
    padding-top: 8px;
}

.reports-panel {
    min-height: calc(100vh - 138px);
    padding: 16px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(32, 36, 43, 0.06);
}

.reports-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.reports-title-row h2 {
    font-size: 22px;
    line-height: 1.05;
}

.reports-title-row p,
.report-card-title p,
.reports-save-row p {
    color: var(--muted);
    font-weight: 700;
}

.reports-controls {
    display: grid;
    grid-template-columns: 180px 210px 180px 220px 160px 170px repeat(3, 120px);
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.reports-controls > label,
.reports-checks {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.reports-controls select {
    width: 100%;
    min-height: 31px;
}

.reports-checks label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.reports-checks input {
    width: auto;
}

.reports-metric {
    min-height: 62px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcff;
}

.reports-metric span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.reports-metric strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
    line-height: 1;
}

.reports-save-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    margin: 0 -16px 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fbfcff;
}

.reports-save-row > span {
    color: var(--muted);
    font-size: 18px;
}

.reports-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-card {
    min-height: 212px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcff;
}

.report-card-title {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.report-card-title h3 {
    margin: 0 0 2px;
    font-size: 17px;
}

.report-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 18px;
    font-weight: 900;
}

.report-icon.blue {
    color: var(--blue);
    background: var(--blue-soft);
}

.report-icon.green {
    color: var(--green);
    background: #e7f8ee;
}

.report-icon.orange {
    color: var(--orange);
    background: #fff1e6;
}

.report-icon.purple {
    color: var(--purple);
    background: #fceaff;
}

.report-row-list {
    display: grid;
    margin-top: 9px;
}

.report-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    min-height: 32px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.report-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.report-row strong {
    font-weight: 850;
}

@media (max-width: 1200px) {
    .app-shell {
        min-width: 1000px;
    }

    .workspace-hero {
        grid-template-columns: 1fr;
    }
}
