/* Version 2.06.06.2026.22 */
:root {
    --theme-dark: #1e293b;
    --theme-dark-light: #334155;
    --theme-dark-lighter: #475569;
    --theme-contrast: #ffffff;
    --canvas-bg: #e8edf3;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #d8e1ea;
    --panel-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    --text-color: #1f2933;
    --muted-text: #66788a;
    --input-border: #c9d4df;
    --grid-line: rgba(31, 41, 55, 0.10);
    --active-row-bg: #edf4fb;
    --confirmed-row-bg: #f0fdf4;
    --left-panel-width: 720px;
    --right-panel-width: 860px;
}

body.theme-Default {
    --theme-dark: #1e293b;
    --theme-dark-light: #334155;
    --theme-dark-lighter: #475569;
    --theme-contrast: #ffffff;
    --canvas-bg: #e8edf3;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #d8e1ea;
    --text-color: #1f2933;
    --muted-text: #66788a;
    --grid-line: rgba(31, 41, 55, 0.10);
    --active-row-bg: #edf4fb;
    --confirmed-row-bg: #f0fdf4;
}

body.theme-Sunrise {
    --theme-dark: #9a5a31;
    --theme-dark-light: #b97447;
    --theme-dark-lighter: #c9895a;
    --theme-contrast: #ffffff;
    --canvas-bg: #f7efe7;
    --panel-bg: rgba(255, 253, 251, 0.98);
    --panel-border: #e6d2c4;
    --text-color: #382516;
    --muted-text: #7a5e4a;
    --grid-line: rgba(154, 90, 49, 0.10);
    --active-row-bg: #fbeee4;
    --confirmed-row-bg: #f2fbef;
}

body.theme-Sunset {
    --theme-dark: #5a3b72;
    --theme-dark-light: #6f4c8b;
    --theme-dark-lighter: #8363a0;
    --theme-contrast: #ffffff;
    --canvas-bg: #f3eef8;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #ddcee9;
    --text-color: #2f2140;
    --muted-text: #6a5a7b;
    --grid-line: rgba(90, 59, 114, 0.11);
    --active-row-bg: #efe7f7;
    --confirmed-row-bg: #eef9f0;
}

body.theme-Harbor {
    --theme-dark: #2f6170;
    --theme-dark-light: #3d7687;
    --theme-dark-lighter: #5290a3;
    --theme-contrast: #ffffff;
    --canvas-bg: #eaf3f5;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #cfe0e4;
    --text-color: #1f3740;
    --muted-text: #5d7580;
    --grid-line: rgba(47, 97, 112, 0.11);
    --active-row-bg: #e8f3f6;
    --confirmed-row-bg: #edf8ee;
}

body.theme-Sage {
    --theme-dark: #5a6f57;
    --theme-dark-light: #6e866b;
    --theme-dark-lighter: #849b80;
    --theme-contrast: #ffffff;
    --canvas-bg: #eef3ed;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #d6dfd4;
    --text-color: #2e3b2c;
    --muted-text: #687566;
    --grid-line: rgba(90, 111, 87, 0.11);
    --active-row-bg: #edf4eb;
    --confirmed-row-bg: #edf8ee;
}

/* DEV CHANGE START */
body.theme-Appletini {
    --theme-dark: #9fc236;
    --theme-dark-light: #b7d529;
    --theme-dark-lighter: #c8df70;
    --theme-contrast: #ffffff;
    --canvas-bg: #edf7dc;
    --panel-bg: rgba(255, 255, 250, 0.98);
    --panel-border: #cadf9d;
    --text-color: #263719;
    --muted-text: #66734f;
    --grid-line: rgba(79, 118, 0, 0.13);
    --active-row-bg: #e7f3cf;
    --confirmed-row-bg: #f0fbef;
}

body.theme-Caribbean {
    --theme-dark: #4768bf;
    --theme-dark-light: #6f8ad0;
    --theme-dark-lighter: #9fd7f2;
    --theme-contrast: #ffffff;
    --canvas-bg: #e8f1fb;
    --panel-bg: rgba(250, 253, 255, 0.98);
    --panel-border: #bfd4ef;
    --text-color: #15233c;
    --muted-text: #5a6f8c;
    --grid-line: rgba(0, 47, 141, 0.12);
    --active-row-bg: #e0edfb;
    --confirmed-row-bg: #edf8ee;
}

body.theme-Claymation {
    --theme-dark: #6a6a6a;
    --theme-dark-light: #8a8a8a;
    --theme-dark-lighter: #a4a4a4;
    --theme-contrast: #ffffff;
    --canvas-bg: #eeeeee;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #d3d3d3;
    --text-color: #252525;
    --muted-text: #686868;
    --grid-line: rgba(68, 68, 68, 0.10);
    --active-row-bg: #e9edf1;
    --confirmed-row-bg: #f0f7ef;
}

body.theme-ElectricBlue {
    --theme-dark: #052684;
    --theme-dark-light: #1c3e74;
    --theme-dark-lighter: #2f69b3;
    --theme-contrast: #ffffff;
    --canvas-bg: #e9f6fd;
    --panel-bg: rgba(250, 253, 255, 0.98);
    --panel-border: #b7ddf2;
    --text-color: #152438;
    --muted-text: #5a7390;
    --grid-line: rgba(28, 62, 116, 0.12);
    --active-row-bg: #e0f1fb;
    --confirmed-row-bg: #edf8ee;
}

body.theme-Harvest {
    --theme-dark: #bd6307;
    --theme-dark-light: #d58218;
    --theme-dark-lighter: #b18e65;
    --theme-contrast: #ffffff;
    --canvas-bg: #fff5e8;
    --panel-bg: rgba(255, 253, 249, 0.98);
    --panel-border: #e7cba9;
    --text-color: #352414;
    --muted-text: #7a5f43;
    --grid-line: rgba(151, 70, 44, 0.12);
    --active-row-bg: #faead8;
    --confirmed-row-bg: #f0f8ed;
}

body.theme-LucidDream {
    --theme-dark: #86bfe5;
    --theme-dark-light: #a9d3ef;
    --theme-dark-lighter: #c8e3f5;
    --theme-contrast: #ffffff;
    --canvas-bg: #eef8ff;
    --panel-bg: rgba(252, 254, 255, 0.98);
    --panel-border: #c8e2f2;
    --text-color: #1f3445;
    --muted-text: #5f7890;
    --grid-line: rgba(105, 155, 201, 0.13);
    --active-row-bg: #e6f4fc;
    --confirmed-row-bg: #edf8ee;
}

body.theme-Nautilus {
    --theme-dark: #456287;
    --theme-dark-light: #5f7ea2;
    --theme-dark-lighter: #f36f21;
    --theme-contrast: #ffffff;
    --canvas-bg: #e9f1f7;
    --panel-bg: rgba(250, 253, 255, 0.98);
    --panel-border: #c0d4e5;
    --text-color: #1c2d3e;
    --muted-text: #617688;
    --grid-line: rgba(34, 62, 110, 0.12);
    --active-row-bg: #e2edf6;
    --confirmed-row-bg: #edf8ee;
}

body.theme-Pear {
    --theme-dark: #4f7600;
    --theme-dark-light: #636a4c;
    --theme-dark-lighter: #9bb740;
    --theme-contrast: #ffffff;
    --canvas-bg: #f0f5df;
    --panel-bg: rgba(255, 255, 250, 0.98);
    --panel-border: #d1df9e;
    --text-color: #283415;
    --muted-text: #687253;
    --grid-line: rgba(79, 118, 0, 0.12);
    --active-row-bg: #eaf2d6;
    --confirmed-row-bg: #f0fbef;
}

body.theme-PhoenixDefault {
    --theme-dark: #5896a8;
    --theme-dark-light: #6faebe;
    --theme-dark-lighter: #9fc9d2;
    --theme-contrast: #ffffff;
    --canvas-bg: #e8eef1;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --panel-border: #b7c8ce;
    --text-color: #24272b;
    --muted-text: #66707a;
    --grid-line: rgba(88, 150, 168, 0.10);
    --active-row-bg: #a8ced7;
    --confirmed-row-bg: #f0f7ef;
}

body.theme-RedPlanet {
    --theme-dark: #9b141c;
    --theme-dark-light: #b01818;
    --theme-dark-lighter: #cf6760;
    --theme-contrast: #ffffff;
    --canvas-bg: #fbebe9;
    --panel-bg: rgba(255, 252, 252, 0.98);
    --panel-border: #e8c5c5;
    --text-color: #381516;
    --muted-text: #7d5d5d;
    --grid-line: rgba(176, 0, 0, 0.12);
    --active-row-bg: #fae5e4;
    --confirmed-row-bg: #f0f8ed;
}

body.theme-RubberBlack {
    --theme-dark: #000000;
    --theme-dark-light: #7d7d7d;
    --theme-dark-lighter: #a0a0a0;
    --theme-contrast: #ffffff;
    --canvas-bg: #e5e7eb;
    --panel-bg: rgba(252, 252, 252, 0.98);
    --panel-border: #c7c7c7;
    --text-color: #191919;
    --muted-text: #646464;
    --grid-line: rgba(0, 0, 0, 0.11);
    --active-row-bg: #e8edf4;
    --confirmed-row-bg: #f0f7ef;
}

body.theme-Trendy {
    --theme-dark: #2f9547;
    --theme-dark-light: #43a456;
    --theme-dark-lighter: #65b7f0;
    --theme-contrast: #ffffff;
    --canvas-bg: #eaf7f1;
    --panel-bg: rgba(250, 255, 252, 0.98);
    --panel-border: #bedfc9;
    --text-color: #1c3325;
    --muted-text: #5c7868;
    --grid-line: rgba(36, 162, 68, 0.12);
    --active-row-bg: #dff3e7;
    --confirmed-row-bg: #edf8ee;
}
/* DEV CHANGE END */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-color);
    background: var(--canvas-bg);
}

button, input, select, textarea {
    font: inherit;
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-color);
}

textarea {
    resize: vertical;
}

.theme-button {
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
    padding: 10px 14px;
    cursor: pointer;
}

.theme-button:hover {
    background: var(--theme-dark-lighter);
}

.theme-button.active-tool {
    background: var(--theme-dark-lighter);
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.18);
    filter: saturate(1.08) brightness(1.04);
}

.theme-button.active-tool:hover {
    background: var(--theme-dark-light);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.small-toolbar-btn {
    width: 42px;
    padding-left: 0;
    padding-right: 0;
}

.small-panel-btn {
    padding: 10px 12px;
}

.top-toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 14px;
    background: var(--theme-dark);
    color: var(--theme-contrast);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


.current-user-display {
    font-weight: 700;
}

.toolbar-right {
    gap: 12px;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
}

/* DEV CHANGE START */
.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
}

.brand-version {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    opacity: 0.85;
}

.support-icon-btn {
    width: 28px;
    height: 28px;
    margin-left: 2px;
    display: inline-grid;
    place-items: center;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--theme-contrast);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.support-icon-btn:hover,
.support-icon-btn:focus-visible {
    background: rgba(255, 255, 255, 0.26);
    outline: 2px solid rgba(255, 255, 255, 0.38);
    outline-offset: 1px;
}
/* DEV CHANGE END */

.toolbar-project-name {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.workspace-shell {
    position: relative;
    height: calc(100vh - 58px);
    overflow: hidden;
}

.center-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.canvas-toolbar-info {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--panel-border);
    z-index: 1;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.08 */
body.left-panel-open .canvas-toolbar-info {
    padding-left: max(14px, calc(var(--left-panel-width, 360px) + 14px));
    justify-content: flex-start;
}

body.right-panel-open .canvas-toolbar-info {
    padding-right: max(14px, calc(var(--right-panel-width, 360px) + 14px));
}

.canvas-toolbar-info span {
    overflow-wrap: anywhere;
}
/* CHANGE END */

/* DEV CHANGE START */
.canvas-nav-button {
    appearance: none;
    -webkit-appearance: none;
    min-width: 36px;
    height: 34px;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    color: var(--theme-dark);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.canvas-nav-button:hover,
.canvas-nav-button:focus-visible {
    color: var(--theme-dark-lighter);
    outline: none;
}
/* DEV CHANGE END */

.canvas-wrapper {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: var(--canvas-bg);
}

#planCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.01 */
.drawing-hint-panel {
    position: absolute;
    left: 14px;
    bottom: 14px;
    max-width: min(520px, calc(100% - 260px));
    min-height: 32px;
    display: none;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(30, 41, 59, 0.22);
    background: rgba(255, 255, 255, 0.92);
    color: var(--theme-dark);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
    z-index: 2;
}

.drawing-hint-panel.show {
    display: flex;
}

.calibration-scale-modal-card,
.shortcut-help-modal-card {
    width: min(560px, calc(100vw - 40px));
}

.shortcut-help-grid {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 0;
    border: 1px solid var(--panel-border);
}

.shortcut-help-grid > div {
    padding: 9px 10px;
    border-bottom: 1px solid var(--panel-border);
}

.shortcut-help-grid > div:nth-child(odd) {
    font-weight: 800;
    color: var(--theme-dark);
    background: #f5f8fb;
}

.shortcut-help-grid > div:nth-last-child(-n + 2) {
    border-bottom: none;
}
/* CHANGE END */

/* DEV CHANGE START */
.overview-map {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 190px;
    height: 126px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    cursor: crosshair;
}

/* DEV CHANGE END */

.panel-handle {
    position: absolute;
    top: 56px;
    z-index: 8;
    width: 34px;
    height: 62px;
    border: none;
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
    cursor: pointer;
    box-shadow: var(--panel-shadow);
    display: grid;
    place-items: center;
    font-size: 0;
}

/* DEV CHANGE START */
.panel-handle::before {
    content: none;
}

.panel-handle-right::before {
    content: none;
}

.panel-handle svg {
    width: 28px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.panel-handle:has(svg)::before {
    content: none;
}
/* DEV CHANGE END */

.panel-handle-left {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.panel-handle-right {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.overlay-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 7;
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    box-shadow: var(--panel-shadow);
    transition: transform 0.18s ease;
}

.overlay-panel-left {
    left: 0;
    width: clamp(360px, var(--left-panel-width), calc(100vw - 48px));
    border-right: 1px solid var(--panel-border);
    transform: translateX(0);
}

.overlay-panel-right {
    right: 0;
    width: clamp(360px, var(--right-panel-width), calc(100vw - 48px));
    border-left: 1px solid var(--panel-border);
    transform: translateX(0);
}

.overlay-panel-left.closed {
    transform: translateX(calc(-100% + 16px));
}

.overlay-panel-right.closed {
    transform: translateX(calc(100% - 16px));
}

.overlay-panel-header {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--panel-border);
}

.overlay-panel-title {
    font-weight: 700;
    font-size: 17px;
}

.overlay-panel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* DEV CHANGE START */
.panel-edge-actions {
    display: flex;
    align-items: center;
}

.panel-collapse-btn {
    width: 38px;
    height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    color: var(--theme-dark);
    border: none !important;
    background: transparent !important;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.panel-collapse-btn:hover {
    color: var(--theme-dark-lighter);
    background: transparent !important;
}

.panel-collapse-btn svg {
    width: 28px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.right-panel-title {
    margin-left: auto;
    text-align: right;
    font-size: 20px;
    letter-spacing: 0;
}

.panel-project-title,
.right-panel-title {
    font-size: 20px;
    font-weight: 800;
}
/* DEV CHANGE END */

.panel-mini-btn {
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-color);
    padding: 6px 10px;
    cursor: pointer;
}

.panel-mini-btn:hover,
.panel-mini-btn:focus-visible {
    border-color: var(--theme-dark-light);
    background: var(--active-row-bg);
    color: var(--theme-dark);
    outline: none;
}

.panel-mini-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.panel-collapse-btn:hover,
.panel-collapse-btn:focus-visible {
    border-color: transparent;
    background: transparent;
}

.panel-mini-btn.pinned {
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
}

/* DEV CHANGE START */
.panel-mini-btn.panel-collapse-btn {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
/* DEV CHANGE END */

.overlay-panel-body {
    flex: 1;
    overflow: auto;
    padding: 14px;
}

.right-panel-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-top: 10px;
}

.right-panel-tabs {
    display: flex;
    align-items: flex-end;
    padding: 6px 8px 0 8px;
    gap: 4px;
    border-bottom: 1.5px solid var(--theme-dark-light);
    position: relative;
}

.right-folder-tab {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    position: relative;
    bottom: -1.5px;
    flex: 0 1 auto;
    min-width: 60px;
    max-width: 320px;
    height: 36px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    z-index: 1;
    overflow: hidden;
}

/* SVG drawn by JS fills the tab shape */
.right-folder-tab svg.tab-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.right-folder-tab .tab-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 12px 3px 20px;
    pointer-events: none;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    line-height: 36px;
    gap: 6px;
    max-width: 100%;
}

.right-folder-tab .tab-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.right-folder-tab.active .tab-label {
    color: var(--theme-dark);
    font-weight: 800;
}

.right-folder-tab-project {
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 35px;
}

.right-tab-pane {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-top: 14px;
}

#rightPanelSheetTabLabel {
    display: block;
}


.panel-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    width: 12px;
    cursor: col-resize;
    touch-action: none;
}

.panel-resizer::after {
    content: "";
    position: absolute;
    top: 48px;
    bottom: 48px;
    width: 2px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.16);
    transition: background 0.15s ease;
}

.panel-resizer:hover::after,
.panel-resizing .panel-resizer::after {
    background: var(--theme-dark-light);
}

.panel-resizer-left {
    right: -6px;
}

.panel-resizer-left::after {
    right: 5px;
}

.panel-resizer-right {
    left: -6px;
}

.panel-resizer-right::after {
    left: 5px;
}

.panel-resizing {
    cursor: col-resize;
    user-select: none;
}

.panel-section {
    margin-bottom: 18px;
}

.panel-section h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
}

.scroll-list,
.task-list,
.grid-table {
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: #fbfcfd;
    overflow: auto;
}

.scroll-list {
    min-height: 90px;
    max-height: 250px;
}

.task-list,
.grid-table {
    max-height: 280px;
}

.list-item {
    padding: 10px;
    border-bottom: 1px solid #e4ebf2;
    cursor: pointer;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover,
.list-item.active {
    background: var(--active-row-bg);
}

.task-entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 60px 54px;
    gap: 8px;
    margin-bottom: 10px;
}

.inline-label,
.helper-text {
    color: var(--muted-text);
    font-size: 12px;
}

.task-row {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e4ebf2;
    cursor: pointer;
}

.task-row:last-child {
    border-bottom: none;
}

.task-row:hover,
.task-row.active {
    background: var(--active-row-bg);
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.detail-form {
    display: grid;
    gap: 12px;
}

.detail-form-row {
    display: grid;
    gap: 6px;
}

.detail-grid {
    display: grid;
    gap: 12px;
}

.detail-grid-four {
    grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
}

.detail-grid-three {
    grid-template-columns: auto auto 1fr;
    align-items: end;
}

.settings-save-row {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-line input {
    width: auto;
}

.grid-table-header,
.grid-table-row {
    display: grid;
    gap: 8px;
    align-items: center;
}

.grid-table-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    background: #f5f8fb;
    border-bottom: 1px solid var(--panel-border);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted-text);
}

.task-order-cols {
    grid-template-columns: 24px 16px minmax(160px, 2.2fr) 15ch 4ch;
}

.measurement-cols {
    grid-template-columns: minmax(170px, 2.2fr) minmax(90px, 1.1fr) minmax(90px, 1fr) 15ch 4ch 28px;
}

.summary-cols {
    grid-template-columns: minmax(160px, 2fr) 15ch 4ch;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.04 */
.group-summary-cols {
    grid-template-columns: minmax(180px, 2fr) 13ch 15ch 4ch;
}

.group-summary-type {
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.group-summary-name {
    font-weight: 800;
}

.group-summary-cols .color-dot {
    margin-right: 8px;
    vertical-align: -2px;
}
/* CHANGE END */

.grid-table-row {
    padding: 10px;
    border-bottom: 1px solid #e4ebf2;
    cursor: pointer;
}

.grid-table-row:last-child {
    border-bottom: none;
}

.grid-table-row:hover,
.grid-table-row.active {
    background: var(--active-row-bg);
}

.drag-handle {
    position: relative;
    cursor: grab;
    user-select: none;
    color: var(--muted-text);
    font-weight: 700;
    font-size: 0;
}

.drag-handle::before {
    content: "\22EE";
    font-size: 16px;
    line-height: 1;
}

.grid-table-row.dragging {
    opacity: 0.45;
}

.row-muted {
    color: var(--muted-text);
    font-size: 12px;
}

/* DEV CHANGE START */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(244, 248, 252, 0.72), rgba(244, 248, 252, 0.28)),
        url("/images/login-blueprint-bg.png") center / cover no-repeat;
}

.login-card {
    width: min(420px, calc(100vw - 40px));
    background-color: rgba(255, 255, 255, 0.97);
    background-image:
        linear-gradient(rgba(100, 180, 220, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 180, 220, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
}

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    flex: 0 0 auto;
}

.login-brand-copy {
    min-width: 0;
}

.login-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-card h1 {
    margin: 0;
    color: #142033;
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
}

.login-support-plus {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    background: #2f6ebb;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.subtle-text {
    margin: 6px 0 0 0;
    color: var(--muted-text);
    font-size: 13px;
}

.login-version {
    margin: 18px 0 0;
    text-align: center;
}

.login-divider {
    height: 1px;
    margin: 22px 0;
    background: #d8e1ea;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
}

.login-input-wrap {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    border: 1px solid var(--input-border);
    border-radius: 7px;
    background: #ffffff;
    overflow: hidden;
}

.login-input-wrap:focus-within {
    border-color: #2f6ebb;
    box-shadow: 0 0 0 3px rgba(47, 110, 187, 0.16);
}

.login-input-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 100%;
    color: #8b98aa;
    text-align: center;
    font-size: 12px;
}

.login-user-icon::before,
.login-user-icon::after,
.login-lock-icon::before,
.login-lock-icon::after,
.login-home-icon::before,
.login-home-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.login-user-icon::before {
    width: 8px;
    height: 8px;
    top: 11px;
    border-radius: 50%;
    background: currentColor;
}

.login-user-icon::after {
    width: 14px;
    height: 7px;
    top: 21px;
    border-radius: 7px 7px 3px 3px;
    background: currentColor;
}

.login-lock-icon::before {
    width: 13px;
    height: 11px;
    top: 19px;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.login-lock-icon::after {
    width: 10px;
    height: 9px;
    top: 10px;
    border: 2px solid currentColor;
    border-bottom: none;
    border-radius: 9px 9px 0 0;
}

.login-input-wrap input {
    border: none;
    min-height: 42px;
    padding: 9px 10px 9px 0;
    background: transparent;
}

.login-input-wrap input:focus {
    outline: none;
}

.login-button {
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    background: linear-gradient(180deg, #3676c5, #1f5ba8);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-button::before {
    content: none;
}

.login-divider-with-text {
    height: auto;
    margin: 18px 0 12px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #6b7280;
    font-size: 13px;
}

.login-divider-with-text::before,
.login-divider-with-text::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d8e1ea;
}

.login-footer-copy {
    margin-top: 8px;
    text-align: center;
    color: var(--muted-text);
    font-size: 14px;
}

.login-home-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 13px;
    margin-right: 4px;
    color: #1f5ba8;
    vertical-align: -2px;
}

.login-home-icon::before {
    width: 10px;
    height: 10px;
    left: 2px;
    top: 1px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.login-home-icon::after {
    width: 10px;
    height: 8px;
    left: 2px;
    bottom: 0;
    border: 2px solid currentColor;
    border-top: none;
}

.login-footer-copy a {
    color: #1f5ba8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-footer-copy a:hover,
.login-footer-copy a:focus-visible {
    color: #164987;
}
/* DEV CHANGE END */

.message-area {
    margin-top: 10px;
    min-height: 20px;
    color: #8a1f1f;
}

/* ── Panel undock button ────────────────────────────── */
/* DEV CHANGE START */
.panel-undock-btn {
    font-size: 13px;
    padding: 2px 6px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.panel-undock-btn:hover { opacity: 1; }

.tab-undock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: inherit;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    line-height: 1;
    flex-shrink: 0;
    pointer-events: all;
    user-select: none;
}
/* Only show undock btn on ACTIVE tab — prevents undocking inactive (blank) tabs */
.right-folder-tab.active .tab-undock-btn { opacity: 0.5; }
.right-folder-tab.active .tab-undock-btn:hover { opacity: 1; background: rgba(0,0,0,0.12); }
/* Hide on inactive tabs entirely */
.right-folder-tab:not(.active) .tab-undock-btn { opacity: 0; pointer-events: none; }

/* ── Floating panel ─────────────────────────────────── */
.floating-panel {
    position: fixed;
    background: var(--panel-bg);
    border: 1.5px solid var(--theme-dark-light);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(15,23,42,0.22), 0 2px 8px rgba(15,23,42,0.10);
    display: flex;
    flex-direction: column;
    z-index: 900;
    min-width: 260px;
    min-height: 180px;
    overflow: hidden;
}

.float-panel-header {
    background: var(--theme-dark);
    color: var(--theme-contrast);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
}
.float-panel-header:active { cursor: grabbing; }

.float-panel-title {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.float-panel-controls {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
}

.float-panel-btn {
    appearance: none;
    background: rgba(255,255,255,0.14);
    border: none;
    color: var(--theme-contrast);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.float-panel-btn:hover { background: rgba(255,255,255,0.28); }

/* Minimized state — height controlled by JS, CSS hides body */
.floating-panel.minimized .float-panel-body { display: none; }
.floating-panel.minimized .float-panel-sheet-bar { display: none; }
.floating-panel.minimized .float-resize-grip { display: none; }



.float-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.float-panel-sheet-bar {
    padding: 5px 12px;
    background: var(--active-row-bg);
    border-bottom: 1px solid var(--panel-border);
    font-size: 11px;
    color: var(--muted-text);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.float-panel-sheet-bar strong { color: var(--theme-dark); font-weight: 700; }

.float-resize-grip {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: se-resize;
    z-index: 10;
}
.float-resize-grip::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--panel-border);
    border-bottom: 2px solid var(--panel-border);
    border-radius: 0 0 2px 0;
    opacity: 0.6;
}

/* Float indicator in tab strip */
.float-tab-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    font-size: 11px;
    color: var(--muted-text);
    position: relative;
    bottom: -1.5px;
    white-space: nowrap;
}
.float-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Settings modal tabs ────────────────────────────── */
.settings-tab-strip {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid var(--panel-border);
    padding: 0 20px;
    margin-bottom: 0;
}
.settings-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted-text);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover { color: var(--text-color); }
.settings-tab.active { color: var(--theme-dark); border-bottom-color: var(--theme-dark-light); }

.settings-tab-pane { display: none; }
.settings-tab-pane.active { display: block; }

/* Layout tab controls */
.layout-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}
.layout-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
.layout-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--active-row-bg);
}
.layout-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.layout-status-dot.docked { background: var(--theme-dark-light); }
.layout-status-dot.floating { background: #f59e0b; }
.layout-status-label { font-weight: 700; flex: 1; }
.layout-status-state { color: var(--muted-text); font-size: 11px; }
/* DEV CHANGE END */


/* ── Fixed right panel bars (never float) ──────────── */
/* DEV CHANGE START */
.right-sheet-name-bar {
    padding: 10px 16px;
    background: var(--theme-dark);
    border-bottom: 1px solid var(--theme-dark-light);
    flex-shrink: 0;
}

.right-sheet-name-text {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--theme-contrast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

/* Hide sheet name bar when not on sheet tab */
.right-sheet-name-bar.hidden {
    display: none;
}
/* DEV CHANGE END */

/* ── Quick save dirty indicator ─────────────────────── */
/* DEV CHANGE START */
.quick-save-btn {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
    position: relative;
}
.quick-save-btn:hover {
    background: rgba(255,255,255,0.12);
}
/* Diskette colours — light grey, clean state dim */
.save-disk-body    { fill: #cccccc; }
.save-disk-shutter { fill: #aaaaaa; }
.save-disk-notch   { fill: #888888; }
.save-disk-label   { fill: #dddddd; }
.save-disk-line    { stroke: #bbbbbb; stroke-width: 1; }

.save-disk-svg {
    overflow: visible;
    display: block;
    opacity: 0.45;
    transition: opacity 0.3s, filter 0.3s;
    filter: none;
}

/* Dirty — full brightness + theme colour glow around silhouette */
.quick-save-btn.dirty .save-disk-svg {
    opacity: 1;
}

@keyframes disk-glow {
    0%   { filter: drop-shadow(0 0 0px var(--theme-dark-light)); }
    50%  { filter: drop-shadow(0 0 6px var(--theme-dark-light)) drop-shadow(0 0 14px var(--theme-dark-light)); }
    100% { filter: drop-shadow(0 0 4px var(--theme-dark-light)) drop-shadow(0 0 10px var(--theme-dark-light)); }
}
.quick-save-btn.dirty .save-disk-svg {
    animation: disk-glow 0.6s ease-out forwards;
}

.quick-save-btn:hover .save-disk-svg { opacity: 0.7; }
.quick-save-btn.dirty:hover .save-disk-svg { opacity: 1; }
/* DEV CHANGE END */

/* DEV CHANGE START */
/* ── Floating placeholder in right panel ────────────── */
.float-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 120px;
}
.float-placeholder-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--muted-text);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}
.float-placeholder-msg button {
    margin-top: 4px;
}

/* ── Tab undock button on LEFT side ─────────────────── */
.tab-undock-left {
    margin-left: 0;
    margin-right: 6px;
    order: -1;
}
/* DEV CHANGE END */

/* ── Range slider — themed with CSS variables ────────── */
/* DEV CHANGE START */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--panel-border);
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

/* Track fill — uses a gradient from theme color to border color */
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(
        to right,
        var(--theme-dark-light) 0%,
        var(--theme-dark-light) var(--range-progress, 50%),
        var(--panel-border) var(--range-progress, 50%),
        var(--panel-border) 100%
    );
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--panel-border);
}

input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--theme-dark-light);
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    border: 2px solid var(--panel-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: -5px;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    border: 2px solid var(--panel-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--theme-dark);
    transform: scale(1.15);
}

input[type="range"]:focus::-webkit-slider-thumb {
    outline: 2px solid var(--theme-dark-light);
    outline-offset: 2px;
}
/* DEV CHANGE END */

/* ── Task Summary label rows ────────────────────────── */
/* DEV CHANGE START */
.task-label-row {
    background: var(--active-row-bg);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.3px;
}
.task-label-text {
    color: var(--theme-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* ── Group Summary ───────────────────────────────────── */
.group-summary-row {
    background: var(--active-row-bg);
    font-weight: 600;
}
.group-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}
/* DEV CHANGE END */

/* ── Floating panel content fills available space ───── */
/* DEV CHANGE START */
.floating-panel .left-section,
.floating-panel .panel-section {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.floating-panel .left-section-body,
.floating-panel .collapsible-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.floating-panel .right-tab-pane {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: block !important;
}
/* DEV CHANGE END */

/* ── Override task-list max-height when floating ────── */
/* DEV CHANGE START */
.floating-panel .task-list,
.floating-panel .grid-table {
    max-height: none;
    flex: 1;
    min-height: 0;
}

.floating-panel #taskList {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}

/* Also remove max-height on the active task select when floating */
.floating-panel #activeTaskSelect {
    flex-shrink: 0;
}
/* DEV CHANGE END */

@media (max-width: 1280px) {
    .overlay-panel-right {
        width: clamp(360px, var(--right-panel-width), calc(100vw - 48px));
    }
}


.task-row,
.grid-table-row,
.list-item {
    font-size: 14px;
}

.task-row > div,
.grid-table-row > div,
.list-item {
    overflow: hidden;
    text-overflow: ellipsis;
}

#measurementLabelInput,
#measurementNotesInput,
#measurementTaskSelect {
    font-size: 14px;
}

#measurementNotesInput {
    min-height: 120px;
}

/* ── Panel undock button ────────────────────────────── */
/* DEV CHANGE START */
.panel-undock-btn {
    font-size: 13px;
    padding: 2px 6px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.panel-undock-btn:hover { opacity: 1; }

.tab-undock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: inherit;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    line-height: 1;
    flex-shrink: 0;
    pointer-events: all;
    user-select: none;
}
/* Only show undock btn on ACTIVE tab — prevents undocking inactive (blank) tabs */
.right-folder-tab.active .tab-undock-btn { opacity: 0.5; }
.right-folder-tab.active .tab-undock-btn:hover { opacity: 1; background: rgba(0,0,0,0.12); }
/* Hide on inactive tabs entirely */
.right-folder-tab:not(.active) .tab-undock-btn { opacity: 0; pointer-events: none; }

/* ── Floating panel ─────────────────────────────────── */
.floating-panel {
    position: fixed;
    background: var(--panel-bg);
    border: 1.5px solid var(--theme-dark-light);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(15,23,42,0.22), 0 2px 8px rgba(15,23,42,0.10);
    display: flex;
    flex-direction: column;
    z-index: 900;
    min-width: 260px;
    min-height: 180px;
    overflow: hidden;
}

.float-panel-header {
    background: var(--theme-dark);
    color: var(--theme-contrast);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
}
.float-panel-header:active { cursor: grabbing; }

.float-panel-title {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.float-panel-controls {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
}

.float-panel-btn {
    appearance: none;
    background: rgba(255,255,255,0.14);
    border: none;
    color: var(--theme-contrast);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.float-panel-btn:hover { background: rgba(255,255,255,0.28); }

/* Minimized state — height controlled by JS, CSS hides body */
.floating-panel.minimized .float-panel-body { display: none; }
.floating-panel.minimized .float-panel-sheet-bar { display: none; }
.floating-panel.minimized .float-resize-grip { display: none; }



.float-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.float-panel-sheet-bar {
    padding: 5px 12px;
    background: var(--active-row-bg);
    border-bottom: 1px solid var(--panel-border);
    font-size: 11px;
    color: var(--muted-text);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.float-panel-sheet-bar strong { color: var(--theme-dark); font-weight: 700; }

.float-resize-grip {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: se-resize;
    z-index: 10;
}
.float-resize-grip::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--panel-border);
    border-bottom: 2px solid var(--panel-border);
    border-radius: 0 0 2px 0;
    opacity: 0.6;
}

/* Float indicator in tab strip */
.float-tab-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    font-size: 11px;
    color: var(--muted-text);
    position: relative;
    bottom: -1.5px;
    white-space: nowrap;
}
.float-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Settings modal tabs ────────────────────────────── */
.settings-tab-strip {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid var(--panel-border);
    padding: 0 20px;
    margin-bottom: 0;
}
.settings-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted-text);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover { color: var(--text-color); }
.settings-tab.active { color: var(--theme-dark); border-bottom-color: var(--theme-dark-light); }

.settings-tab-pane { display: none; }
.settings-tab-pane.active { display: block; }

/* Layout tab controls */
.layout-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}
.layout-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
.layout-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--active-row-bg);
}
.layout-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.layout-status-dot.docked { background: var(--theme-dark-light); }
.layout-status-dot.floating { background: #f59e0b; }
.layout-status-label { font-weight: 700; flex: 1; }
.layout-status-state { color: var(--muted-text); font-size: 11px; }
/* DEV CHANGE END */


/* ── Fixed right panel bars (never float) ──────────── */
/* DEV CHANGE START */
.right-sheet-name-bar {
    padding: 10px 16px;
    background: var(--theme-dark);
    border-bottom: 1px solid var(--theme-dark-light);
    flex-shrink: 0;
}

.right-sheet-name-text {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--theme-contrast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

/* Hide sheet name bar when not on sheet tab */
.right-sheet-name-bar.hidden {
    display: none;
}
/* DEV CHANGE END */

/* ── Quick save dirty indicator ─────────────────────── */
/* DEV CHANGE START */
.quick-save-btn {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
    position: relative;
}
.quick-save-btn:hover {
    background: rgba(255,255,255,0.12);
}
/* Diskette colours — light grey, clean state dim */
.save-disk-body    { fill: #cccccc; }
.save-disk-shutter { fill: #aaaaaa; }
.save-disk-notch   { fill: #888888; }
.save-disk-label   { fill: #dddddd; }
.save-disk-line    { stroke: #bbbbbb; stroke-width: 1; }

.save-disk-svg {
    overflow: visible;
    display: block;
    opacity: 0.45;
    transition: opacity 0.3s, filter 0.3s;
    filter: none;
}

/* Dirty — full brightness + theme colour glow around silhouette */
.quick-save-btn.dirty .save-disk-svg {
    opacity: 1;
}

@keyframes disk-glow {
    0%   { filter: drop-shadow(0 0 0px var(--theme-dark-light)); }
    50%  { filter: drop-shadow(0 0 6px var(--theme-dark-light)) drop-shadow(0 0 14px var(--theme-dark-light)); }
    100% { filter: drop-shadow(0 0 4px var(--theme-dark-light)) drop-shadow(0 0 10px var(--theme-dark-light)); }
}
.quick-save-btn.dirty .save-disk-svg {
    animation: disk-glow 0.6s ease-out forwards;
}

.quick-save-btn:hover .save-disk-svg { opacity: 0.7; }
.quick-save-btn.dirty:hover .save-disk-svg { opacity: 1; }
/* DEV CHANGE END */

/* DEV CHANGE START */
/* ── Floating placeholder in right panel ────────────── */
.float-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 120px;
}
.float-placeholder-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--muted-text);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}
.float-placeholder-msg button {
    margin-top: 4px;
}

/* ── Tab undock button on LEFT side ─────────────────── */
.tab-undock-left {
    margin-left: 0;
    margin-right: 6px;
    order: -1;
}
/* DEV CHANGE END */

/* ── Range slider — themed with CSS variables ────────── */
/* DEV CHANGE START */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--panel-border);
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

/* Track fill — uses a gradient from theme color to border color */
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(
        to right,
        var(--theme-dark-light) 0%,
        var(--theme-dark-light) var(--range-progress, 50%),
        var(--panel-border) var(--range-progress, 50%),
        var(--panel-border) 100%
    );
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--panel-border);
}

input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--theme-dark-light);
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    border: 2px solid var(--panel-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: -5px;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-dark-light);
    border: 2px solid var(--panel-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--theme-dark);
    transform: scale(1.15);
}

input[type="range"]:focus::-webkit-slider-thumb {
    outline: 2px solid var(--theme-dark-light);
    outline-offset: 2px;
}
/* DEV CHANGE END */

/* ── Task Summary label rows ────────────────────────── */
/* DEV CHANGE START */
.task-label-row {
    background: var(--active-row-bg);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.3px;
}
.task-label-text {
    color: var(--theme-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* ── Group Summary ───────────────────────────────────── */
.group-summary-row {
    background: var(--active-row-bg);
    font-weight: 600;
}
.group-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}
/* DEV CHANGE END */

/* ── Floating panel content fills available space ───── */
/* DEV CHANGE START */
.floating-panel .left-section,
.floating-panel .panel-section {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.floating-panel .left-section-body,
.floating-panel .collapsible-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.floating-panel .right-tab-pane {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: block !important;
}
/* DEV CHANGE END */

/* ── Override task-list max-height when floating ────── */
/* DEV CHANGE START */
.floating-panel .task-list,
.floating-panel .grid-table {
    max-height: none;
    flex: 1;
    min-height: 0;
}

.floating-panel #taskList {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}

/* Also remove max-height on the active task select when floating */
.floating-panel #activeTaskSelect {
    flex-shrink: 0;
}
/* DEV CHANGE END */

@media (max-width: 1280px) {
    .overlay-panel-right {
        width: clamp(360px, var(--right-panel-width), calc(100vw - 48px));
    }
}


/* v4 usability increase: make left workspace wide enough to read and work */
.overlay-panel-left .overlay-panel-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.overlay-panel-left .panel-section h3 {
    font-size: 16px;
}

.overlay-panel-left .panel-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.overlay-panel-left .task-entry-grid {
    grid-template-columns: minmax(260px, 1fr) 82px 48px 84px;
}

.overlay-panel-left #taskNameInput,
.overlay-panel-left #activeTaskSelect,
.overlay-panel-left .list-item,
.overlay-panel-left .task-row,
.overlay-panel-left .row-muted {
    font-size: 15px;
}

.overlay-panel-left .scroll-list,
.overlay-panel-left .task-list {
    max-height: 320px;
}

.overlay-panel-left .task-list {
    flex: 1;
    min-height: 220px;
}

.overlay-panel-left #sheetsSection.collapsed + .panel-section .task-list {
    min-height: 420px;
    max-height: none;
}

.overlay-panel-left .task-row {
    grid-template-columns: 18px 1fr;
    gap: 12px;
    padding: 12px;
}

.overlay-panel-left .color-dot {
    width: 18px;
    height: 18px;
}

.overlay-panel-left .inline-label {
    font-size: 13px;
}

.hidden {
    display: none !important;
}

.menu-wrap {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    box-shadow: var(--panel-shadow);
    padding: 6px;
    z-index: 50;
}

.menu-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
}

.menu-item:hover {
    background: var(--active-row-bg);
}

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

/* DEV CHANGE START */
.section-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.collapsible-title-row {
    padding: 4px 0 8px;
}

.collapse-section-button {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: none;
    background: transparent;
    color: var(--text-color);
    padding: 8px 0 8px 38px;  /* ← 38px left padding to avoid the handle */
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.collapse-section-caret {
    width: 30px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    color: var(--theme-dark-light);
}

.collapse-section-caret svg {
    width: 30px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.collapsible-section.collapsed .collapsible-content {
    display: none;
}

.sheet-list-fixed {
    max-height: 320px;
}
/* DEV CHANGE END */

.task-entry-grid-compact {
    grid-template-columns: minmax(0, 1fr) 130px 36px 64px !important;
    gap: 4px;
    padding: 6px 8px;
}

/* Name input fills available space */
.task-entry-grid-compact input[type="text"] {
    min-width: 0;
    width: 100%;
}

.task-row {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    border-left: 5px solid transparent;
    transition: border-color 0.15s;
}

.task-row.task-row-label {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 42px;
    color: var(--muted-text);
    background: rgba(255, 255, 255, 0.65);
}

.task-row.task-row-label:hover {
    background: var(--active-row-bg);
}

.task-actions,
.sheet-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    padding: 4px;
    min-width: 28px;
    min-height: 28px;
    line-height: 1;
    border: none;
    background: transparent;
    border-radius: 6px;
}

.icon-btn:hover {
    background: var(--active-row-bg);
    color: var(--theme-dark);
}

/* DEV CHANGE START */
.icon-btn,
.palette-button {
    display: inline-grid;
    place-items: center;
}

.icon-btn svg,
.palette-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crosshair-btn {
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.crosshair-btn::before,
.crosshair-btn::after {
    content: none;
}
.crosshair-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.trash-btn {
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.trash-btn::before,
.trash-btn::after {
    content: none;
}
.trash-btn svg {
    width: 16px;
    height: 18px;
    display: block;
}

.palette-button {
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-color: var(--selected-task-color, var(--panel-border));
    color: var(--selected-task-color, var(--theme-dark-light));
}

.palette-button svg circle {
    fill: currentColor;
    stroke: none;
}

.visually-hidden-color-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
/* DEV CHANGE END */

.color-dot.clickable {
    cursor: pointer;
}

.sheet-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

/* DEV CHANGE START */
.sheet-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sheet-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-capability-badge,
.doc-capability-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

.sheet-capability-badge.vector,
.doc-capability-badge.vector {
    border: 1px solid #15803d;
    background: #dcfce7;
    color: #14532d;
}

.sheet-capability-badge.raster,
.doc-capability-badge.raster {
    border: 1px solid #b45309;
    background: #fef3c7;
    color: #78350f;
}
/* DEV CHANGE END */

.modal-shell {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    width: min(720px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
    overflow: auto;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: var(--panel-shadow);
    padding: 16px;
    color: var(--text-color);
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.08 */
.support-chat-modal-card {
    width: min(1080px, calc(100vw - 32px));
    height: min(760px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-chat-transcript {
    flex: 1;
    min-height: 420px;
    width: 100%;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: #ffffff;
    overflow: auto;
    padding: 12px;
}

.support-chat-message {
    max-width: 82%;
    margin-bottom: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    line-height: 1.35;
    white-space: pre-wrap;
}

.support-chat-line {
    margin: 0 0 6px;
}

.support-chat-spacer {
    height: 8px;
}

.support-chat-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    column-gap: 4px;
    margin: 0 0 5px;
    white-space: normal;
}

.support-chat-bullet {
    grid-template-columns: 18px 1fr;
}

.support-chat-marker {
    color: var(--muted-text);
    font-weight: 700;
    text-align: right;
}

.support-chat-message.user {
    margin-left: auto;
    background: var(--theme-dark-light);
    color: var(--theme-contrast);
}

.support-chat-message.assistant {
    margin-right: auto;
    background: #f5f8fb;
    color: var(--text-color);
}

.support-chat-compose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 10px;
}

.support-chat-compose textarea {
    width: 100%;
    resize: vertical;
    min-height: 68px;
}

.support-chat-actions {
    margin-top: 10px;
}

.support-chat-link {
    text-decoration: none;
}
/* CHANGE END */

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--theme-dark-light);
    color: var(--theme-dark);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-dark);
}

.modal-project-list {
    max-height: 420px;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.11 */
.project-open-modal-card {
    width: min(860px, calc(100vw - 40px));
}

.project-list-header,
.project-list-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px);
    gap: 16px;
    align-items: center;
}

.project-list-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 12px;
    background: var(--active-row-bg);
    border: 1px solid var(--panel-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: var(--theme-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.project-list-table {
    max-height: 460px;
    border: 1px solid var(--panel-border);
    border-radius: 0 0 8px 8px;
    background: var(--panel-bg);
}

.project-list-row {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
}

.project-list-row:hover,
.project-list-row.active {
    background: var(--active-row-bg);
}

.project-list-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.project-list-date {
    color: var(--muted-text);
    font-size: 13px;
    white-space: nowrap;
}

.project-list-empty {
    padding: 18px 12px;
    color: var(--muted-text);
}

body.no-project-loaded .panel-handle {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: auto;
}

body.no-project-loaded .panel-handle svg {
    opacity: 0.7;
}
/* CHANGE END */


.detail-grid-two {
    grid-template-columns: 1fr 1fr;
}

.task-edit-modal-card {
    width: min(520px, calc(100vw - 40px));
}

.task-edit-modal-card input[type="color"] {
    width: 100%;
    min-height: 42px;
    padding: 4px;
}

.task-edit-grid {
    grid-template-columns: 80px minmax(130px, 1fr) minmax(100px, 1fr);
}

.task-edit-grid.label-task-mode {
    grid-template-columns: minmax(130px, 1fr);
}

.task-edit-grid.label-task-mode .task-edit-color-field,
.task-edit-grid.label-task-mode .task-edit-production-field {
    display: none;
}

.modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--panel-border);
}

.panel-project-title-empty {
    color: var(--muted-text);
    font-style: italic;
    font-weight: 600;
}

.left-panel-section-title {
    padding-left: 5ch;
}

.task-name-content {
    min-width: 0;
    cursor: pointer;
}

.task-name-content > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-unit-badge {
    display: inline-block;
    margin-top: 3px;
    color: var(--muted-text);
    font-size: 12px;
}

.confirm-modal-card {
    width: min(460px, calc(100vw - 40px));
}

.confirm-modal-message {
    margin: 10px 0 18px 0;
    line-height: 1.45;
}


.checkbox-line input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    background: var(--panel-bg);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
}

.checkbox-line input[type="checkbox"]::after {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: transform 0.12s ease;
    background: var(--theme-dark-light);
    border-radius: 2px;
}

.checkbox-line input[type="checkbox"]:checked::after {
    transform: scale(1);
}

.measurement-cols {
    /* CHANGE START */
    /* Thomas Nonmacher */
    /* Version 2.06.06.2026.02 */
    grid-template-columns: minmax(170px, 2.2fr) minmax(90px, 1.1fr) minmax(90px, 1fr) 15ch 4ch 28px;
    /* CHANGE END */
}

.task-order-cols > div,
.summary-cols > div,
.group-summary-cols > div,
.measurement-cols > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.measurement-cols .measurement-col-delete,
.measurement-cols .measurement-col-delete-header {
    text-align: center;
    overflow: visible;
    text-overflow: clip;
}

.measurement-cols .measurement-col-delete button {
    min-width: 24px;
    width: 24px;
    padding-left: 0;
    padding-right: 0;
}

.measurement-edit-modal-card {
    width: min(760px, calc(100vw - 40px));
}

/* DEV CHANGE START */
.measurement-audit-grid input[readonly] {
    background: #f8fafc;
    color: var(--muted-text);
}

.grid-table-row.measurement-deduction-row {
    background: rgba(250, 204, 21, 0.13);
}
/* DEV CHANGE END */

.settings-modal-card {
    width: min(560px, calc(100vw - 40px));
}

/* DEV CHANGE START */
.phoenix-export-modal-card {
    width: min(860px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.phoenix-export-modal-card .detail-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.phoenix-export-preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.phoenix-export-options {
    margin-top: 8px;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.04.29.2026.02 */
.phoenix-export-type-section,
.phoenix-export-mode-section,
.phoenix-export-preview-section {
    margin-top: 8px;
}

.export-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.export-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s;
}

.export-choice:hover {
    border-color: var(--theme-dark-light);
    background: var(--active-row-bg);
}

.export-choice input {
    margin: 0;
    accent-color: var(--theme-dark-light);
}

.export-preview-grid {
    flex: 1;
    min-height: 180px;
    max-height: none;
    overflow: auto;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel-bg);
}

.export-preview-row {
    display: grid;
    grid-template-columns: 34px 54px minmax(160px, 1.8fr) minmax(72px, 0.7fr) minmax(60px, 0.5fr) minmax(72px, 0.6fr);
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    font-size: 13px;
}

.export-preview-row.sortable {
    cursor: grab;
}

.export-preview-row.sortable:active,
.export-preview-row.dragging {
    cursor: grabbing;
}

.export-preview-row.dragging {
    opacity: 0.58;
}

.export-preview-row:last-child {
    border-bottom: 0;
}

.export-preview-row.header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--active-row-bg);
    color: var(--theme-dark);
    font-weight: 800;
    border-bottom: 1px solid var(--theme-dark-light);
}

.export-preview-row.label-row {
    color: var(--theme-dark);
    font-weight: 700;
    background: var(--confirmed-row-bg);
}

.export-preview-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.export-preview-handle {
    color: var(--theme-dark-light);
    font-weight: 900;
    letter-spacing: 1px;
    text-align: center;
}
/* CHANGE END */
/* DEV CHANGE END */

.measurement-delete-btn {
    padding: 4px 8px;
    min-width: 30px;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.06 */
.measurement-assist-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: -4px 0 8px;
    flex-wrap: wrap;
}

.measurement-assist-status {
    margin: 0 0 10px;
    padding: 7px 9px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: #f5f8fb;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.25;
}
/* CHANGE END */

.document-import-modal-card {
    width: min(1200px, calc(100vw - 40px));
}

.document-import-toolbar {
    align-items: end;
}

.document-import-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.document-pager-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
}

.document-thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    max-height: 60vh;
    overflow: auto;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.08 */
.document-loading-state {
    grid-column: 1 / -1;
    min-height: 220px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--panel-border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted-text);
    font-weight: 700;
}
/* CHANGE END */

.doc-thumb-card {
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-thumb-card.imported {
    opacity: 0.8;
}

.doc-thumb-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
}

.doc-thumb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.doc-thumb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.document-page-preview-card {
    width: min(1100px, calc(100vw - 40px));
}

.document-page-preview-wrap {
    max-height: 80vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    background: #f8fafc;
}

.document-page-preview-image {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1100px) {
    .document-thumb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .document-thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.settings-form-layout {
    gap: 16px;
}

.settings-section {
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--active-row-bg);
}

.settings-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-dark);
    letter-spacing: 0.02em;
}

.settings-grid-row {
    align-items: end;
    gap: 12px;
}

.settings-save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cursor-feedback-host {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 250;
}

.cursor-feedback {
    position: fixed;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
    max-width: min(calc(100vw - 24px), 820px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cursor-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.cursor-feedback.snap {
    background: rgba(2, 132, 199, 0.94);
}

.cursor-feedback.shortcut {
    background: rgba(22, 163, 74, 0.94);
}

#rightPanelSheetTabLabel {
    display: block;
}

#rightPanelSheetTabLabel {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
    unicode-bidi: plaintext;
}

/* CHANGE START */
/* Thomas Nonmacher */
/* Version 2.06.06.2026.09 */
.support-icon-btn {
    background: transparent;
    color: inherit;
    padding: 0;
    overflow: hidden;
}

.support-icon-btn:hover,
.support-icon-btn:focus-visible {
    background: transparent;
    outline: 2px solid rgba(255, 255, 255, 0.55);
}

.support-first-aid-icon {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: cover;
    border-radius: 5px;
}

.theme-button:disabled,
.panel-mini-btn:disabled,
.menu-item:disabled,
.quick-save-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.25);
}

.menu-item:disabled:hover {
    background: transparent;
}

.task-entry-grid-compact {
    grid-template-columns: minmax(0, 1fr) 76px 36px 60px !important;
}

.task-entry-grid-compact select {
    min-width: 0;
    text-overflow: ellipsis;
}

.sheet-row {
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.sheet-label {
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

.sheet-row .sheet-capability-badge {
    display: none;
}

.sheet-name-text {
    display: block;
    min-width: 0;
}

.task-row {
    min-height: 42px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.task-row.task-row-label {
    min-height: 38px;
}

.task-name-content {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.task-name-content > div {
    display: inline;
}

.task-unit-badge {
    display: inline;
    margin: 0 0 0 4px;
    font-size: inherit;
    color: var(--muted-text);
    font-weight: 700;
}

.left-panel-section-title {
    white-space: nowrap;
}

.app-message-modal-card,
.app-prompt-modal-card,
.app-choice-modal-card,
.task-color-choice-card {
    width: min(500px, calc(100vw - 40px));
}

.app-message-busy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
    color: var(--muted-text);
    font-weight: 700;
}

.app-message-busy.hidden {
    display: none;
}

.busy-spinner {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 3px solid rgba(100, 116, 139, 0.25);
    border-top-color: var(--theme-dark-light);
    animation: exacttake-spin 0.8s linear infinite;
}

@keyframes exacttake-spin {
    to { transform: rotate(360deg); }
}

.task-color-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.task-color-choice {
    min-height: 48px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel-bg);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.task-color-choice:hover,
.task-color-choice:focus-visible {
    outline: 2px solid var(--theme-dark-light);
    outline-offset: 1px;
}

.task-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.16);
}

.count-reference-modal-card {
    width: min(860px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.count-reference-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.count-reference-controls {
    display: grid;
    gap: 8px;
    padding: 10px 0 4px;
}

.count-reference-advanced {
    margin: 8px 0 10px;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
}

.count-reference-advanced summary {
    padding: 10px 0;
    color: var(--theme-dark);
    cursor: pointer;
    font-weight: 800;
}

.count-reference-primary-controls {
    display: grid;
    gap: 6px;
    margin: 4px 0 8px;
}

.count-reference-primary-controls label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 800;
}

.count-reference-primary-controls input[type="range"] {
    width: 100%;
}

.count-reference-preview-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 4px 0 8px;
    padding: 6px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--active-row-bg);
    color: var(--theme-dark);
    font-weight: 800;
}

.app-busy-spinner {
    width: 18px;
    height: 18px;
    color: var(--theme-dark);
    animation: exacttake-spin 0.85s linear infinite;
    flex: 0 0 auto;
}

.app-busy-spinner circle {
    fill: none;
    stroke: var(--panel-border);
    stroke-width: 3;
}

.app-busy-spinner path {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

@keyframes exacttake-spin {
    to {
        transform: rotate(360deg);
    }
}

.count-reference-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.count-preview-refresh-btn {
    min-height: 34px;
}

.count-template-preview {
    margin: 4px 0 8px;
}

.count-template-title {
    margin-bottom: 6px;
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 800;
}

.count-template-canvas {
    width: 264px;
    height: 144px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #fff;
    image-rendering: pixelated;
}

.count-reference-options {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.count-reference-options .check-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.count-reference-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--theme-dark-light);
    cursor: pointer;
}

#activeTaskLabel.active-task-colored {
    font-weight: 800;
}

.count-reference-controls label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 800;
}

.count-reference-controls input[type="range"] {
    width: 100%;
}

.count-reference-canvas {
    width: 204px;
    height: 204px;
    border-radius: 999px;
    border: 3px solid var(--theme-dark-light);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    background: #fff;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.count-reference-canvas:active {
    cursor: grabbing;
}

.quick-save-btn {
    overflow: visible;
}

.save-disk-body { fill: #d7dde4; stroke: #475569; stroke-width: 1.4; }
.save-disk-shutter { fill: #9aa8b8; stroke: #475569; stroke-width: 0.9; }
.save-disk-notch { fill: #475569; }
.save-disk-label { fill: #f8fafc; stroke: #64748b; stroke-width: 0.8; }
.save-disk-line { stroke: #475569; stroke-width: 1.2; }

.save-disk-svg {
    opacity: 0.72;
}

@keyframes disk-glow {
    0% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
    100% { filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.98)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.9)); }
}

.quick-save-btn.dirty .save-disk-svg {
    opacity: 1;
    animation: disk-glow 0.3s ease-out forwards;
}

@media (max-width: 760px) {
    .count-reference-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .task-color-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* CHANGE END */
