:root {
    --ink: #11161f;
    --rail: #0d121b;
    --sidebar: #151b26;
    --panel: #ffffff;
    --muted: #687385;
    --line: #dce3ea;
    --soft: #f4f7f8;
    --mint: #18b89a;
    --mint-dark: #0d7d70;
    --aqua: #58d7d0;
    --iris: #7f8cff;
    --sun: #e6a736;
    --danger: #c94b4b;
    --text: #17202b;
    --radius: 14px;
    --shadow: 0 18px 46px rgba(17, 22, 31, .075);
    --shadow-soft: 0 10px 28px rgba(17, 22, 31, .055);
    --glass: rgba(255, 255, 255, .72);
    --glass-strong: rgba(255, 255, 255, .88);
    --control-height: 42px;
    --control-radius: 11px;
    --control-font-size: .94rem;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    font-size: 16.15px;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fbff 0%, #eef7f7 48%, #faf8f3 100%);
    letter-spacing: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(88, 215, 208, .32);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(88, 215, 208, .34);
    outline-offset: 3px;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 56px 296px minmax(0, 1fr);
    background: linear-gradient(90deg, var(--rail) 0 56px, var(--sidebar) 56px 352px, transparent 352px);
    transition: grid-template-columns .18s ease;
}

html.sidebar-collapsed .app-shell {
    grid-template-columns: 56px 72px minmax(0, 1fr);
    background: linear-gradient(90deg, var(--rail) 0 56px, var(--sidebar) 56px 128px, transparent 128px);
}

.icon-rail {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 100vh;
    background: linear-gradient(180deg, #0d121b, #0a1018);
    color: #f7fbfb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 18px 10px;
}

.icon-rail a,
.rail-action,
.rail-user {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 800;
}

.rail-action {
    border: 0;
    cursor: pointer;
    font-size: 1.25rem;
}

.rail-quick {
    position: relative;
    z-index: 130;
}

.quick-actions-menu {
    position: absolute;
    left: 44px;
    top: -8px;
    z-index: 150;
    display: grid;
    gap: 4px;
    min-width: 170px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    background: rgba(18, 25, 37, .95);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
    backdrop-filter: blur(18px) saturate(140%);
}

.quick-actions-menu[hidden] {
    display: none;
}

.quick-actions-menu a {
    width: auto;
    height: auto;
    justify-content: flex-start;
    place-items: initial;
    padding: 9px 10px;
    border-radius: 11px;
    background: transparent;
    color: #e7eeee;
    font-size: .86rem;
}

.quick-actions-menu a:hover {
    background: rgba(255, 255, 255, .1);
}

.rail-mark {
    overflow: hidden;
    background: rgba(88, 215, 208, .14) !important;
    color: #07110f !important;
    box-shadow: 0 0 0 1px rgba(88, 215, 208, .32) inset;
}

.rail-mark img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.rail-spacer {
    flex: 1;
}

.rail-account {
    position: relative;
    z-index: 120;
}

.rail-user {
    border: 0;
    cursor: pointer;
}

.account-menu {
    position: absolute;
    left: 44px;
    bottom: 0;
    z-index: 1000;
    min-width: 172px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: rgba(18, 25, 37, .92);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .34);
    backdrop-filter: blur(18px) saturate(140%);
}

.account-menu a,
.account-menu button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: transparent;
    color: #edf4f3;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: left;
}

.account-menu a:hover,
.account-menu button:hover {
    background: rgba(255, 255, 255, .1);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    background:
        radial-gradient(circle at 70% 0%, rgba(88, 215, 208, .08), transparent 32%),
        linear-gradient(180deg, #151b26, #111824);
    color: #f8fbfa;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    transition: padding .18s ease, gap .18s ease;
}

.sidebar-collapse-toggle {
    position: absolute;
    top: 14px;
    right: 8px;
    z-index: 20;
    width: 26px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(222, 232, 232, .58);
    cursor: pointer;
}

.sidebar-collapse-toggle span,
.panel-collapse-toggle span {
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.sidebar-collapse-toggle:hover {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .9);
}

html.sidebar-collapsed .sidebar {
    padding: 18px 10px;
    gap: 18px;
    align-items: center;
}

html.sidebar-collapsed .sidebar-collapse-toggle span {
    transform: rotate(-135deg);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-right: 26px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: none;
    place-items: center;
    overflow: hidden;
    background: rgba(88, 215, 208, .14);
    border: 1px solid rgba(88, 215, 208, .28);
    color: #07110f;
    font-weight: 800;
}

.brand-mark img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-wordmark {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.brand-logo-dark {
    display: none;
}

.brand small {
    color: #aeb9bd;
    display: block;
    margin-top: -3px;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html.sidebar-collapsed .brand {
    justify-content: center;
    padding-right: 0;
}

html.sidebar-collapsed .brand-wordmark {
    display: none;
}

html.sidebar-collapsed .brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
}

html.sidebar-collapsed .brand-mark img {
    width: 28px;
    height: 28px;
}

html.sidebar-collapsed .nav {
    width: 100%;
    gap: 8px;
}

html.sidebar-collapsed .nav-group {
    width: 100%;
    gap: 6px;
}

html.sidebar-collapsed .nav-group-toggle {
    justify-content: center;
    min-height: 10px;
    padding: 2px 0;
}

html.sidebar-collapsed .nav-group-toggle span,
html.sidebar-collapsed .nav-group-toggle b {
    display: none;
}

html.sidebar-collapsed .nav-group.has-active .nav-group-toggle::before {
    opacity: .42;
}

html.sidebar-collapsed .nav-item {
    width: 100%;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 2px;
    padding: 0;
    justify-items: center;
}

html.sidebar-collapsed .nav a {
    width: 100%;
    justify-content: center;
    gap: 0;
    padding: 9px 2px;
}

html.sidebar-collapsed .nav a .nav-code {
    width: 34px;
    height: 34px;
    font-size: .72rem;
}

html.sidebar-collapsed .nav-label {
    display: none;
}

html.sidebar-collapsed .nav-color-toggle {
    width: 12px;
    height: 34px;
}

html.sidebar-collapsed .nav-color-menu {
    left: 46px;
    top: 0;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-group {
    display: grid;
    gap: 2px;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 26px;
    padding: 4px 8px 4px 30px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #798693;
    cursor: pointer;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.nav-group-toggle:hover {
    color: rgba(255, 255, 255, .76);
    background: rgba(255, 255, 255, .045);
}

.nav-group-toggle b {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.nav-group.is-open .nav-group-toggle b {
    transform: rotate(225deg);
}

.nav-group-toggle::before {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: .28;
}

.nav-group-items {
    display: grid;
    gap: 2px;
}

.nav-group.is-collapsed .nav-group-items {
    display: none;
}

.nav-item {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    border-radius: var(--radius);
    padding: 0 6px;
}

.nav-item.active {
    background: rgba(255, 255, 255, .075);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #d7dfdf;
    border-radius: var(--radius);
    padding: 11px 6px;
}

.nav a .nav-code {
    --nav-color: var(--mint);
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: .68rem;
    font-weight: 800;
    color: var(--nav-color);
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--nav-color) 22%, transparent) inset;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav a:hover,
.nav a:focus {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav a.active {
    color: #fff;
}

.nav a.active .nav-code {
    background: color-mix(in srgb, var(--nav-color) 20%, rgba(255, 255, 255, .06));
}

.nav-color-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 18px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    position: relative;
    color: rgba(215, 223, 223, .28);
    opacity: 1;
}

.nav-color-toggle::before {
    content: "\2022";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: .78rem;
    line-height: 1;
    font-weight: 900;
}

.nav-color-toggle:hover,
.nav-color-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .72);
}

.nav-color-menu {
    position: absolute;
    left: 0;
    right: auto;
    top: 36px;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, 22px);
    gap: 7px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(18, 25, 37, .94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px) saturate(140%);
}

.nav-color-menu[hidden] {
    display: none;
}

.nav-color-swatch {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: var(--swatch);
    cursor: pointer;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .06);
}

.shortcut-panel {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.shortcut-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.shortcut-panel small {
    color: #7e8b99;
    text-transform: uppercase;
    font-weight: 900;
    font-size: .68rem;
}

.shortcut-panel header a {
    color: var(--mint);
    font-size: .78rem;
    font-weight: 900;
}

.shortcut-panel > div {
    display: grid;
    gap: 6px;
}

.shortcut-link,
.shortcut-empty {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    color: #d9e2e2;
    font-weight: 800;
    overflow: hidden;
}

.shortcut-link .shortcut-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.shortcut-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-link:hover,
.shortcut-empty:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.shortcut-empty {
    color: #93a2af;
}

html.sidebar-collapsed .shortcut-panel {
    width: 100%;
    padding-top: 0;
}

html.sidebar-collapsed .shortcut-panel header {
    display: none;
}

html.sidebar-collapsed .shortcut-panel > div {
    justify-items: center;
}

html.sidebar-collapsed .shortcut-link {
    justify-content: center;
    width: 44px;
    min-height: 38px;
    padding: 8px;
    background: rgba(255, 255, 255, .045);
}

html.sidebar-collapsed .shortcut-empty,
html.sidebar-collapsed .shortcut-label {
    display: none;
}

html.sidebar-collapsed .sidebar-timer {
    display: none;
}

.shortcut-icon {
    --shortcut-color: #58d7d0;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--shortcut-color);
    border-radius: 8px;
}

.shortcut-icon::before,
.shortcut-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.shortcut-icon-flag::before {
    left: 7px;
    top: 4px;
    width: 2px;
    height: 17px;
    background: currentColor;
    border-radius: 2px;
}

.shortcut-icon-flag::after {
    left: 9px;
    top: 5px;
    width: 12px;
    height: 8px;
    border: 2px solid currentColor;
    border-left: 0;
    clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%);
}

.shortcut-icon-dollar::before {
    content: "$";
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 800;
}

.shortcut-icon-arrow::before {
    top: 6px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.shortcut-icon-arrow::after {
    left: 7px;
    bottom: 7px;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-45deg);
    transform-origin: center;
}

.shortcut-icon-folder::before {
    left: 4px;
    top: 8px;
    width: 17px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.shortcut-icon-folder::after {
    left: 6px;
    top: 5px;
    width: 8px;
    height: 5px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
}

.shortcut-icon-target {
    border: 2px solid currentColor;
    border-radius: 50%;
}

.shortcut-icon-target::before {
    inset: 6px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.shortcut-icon-target::after {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.shortcut-icon-clock {
    border: 2px solid currentColor;
    border-radius: 50%;
}

.shortcut-icon-clock::before {
    left: 11px;
    top: 5px;
    width: 2px;
    height: 8px;
    background: currentColor;
    border-radius: 2px;
}

.shortcut-icon-clock::after {
    left: 11px;
    top: 11px;
    width: 7px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(32deg);
    transform-origin: left center;
}

.shortcut-icon-check::before {
    width: 14px;
    height: 8px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(-45deg) translate(1px, -1px);
}

.shortcut-icon-spark::before,
.shortcut-icon-spark::after {
    background: currentColor;
    border-radius: 2px;
}

.shortcut-icon-spark::before {
    width: 3px;
    height: 18px;
}

.shortcut-icon-spark::after {
    width: 18px;
    height: 3px;
}

.sidebar-timer {
    margin-top: auto;
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(42, 55, 81, .96), rgba(31, 42, 63, .96));
    box-shadow: 0 18px 52px rgba(0, 0, 0, .22), 0 1px 0 rgba(255, 255, 255, .08) inset;
}

.sidebar-timer small {
    color: #7e8b99;
    text-transform: uppercase;
    font-weight: 800;
    font-size: .72rem;
}

.sidebar-timer strong,
.sidebar-timer b {
    color: #fff;
}

.sidebar-timer strong {
    font-size: .96rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-timer b {
    font-size: 1.16rem;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.sidebar-timer span {
    color: #aab4bf;
    font-size: .9rem;
}

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

.sidebar-timer select {
    min-height: 38px;
    padding: 7px 9px;
    background-color: rgba(15, 21, 31, .78);
    color: #f7fbfb;
    border-color: rgba(255, 255, 255, .12);
}

.sidebar-timer.is-active {
    align-content: start;
    gap: 10px;
}

.sidebar-timer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-timer-heading span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #f7fbfb;
    font-size: .76rem;
    font-weight: 900;
}

.sidebar-timer-list {
    display: grid;
    gap: 10px;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    padding-right: 2px;
    overscroll-behavior: contain;
}

.sidebar-timer-card {
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(11, 17, 27, .32);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset;
}

.sidebar-timer-card.machine {
    background: linear-gradient(135deg, rgba(13, 125, 112, .28), rgba(35, 49, 76, .48));
}

.timer-console {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 22px;
    gap: 8px;
    align-items: center;
    min-height: 48px;
    margin-top: 8px;
    padding: 7px 8px 7px 7px;
    border-radius: 999px;
    background: rgba(11, 17, 27, .7);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .05) inset;
    overflow: hidden;
}

.timer-control-form {
    display: grid;
}

.timer-round {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid #35ef71;
    background: rgba(53, 239, 113, .08);
    cursor: pointer;
}

.timer-round:hover {
    background: rgba(53, 239, 113, .16);
}

.timer-round-stop {
    border-color: #ff766b;
    background: rgba(255, 118, 107, .1);
}

.play-symbol {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #35ef71;
}

.stop-symbol {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    background: #ff766b;
}

.timer-jump {
    position: relative;
    justify-self: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #35ef71;
    background: rgba(53, 239, 113, .08);
    overflow: hidden;
}

.timer-jump::before,
.timer-jump::after {
    content: "";
    position: absolute;
    background: #35ef71;
}

.timer-jump::before {
    width: 7px;
    height: 7px;
    right: 6px;
    top: 5px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    background: transparent;
}

.timer-jump::after {
    width: 9px;
    height: 2px;
    right: 6px;
    top: 12px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-45deg);
    transform-origin: right center;
}

.main {
    grid-column: 3 / -1;
    min-width: 0;
    min-height: 100vh;
    padding: 26px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef7f7 48%, #faf8f3 100%);
    overflow-x: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.topbar h1 {
    font-size: 2rem;
}

.eyebrow {
    color: var(--mint-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .72rem;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1rem;
}

p {
    line-height: 1.55;
}

.user-chip {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    min-width: 160px;
}

.user-chip span,
.user-chip small {
    display: block;
}

.user-chip small {
    color: var(--muted);
}

.top-search {
    flex: 1;
    max-width: 440px;
}

.top-search input {
    min-height: var(--control-height);
    border-radius: 999px;
    border-color: rgba(141, 153, 168, .22);
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 12px 34px rgba(28, 42, 58, .06);
}

.grid {
    display: grid;
    gap: 16px;
}

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

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

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card,
.table-wrap,
.kanban-column,
.empty-state {
    background: var(--panel);
    border: 1px solid rgba(206, 217, 226, .76);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.workspace {
    position: relative;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: calc(100vh - 126px);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(206, 217, 226, .76);
    border-radius: var(--radius);
    overflow: hidden;
}

.workspace-list {
    position: relative;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, .7);
    min-width: 0;
}

.workspace-tools {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.stacked-filter {
    display: grid;
    gap: 8px;
}

.entity-list {
    max-height: calc(100vh - 250px);
    overflow: auto;
}

.entity-row {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1f4;
}

.entity-row:hover,
.entity-row.active {
    background: #f7fbfa;
}

.entity-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef2f4;
    color: #697481;
    font-weight: 800;
    flex: 0 0 auto;
}

.entity-icon.large {
    width: 52px;
    height: 52px;
}

.entity-text {
    min-width: 0;
}

.entity-text strong,
.entity-text small {
    display: block;
}

.entity-text small {
    margin-top: 8px;
    color: var(--muted);
}

.entity-text small span {
    display: inline-flex;
    margin-left: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
}

.workspace-main {
    min-width: 0;
    padding: 24px;
    background: linear-gradient(180deg, rgba(247, 250, 251, .86), rgba(255, 255, 255, .76));
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.detail-tabs {
    display: flex;
    gap: 26px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin: 0 -24px 20px;
    padding: 0 24px;
    background: #fff;
}

.detail-tabs a {
    padding: 14px 0 13px;
    color: #4e5865;
    border-bottom: 3px solid transparent;
    font-weight: 700;
}

.detail-tabs a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    margin-left: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(141, 153, 168, .12);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
}

.detail-tabs a.active,
.detail-tabs a:hover {
    color: var(--mint-dark);
    border-bottom-color: var(--mint);
}

.detail-tabs a.active span,
.detail-tabs a:hover span {
    background: rgba(24, 184, 154, .14);
    color: var(--mint-dark);
}

.context-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.context-breadcrumb a {
    color: var(--mint-dark);
}

.context-breadcrumb a::after {
    content: "/";
    margin-left: 6px;
    color: #9aa7b6;
}

.context-breadcrumb span {
    color: #7b8797;
}

.compact-stats {
    margin-bottom: 18px;
}

.grid.four.compact-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.compact-stats .card {
    box-shadow: none;
}

.compact-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

.plain-panel,
.flat-table {
    box-shadow: none;
}

.flat-table {
    border-radius: 0;
}

.flat-table th {
    background: #f0f1f2;
    color: #505b66;
}

.link-strong {
    color: #45b95b;
    font-weight: 800;
}

.progress {
    width: 170px;
    height: 5px;
    margin-top: 8px;
    border-radius: 999px;
    background: #e4e7ea;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: #a75a53;
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 12px;
    background: #edf2f5;
    color: #5a6470;
    font-weight: 800;
    line-height: 1;
}

.pill.success {
    background: #e0f7e2;
    color: #48aa4d;
}

.empty-inline {
    padding: 20px;
    color: var(--muted);
}

.project-shell {
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.project-head {
    background: #fff;
    margin: -24px -24px 0;
    padding: 22px 24px 0;
}

.project-index-page {
    display: grid;
    gap: 16px;
}

.project-overview-query {
    grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
}

.project-overview-filter {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(170px, .8fr) minmax(150px, .7fr) auto;
    gap: 10px;
    align-items: end;
    min-width: 0;
    width: 100%;
}

.project-overview-filter label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.project-overview-filter input,
.project-overview-filter select {
    min-width: 0;
    height: var(--control-height);
    min-height: var(--control-height);
    border-color: rgba(141, 153, 168, .22);
    background-color: rgba(255, 255, 255, .88);
}

.project-overview-filter .button {
    min-width: 112px;
    height: var(--control-height);
    min-height: var(--control-height);
}

.project-table-panel {
    border-radius: 22px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 18px 52px rgba(28, 42, 58, .07);
}

.project-customer-groups {
    display: grid;
    gap: 18px;
}

.project-customer-group {
    overflow: hidden;
    border: 1px solid rgba(206, 217, 226, .86);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .1), transparent 30%),
        rgba(255, 255, 255, .86);
    box-shadow: 0 18px 48px rgba(28, 42, 58, .07);
}

.project-customer-group > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(206, 217, 226, .72);
}

.project-customer-group h3 {
    margin: 3px 0 0;
    font-size: 1.25rem;
}

.project-customer-group > header > span {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid rgba(206, 217, 226, .82);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
}

.project-customer-group .project-table-panel {
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .66);
    box-shadow: none;
}

.project-overview-table {
    min-width: 960px;
    table-layout: fixed;
}

.project-overview-table .project-column-name {
    width: 24%;
}

.project-overview-table .project-column-worked {
    width: 23%;
}

.project-overview-table .project-column-budget {
    width: 10%;
}

.project-overview-table .project-column-status {
    width: 10%;
}

.project-overview-table .project-column-lead {
    width: 18%;
}

.project-overview-table .project-column-created {
    width: 15%;
}

.project-overview-table th,
.project-overview-table td {
    vertical-align: middle;
}

.project-overview-table .progress {
    max-width: 180px;
}

.board-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.board-kanban {
    grid-template-columns: repeat(5, minmax(290px, 1fr));
    align-items: start;
}

.board-kanban .kanban-column {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 8px;
}

.board-kanban .kanban-column h3 {
    display: flex;
    justify-content: space-between;
    padding: 0 6px 14px;
    border-bottom: 4px solid #dfe4e8;
    color: #4e5865;
    text-transform: uppercase;
    letter-spacing: 0;
}

.board-kanban .kanban-column:nth-child(2) h3 {
    border-color: #6bd5e8;
}

.board-kanban .kanban-column:nth-child(3) h3 {
    border-color: #f2b04c;
}

.board-kanban .kanban-column:nth-child(4) h3 {
    border-color: #ed716d;
}

.board-kanban .kanban-column:nth-child(5) h3 {
    border-color: #66a559;
}

.board-kanban .task-card {
    padding: 18px;
    border: 0;
    box-shadow: 0 2px 8px rgba(17, 22, 31, .08);
    min-height: 104px;
}

.quick-add {
    margin-top: 12px;
}

.quick-add input {
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(17, 22, 31, .08);
    color: #45b95b;
    font-weight: 800;
}

.timesheet-shell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.timesheet-tabs {
    display: flex;
    justify-content: center;
    gap: 38px;
    border-bottom: 1px solid var(--line);
}

.timesheet-tabs a {
    padding: 18px 0 14px;
    font-weight: 800;
    border-bottom: 3px solid transparent;
}

.timesheet-tabs a.active {
    color: var(--mint-dark);
    border-bottom-color: var(--mint);
}

.timesheet-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.timesheet-toolbar > .actions:last-child {
    justify-content: flex-end;
}

.week-switcher {
    display: flex;
    align-items: center;
    gap: 16px;
}

.week-switcher a {
    color: #45b95b;
    font-size: 1.6rem;
    font-weight: 800;
}

.week-switcher span {
    color: var(--muted);
}

.collapsible-panel {
    margin: 16px 22px;
    box-shadow: none;
}

.hidden {
    display: none !important;
}

.week-grid {
    display: grid;
    grid-template-columns: 62px repeat(7, minmax(210px, 1fr));
    overflow-x: auto;
    background: #fff;
}

.time-column,
.day-column {
    min-height: 1080px;
    border-right: 1px solid #e9ecef;
}

.time-column {
    color: #56616c;
    font-weight: 700;
}

.time-column span {
    display: block;
    height: 83px;
    padding: 6px 10px;
    border-bottom: 1px solid #eef0f2;
    text-align: right;
}

.day-column header {
    height: 83px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 0 12px;
    text-align: center;
    border-bottom: 1px solid #eef0f2;
}

.day-column header span {
    color: #9aa2ad;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.day-lane {
    position: relative;
    height: 1000px;
    background-image: linear-gradient(to bottom, transparent 82px, #eef0f2 83px);
    background-size: 100% 83px;
}

.time-block {
    position: absolute;
    left: calc(var(--block-left, 0%) + 8px);
    right: auto;
    width: calc(var(--block-width, 100%) - 16px);
    max-width: calc(100% - 16px);
    min-height: 40px;
    overflow: visible;
    display: grid;
    align-content: start;
    gap: 1px;
    padding: 5px 7px;
    border-left: 4px solid currentColor;
    border-radius: 4px;
    background: #e6f6fb;
    color: #42a9c7;
    box-shadow: 0 1px 3px rgba(17, 22, 31, .08);
}

.time-block::after {
    content: attr(data-timesheet-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 120;
    width: max-content;
    max-width: min(320px, 72vw);
    padding: 10px 12px;
    border: 1px solid rgba(194, 204, 216, .72);
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 42px rgba(20, 29, 43, .18);
    color: #111827;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
    visibility: hidden;
}

.time-block::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    z-index: 121;
    width: 12px;
    height: 12px;
    border-right: 1px solid rgba(194, 204, 216, .72);
    border-bottom: 1px solid rgba(194, 204, 216, .72);
    background: rgba(255, 255, 255, .96);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px) rotate(45deg);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
    visibility: hidden;
}

.time-block:hover,
.time-block:focus-visible {
    z-index: 90;
}

.time-block:hover::after,
.time-block:focus-visible::after,
.time-block:hover::before,
.time-block:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg);
    visibility: visible;
}

.time-block:hover::before,
.time-block:focus-visible::before {
    transform: translate(-50%, 0) rotate(45deg);
}

.time-block.floating {
    position: relative;
    left: auto;
    right: auto;
    width: auto;
    max-width: none;
    margin: 8px;
}

.time-block strong {
    color: #4b4f58;
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-block small {
    color: currentColor;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-block.color-1 {
    background: #fde5e2;
    color: #ef5d50;
}

.time-block.color-2 {
    background: #e6fbf5;
    color: #2dc3a3;
}

.time-block.color-3 {
    background: #ede7fb;
    color: #8d73d7;
}

.time-block.color-4 {
    background: #fceaf1;
    color: #d6658f;
}

.time-block.color-5 {
    background: #fff2d8;
    color: #d69428;
}

.time-block.color-6,
.time-block.machine-entry {
    background: #edf7f0;
    color: #4e9b62;
}

.panel,
.card,
.empty-state {
    padding: 18px;
}

.panel-header,
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.section-header {
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .76), rgba(232, 248, 246, .56));
    box-shadow: 0 18px 52px rgba(28, 42, 58, .08);
    backdrop-filter: blur(18px) saturate(140%);
}

.section-header h2 {
    font-size: 1.35rem;
}

.section-header p {
    margin: 8px 0 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-height);
    padding: 0 15px;
    border-radius: var(--control-radius);
    border: 1px solid rgba(16, 116, 104, .82);
    background:
        linear-gradient(135deg, #111821 0%, #0d7d70 54%, #18b89a 100%);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: var(--control-font-size);
    line-height: 1;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 10px 22px rgba(13, 125, 112, .14), 0 8px 18px rgba(17, 22, 31, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.button:hover,
button.button:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 184, 154, .88);
    background:
        linear-gradient(135deg, #121a24 0%, #0f8c7d 52%, #31c9b2 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .24) inset, 0 16px 34px rgba(13, 125, 112, .18), 0 14px 30px rgba(17, 22, 31, .12);
}

.button:active,
button.button:active {
    transform: translateY(0);
}

.button.secondary {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98) 0%, rgba(247, 253, 252, .96) 50%, rgba(234, 249, 246, .92) 100%);
    color: var(--ink);
    border-color: rgba(183, 204, 210, .76);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 24px rgba(28, 42, 58, .07);
}

.button.secondary:hover {
    border-color: rgba(24, 184, 154, .46);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(244, 252, 251, .98) 46%, rgba(224, 247, 243, .96) 100%);
}

.button.ghost {
    background: transparent;
    color: #eaf2f0;
    border-color: rgba(255, 255, 255, .22);
}

.button.danger {
    background: linear-gradient(135deg, #b64040 0%, var(--danger) 62%, #df746d 100%);
    border-color: var(--danger);
}

.button.small {
    min-height: 32px;
    padding: 6px 9px;
    font-size: .88rem;
}

.alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert.success {
    background: #def8ee;
    color: #075944;
}

.alert.error {
    background: #fde7e7;
    color: #8d2525;
}

.stat {
    min-height: 112px;
}

.stat .value {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    margin-top: 10px;
}

.muted {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e9f7f3;
    color: #0a6659;
    font-weight: 700;
    font-size: .78rem;
    padding: 4px 9px;
}

.badge.gray {
    background: #eef2f5;
    color: #53606e;
}

.badge.warn {
    background: #fff3d8;
    color: #8b5a00;
}

.badge.success {
    background: #e0f7e2;
    color: #287a37;
}

.badge.focus {
    background: #e7f3ff;
    color: #2269a9;
}

.badge.danger {
    background: #fde7e7;
    color: #9c2d2d;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: .78rem;
    text-transform: uppercase;
    color: var(--muted);
}

tr:last-child td {
    border-bottom: 0;
}

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

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
    color: #27313d;
    font-size: .92rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    padding: 10px 12px;
    min-height: var(--control-height);
    font-size: var(--control-font-size);
    font-weight: 650;
    line-height: 1.2;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .82) inset;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
    height: var(--control-height);
}

input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--mint);
}

input[type="file"] {
    min-height: var(--control-height);
    padding: 8px 10px;
    font-weight: 700;
}

select {
    padding-right: 34px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #667386 50%),
        linear-gradient(135deg, #667386 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: rgba(24, 184, 154, .5);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 0 0 4px rgba(24, 184, 154, .12), 0 10px 24px rgba(28, 42, 58, .065);
}

textarea {
    resize: vertical;
}

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

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 9px;
}

.checkbox input {
    width: auto;
    min-height: auto;
}

form.panel.form-grid {
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
    border-color: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 52px rgba(28, 42, 58, .08);
    backdrop-filter: blur(16px) saturate(135%);
}

form.panel.form-grid > .field,
form.panel.form-grid > .checkbox {
    padding: 12px;
    border: 1px solid rgba(141, 153, 168, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .66);
}

.smart-form {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 0%, rgba(88, 215, 208, .18), transparent 32%),
        radial-gradient(circle at 100% 8%, rgba(127, 140, 255, .14), transparent 30%),
        rgba(255, 255, 255, .68);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: 0 26px 80px rgba(28, 42, 58, .1), 0 1px 0 rgba(255, 255, 255, .92) inset;
    backdrop-filter: blur(20px) saturate(150%);
}

.form-section {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 14px 36px rgba(28, 42, 58, .07);
}

.form-section > header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.form-section > header > span {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(88, 215, 208, .34), rgba(127, 140, 255, .22));
    color: #173d3a;
    font-weight: 900;
}

.form-section h3 {
    font-size: 1.05rem;
}

.form-section p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.smart-form .form-grid {
    align-content: start;
}

.smart-form .field,
.smart-form .checkbox {
    padding: 12px;
    border: 1px solid rgba(141, 153, 168, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .66);
}

.smart-form .field > label {
    margin-bottom: 6px;
}

.smart-form input,
.smart-form select,
.smart-form textarea {
    min-height: var(--control-height);
    border-radius: 12px;
    border-color: rgba(141, 153, 168, .22);
    background-color: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .75) inset;
}

.smart-form textarea {
    min-height: 118px;
}

.smart-form .checkbox-grid {
    margin-top: 8px;
}

.smart-form .checkbox-grid .checkbox,
.form-toggle {
    min-height: 52px;
    border-radius: 14px;
}

.smart-form .checkbox input {
    accent-color: var(--mint);
}

.shortcut-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.shortcut-groups {
    display: grid;
    gap: 22px;
}

.shortcut-group-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .44)),
        radial-gradient(circle at 0 0, rgba(88, 215, 208, .13), transparent 34%);
    box-shadow: 0 18px 48px rgba(31, 49, 69, .08);
}

.shortcut-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shortcut-group-head h4 {
    margin: 0;
    font-size: 1.02rem;
}

.shortcut-group-head small {
    color: var(--muted);
    font-weight: 900;
}

.shortcut-choice {
    position: relative;
    display: grid;
    gap: 12px;
    min-height: 146px;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 20px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .82) inset;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.shortcut-choice:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(31, 49, 69, .1);
}

.shortcut-card-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.shortcut-card-main input {
    grid-column: 3;
    grid-row: 1;
    width: 18px;
    height: 18px;
    min-height: auto;
    accent-color: var(--mint);
}

.shortcut-card-main > span:last-child {
    min-width: 0;
}

.shortcut-choice-icon {
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(17, 24, 39, .045);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .86) inset;
}

.shortcut-choice-icon.shortcut-icon-flag::before {
    left: 12px;
    top: 9px;
    height: 25px;
}

.shortcut-choice-icon.shortcut-icon-flag::after {
    left: 14px;
    top: 10px;
    width: 19px;
    height: 12px;
}

.shortcut-choice-icon.shortcut-icon-folder::before {
    left: 8px;
    top: 15px;
    width: 26px;
    height: 17px;
}

.shortcut-choice-icon.shortcut-icon-folder::after {
    left: 10px;
    top: 10px;
    width: 13px;
    height: 8px;
}

.shortcut-choice-icon.shortcut-icon-arrow::before {
    top: 11px;
    right: 9px;
    width: 16px;
    height: 16px;
}

.shortcut-choice-icon.shortcut-icon-arrow::after {
    left: 11px;
    bottom: 14px;
    width: 24px;
}

.shortcut-choice-icon.shortcut-icon-dollar::before {
    font-size: 1.75rem;
}

.shortcut-choice-icon.shortcut-icon-clock::before {
    left: 20px;
    top: 10px;
    height: 13px;
}

.shortcut-choice-icon.shortcut-icon-clock::after {
    left: 20px;
    top: 20px;
    width: 12px;
}

.shortcut-choice strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-choice small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-choice:has(input:checked) {
    border-color: rgba(24, 184, 154, .34);
    background: linear-gradient(135deg, rgba(232, 248, 246, .9), rgba(239, 243, 255, .74));
    box-shadow: 0 14px 34px rgba(24, 184, 154, .11);
}

.shortcut-config {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(110px, .8fr) 56px;
    gap: 10px;
}

.shortcut-config label {
    display: grid;
    gap: 6px;
}

.shortcut-config label > span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.shortcut-config input,
.shortcut-config select {
    min-height: 42px;
    border-radius: 13px;
    background-color: rgba(255, 255, 255, .82);
}

.shortcut-config input[type="color"] {
    width: 56px;
    padding: 5px;
    cursor: pointer;
}

.form-actions {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, auto);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .62);
}

.form-actions .button {
    min-height: var(--control-height);
}

.kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(240px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.kanban-column {
    min-height: 360px;
    padding: 12px;
    box-shadow: none;
}

.kanban-column h3 {
    margin-bottom: 10px;
}

.task-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: grab;
}

.task-card:active {
    cursor: grabbing;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.tab {
    padding: 10px 12px;
    border-bottom: 3px solid transparent;
    font-weight: 700;
    color: var(--muted);
}

.tab.active {
    color: var(--ink);
    border-bottom-color: var(--mint);
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    border-left: 3px solid var(--mint);
    padding-left: 12px;
}

.guest-body {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(88, 215, 208, .26), transparent 26%),
        radial-gradient(circle at 82% 20%, rgba(127, 140, 255, .2), transparent 28%),
        linear-gradient(145deg, #0a111b 0%, #111927 48%, #eef8f7 140%);
    display: grid;
    place-items: center;
    padding: 24px;
}

.guest-body::before,
.guest-body::after {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .18) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(88, 215, 208, .24) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(127, 140, 255, .18) 0 1px, transparent 2px);
    background-size: 78px 78px, 116px 116px, 148px 148px;
    background-position: 0 0, 36px 42px, 80px 20px;
    animation: guestFieldDrift 26s linear infinite;
}

.guest-body::after {
    z-index: -3;
    opacity: .42;
    filter: blur(.2px);
    animation-duration: 38s;
    animation-direction: reverse;
}

.guest-pixels {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.guest-pixels span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(88, 215, 208, .72);
    box-shadow: 0 0 28px rgba(88, 215, 208, .44);
    animation: guestPixelFloat 12s ease-in-out infinite;
}

.guest-pixels span:nth-child(1) { left: 12%; top: 18%; animation-delay: -1s; }
.guest-pixels span:nth-child(2) { left: 26%; top: 76%; animation-delay: -7s; background: rgba(127, 140, 255, .72); }
.guest-pixels span:nth-child(3) { left: 42%; top: 12%; animation-delay: -4s; }
.guest-pixels span:nth-child(4) { left: 58%; top: 82%; animation-delay: -9s; background: rgba(168, 239, 114, .7); }
.guest-pixels span:nth-child(5) { left: 78%; top: 28%; animation-delay: -2s; }
.guest-pixels span:nth-child(6) { left: 88%; top: 68%; animation-delay: -6s; background: rgba(127, 140, 255, .68); }
.guest-pixels span:nth-child(7) { left: 18%; top: 46%; animation-delay: -11s; }
.guest-pixels span:nth-child(8) { left: 72%; top: 48%; animation-delay: -5s; background: rgba(168, 239, 114, .66); }
.guest-pixels span:nth-child(9) { left: 33%; top: 34%; animation-delay: -8s; }
.guest-pixels span:nth-child(10) { left: 51%; top: 55%; animation-delay: -3s; background: rgba(127, 140, 255, .7); }
.guest-pixels span:nth-child(11) { left: 8%; top: 88%; animation-delay: -10s; }
.guest-pixels span:nth-child(12) { left: 94%; top: 12%; animation-delay: -12s; background: rgba(168, 239, 114, .62); }

.guest-shell {
    width: min(520px, 100%);
}

.guest-panel {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(245, 251, 251, .72));
    box-shadow: 0 34px 90px rgba(0, 0, 0, .34), 0 1px 0 rgba(255, 255, 255, .9) inset;
    backdrop-filter: blur(24px) saturate(142%);
}

.guest-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 0%, rgba(88, 215, 208, .2), transparent 34%),
        radial-gradient(circle at 100% 12%, rgba(127, 140, 255, .16), transparent 32%);
}

.guest-brand {
    position: relative;
    width: fit-content;
    margin-bottom: 22px;
}

.guest-brand .brand-mark {
    display: none;
}

.guest-brand .brand-logo-light {
    display: none;
}

.guest-brand .brand-logo-dark {
    display: block;
    width: auto;
    height: 72px;
    max-width: 240px;
}

.guest-brand small {
    margin-top: -2px;
    color: var(--mint-dark);
}

.login-copy,
.login-form,
.login-foot,
.guest-panel .alert {
    position: relative;
}

.login-copy {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.login-copy h1 {
    font-size: 3rem;
    line-height: .98;
    letter-spacing: 0;
}

.login-copy p {
    max-width: 34ch;
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

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

.login-form .field {
    gap: 8px;
}

.login-form input {
    min-height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .86) inset;
}

.login-form .button {
    min-height: 52px;
    margin-top: 4px;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(8, 13, 22, .18);
}

.login-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 850;
}

.login-foot a {
    color: var(--mint-dark);
}

@keyframes guestFieldDrift {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(74px, -58px, 0); }
}

@keyframes guestPixelFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: .42;
    }
    45% {
        transform: translate3d(22px, -18px, 0) scale(1.45);
        opacity: .92;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guest-body::before,
    .guest-body::after,
    .guest-pixels span {
        animation: none;
    }
}

@media (max-width: 520px) {
    .guest-body {
        padding: 16px;
    }

    .guest-panel {
        padding: 22px;
        border-radius: 24px;
    }

    .login-copy h1 {
        font-size: 2.25rem;
    }

    .login-foot {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) and (max-width: 1368px) {
    .machine-run-create-shell[open] .machine-run-create,
    .machine-resource-shell[open] .machine-resource-panel {
        position: fixed;
        left: 14px;
        right: 14px;
        top: 86px;
        width: auto;
        max-height: calc(100vh - 110px);
        overflow: auto;
    }

    .machine-resource-form,
    .machine-resource-row {
        grid-template-columns: 1fr;
    }
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 12% 8%, rgba(88, 215, 208, .16), transparent 32%),
        radial-gradient(circle at 84% 16%, rgba(127, 140, 255, .12), transparent 34%),
        #eef5f5;
}

.error-shell {
    width: min(720px, 100%);
}

.error-card {
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid rgba(170, 184, 198, .42);
    border-radius: 30px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 30px 90px rgba(24, 34, 45, .12);
    backdrop-filter: blur(22px) saturate(150%);
}

.error-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: 0;
}

.error-card p {
    max-width: 62ch;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.55;
}

.error-reference {
    display: inline-flex;
    margin: 18px 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(88, 215, 208, .12);
    color: var(--brand-dark);
    font-size: .86rem;
    font-weight: 850;
}

.error-actions,
.export-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.error-help {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(141, 153, 168, .18);
    border-radius: 18px;
    background: rgba(245, 251, 250, .72);
}

.error-help strong {
    display: block;
    margin-bottom: 8px;
}

.error-help ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-weight: 650;
}

.error-details {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.error-details summary {
    cursor: pointer;
    font-weight: 850;
}

.error-details pre {
    overflow: auto;
    max-height: 360px;
    padding: 14px;
    border-radius: 16px;
    background: #111827;
    color: #e6f5f3;
    font-size: .78rem;
    line-height: 1.45;
}

.search-group-wide {
    grid-column: 1 / -1;
}

.empty-state {
    text-align: center;
    max-width: 680px;
    margin: 48px auto;
}

.timer-bar {
    border-left: 4px solid var(--sun);
}

.reports-workspace {
    position: relative;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: calc(100vh - 126px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.report-list {
    position: relative;
    border-right: 1px solid var(--line);
    background: #fff;
}

.report-list-head {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.report-list-head .button {
    width: 100%;
}

.report-row {
    position: relative;
    display: grid;
    gap: 7px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1f4;
}

.report-row:hover,
.report-row.active {
    background: #eaf8f4;
}

.report-row strong {
    max-width: 220px;
    font-size: 1.05rem;
}

.report-row span {
    color: var(--muted);
}

.report-row small {
    display: flex;
    justify-content: space-between;
    color: #48535f;
}

.report-row em {
    position: absolute;
    right: 16px;
    top: 16px;
    font-style: normal;
    border-radius: 999px;
    background: #e0f7e2;
    color: #48aa4d;
    padding: 4px 9px;
    font-size: .78rem;
    font-weight: 800;
}

.report-preview,
.report-page {
    min-width: 0;
    padding: 24px;
    background: #fbfcfd;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.report-period-form {
    display: grid;
    grid-template-columns: minmax(190px, .82fr) minmax(240px, 1.12fr) minmax(136px, .62fr) minmax(136px, .62fr) minmax(168px, .72fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(232, 248, 246, .92), rgba(255, 255, 255, .84)),
        rgba(255, 255, 255, .82);
    box-shadow: 0 14px 36px rgba(28, 42, 58, .055);
}

.report-period-form > div {
    display: grid;
    gap: 3px;
}

.report-period-form > * {
    min-width: 0;
}

.report-period-form strong,
.report-period-form small {
    display: block;
}

.report-period-form small {
    color: var(--muted);
    font-weight: 750;
}

.report-period-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 850;
}

.report-period-form .button {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-title-field input {
    min-width: 0;
}

.report-document {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.report-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.report-hero h2 {
    font-size: 2.45rem;
}

.report-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.report-number {
    min-width: 150px;
    text-align: right;
}

.report-number span,
.report-number strong {
    display: block;
}

.report-number span {
    color: var(--muted);
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.report-summary article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 15px;
    background: #fbfcfd;
}

.report-summary span,
.report-project p,
.report-task-head span {
    color: var(--muted);
}

.report-summary strong {
    display: block;
    margin-top: 8px;
    font-size: 1.35rem;
}

.report-project {
    margin-top: 18px;
    border-top: 3px solid var(--mint);
    padding-top: 16px;
}

.report-project > header,
.report-task-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 150px;
    gap: 16px;
    align-items: center;
}

.report-project > header {
    padding: 0 0 12px;
    border-bottom: 2px solid #dfe4e8;
}

.report-project > header > div {
    display: flex;
    gap: 12px;
    align-items: center;
}

.report-folder {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #e9f8f5;
    color: var(--mint-dark);
    font-weight: 900;
}

.report-project h3 {
    font-size: 1.18rem;
}

.report-project p {
    margin: 5px 0 0;
}

.report-task {
    padding: 14px 0;
    border-bottom: 1px solid #e6eaee;
}

.report-task-head {
    margin-bottom: 8px;
}

.report-task-head div strong,
.report-task-head div span {
    display: block;
}

.report-lines {
    display: grid;
}

.report-line {
    display: grid;
    grid-template-columns: minmax(82px, .65fr) minmax(82px, .65fr) minmax(110px, .8fr) minmax(240px, 2fr) minmax(90px, .68fr) minmax(136px, .86fr) minmax(110px, .72fr);
    gap: 12px;
    align-items: start;
    padding: 14px 0 14px 46px;
    border-top: 1px solid #eef1f4;
    color: #3f4853;
}

.report-line > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.report-line span {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.report-line strong {
    min-width: 0;
    font-size: .9rem;
    line-height: 1.28;
}

.report-line small {
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.3;
}

.report-line-description strong {
    overflow-wrap: anywhere;
}

.report-line-metric {
    text-align: right;
}

.report-line-metric strong {
    white-space: nowrap;
}

.report-line-metric small {
    white-space: nowrap;
}

.report-line-description span {
    color: var(--muted);
}

.report-line-date strong {
    white-space: nowrap;
}

.liquid-surface,
.liquid-panel,
.glass-toolbar,
.entry-ledger {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: 0 24px 80px rgba(28, 42, 58, .11), 0 1px 0 rgba(255, 255, 255, .92) inset;
    backdrop-filter: blur(18px) saturate(140%);
}

.liquid-panel,
.entry-ledger {
    border-radius: 16px;
}

.timesheet-shell.liquid-surface {
    border-color: rgba(255, 255, 255, .72);
    box-shadow: 0 24px 80px rgba(28, 42, 58, .1);
}

.glass-toolbar {
    margin: 12px;
    border-radius: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .72);
}

.week-switcher {
    justify-content: center;
}

.week-switcher div {
    display: grid;
    gap: 2px;
    min-width: 150px;
    text-align: center;
}

.week-switcher b {
    min-width: 76px;
    text-align: right;
    color: var(--ink);
}

.view-switch {
    justify-self: end;
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(17, 22, 31, .06);
    border: 1px solid rgba(17, 22, 31, .06);
}

.view-switch a {
    min-width: 66px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #56616d;
    font-weight: 800;
    text-align: center;
}

.view-switch a.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(17, 22, 31, .1);
}

.timesheet-filter {
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 0 12px 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .64);
    border: 1px solid rgba(255, 255, 255, .7);
}

.timesheet-filter label {
    display: grid;
    gap: 6px;
    min-width: min(320px, 100%);
}

.timesheet-filter select,
.liquid-panel input,
.liquid-panel select,
.entry-edit input,
.entry-edit select {
    background: rgba(255, 255, 255, .82);
    border-color: rgba(141, 153, 168, .26);
}

.time-column,
.day-column {
    border-right-color: rgba(141, 153, 168, .16);
}

.day-column header {
    background: rgba(255, 255, 255, .58);
}

.day-lane {
    background-color: rgba(255, 255, 255, .28);
    background-image: linear-gradient(to bottom, transparent 82px, rgba(141, 153, 168, .18) 83px);
}

.time-block {
    border-left-width: 5px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(30, 44, 60, .12);
    font-size: .73rem;
    line-height: 1.08;
    transition: transform .16s ease, box-shadow .16s ease;
}

.time-block strong {
    font-size: .78rem;
}

.time-block small {
    font-size: .68rem;
    font-weight: 800;
}

.time-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(30, 44, 60, .16);
}

.day-dashboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 12px;
}

.metric-card,
.active-timer-card,
.entry-card,
.month-day {
    background: var(--glass-strong);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(28, 42, 58, .08);
}

.metric-card {
    display: grid;
    gap: 7px;
    padding: 18px;
}

.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    font-size: 2rem;
    letter-spacing: 0;
}

.metric-card.accent {
    background: linear-gradient(135deg, rgba(88, 215, 208, .2), rgba(127, 140, 255, .14)), var(--glass-strong);
}

.active-timers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    padding: 0 12px 12px;
}

.active-timer-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
}

.active-timer-card span,
.active-timer-card small {
    display: block;
    color: var(--muted);
}

.active-timer-card strong {
    display: block;
    margin: 4px 0;
}

.active-timer-card b {
    font-size: 1.25rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px;
    overflow-x: auto;
}

.month-day {
    min-height: 142px;
    padding: 12px;
}

.month-day.outside {
    opacity: .5;
}

.month-day header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.month-day header span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(17, 22, 31, .06);
    font-weight: 800;
}

.month-day header strong {
    color: var(--muted);
    font-size: .88rem;
}

.month-entry {
    display: block;
    margin-top: 6px;
    padding: 7px 8px;
    border-radius: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(88, 215, 208, .16);
    color: #16756d;
    font-weight: 800;
    font-size: .84rem;
}

.month-entry.machine-entry {
    background: rgba(78, 155, 98, .14);
    color: #3f844f;
}

.entry-card.machine-entry-card {
    border-color: rgba(78, 155, 98, .18);
    background:
        radial-gradient(circle at 0% 0%, rgba(78, 155, 98, .12), transparent 30%),
        var(--glass-strong);
}

.entry-machine-link {
    margin-top: 12px;
}

.entry-ledger {
    margin-top: 18px;
    padding: 18px;
}

.entry-ledger-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.entry-ledger-head strong {
    font-size: 1.55rem;
}

.entry-card-list {
    display: grid;
    gap: 12px;
}

.entry-card {
    padding: 16px;
    scroll-margin-top: 20px;
}

.entry-card:target {
    outline: 3px solid rgba(24, 184, 154, .28);
}

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

.entry-card > header span,
.entry-card > header small {
    display: block;
    color: var(--muted);
}

.entry-card > header strong {
    display: block;
    margin: 5px 0;
    font-size: 1.05rem;
}

.entry-card-values {
    text-align: right;
}

.entry-card-values strong {
    margin: 0 0 5px;
    font-size: 1.35rem;
}

.entry-card-values span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(24, 184, 154, .12);
    color: var(--mint-dark);
    font-weight: 800;
}

.entry-edit {
    margin-top: 12px;
    border-top: 1px solid rgba(141, 153, 168, .2);
    padding-top: 10px;
}

.entry-edit summary {
    cursor: pointer;
    color: var(--mint-dark);
    font-weight: 800;
}

.entry-edit form {
    margin-top: 12px;
}

.entry-delete-form {
    margin-top: 10px;
}

.command-search-page,
.search-group {
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .18), transparent 36%),
        radial-gradient(circle at 100% 0%, rgba(127, 140, 255, .12), transparent 34%),
        rgba(255, 255, 255, .74);
    box-shadow: 0 24px 76px rgba(28, 42, 58, .09);
    backdrop-filter: blur(18px) saturate(145%);
}

.dashboard-section {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(198, 210, 220, .52);
    border-radius: 24px;
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 18px 46px rgba(28, 42, 58, .045);
}

.dashboard-section:first-of-type {
    margin-top: 0;
}

.dashboard-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid rgba(141, 153, 168, .12);
}

.dashboard-section-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--mint-dark);
    text-transform: uppercase;
    font-size: .7rem;
    font-weight: 900;
}

.dashboard-section-head h2 {
    font-size: 1.24rem;
}

.dashboard-section-head p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    text-align: right;
}

.dashboard-hero,
.dashboard-panel,
.metric-card,
.value-row,
.mini-card,
.suggestion-card,
.compact-breakdown a,
.compact-breakdown div,
.work-card,
.search-card {
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 34px rgba(28, 42, 58, .052);
    backdrop-filter: blur(12px) saturate(125%);
}

.dashboard-hero,
.dashboard-panel,
.command-search-page,
.search-group {
    border-radius: 22px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.dashboard-query {
    background:
        linear-gradient(115deg, rgba(244, 251, 250, .92), rgba(255, 255, 255, .9) 54%, rgba(247, 248, 255, .82)),
        rgba(255, 255, 255, .82);
}

.dashboard-hero h2 {
    font-size: 1.65rem;
    line-height: 1.08;
}

.dashboard-hero p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .96rem;
}

.timer-hero {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(31, 42, 63, .96), rgba(22, 29, 43, .96));
    color: #fff;
}

.timer-hero p {
    color: #aab4bf;
}

.timer-hero-control {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.timer-hero-control strong {
    font-size: 1.45rem;
}

.dashboard-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    min-width: 0;
    width: 100%;
    max-width: 460px;
    justify-self: end;
    justify-content: flex-end;
}

.dashboard-filter label {
    display: grid;
    gap: 6px;
    flex: 1 1 150px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.dashboard-filter input,
.dashboard-filter select {
    min-width: 0;
    min-height: var(--control-height);
    height: var(--control-height);
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, .88);
    border-color: rgba(141, 153, 168, .22);
}

.dashboard-filter .button {
    justify-self: start;
    min-width: 132px;
    min-height: var(--control-height);
    height: var(--control-height);
    padding-inline: 14px;
    white-space: nowrap;
}

.dashboard-metrics {
    margin-bottom: 0;
}

.grid.four.dashboard-metrics {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dashboard-metrics .metric-card {
    min-width: 0;
    padding: 15px;
}

.dashboard-metrics .metric-card strong {
    font-size: 1.72rem;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 14px;
    margin-top: 0;
}

.dashboard-grid.one-col {
    grid-template-columns: 1fr;
}

.dashboard-grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-panel {
    padding: 18px;
    min-height: 0;
}

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

.dashboard-panel h2,
.dashboard-task-head h2 {
    font-size: 1.24rem;
}

.widget-control {
    margin: 0;
    flex: 0 0 auto;
    opacity: .46;
    transition: opacity .18s ease;
}

.widget-control button {
    min-height: 24px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, .48);
    color: var(--muted);
    cursor: pointer;
    font-size: .66rem;
    font-weight: 900;
}

.metric-card:hover .widget-control,
.dashboard-panel:hover .widget-control,
.dashboard-hero:hover .widget-control,
.dashboard-section-head:hover .widget-control,
.widget-control:focus-within {
    opacity: 1;
}

.widget-control button:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .92);
}

.dashboard-hidden-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 28px rgba(28, 42, 58, .04);
}

.dashboard-hidden-bar > span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.value-list,
.mini-card-list,
.compact-breakdown,
.task-card-grid,
.search-results {
    display: grid;
    gap: 12px;
}

.value-row,
.mini-card,
.suggestion-card,
.compact-breakdown a,
.compact-breakdown div,
.work-card,
.search-card {
    border-radius: 14px;
}

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

.value-row > span,
.search-card > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(88, 215, 208, .32), rgba(127, 140, 255, .2));
    color: #173d3a;
    font-weight: 900;
}

.value-row small,
.mini-card small,
.work-card small,
.compact-breakdown span,
.search-card small {
    display: block;
    color: var(--muted);
}

.value-row i {
    display: block;
    height: 6px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mint), var(--iris));
}

.value-row b {
    font-size: 1.05rem;
}

.day-chart {
    --day-chart-axis-width: 54px;
    --day-chart-x-label-space: 30px;
    position: relative;
    height: calc(var(--day-chart-height, 178px) + var(--day-chart-x-label-space));
    margin-top: 20px;
    padding-right: var(--day-chart-axis-width);
    overflow: hidden;
}

.day-chart::before {
    content: "";
    position: absolute;
    left: 0;
    right: var(--day-chart-axis-width);
    bottom: var(--day-chart-x-label-space);
    border-bottom: 1px solid rgba(141, 153, 168, .25);
}

.day-chart::after {
    content: "";
    position: absolute;
    top: 0;
    right: var(--day-chart-axis-width);
    bottom: var(--day-chart-x-label-space);
    border-right: 1px solid rgba(141, 153, 168, .25);
}

.day-chart-grid {
    position: absolute;
    inset: 0 var(--day-chart-axis-width) var(--day-chart-x-label-space) 0;
    pointer-events: none;
}

.day-chart-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(141, 153, 168, .14);
}

.day-chart-gridline b {
    position: absolute;
    top: -.55rem;
    right: calc(var(--day-chart-axis-width) * -1 + 2px);
    width: calc(var(--day-chart-axis-width) - 8px);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
}

.day-bars {
    position: absolute;
    inset: 0 var(--day-chart-axis-width) var(--day-chart-x-label-space) 0;
    z-index: 1;
    display: flex;
    align-items: end;
    justify-content: space-evenly;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 18px;
}

.day-bars span {
    position: relative;
    flex: 0 0 54px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.day-bars i {
    width: 32px;
    max-width: 100%;
    border-radius: 999px 999px 6px 6px;
    background: linear-gradient(180deg, var(--iris), var(--mint));
    box-shadow: 0 12px 24px rgba(24, 184, 154, .18);
}

.day-bars small {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.day-chart-empty {
    align-self: center;
    margin: auto;
}

.mini-card,
.work-card,
.search-card {
    display: grid;
    gap: 6px;
    padding: 14px;
}

.mini-card span,
.work-card span {
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(24, 184, 154, .12);
    color: var(--mint-dark);
    font-weight: 900;
    font-size: .8rem;
}

.suggestion-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    padding: 12px;
}

.suggestion-card button {
    justify-self: end;
}

.compact-breakdown a,
.compact-breakdown div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    align-items: center;
    padding: 12px;
}

.compact-breakdown a strong,
.compact-breakdown div strong {
    min-width: 0;
    line-height: 1.18;
}

.compact-breakdown a span,
.compact-breakdown div span {
    justify-self: end;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    line-height: 1.18;
    text-align: right;
    white-space: nowrap;
}

.task-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.work-card em {
    color: var(--muted);
    font-style: normal;
}

.command-search-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.command-search-page input {
    min-height: 50px;
    border-radius: 16px;
}

.search-results {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.search-group {
    padding: 16px;
}

.search-card {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
}

.customers-workspace {
    border-color: rgba(255, 255, 255, .72);
    box-shadow: 0 24px 80px rgba(28, 42, 58, .1);
}

.customer-sidebar {
    background: rgba(255, 255, 255, .58);
}

.customer-sidebar .workspace-tools {
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(244, 251, 250, .62));
}

.customer-sidebar .entity-row {
    margin: 10px 12px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 10px 28px rgba(28, 42, 58, .05);
}

.customer-sidebar .entity-row.active,
.customer-sidebar .entity-row:hover {
    background: linear-gradient(135deg, rgba(232, 248, 246, .95), rgba(239, 243, 255, .72));
    border-color: rgba(24, 184, 154, .22);
}

.customer-sidebar .entity-icon,
.customer-hero .entity-icon {
    background: linear-gradient(135deg, rgba(88, 215, 208, .28), rgba(127, 140, 255, .18));
    color: #173d3a;
}

.customer-hero {
    margin: 0 0 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 20px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .2), transparent 36%),
        radial-gradient(circle at 100% 0%, rgba(127, 140, 255, .14), transparent 36%),
        rgba(255, 255, 255, .76);
    box-shadow: 0 20px 60px rgba(28, 42, 58, .09);
}

.customer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.customer-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(141, 153, 168, .18);
    color: #526071;
    font-weight: 800;
    font-size: .84rem;
}

.customer-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(141, 153, 168, .18);
    color: var(--mint-dark);
    font-weight: 900;
    font-size: .84rem;
}

.team-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.team-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px 5px 6px;
    border: 1px solid rgba(141, 153, 168, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #26313d;
    font-weight: 850;
    font-size: .86rem;
}

.team-chip b {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(88, 215, 208, .32), rgba(127, 140, 255, .18));
    color: #173d3a;
    font-size: .72rem;
}

.team-chip small {
    color: var(--muted);
    font-weight: 800;
}

.muted-chip {
    color: var(--muted);
}

.customer-stats {
    margin-bottom: 18px;
}

.customer-stats .metric-card {
    min-height: 132px;
}

.customer-stats .metric-card strong {
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.customer-project-panel {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 18px 50px rgba(28, 42, 58, .08);
}

.customer-team-panel,
.customer-reports-panel {
    margin-top: 18px;
}

.report-mini-list {
    display: grid;
    gap: 10px;
}

.report-mini-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 26px rgba(28, 42, 58, .05);
}

.report-mini-card strong,
.report-mini-card small {
    display: block;
}

.report-mini-card strong {
    margin-top: 6px;
}

.report-mini-card > div:last-child {
    text-align: right;
}

.empty-data-card {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px dashed rgba(141, 153, 168, .28);
    border-radius: 16px;
    background: rgba(247, 250, 251, .72);
    color: var(--muted);
}

.empty-data-card strong {
    color: var(--ink);
}

.panel > form + .empty-data-card,
.panel > .actions + .empty-data-card {
    margin-top: 12px;
}

.project-card-list {
    display: grid;
    gap: 12px;
}

.customer-project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 30px rgba(28, 42, 58, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.customer-project-card:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 184, 154, .24);
    box-shadow: 0 18px 42px rgba(28, 42, 58, .1);
}

.customer-project-card span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e0f7e2;
    color: #48aa4d;
    font-weight: 900;
    font-size: .8rem;
}

.customer-project-card strong {
    display: block;
    font-size: 1.05rem;
}

.customer-project-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.project-card-metrics {
    text-align: right;
}

.project-card-metrics strong {
    font-size: 1.35rem;
}

.project-card-metrics .progress {
    width: 100%;
    margin-left: auto;
}

.task-hero {
    align-items: stretch;
}

.task-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.task-summary-strip span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.task-summary-strip strong {
    color: var(--ink);
    font-size: .98rem;
}

.task-filter-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .76);
    border-color: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 52px rgba(28, 42, 58, .07);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-grid label,
.ledger-filter label,
.project-overview-filter label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 850;
}

.task-filter-panel input,
.task-filter-panel select,
.ledger-filter input,
.ledger-filter select {
    border-color: rgba(141, 153, 168, .22);
    background-color: rgba(255, 255, 255, .88);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(141, 153, 168, .12);
}

.filter-actions .button {
    min-width: 104px;
}

.task-list-modern {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.task-row-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(247, 251, 251, .78)),
        rgba(255, 255, 255, .82);
    box-shadow: 0 14px 40px rgba(28, 42, 58, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.task-row-card:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 184, 154, .24);
    box-shadow: 0 20px 48px rgba(28, 42, 58, .09);
}

.task-row-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.task-row-main > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-row-main h3 {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.task-row-main p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.task-row-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.task-row-meta span {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(247, 250, 251, .78);
}

.task-row-meta small {
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    font-weight: 900;
}

.task-row-meta strong {
    overflow-wrap: anywhere;
}

.inquiry-hero {
    align-items: stretch;
}

.inquiry-workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    min-height: 760px;
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 18px 52px rgba(28, 42, 58, .07);
}

.inquiry-list-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, .66);
}

.panel-collapse-toggle {
    position: absolute;
    top: 12px;
    right: -13px;
    z-index: 40;
    width: 24px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: rgba(91, 103, 117, .62);
    box-shadow: 0 8px 24px rgba(28, 42, 58, .1);
    backdrop-filter: blur(14px) saturate(130%);
    cursor: pointer;
}

.panel-collapse-toggle:hover {
    background: #fff;
    color: var(--ink);
}

.collapsible-workspace.list-collapsed .panel-collapse-toggle {
    right: 7px;
}

.collapsible-workspace.list-collapsed .panel-collapse-toggle span {
    transform: rotate(-135deg);
}

.reports-workspace.list-collapsed,
.workspace.list-collapsed,
.inquiry-workspace.list-collapsed,
.ai-workspace.list-collapsed {
    grid-template-columns: 38px minmax(0, 1fr);
}

.reports-workspace.list-collapsed .report-list,
.workspace.list-collapsed .workspace-list,
.inquiry-workspace.list-collapsed .inquiry-list-panel,
.ai-workspace.list-collapsed .ai-list-panel {
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(242, 248, 248, .72));
}

.reports-workspace.list-collapsed .report-list > :not(.panel-collapse-toggle),
.workspace.list-collapsed .workspace-list > :not(.panel-collapse-toggle),
.inquiry-workspace.list-collapsed .inquiry-list-panel > :not(.panel-collapse-toggle),
.ai-workspace.list-collapsed .ai-list-panel > :not(.panel-collapse-toggle) {
    display: none;
}

.inquiry-list-head,
.inquiry-filter {
    padding: 16px;
}

.inquiry-list-head {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.inquiry-filter {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid var(--line);
}

.inquiry-filter input,
.inquiry-filter select {
    min-height: 38px;
}

.inquiry-list {
    overflow: auto;
    padding: 12px;
}

.inquiry-list-item {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--ink);
}

.inquiry-list-item:hover,
.inquiry-list-item.active {
    border-color: rgba(88, 215, 208, .22);
    background: linear-gradient(135deg, rgba(232, 248, 246, .78), rgba(247, 250, 255, .7));
}

.inquiry-avatar {
    grid-row: span 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(88, 215, 208, .16);
    color: var(--mint-dark);
    font-weight: 950;
}

.inquiry-list-item strong,
.inquiry-list-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-list-item small {
    color: var(--muted);
    font-weight: 750;
}

.inquiry-list-item em {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: start;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--muted);
    font-size: .72rem;
    font-style: normal;
    font-weight: 850;
}

.inquiry-main {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
    padding: 18px;
}

.inquiry-pipeline {
    display: grid;
    grid-template-columns: repeat(7, minmax(160px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding: 10px 2px 8px;
}

.inquiry-pipeline-column {
    min-height: 220px;
    padding: 12px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(246, 250, 250, .78)),
        rgba(247, 250, 251, .8);
    box-shadow: 0 12px 30px rgba(28, 42, 58, .055);
}

.inquiry-pipeline-column header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(141, 153, 168, .16);
    color: #394554;
    font-size: .8rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inquiry-pipeline-column header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 46%;
    height: 2px;
    border-radius: 999px;
    background: var(--mint);
}

.inquiry-pipeline-column:nth-child(2) header::after {
    background: #6bd5e8;
}

.inquiry-pipeline-column:nth-child(3) header::after {
    background: #f2b04c;
}

.inquiry-pipeline-column:nth-child(4) header::after {
    background: #ed716d;
}

.inquiry-pipeline-column:nth-child(5) header::after {
    background: #8f8cf2;
}

.inquiry-pipeline-column:nth-child(6) header::after {
    background: #66a559;
}

.inquiry-pipeline-column:nth-child(7) header::after {
    background: #8d99a8;
}

.inquiry-pipeline-column header b {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(28, 42, 58, .06);
}

.inquiry-pipeline-card {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 252, 252, .9));
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(28, 42, 58, .065);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.inquiry-pipeline-card.active {
    border-color: rgba(24, 184, 154, .42);
    background:
        linear-gradient(135deg, rgba(235, 255, 251, .98), rgba(255, 255, 255, .92));
}

.inquiry-pipeline-card:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 184, 154, .28);
    box-shadow: 0 16px 34px rgba(28, 42, 58, .09);
}

.inquiry-pipeline-card span,
.inquiry-pipeline-card small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-detail-hero {
    box-shadow: 0 14px 42px rgba(28, 42, 58, .06);
}

.inquiry-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .45fr);
    gap: 16px;
    align-items: start;
}

.inquiry-detail-grid > .task-section-block {
    grid-column: 1;
}

.inquiry-detail-grid > aside {
    grid-column: 2;
    grid-row: 1 / span 2;
}

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

.inquiry-activity-form {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1fr) 160px;
    gap: 12px;
    padding: 16px;
}

.inquiry-activity-form .full,
.inquiry-activity-form .button {
    grid-column: 1 / -1;
}

.inquiry-timeline {
    display: grid;
    gap: 12px;
}

.ai-hero {
    align-items: stretch;
}

.ai-workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    min-height: 760px;
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 18px 52px rgba(28, 42, 58, .07);
}

.ai-list-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, .66);
}

.ai-list-head,
.ai-filter {
    padding: 16px;
}

.ai-list-head {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.ai-filter {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid var(--line);
}

.ai-filter .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ai-list {
    overflow: auto;
    padding: 12px;
}

.ai-list-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--ink);
}

.ai-list-item:hover,
.ai-list-item.active {
    border-color: rgba(24, 184, 154, .18);
    background: linear-gradient(135deg, rgba(232, 248, 246, .92), rgba(239, 243, 255, .68));
}

.ai-list-item strong,
.ai-list-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-list-item small {
    grid-column: 2;
    color: var(--muted);
    font-weight: 750;
}

.ai-list-item em {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #526071;
    font-size: .74rem;
    font-style: normal;
    font-weight: 900;
}

.ai-type-dot {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #14322e;
    background: rgba(88, 215, 208, .18);
    font-weight: 950;
}

.ai-type-dot.knowledge {
    background: rgba(53, 239, 113, .16);
}

.ai-type-dot.code {
    background: rgba(245, 200, 76, .18);
}

.ai-type-dot.template {
    background: rgba(127, 140, 255, .16);
}

.ai-main {
    min-width: 0;
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 20px;
    background: linear-gradient(180deg, rgba(247, 250, 251, .86), rgba(255, 255, 255, .76));
}

.ai-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: start;
}

.ai-side-stack {
    display: grid;
    gap: 14px;
}

.ai-content-card {
    min-width: 0;
}

.ai-content-pre {
    margin: 0;
    min-height: 360px;
    max-height: 760px;
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(206, 217, 226, .76);
    border-radius: 18px;
    background: rgba(12, 18, 28, .96);
    color: #edf8f7;
    font: 800 .88rem/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-info-card {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.ai-info-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.ai-info-card dl div {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
}

.ai-info-card dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.ai-info-card dd {
    margin: 0;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.ai-version-list {
    display: grid;
    gap: 8px;
}

.ai-version-list details {
    padding: 10px;
    border: 1px solid rgba(206, 217, 226, .76);
    border-radius: 12px;
    background: rgba(247, 250, 251, .78);
}

.ai-version-list summary {
    cursor: pointer;
    font-weight: 900;
}

.ai-version-list p {
    margin: 8px 0 0;
    color: var(--muted);
}

.ai-form {
    gap: 16px;
}

.ai-form-grid {
    grid-template-columns: minmax(220px, .6fr) repeat(2, minmax(0, 1fr));
}

.ai-content-form-section {
    grid-template-columns: minmax(220px, .4fr) minmax(0, 1fr);
}

.ai-content-form-section label {
    grid-column: 2;
}

.project-detail-page,
.task-detail-page {
    display: grid;
    gap: 16px;
}

.detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(247, 251, 251, .72));
    box-shadow: 0 22px 64px rgba(28, 42, 58, .08);
}

.detail-hero h2 {
    font-size: 1.8rem;
    line-height: 1.08;
}

.detail-hero p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-chip-row > span:not(.badge) {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    color: #526071;
    font-size: .82rem;
    font-weight: 850;
}

.modern-tabs {
    margin: 0;
    padding: 0 4px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(141, 153, 168, .12);
}

.project-overview-grid,
.task-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.project-board-panel,
.task-section-panel,
.task-command-card,
.task-note-panel,
.activity-panel {
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 16px 42px rgba(28, 42, 58, .06);
}

.project-board-panel {
    padding: 18px;
}

.project-board-panel > .panel-header,
.task-section-panel > .panel-header,
.task-command-card > .panel-header,
.task-note-panel > .panel-header,
.activity-panel > .panel-header {
    margin-bottom: 14px;
}

.project-kanban {
    gap: 12px;
    padding-bottom: 4px;
}

.project-kanban .kanban-column {
    min-height: 320px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(247, 250, 251, .76);
    border: 1px solid rgba(141, 153, 168, .12);
}

.project-kanban .kanban-column h3 {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 2px solid rgba(141, 153, 168, .16);
    color: #27313d;
    font-size: .86rem;
    text-transform: none;
}

.project-kanban.board-kanban .kanban-column h3 {
    border-bottom-color: rgba(141, 153, 168, .16);
}

.project-kanban .kanban-column h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 42%;
    height: 2px;
    border-radius: 999px;
    background: var(--mint);
}

.project-kanban .kanban-column:nth-child(2) h3::after {
    background: #6bd5e8;
}

.project-kanban .kanban-column:nth-child(3) h3::after {
    background: #f2b04c;
}

.project-kanban .kanban-column:nth-child(4) h3::after {
    background: #ed716d;
}

.project-kanban .kanban-column:nth-child(5) h3::after {
    background: #66a559;
}

.project-kanban .kanban-column h3 small {
    grid-column: 1;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: none;
}

.project-kanban .kanban-column h3 b {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    font-size: .82rem;
}

.project-kanban .task-card {
    align-content: start;
    min-height: 110px;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 26px rgba(28, 42, 58, .06);
}

.project-kanban .task-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(28, 42, 58, .09);
}

.task-card-link {
    display: grid;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.task-card-link:hover strong {
    color: var(--mint-dark);
}

.card-start-form {
    display: flex;
    justify-content: flex-end;
    margin: 2px 0 0;
}

.card-start-button {
    min-width: 72px;
    min-height: 30px;
    padding-inline: 12px;
    border-radius: 999px;
    font-size: .78rem;
    box-shadow: 0 8px 18px rgba(13, 125, 112, .12);
}

.kanban-empty {
    display: grid;
    place-items: center;
    min-height: 74px;
    margin-bottom: 10px;
    border: 1px dashed rgba(141, 153, 168, .24);
    border-radius: 14px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.project-task-list .task-row-card {
    box-shadow: 0 10px 30px rgba(28, 42, 58, .055);
}

.project-machine-panel {
    padding: 18px;
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .12), transparent 30%),
        rgba(255, 255, 255, .84);
    box-shadow: 0 16px 42px rgba(28, 42, 58, .06);
}

.machine-run-totals {
    display: grid;
    gap: 3px;
    text-align: right;
    color: var(--muted);
    font-weight: 850;
}

.machine-run-totals strong {
    color: var(--ink);
}

.machine-board-actions {
    align-items: center;
}

.machine-run-create-shell,
.machine-resource-shell {
    position: relative;
}

.machine-run-create-shell > summary,
.machine-resource-shell > summary {
    list-style: none;
    cursor: pointer;
}

.machine-run-create-shell > summary::-webkit-details-marker,
.machine-resource-shell > summary::-webkit-details-marker {
    display: none;
}

.machine-run-create-shell[open] > summary,
.machine-resource-shell[open] > summary {
    box-shadow: 0 16px 32px rgba(24, 73, 65, .18);
}

.machine-run-create-shell[open] .machine-run-create,
.machine-resource-shell[open] .machine-resource-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: min(760px, calc(100vw - 48px));
    margin-top: 0;
    box-shadow: 0 28px 70px rgba(28, 42, 58, .18);
}

.machine-resource-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .18);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
}

.machine-resource-form,
.machine-resource-row {
    display: grid;
    gap: 10px;
    align-items: end;
}

.machine-resource-form {
    grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(130px, .7fr) minmax(180px, 1fr) auto;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(141, 153, 168, .16);
}

.machine-resource-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.machine-resource-list {
    display: grid;
    gap: 8px;
}

.machine-resource-row {
    grid-template-columns: minmax(170px, 1fr) minmax(130px, .8fr) minmax(110px, .55fr) minmax(110px, .55fr) minmax(160px, 1fr) auto;
    padding: 10px;
    border: 1px solid rgba(141, 153, 168, .13);
    border-radius: 16px;
    background: rgba(247, 251, 252, .78);
}

.machine-resource-form input,
.machine-resource-form select,
.machine-resource-row input,
.machine-resource-row select {
    min-height: 38px;
    border-radius: 12px;
}

.machine-run-create {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed rgba(24, 184, 154, .22);
    border-radius: 18px;
    background: rgba(255, 255, 255, .7);
}

.machine-run-actions {
    align-self: end;
}

.machine-kanban {
    margin-top: 14px;
}

.machine-kanban .kanban-column {
    min-height: 290px;
}

.machine-task-card {
    cursor: grab;
}

.machine-task-card.is-running {
    border-color: rgba(24, 184, 154, .34);
    background:
        radial-gradient(circle at 100% 0%, rgba(88, 215, 208, .16), transparent 38%),
        rgba(255, 255, 255, .94);
}

.machine-task-card-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.machine-task-card-main strong {
    display: block;
    margin-bottom: 4px;
}

.machine-task-time {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.machine-task-meta {
    margin-top: 2px;
}

.machine-card-start {
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid rgba(141, 153, 168, .12);
}

.machine-live-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(141, 153, 168, .12);
}

.machine-live-row b {
    color: var(--mint-dark);
    font-size: 1rem;
}

.machine-active-grid,
.machine-run-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.machine-active-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.machine-active-card,
.machine-run-card {
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 10px 28px rgba(28, 42, 58, .06);
}

.machine-active-card,
.machine-run-card > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.machine-active-card strong,
.machine-run-card h3 {
    display: block;
    margin: 6px 0 4px;
}

.machine-active-card small,
.machine-run-card p {
    color: var(--muted);
    font-weight: 750;
}

.machine-active-card b {
    font-size: 1.35rem;
}

.machine-run-card.is-running {
    border-color: rgba(24, 184, 154, .34);
    background:
        radial-gradient(circle at 100% 0%, rgba(88, 215, 208, .16), transparent 36%),
        rgba(255, 255, 255, .92);
}

.machine-run-values {
    min-width: 120px;
    text-align: right;
}

.machine-run-values strong {
    display: block;
    font-size: 1.18rem;
}

.machine-run-values span {
    color: var(--mint-dark);
    font-weight: 850;
}

.machine-run-description {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(141, 153, 168, .16);
}

.machine-run-edit {
    margin-top: 10px;
}

.machine-edit-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    color: var(--mint-dark);
    font-size: .82rem;
    font-weight: 900;
    text-decoration: none;
}

.machine-edit-link::before {
    content: "›";
    margin-right: 4px;
}

.machine-run-page-form .form-actions {
    justify-content: flex-start;
}

.resource-page-list {
    display: grid;
    gap: 14px;
}

.resource-page-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(140px, .75fr) minmax(130px, .6fr) minmax(120px, .55fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(88, 215, 208, .08), transparent 34%),
        rgba(255, 255, 255, .88);
}

.resource-page-row .full,
.form-actions.full {
    grid-column: 1 / -1;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) and (max-width: 1368px) {
    .resource-page-row {
        grid-template-columns: 1fr;
    }
}

.project-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 16px;
    align-items: start;
}

.activity-panel {
    padding: 18px;
}

.activity-timeline {
    max-height: 460px;
    overflow: auto;
    padding-right: 4px;
}

.task-detail-hero {
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .16), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(127, 140, 255, .12), transparent 34%),
        rgba(255, 255, 255, .82);
}

.task-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    gap: 16px;
    align-items: start;
}

.task-work-main,
.task-work-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.task-section-block {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 26px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .08), transparent 32%),
        rgba(255, 255, 255, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.task-overview-block {
    background:
        linear-gradient(135deg, rgba(244, 253, 252, .8), rgba(248, 250, 255, .68)),
        rgba(255, 255, 255, .48);
}

.task-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 2px 4px 12px;
    border-bottom: 1px solid rgba(141, 153, 168, .12);
}

.task-section-heading > div {
    min-width: 0;
}

.task-section-heading span {
    display: block;
    margin-bottom: 5px;
    color: var(--mint-dark);
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.task-section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.24rem;
    line-height: 1.12;
}

.task-section-heading p {
    max-width: 330px;
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 750;
    text-align: right;
}

.task-section-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.task-side-section {
    gap: 12px;
    padding: 12px;
}

.task-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.task-command-card,
.task-section-panel,
.task-note-panel {
    padding: 18px;
}

.task-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.task-live-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(31, 42, 63, .96), rgba(18, 26, 40, .96));
    color: #fff;
}

.task-live-timer strong {
    font-size: 1.55rem;
    font-weight: 650;
}

.task-booking-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.task-booking-form .full {
    grid-column: 1 / -1;
}

.task-booking-form .form-toggle {
    grid-column: span 2;
}

.task-booking-submit {
    grid-column: span 2;
    align-self: stretch;
}

.task-entry-list {
    display: grid;
    gap: 10px;
}

.task-entry-card {
    padding: 14px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 26px rgba(28, 42, 58, .05);
}

.task-entry-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-entry-card > header > div {
    display: grid;
    gap: 4px;
}

.task-entry-card > header > div:last-child {
    text-align: right;
}

.task-entry-card strong {
    font-size: 1.08rem;
}

.task-entry-card small,
.task-entry-card p {
    color: var(--muted);
}

.task-entry-card p {
    margin: 10px 0 0;
}

.task-entry-card .entry-edit form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.task-entry-card .entry-edit .field,
.task-entry-card .entry-edit .checkbox {
    min-width: 0;
}

.task-entry-card .entry-edit .field.full {
    grid-column: 1 / -1;
}

.task-note-panel h2 {
    font-size: 1.12rem;
}

.task-note-panel h3 {
    margin-top: 16px;
}

.task-note-panel p {
    color: #27313d;
}

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

.compact-timeline {
    margin-top: 12px;
}

.timeline-accordion {
    margin-top: 4px;
}

.timeline-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 12px;
    background: rgba(247, 250, 251, .86);
    color: var(--mint-dark);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 900;
    list-style: none;
}

.timeline-accordion summary::-webkit-details-marker {
    display: none;
}

.timeline-accordion summary span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.timeline-extra {
    margin-top: 12px;
}

.task-files-panel .panel {
    box-shadow: 0 16px 42px rgba(28, 42, 58, .06);
    border-radius: 22px;
}

.ledger-hero {
    background:
        linear-gradient(120deg, rgba(244, 251, 250, .96), rgba(255, 255, 255, .92) 56%, rgba(247, 248, 255, .84)),
        rgba(255, 255, 255, .82);
}

.ledger-filter {
    margin-top: 16px;
}

.sheet-panel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 0%, rgba(88, 215, 208, .12), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(127, 140, 255, .1), transparent 32%),
        rgba(255, 255, 255, .74);
    box-shadow: 0 24px 70px rgba(28, 42, 58, .08);
    backdrop-filter: blur(16px) saturate(135%);
}

.sheet-panel > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.sheet-panel h2 {
    font-size: 1.25rem;
}

.sheet-scroll {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-gutter: stable;
}

.sheet-grid {
    display: grid;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.password-grid {
    grid-template-columns: minmax(150px, .95fr) minmax(130px, .8fr) minmax(210px, 1.12fr) minmax(150px, .86fr) minmax(190px, .98fr) minmax(150px, .84fr) minmax(132px, .5fr);
    min-width: 1280px;
}

.invoice-grid {
    grid-template-columns: minmax(150px, .96fr) minmax(124px, .76fr) minmax(145px, .86fr) minmax(124px, .74fr) minmax(118px, .7fr) minmax(112px, .66fr) minmax(124px, .76fr) minmax(132px, .5fr);
    min-width: 1240px;
}

.invoice-sheet-row {
    align-items: start;
}

.sheet-head {
    padding: 0 10px 3px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sheet-row {
    padding: 10px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 30px rgba(28, 42, 58, .045);
}

.sheet-row.add-row {
    border-style: dashed;
    background: rgba(247, 251, 251, .82);
}

.sheet-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.sheet-row input,
.sheet-row select,
.sheet-row textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: .86rem;
}

.sheet-row input,
.sheet-row select {
    min-height: 38px;
    height: 38px;
}

.sheet-row textarea {
    min-height: 86px;
    resize: vertical;
}

.sheet-row input[type="month"] {
    min-width: 0;
}

.sheet-mobile-label {
    display: none;
}

.password-field {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 6px;
}

.password-field .sheet-mobile-label {
    grid-column: 1 / -1;
}

.password-field input {
    min-width: 0;
}

.password-field button {
    white-space: nowrap;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(141, 153, 168, .2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    color: var(--mint-dark);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 900;
}

.sheet-link {
    display: inline-flex;
    width: max-content;
    margin-top: 4px;
    color: var(--mint-dark);
    font-size: .76rem;
    font-weight: 900;
}

.gross-cell {
    display: grid;
    gap: 5px;
}

.gross-cell output {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 10px;
    background: rgba(247, 250, 251, .86);
    color: var(--ink);
    font-size: .86rem;
    font-weight: 900;
}

.status-select-success {
    color: #287a37;
}

.status-select-warn {
    color: #8b5a00;
}

.status-select-danger {
    color: #9c2d2d;
}

.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.sheet-actions .button {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
}

.sheet-action-menu {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.sheet-action-menu summary {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid rgba(183, 204, 210, .76);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98) 0%, rgba(247, 253, 252, .96) 50%, rgba(234, 249, 246, .92) 100%);
    color: var(--ink);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1;
    list-style: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 24px rgba(28, 42, 58, .07);
}

.sheet-action-menu summary::-webkit-details-marker {
    display: none;
}

.sheet-action-menu[open] summary {
    border-color: rgba(24, 184, 154, .46);
}

.sheet-action-menu > div {
    display: grid;
    gap: 6px;
}

.sheet-action-menu .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
}

.sheet-actions-wide {
    flex-wrap: wrap;
}

.invoice-extra {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(130px, .6fr) minmax(130px, .6fr) minmax(100px, .45fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(141, 153, 168, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .58);
}

.invoice-extra .span-2 {
    grid-column: span 2;
}

.linked-source {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.linked-source a {
    color: var(--mint-dark);
}

.sheet-empty {
    min-width: 0;
}

.system-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 16px;
    margin-top: 16px;
}

.system-card {
    display: grid;
    gap: 16px;
}

.system-check-list {
    display: grid;
    gap: 10px;
}

.system-check {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
}

.system-check > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 950;
}

.system-check.ok > span {
    background: rgba(53, 239, 113, .16);
    color: #21803a;
}

.system-check.warn > span {
    background: rgba(255, 120, 79, .16);
    color: #a64122;
}

.system-check div {
    display: grid;
    gap: 2px;
}

.system-check small,
.system-check em {
    color: var(--muted);
    font-style: normal;
}

.system-table-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.system-table-list span {
    padding: 6px 9px;
    border: 1px solid rgba(141, 153, 168, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 850;
}

.system-backup-button {
    justify-self: start;
    width: auto;
    min-height: 46px;
    padding-inline: 24px;
}

.backup-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backup-status-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid rgba(141, 153, 168, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.backup-status-strip strong {
    color: var(--ink);
}

.backup-retention-note {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(88, 177, 161, .18);
    border-radius: 15px;
    background: rgba(88, 177, 161, .09);
    color: var(--brand-dark);
    font-size: .84rem;
    font-weight: 850;
    line-height: 1.4;
}

.backup-retention-note.warn {
    border-color: rgba(245, 118, 76, .24);
    background: rgba(245, 118, 76, .11);
    color: #9a3412;
}

.backup-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.backup-action-row form {
    margin: 0;
}

.backup-list {
    display: grid;
    gap: 8px;
}

.backup-row,
.backup-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(141, 153, 168, .15);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    color: var(--ink);
}

.backup-row span {
    display: grid;
    gap: 2px;
}

.backup-row small,
.backup-row em,
.backup-empty {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.backup-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(28, 42, 58, .08);
}

.system-table-details {
    border-top: 1px solid rgba(141, 153, 168, .14);
    padding-top: 12px;
}

.system-table-details summary {
    cursor: pointer;
    color: var(--mint-dark);
    font-weight: 900;
}

.system-table-details .system-table-list {
    margin-top: 12px;
}

.print-body {
    min-height: 100vh;
    background: #f6f9fb;
    color: var(--ink);
}

.invoice-print-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px;
}

.invoice-print-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.invoice-document {
    display: grid;
    gap: 28px;
    padding: 46px;
    border: 1px solid rgba(206, 217, 226, .9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(28, 42, 58, .08);
}

.invoice-document-head,
.invoice-address-grid,
.invoice-amounts {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
}

.invoice-document h1 {
    max-width: 780px;
    font-size: clamp(2rem, 5vw, 4rem);
}

.invoice-company,
.invoice-address-grid article {
    display: grid;
    gap: 5px;
}

.invoice-company {
    justify-items: end;
    text-align: right;
}

.invoice-address-grid article {
    padding: 18px;
    border: 1px solid rgba(141, 153, 168, .15);
    border-radius: 16px;
    background: rgba(248, 251, 252, .86);
}

.invoice-address-grid small,
.invoice-amounts span {
    color: var(--muted);
    font-weight: 850;
}

.invoice-description,
.invoice-appendix {
    display: grid;
    gap: 12px;
}

.invoice-description p {
    white-space: normal;
    margin: 0;
    color: #354254;
}

.invoice-amounts {
    grid-template-columns: repeat(3, 1fr);
}

.invoice-amounts div {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(141, 153, 168, .16);
    border-radius: 16px;
    background: rgba(248, 251, 252, .86);
}

.invoice-amounts strong {
    font-size: 1.45rem;
}

.invoice-appendix-head,
.invoice-appendix-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 132px;
    gap: 14px;
    align-items: start;
}

.invoice-appendix-head {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.invoice-appendix-head span:first-child {
    white-space: nowrap;
}

.invoice-appendix-row {
    padding: 12px 0;
    border-top: 1px solid rgba(141, 153, 168, .18);
}

.invoice-appendix-row span {
    min-width: 0;
}

.invoice-appendix-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.invoice-appendix-label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.invoice-appendix-head span:last-child,
.invoice-appendix-net {
    text-align: right;
    justify-self: stretch;
}

.invoice-document footer {
    padding-top: 18px;
    border-top: 1px solid rgba(141, 153, 168, .18);
    color: var(--muted);
}

.invoice-letter-page {
    max-width: 980px;
}

.invoice-letter {
    min-height: 1240px;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 62px 78px 72px;
    border: 1px solid rgba(206, 217, 226, .9);
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(28, 42, 58, .08);
    color: #111827;
}

.invoice-letter-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 44px;
    min-height: 260px;
    align-items: start;
}

.invoice-recipient {
    align-self: end;
    display: grid;
    gap: 18px;
    padding-bottom: 48px;
}

.invoice-sender-line {
    width: max-content;
    max-width: 100%;
    border-bottom: 1px solid currentColor;
    color: #111827;
    font-size: .76rem;
    line-height: 1.1;
}

.invoice-recipient address {
    display: grid;
    gap: 2px;
    font-style: normal;
    line-height: 1.25;
}

.invoice-letter-company {
    display: grid;
    justify-items: end;
    gap: 13px;
    text-align: right;
    line-height: 1.28;
    font-size: .82rem;
}

.invoice-letter-company img {
    width: 184px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: right center;
    margin-bottom: 4px;
}

.invoice-letter-title {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.invoice-letter-title span {
    color: var(--mint-dark);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.invoice-letter-title h1 {
    max-width: 620px;
    margin-top: 0;
    font-size: 1.34rem;
    line-height: 1.22;
}

.invoice-letter-title p {
    margin: 12px 0 0;
    color: #111827;
    font-size: 1rem;
    line-height: 1.35;
}

.invoice-letter-title p span {
    display: inline-block;
    margin-top: 3px;
}

.invoice-letter-description,
.invoice-letter-appendix,
.invoice-payment-block {
    display: grid;
    gap: 12px;
}

.invoice-letter-description p,
.invoice-payment-block p {
    margin: 0;
    color: #1f2937;
}

.invoice-letter-amounts {
    display: grid;
    gap: 10px;
    max-width: 430px;
    margin-left: auto;
    padding-top: 16px;
    border-top: 2px solid #111827;
}

.invoice-letter-amounts div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: baseline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.invoice-letter-amounts span,
.invoice-payment-total span {
    color: #111827;
    font-size: .92rem;
    font-weight: 760;
}

.invoice-letter-amounts strong {
    color: #111827;
    font-size: .95rem;
    font-weight: 850;
    white-space: nowrap;
}

.invoice-letter-amounts div:last-child span,
.invoice-letter-amounts div:last-child strong {
    font-size: 1.02rem;
    font-weight: 900;
}

.invoice-letter-appendix {
    margin-top: 62px;
    page-break-inside: auto;
}

.invoice-payment-block {
    margin-top: 8px;
    padding-top: 8px;
    page-break-inside: avoid;
}

.invoice-payment-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: baseline;
    max-width: 520px;
    margin-left: auto;
    font-size: 1.02rem;
}

.invoice-payment-block h2 {
    margin-top: 18px;
}

.invoice-letter footer {
    padding-top: 18px;
    border-top: 1px solid rgba(141, 153, 168, .18);
    color: var(--muted);
}

.invoice-editor-form {
    display: grid;
    gap: 16px;
}

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

.invoice-flow-guide div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(206, 217, 226, .68);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 12px 34px rgba(28, 42, 58, .045);
}

.invoice-flow-guide div.active {
    background: linear-gradient(135deg, rgba(232, 248, 246, .92), rgba(239, 243, 255, .62));
    border-color: rgba(88, 215, 208, .3);
}

.invoice-flow-guide span {
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(17, 22, 31, .08);
    color: var(--ink);
    font-weight: 950;
}

.invoice-flow-guide div.active span {
    background: rgba(88, 215, 208, .22);
    color: var(--mint-dark);
}

.invoice-flow-guide strong,
.invoice-flow-guide small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-flow-guide small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 780;
}

.invoice-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(206, 217, 226, .74);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(88, 215, 208, .14), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(127, 140, 255, .12), transparent 32%),
        rgba(255, 255, 255, .86);
    box-shadow: 0 18px 48px rgba(28, 42, 58, .08);
    backdrop-filter: blur(16px) saturate(135%);
}

.invoice-editor-toolbar h2 {
    font-size: 1.45rem;
}

.invoice-editor-toolbar .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.invoice-export-button {
    display: grid;
    gap: 2px;
    min-width: 168px;
    justify-items: center;
    line-height: 1.1;
}

.invoice-export-button small {
    color: inherit;
    font-size: .72rem;
    font-weight: 780;
    opacity: .72;
}

.invoice-editor-layout {
    display: grid;
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.invoice-checklist {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(206, 217, 226, .72);
    border-radius: 22px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 50px rgba(28, 42, 58, .07);
    backdrop-filter: blur(16px) saturate(135%);
}

.invoice-checklist h3 {
    font-size: 1.05rem;
}

.invoice-checklist ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.invoice-checklist li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.invoice-checklist li span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(141, 153, 168, .28);
    box-shadow: inset 0 0 0 1px rgba(141, 153, 168, .2);
}

.invoice-checklist li.ok {
    color: #246f62;
}

.invoice-checklist li.ok span {
    background: var(--mint);
    box-shadow: 0 0 0 4px rgba(88, 215, 208, .14);
}

.invoice-checklist li.missing span {
    background: rgba(245, 200, 76, .9);
}

.invoice-checklist p {
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.4;
}

.invoice-a4-stage {
    width: 100%;
    overflow: auto;
    padding: 26px;
    border: 1px solid rgba(206, 217, 226, .74);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(232, 248, 246, .72), rgba(239, 243, 255, .56)),
        #eef4f6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
}

.invoice-letter-editor {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    box-sizing: border-box;
    box-shadow: 0 34px 90px rgba(28, 42, 58, .18);
}

.invoice-letter-editor [contenteditable] {
    min-width: 1.5em;
    min-height: 1em;
    border-radius: 7px;
    outline: 1px dashed transparent;
    outline-offset: 4px;
    cursor: text;
    transition: background .16s ease, outline-color .16s ease, box-shadow .16s ease;
}

.invoice-letter-editor [contenteditable]:hover {
    background: rgba(88, 215, 208, .08);
    outline-color: rgba(24, 184, 154, .2);
}

.invoice-letter-editor [contenteditable]:focus {
    background: rgba(88, 215, 208, .14);
    outline-color: rgba(24, 184, 154, .48);
    box-shadow: 0 0 0 6px rgba(88, 215, 208, .09);
}

.invoice-letter-editor [contenteditable]:empty::before {
    content: attr(data-placeholder);
    color: rgba(100, 116, 139, .58);
}

.invoice-letter-editor .invoice-letter-title h1[contenteditable] {
    display: block;
}

.invoice-letter-editor .invoice-letter-description p[contenteditable] {
    min-height: 96px;
    white-space: pre-wrap;
}

.invoice-letter-editor .invoice-recipient [contenteditable] {
    display: block;
    width: fit-content;
    max-width: 100%;
}

.invoice-letter-editor [data-wysiwyg-money-net] {
    display: inline-block;
}

.invoice-letter-editor [data-wysiwyg-line-net] {
    display: block;
    min-width: 92px;
    text-align: right;
}

@media (max-width: 980px) {
    .system-grid,
    .invoice-document-head,
    .invoice-address-grid,
    .invoice-amounts,
    .invoice-letter-head,
    .invoice-letter-title,
    .invoice-letter-amounts {
        grid-template-columns: 1fr;
    }

    .invoice-company {
        justify-items: start;
        text-align: left;
    }

    .invoice-appendix-head {
        display: none;
    }

    .invoice-appendix-row {
        grid-template-columns: 1fr;
    }

    .invoice-letter {
        min-height: 0;
        padding: 28px;
    }

    .invoice-letter-company {
        justify-items: start;
        text-align: left;
    }

    .invoice-editor-toolbar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-flow-guide,
    .invoice-editor-layout {
        grid-template-columns: 1fr;
    }

    .invoice-editor-toolbar .actions {
        justify-content: stretch;
    }

    .invoice-editor-toolbar .button {
        flex: 1;
    }

    .invoice-checklist {
        position: static;
    }

    .invoice-a4-stage {
        padding: 14px;
    }

    .invoice-letter-editor {
        width: 210mm;
    }

    .invoice-recipient {
        align-self: start;
    }
}

/* Final polish layer: quieter surfaces, clearer hierarchy and consistent controls. */
.topbar {
    min-height: 56px;
}

.user-chip {
    background: rgba(255, 255, 255, .76);
    border-color: rgba(206, 217, 226, .72);
    box-shadow: 0 10px 28px rgba(28, 42, 58, .045);
}

.top-search input::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(104, 115, 133, .62);
}

.section-header,
.detail-hero,
.dashboard-hero,
.ledger-hero,
.task-hero,
.inquiry-hero,
.ai-hero {
    border-color: rgba(255, 255, 255, .78);
    box-shadow: 0 22px 62px rgba(28, 42, 58, .075), 0 1px 0 rgba(255, 255, 255, .86) inset;
}

.section-header h2 {
    font-size: 1.42rem;
}

.panel-header h2,
.panel-header h3 {
    font-size: 1.12rem;
}

.panel-header p,
.section-header p,
.detail-hero p {
    color: var(--muted);
    font-weight: 730;
}

.panel,
.card,
.table-wrap,
.empty-state,
.task-command-card,
.task-section-panel,
.task-note-panel,
.activity-panel,
.sheet-panel,
.project-board-panel,
.customer-project-panel,
.dashboard-panel {
    box-shadow: 0 16px 42px rgba(28, 42, 58, .055), 0 1px 0 rgba(255, 255, 255, .84) inset;
}

.table-wrap {
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: rgba(247, 250, 251, .92);
    color: #5b6878;
    letter-spacing: .04em;
}

td {
    border-bottom-color: rgba(206, 217, 226, .72);
}

tbody tr:hover td {
    background: rgba(244, 251, 250, .78);
}

.detail-tabs,
.modern-tabs,
.timesheet-tabs {
    overflow-x: auto;
    scrollbar-width: none;
}

.detail-tabs::-webkit-scrollbar,
.modern-tabs::-webkit-scrollbar,
.timesheet-tabs::-webkit-scrollbar {
    display: none;
}

.detail-tabs a,
.modern-tabs a,
.timesheet-tabs a {
    white-space: nowrap;
}

.badge,
.pill {
    min-height: 24px;
    line-height: 1;
}

.empty-inline {
    padding: 16px;
    border: 1px dashed rgba(141, 153, 168, .28);
    border-radius: 14px;
    background: rgba(247, 250, 251, .68);
    color: var(--muted);
    font-weight: 760;
}

.empty-state {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(247, 251, 251, .72)),
        rgba(255, 255, 255, .82);
}

.entity-row,
.report-row,
.task-row-card,
.customer-project-card,
.report-mini-card,
.inquiry-list-item,
.inquiry-pipeline-card,
.ai-list-item,
.search-card,
.work-card,
.mini-card,
.suggestion-card,
.sheet-row,
.task-entry-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.entity-row:hover,
.report-row:hover,
.task-row-card:hover,
.customer-project-card:hover,
.report-mini-card:hover,
.inquiry-list-item:hover,
.inquiry-pipeline-card:hover,
.ai-list-item:hover,
.search-card:hover,
.work-card:hover,
.mini-card:hover,
.suggestion-card:hover,
.sheet-row:hover,
.task-entry-card:hover {
    border-color: rgba(24, 184, 154, .22);
}

.timeline-item {
    position: relative;
    padding: 2px 0 12px 15px;
    border-left-color: rgba(24, 184, 154, .62);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 4px;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    background: var(--mint);
    box-shadow: 0 0 0 3px rgba(24, 184, 154, .12);
}

.timeline-item strong {
    display: block;
    margin-bottom: 4px;
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 0;
    border-radius: 9px;
    padding: 7px 10px;
    background: rgba(17, 22, 31, .08);
    color: var(--ink);
    cursor: pointer;
    font-weight: 850;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(17, 22, 31, .12);
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) and (max-width: 1368px) {
    .sheet-head {
        display: none;
    }

    .sheet-grid,
    .password-grid,
    .invoice-grid {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .sheet-mobile-label {
        display: block;
        color: var(--muted);
        font-size: .74rem;
        font-weight: 900;
    }

    .sheet-actions {
        justify-content: stretch;
    }

    .invoice-extra {
        grid-template-columns: 1fr;
    }

    .invoice-extra .span-2 {
        grid-column: auto;
    }
}

@media print {
    .invoice-print-toolbar {
        display: none !important;
    }

    .print-body {
        background: #fff;
    }

    .invoice-print-page {
        max-width: none;
        padding: 0;
    }

    .invoice-document {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    .invoice-letter {
        min-height: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    .icon-rail,
    .sidebar,
    .topbar,
    .report-list,
    .report-actions,
    .report-period-form {
        display: none !important;
    }

    .app-shell,
    .reports-workspace {
        display: block;
    }

    .main,
    .report-preview,
    .report-page {
        padding: 0;
        background: #fff;
    }

    .report-document {
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 1020px) {
    .app-shell {
        grid-template-columns: 1fr;
        background: transparent;
    }

    html.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
        background: transparent;
    }

    .icon-rail {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
    }

    .account-menu {
        left: auto;
        right: 0;
        bottom: auto;
        top: 44px;
    }

    .sidebar {
        position: static;
        height: auto;
    }

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

    .grid.three,
    .grid.four,
    .grid.two,
    .inquiry-workspace,
    .ai-workspace,
    .project-overview-grid,
    .task-snapshot-grid,
    .ai-detail-grid,
    .inquiry-detail-grid,
    .inquiry-card-grid,
    .project-support-grid,
    .task-work-grid,
    .task-command-grid,
    .form-grid,
    .filter-grid,
    .task-row-card,
    .form-section,
    .workspace,
    .timesheet-toolbar,
    .reports-workspace,
    .report-summary,
    .report-period-form,
    .report-project > header,
    .report-task-head,
    .report-line {
        grid-template-columns: 1fr;
    }

    .report-line {
        padding: 12px 0;
    }

    .report-line-metric {
        text-align: left;
    }

    .report-line-metric strong,
    .report-line-metric small {
        white-space: normal;
    }

    .inquiry-list-panel,
    .ai-list-panel {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .inquiry-detail-grid > .task-section-block,
    .inquiry-detail-grid > aside,
    .ai-detail-grid > .task-section-block,
    .ai-detail-grid > aside {
        grid-column: auto;
        grid-row: auto;
    }

    .task-row-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-booking-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-list,
    .report-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .reports-workspace.list-collapsed,
    .workspace.list-collapsed,
    .inquiry-workspace.list-collapsed,
    .ai-workspace.list-collapsed {
        grid-template-columns: 1fr;
        grid-template-rows: 38px minmax(0, 1fr);
    }

    .reports-workspace.list-collapsed .report-list,
    .workspace.list-collapsed .workspace-list,
    .inquiry-workspace.list-collapsed .inquiry-list-panel,
    .ai-workspace.list-collapsed .ai-list-panel {
        min-height: 38px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .collapsible-workspace.list-collapsed .panel-collapse-toggle {
        top: 5px;
        right: auto;
        left: 7px;
    }

    .report-line {
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .panel-header,
    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        grid-template-columns: 1fr 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body {
        background: #f5f8f9;
    }

    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .sidebar {
        height: auto;
        padding: 14px;
        gap: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .brand {
        width: 100%;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand small {
        display: none;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 0 -14px;
        padding: 2px 14px 8px;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex: 0 0 auto;
        grid-template-columns: 24px minmax(0, auto);
        border: 1px solid rgba(255, 255, 255, .08);
    }

    .nav a {
        flex: 0 0 auto;
        gap: 8px;
        padding: 9px 4px;
        white-space: nowrap;
    }

    .nav a .nav-code {
        width: 24px;
        height: 24px;
    }

    .nav-color-menu {
        left: 0;
        right: auto;
    }

    .sidebar-timer {
        margin-top: 0;
        padding: 14px;
    }

    .sidebar-timer b,
    .sidebar-timer strong {
        overflow-wrap: anywhere;
    }

    .sidebar-timer-form {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .shortcut-panel > div {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .shortcut-link,
    .shortcut-empty {
        flex: 0 0 auto;
    }

    .logout-form .button {
        width: 100%;
    }

    .main {
        padding: 16px;
    }

    .topbar {
        margin-bottom: 12px;
    }

    .user-chip {
        display: none;
    }

    .top-search {
        max-width: none;
        width: 100%;
    }

    .button,
    button.button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .report-actions {
        justify-content: flex-start;
    }

    .report-actions form,
    .report-actions .button {
        flex: 1 1 auto;
    }

    .report-actions form .button {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .main {
        padding: 14px;
    }

    .topbar h1 {
        font-size: 1.45rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .report-hero h2 {
        font-size: 1.9rem;
    }

    .dashboard-hero h2,
    .detail-hero h2 {
        font-size: 1.45rem;
    }

    .grid.two,
    .grid.three,
    .grid.four,
    .inquiry-workspace,
    .ai-workspace,
    .inquiry-detail-grid,
    .ai-detail-grid,
    .inquiry-card-grid,
    .inquiry-activity-form,
    .project-overview-grid,
    .task-snapshot-grid,
    .project-support-grid,
    .task-work-grid,
    .task-command-grid,
    .task-booking-form,
    .form-grid,
    .filter-grid,
    .form-section,
    .ai-form-grid,
    .ai-content-form-section,
    .dashboard-section-head,
    .dashboard-hero,
    .detail-hero,
    .dashboard-filter,
    .project-overview-query,
    .project-overview-filter,
    .dashboard-grid,
    .dashboard-grid.three-col,
    .search-results,
    .workspace,
    .reports-workspace,
    .report-summary {
        grid-template-columns: 1fr;
    }

    .ai-content-form-section label {
        grid-column: 1;
    }

    .report-period-form {
        grid-template-columns: 1fr;
    }

    .task-row-meta {
        grid-template-columns: 1fr;
    }

    .task-summary-strip,
    .filter-actions,
    .detail-chip-row {
        justify-content: flex-start;
    }

    .task-inline-form,
    .task-entry-card > header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .task-entry-card > header {
        display: grid;
    }

    .task-entry-card > header > div:last-child {
        text-align: left;
    }

    .task-section-block {
        padding: 12px;
        border-radius: 22px;
    }

    .task-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .task-section-heading p {
        max-width: none;
        text-align: left;
    }

    .task-entry-card .entry-edit form {
        grid-template-columns: 1fr;
    }

    .task-booking-form .form-toggle,
    .task-booking-submit {
        grid-column: 1 / -1;
    }

    .workspace,
    .reports-workspace,
    .timesheet-shell {
        margin: 0 -14px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        min-height: auto;
    }

    .workspace-tools,
    .report-list-head {
        padding: 14px;
    }

    .workspace-list,
    .report-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .entity-list {
        max-height: 320px;
    }

    .entity-row,
    .report-row {
        padding: 14px;
    }

    .workspace-main,
    .report-preview,
    .report-page {
        padding: 14px;
        background: #f7fafb;
    }

    .section-header,
    .smart-form {
        margin-left: -2px;
        margin-right: -2px;
        padding: 14px;
        border-radius: 16px;
    }

    .form-section {
        padding: 14px;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .dashboard-panel,
    .dashboard-section {
        padding: 16px;
    }

    .dashboard-section-head {
        align-items: flex-start;
    }

    .detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-section-head p {
        max-width: none;
        text-align: left;
    }

    .value-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .value-row b {
        grid-column: 2;
    }

    .detail-head,
    .board-toolbar,
    .report-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-title {
        align-items: flex-start;
    }

    .detail-tabs,
    .timesheet-tabs,
    .tabs {
        overflow-x: auto;
        gap: 18px;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
        scrollbar-width: none;
    }

    .detail-tabs::-webkit-scrollbar,
    .timesheet-tabs::-webkit-scrollbar,
    .tabs::-webkit-scrollbar {
        display: none;
    }

    .detail-tabs a,
    .timesheet-tabs a,
    .tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .project-shell {
        margin: 0 -14px;
        padding: 16px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .project-head {
        margin: -16px -16px 0;
        padding: 18px 16px 0;
    }

    .board-kanban {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 14px;
        scroll-snap-type: x proximity;
    }

    .board-kanban .kanban-column {
        flex: 0 0 286px;
        min-width: 286px;
        padding: 0;
        scroll-snap-align: start;
    }

    .timesheet-toolbar {
        grid-template-columns: 1fr;
        padding: 14px;
        margin: 10px;
    }

    .timesheet-toolbar > .actions,
    .timesheet-toolbar > .actions:last-child,
    .week-switcher,
    .view-switch {
        justify-content: flex-start;
    }

    .week-switcher {
        width: 100%;
        gap: 12px;
    }

    .week-switcher strong {
        min-width: 0;
    }

    .week-switcher div {
        text-align: left;
    }

    .view-switch {
        width: 100%;
        justify-self: stretch;
    }

    .view-switch a {
        flex: 1;
        min-width: 0;
    }

    .timesheet-filter {
        align-items: stretch;
        flex-direction: column;
        margin: 0 10px 10px;
    }

    .day-dashboard,
    .active-timers-grid {
        grid-template-columns: 1fr;
    }

    .month-grid {
        grid-template-columns: repeat(7, minmax(132px, 1fr));
    }

    .entry-ledger {
        margin: 14px -14px 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        padding: 14px;
    }

    .entry-card > header,
    .active-timer-card,
    .customer-project-card {
        grid-template-columns: 1fr;
    }

    .entry-card-values {
        text-align: left;
    }

    .project-card-metrics {
        text-align: left;
    }

    .week-grid {
        grid-template-columns: 54px repeat(7, minmax(260px, 1fr));
    }

    .time-block {
        left: calc(var(--block-left, 0%) + 5px);
        right: auto;
        width: calc(var(--block-width, 100%) - 10px);
        max-width: calc(100% - 10px);
        padding: 5px 6px;
        font-size: .73rem;
    }

    .report-document {
        padding: 18px;
        border-radius: 0;
    }

    .report-number {
        min-width: 0;
        text-align: left;
    }

    .report-project > header,
    .report-task-head,
    .report-line {
        grid-template-columns: 1fr;
    }

    .report-line {
        gap: 4px;
        padding: 12px 0;
    }

    .report-line strong {
        text-align: left;
    }

    .table-wrap table {
        min-width: 680px;
    }
}

@media (max-width: 520px) {
    .brand-logo {
        height: 36px;
    }

    .guest-brand .brand-logo-dark {
        height: 58px;
    }

    .sidebar-timer-form {
        grid-template-columns: 1fr;
    }

    .timer-start,
    .timer-stop {
        width: 100%;
    }

    .actions,
    .report-actions {
        width: 100%;
    }

    .actions .button,
    .report-actions .button,
    .report-actions form {
        width: 100%;
    }

    .entity-text small span {
        margin: 6px 6px 0 0;
    }

    .report-row strong {
        max-width: none;
        padding-right: 74px;
    }

    .report-summary strong {
        font-size: 1.15rem;
    }

    .day-column,
    .time-column {
        min-height: 980px;
    }
}

@media screen and (min-width: 1021px) {
    :root {
        --control-height: 38px;
        --control-radius: 10px;
        --control-font-size: .86rem;
        --radius: 12px;
        --shadow: 0 14px 34px rgba(17, 22, 31, .062);
        --shadow-soft: 0 8px 22px rgba(17, 22, 31, .048);
    }

    html {
        font-size: 15.25px;
    }

    .app-shell {
        grid-template-columns: 52px 252px minmax(0, 1fr);
        background: linear-gradient(90deg, var(--rail) 0 52px, var(--sidebar) 52px 304px, transparent 304px);
    }

    html.sidebar-collapsed .app-shell {
        grid-template-columns: 52px 66px minmax(0, 1fr);
        background: linear-gradient(90deg, var(--rail) 0 52px, var(--sidebar) 52px 118px, transparent 118px);
    }

    .icon-rail {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: 52px;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        gap: 14px;
        padding: 14px 8px;
    }

    .icon-rail a,
    .rail-action,
    .rail-user {
        width: 32px;
        height: 32px;
        font-size: .88rem;
    }

    .rail-action {
        font-size: 1.08rem;
    }

    .rail-mark img {
        width: 20px;
        height: 20px;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 52px;
        z-index: 39;
        width: 252px;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 20px 18px;
        gap: 20px;
    }

    html.sidebar-collapsed .sidebar {
        width: 66px;
    }

    .sidebar-collapse-toggle {
        top: 12px;
        right: 6px;
        width: 24px;
        height: 28px;
    }

    .brand {
        gap: 10px;
        padding-right: 20px;
    }

    .brand-logo {
        height: 34px;
    }

    .brand small {
        font-size: .66rem;
    }

    html.sidebar-collapsed .brand-mark {
        width: 34px;
        height: 34px;
    }

    html.sidebar-collapsed .brand-mark img {
        width: 24px;
        height: 24px;
    }

    .nav {
        gap: 1px;
    }

    .nav-item {
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 4px;
        padding: 0 4px;
        border-radius: 11px;
    }

    .nav a {
        gap: 10px;
        padding: 9px 5px;
        border-radius: 11px;
        font-size: .92rem;
    }

    .nav a .nav-code {
        width: 25px;
        height: 25px;
        border-radius: 7px;
        font-size: .64rem;
    }

    .nav-label {
        font-size: .92rem;
    }

    .nav-color-toggle {
        width: 14px;
        height: 30px;
        color: rgba(215, 223, 223, .24);
    }

    .nav-color-toggle::before {
        font-size: .62rem;
    }

    .nav-color-menu {
        top: 32px;
        grid-template-columns: repeat(4, 20px);
        gap: 6px;
        padding: 8px;
        border-radius: 12px;
    }

    .nav-color-swatch {
        width: 20px;
        height: 20px;
    }

    html.sidebar-collapsed .nav {
        gap: 7px;
    }

    html.sidebar-collapsed .nav-item {
        grid-template-columns: 10px minmax(0, 1fr);
    }

    html.sidebar-collapsed .nav a .nav-code {
        width: 31px;
        height: 31px;
        font-size: .7rem;
    }

    .shortcut-panel {
        gap: 8px;
    }

    .shortcut-panel small {
        font-size: .62rem;
    }

    .shortcut-panel header a {
        font-size: .72rem;
    }

    .shortcut-link,
    .shortcut-empty {
        min-height: 32px;
        padding: 6px 9px;
        border-radius: 10px;
        font-size: .86rem;
    }

    .shortcut-icon {
        width: 23px;
        height: 23px;
        font-size: .86rem;
    }

    .sidebar-timer {
        gap: 6px;
        padding: 13px;
        border-radius: 17px;
    }

    .sidebar-timer small {
        font-size: .64rem;
    }

    .sidebar-timer strong {
        font-size: .86rem;
    }

    .sidebar-timer b {
        font-size: 1.02rem;
    }

    .sidebar-timer span {
        font-size: .8rem;
    }

    .sidebar-timer-form {
        gap: 9px;
    }

    .sidebar-timer select {
        min-height: 34px;
        height: 34px;
        padding: 6px 8px;
        font-size: .78rem;
    }

    .timer-console {
        grid-template-columns: 29px minmax(0, 1fr) 20px;
        gap: 7px;
        min-height: 43px;
        margin-top: 6px;
        padding: 6px 7px;
    }

    .timer-round {
        width: 28px;
        height: 28px;
    }

    .play-symbol {
        border-top-width: 6px;
        border-bottom-width: 6px;
        border-left-width: 9px;
    }

    .stop-symbol {
        width: 11px;
        height: 11px;
    }

    .timer-jump {
        width: 20px;
        height: 20px;
    }

    .timer-jump::before {
        right: 5px;
        top: 5px;
    }

    .timer-jump::after {
        right: 5px;
        top: 11px;
    }

    .main {
        padding: 22px;
    }

    .topbar {
        min-height: 50px;
        margin-bottom: 14px;
    }

    .topbar h1 {
        font-size: 1.76rem;
    }

    h1 {
        font-size: 1.99rem;
    }

    h2 {
        font-size: 1.14rem;
    }

    h3 {
        font-size: .98rem;
    }

    p {
        line-height: 1.45;
    }

    .eyebrow {
        font-size: .64rem;
    }

    .user-chip {
        min-width: 142px;
        padding: 8px 10px;
        border-radius: 11px;
    }

    .top-search {
        max-width: 400px;
    }

    .grid {
        gap: 14px;
    }

    .workspace {
        grid-template-columns: 320px minmax(0, 1fr);
        min-height: calc(100vh - 108px);
    }

    .workspace-tools,
    .workspace-main {
        padding: 18px;
    }

    .entity-row {
        gap: 12px;
        padding: 14px 16px;
    }

    .entity-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .entity-icon.large {
        width: 46px;
        height: 46px;
    }

    .detail-tabs {
        gap: 22px;
        margin: 0 -18px 18px;
        padding: 0 18px;
    }

    .detail-tabs a,
    .timesheet-tabs a,
    .modern-tabs a {
        font-size: .9rem;
    }

    .detail-tabs a {
        padding: 12px 0 11px;
    }

    .section-header,
    .dashboard-hero,
    .dashboard-panel,
    .task-filter-panel,
    .project-shell,
    .project-table-panel,
    .panel,
    .card,
    .table-wrap,
    .empty-state {
        border-radius: 16px;
    }

    .section-header {
        padding: 17px 19px;
        margin-bottom: 12px;
    }

    .section-header h2 {
        font-size: 1.27rem;
    }

    .section-header p {
        margin-top: 6px;
        font-size: .9rem;
    }

    .panel,
    .card,
    .empty-state {
        padding: 15px;
    }

    .panel-header,
    .section-header {
        gap: 12px;
        margin-bottom: 12px;
    }

    .panel-header h2,
    .panel-header h3 {
        font-size: 1.02rem;
    }

    label,
    .filter-grid label,
    .ledger-filter label,
    .project-overview-filter label,
    .dashboard-filter label {
        font-size: .8rem;
    }

    input,
    select,
    textarea {
        padding: 8px 10px;
        font-weight: 650;
    }

    select {
        padding-right: 30px;
        background-position:
            calc(100% - 16px) 50%,
            calc(100% - 11px) 50%;
        background-size: 5px 5px, 5px 5px;
    }

    .button,
    button.button {
        gap: 7px;
        padding: 0 13px;
        font-weight: 760;
    }

    .button.small,
    button.button.small {
        min-height: 31px;
        padding: 0 10px;
        font-size: .78rem;
    }

    .project-overview-filter {
        gap: 8px;
    }

    .project-overview-filter .button {
        min-width: 100px;
    }

    .board-toolbar {
        margin-bottom: 14px;
    }

    .board-kanban {
        grid-template-columns: repeat(5, minmax(250px, 1fr));
    }

    .board-kanban .kanban-column {
        padding: 0 6px;
    }

    .board-kanban .kanban-column h3 {
        padding: 0 5px 11px;
        font-size: .78rem;
    }

    .board-kanban .task-card {
        min-height: 92px;
        padding: 14px;
    }

    .timesheet-shell {
        border-radius: 16px;
    }

    .timesheet-tabs {
        gap: 32px;
    }

    .timesheet-tabs a {
        padding: 15px 0 12px;
    }

    .timesheet-toolbar {
        gap: 14px;
        padding: 16px 18px;
    }

    .week-switcher {
        gap: 13px;
    }

    .week-switcher a {
        font-size: 1.28rem;
    }

    .week-switcher div {
        min-width: 132px;
    }

    .week-switcher b {
        min-width: 66px;
        font-size: .96rem;
    }

    .view-switch {
        padding: 3px;
    }

    .view-switch a {
        min-width: 58px;
        padding: 7px 10px;
        font-size: .86rem;
    }

    .timesheet-filter {
        margin: 0 10px 10px;
        padding: 10px;
    }

    .timesheet-filter label {
        min-width: min(300px, 100%);
    }

    .week-grid {
        grid-template-columns: 52px repeat(7, minmax(178px, 1fr));
    }

    .time-column span,
    .day-column header {
        height: 78px;
    }

    .day-lane {
        height: 936px;
        background-image: linear-gradient(to bottom, transparent 77px, rgba(141, 153, 168, .18) 78px);
        background-size: 100% 78px;
    }

    .time-column,
    .day-column {
        min-height: 1014px;
    }

    .time-column span {
        padding: 6px 8px;
        font-size: .84rem;
    }

    .day-column header {
        padding: 0 9px;
    }

    .day-column header span {
        font-size: .68rem;
    }

    .day-column header strong {
        font-size: .92rem;
    }

    .time-block {
        left: calc(var(--block-left, 0%) + 7px);
        right: auto;
        width: calc(var(--block-width, 100%) - 14px);
        max-width: calc(100% - 14px);
        min-height: 34px;
        padding: 5px 6px;
        border-left-width: 4px;
        border-radius: 7px;
        font-size: .68rem;
    }

    .time-block strong {
        font-size: .74rem;
    }

    .time-block small {
        font-size: .66rem;
    }

    .time-block.floating {
        left: auto;
        width: auto;
        max-width: none;
    }

    .metric-card {
        gap: 6px;
        padding: 15px;
    }

    .metric-card strong {
        font-size: 1.56rem;
    }

    .dashboard-section {
        gap: 14px;
        margin-top: 16px;
    }

    .dashboard-hero {
        gap: 18px;
        padding: 18px;
    }

    .dashboard-hero h2 {
        font-size: 1.42rem;
    }

    .dashboard-hero p {
        font-size: .88rem;
    }

    .dashboard-filter {
        gap: 8px;
        max-width: 430px;
    }

    .dashboard-filter .button {
        min-width: 112px;
    }

    .grid.four.dashboard-metrics {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .dashboard-metrics .metric-card {
        padding: 13px;
    }

    .dashboard-metrics .metric-card strong {
        font-size: 1.46rem;
    }

    .dashboard-grid {
        gap: 12px;
    }

    .dashboard-panel {
        padding: 15px;
    }

    .dashboard-panel > header {
        margin-bottom: 12px;
    }

    .dashboard-panel h2,
    .dashboard-task-head h2 {
        font-size: 1.08rem;
    }

    .task-filter-panel {
        gap: 12px;
        padding: 15px;
    }

    .filter-grid {
        gap: 10px;
    }

    .filter-actions {
        gap: 8px;
        padding-top: 10px;
    }

    .task-row-card {
        grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
        gap: 14px;
        padding: 14px 16px;
        border-radius: 16px;
    }

    .task-row-main {
        gap: 6px;
    }

    .task-row-main h3 {
        font-size: .98rem;
    }

    .task-row-meta span {
        min-height: 56px;
        padding: 8px;
        border-radius: 12px;
    }

    th,
    td {
        padding: 10px 12px;
        font-size: .86rem;
    }
}

.mobile-menu-button,
.mobile-sidebar-close,
.mobile-sidebar-backdrop,
.mobile-quick-panel,
.mobile-account-panel,
.mobile-timer-bar {
    display: none;
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) and (max-width: 1368px) {
    body.mobile-sidebar-open {
        overflow: hidden;
    }

    body.has-mobile-timer .main {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .app-shell,
    html.sidebar-collapsed .app-shell {
        display: block;
        min-height: 100vh;
        background: linear-gradient(135deg, #f8fbff 0%, #eef7f7 48%, #faf8f3 100%);
    }

    .icon-rail {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
        gap: 4px;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        border: 1px solid rgba(206, 217, 226, .82);
        border-radius: 14px;
        background: rgba(255, 255, 255, .84);
        color: var(--ink);
        box-shadow: 0 12px 32px rgba(28, 42, 58, .08), 0 1px 0 rgba(255, 255, 255, .9) inset;
        backdrop-filter: blur(18px) saturate(140%);
        cursor: pointer;
    }

    .mobile-menu-button span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .18s ease, opacity .18s ease;
    }

    html.mobile-sidebar-open .mobile-menu-button span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    html.mobile-sidebar-open .mobile-menu-button span:nth-child(2) {
        opacity: 0;
    }

    html.mobile-sidebar-open .mobile-menu-button span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1080;
        display: block;
        background: rgba(10, 16, 24, .42);
        backdrop-filter: blur(10px) saturate(125%);
    }

    .mobile-sidebar-backdrop[hidden] {
        display: none;
    }

    .sidebar,
    html.sidebar-collapsed .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1100;
        width: min(86vw, 392px);
        max-width: 392px;
        height: 100vh;
        height: 100dvh;
        padding: 20px;
        gap: 18px;
        align-items: stretch;
        border-right: 1px solid rgba(255, 255, 255, .1);
        border-bottom: 0;
        box-shadow: 26px 0 80px rgba(0, 0, 0, .36);
        transform: translateX(-106%);
        transition: transform .22s ease;
        overscroll-behavior: contain;
    }

    html.mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .mobile-sidebar-close {
        position: absolute;
        top: 18px;
        right: 16px;
        z-index: 20;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 999px;
        background: rgba(255, 255, 255, .07);
        color: #edf4f3;
        cursor: pointer;
    }

    .mobile-sidebar-close::before,
    .mobile-sidebar-close::after {
        content: "";
        position: absolute;
        width: 15px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .mobile-sidebar-close::before {
        transform: rotate(45deg);
    }

    .mobile-sidebar-close::after {
        transform: rotate(-45deg);
    }

    .brand,
    html.sidebar-collapsed .brand {
        width: 100%;
        justify-content: flex-start;
        padding-right: 0;
    }

    .brand-wordmark,
    html.sidebar-collapsed .brand-wordmark {
        display: grid;
    }

    .brand-logo {
        height: 38px;
    }

    .brand small {
        display: block;
    }

    .brand-mark,
    html.sidebar-collapsed .brand-mark {
        display: grid;
        width: 42px;
        height: 42px;
    }

    .brand-mark img,
    html.sidebar-collapsed .brand-mark img {
        width: 30px;
        height: 30px;
    }

    .mobile-quick-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-quick-panel a {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, .11);
        border-radius: 12px;
        background: rgba(255, 255, 255, .075);
        color: #eef7f6;
        font-size: .86rem;
        font-weight: 850;
    }

    .mobile-quick-panel a:hover {
        background: rgba(255, 255, 255, .12);
    }

    .nav,
    html.sidebar-collapsed .nav {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 4px;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .nav-group,
    html.sidebar-collapsed .nav-group {
        width: 100%;
    }

    .nav-group-toggle,
    html.sidebar-collapsed .nav-group-toggle {
        justify-content: space-between;
        min-height: 28px;
        padding: 4px 8px 4px 28px;
    }

    .nav-group-toggle span,
    .nav-group-toggle b,
    html.sidebar-collapsed .nav-group-toggle span,
    html.sidebar-collapsed .nav-group-toggle b {
        display: inline-block;
    }

    .nav-item,
    html.sidebar-collapsed .nav-item {
        width: 100%;
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 8px;
        padding: 0 6px;
        justify-items: stretch;
        border: 0;
    }

    .nav a,
    html.sidebar-collapsed .nav a {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 7px;
        white-space: normal;
    }

    .nav a .nav-code,
    html.sidebar-collapsed .nav a .nav-code {
        width: 28px;
        height: 28px;
        font-size: .68rem;
    }

    .nav-label,
    html.sidebar-collapsed .nav-label {
        display: block;
    }

    .nav-color-toggle,
    html.sidebar-collapsed .nav-color-toggle {
        width: 18px;
        height: 34px;
    }

    .nav-color-menu,
    html.sidebar-collapsed .nav-color-menu {
        left: 28px;
        top: 35px;
    }

    .shortcut-panel > div {
        display: grid;
        overflow: visible;
        padding-bottom: 0;
    }

    .shortcut-panel,
    html.sidebar-collapsed .shortcut-panel {
        width: 100%;
    }

    .shortcut-panel header,
    html.sidebar-collapsed .shortcut-panel header {
        display: flex;
    }

    .shortcut-link,
    .shortcut-empty,
    html.sidebar-collapsed .shortcut-link,
    html.sidebar-collapsed .shortcut-empty {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        min-height: 36px;
        padding: 8px 10px;
    }

    .shortcut-label,
    html.sidebar-collapsed .shortcut-label {
        display: block;
    }

    .mobile-account-panel {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 16px;
        background: rgba(255, 255, 255, .055);
    }

    .mobile-account-panel strong,
    .mobile-account-panel small {
        display: block;
    }

    .mobile-account-panel small {
        color: #aeb9bd;
    }

    .mobile-account-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-account-actions a,
    .mobile-account-actions button {
        min-height: 34px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, .11);
        border-radius: 11px;
        background: rgba(255, 255, 255, .06);
        color: #edf4f3;
        font: inherit;
        font-size: .82rem;
        font-weight: 850;
        cursor: pointer;
    }

    .mobile-account-actions form {
        margin: 0;
    }

    .sidebar-timer,
    html.sidebar-collapsed .sidebar-timer {
        display: grid;
        margin-top: auto;
        padding: 14px;
        border-radius: 18px;
    }

    .sidebar-timer-form {
        grid-template-columns: 1fr;
    }

    .timer-console {
        grid-template-columns: 32px minmax(0, 1fr) 22px;
        min-height: 48px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 980;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        flex-direction: initial;
        gap: 10px 12px;
        min-height: 0;
        margin: -16px -16px 14px;
        padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
        border-bottom: 1px solid rgba(206, 217, 226, .72);
        background: rgba(247, 251, 251, .82);
        box-shadow: 0 14px 36px rgba(28, 42, 58, .06);
        backdrop-filter: blur(20px) saturate(140%);
    }

    .topbar > div {
        min-width: 0;
    }

    .topbar h1 {
        overflow: hidden;
        font-size: 1.34rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .eyebrow {
        font-size: .62rem;
    }

    .top-search {
        grid-column: 1 / -1;
        max-width: none;
        width: 100%;
    }

    .top-search input {
        min-height: 40px;
        height: 40px;
        box-shadow: none;
    }

    .user-chip {
        display: none;
    }

    .main {
        padding: 16px;
    }

    .mobile-timer-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1060;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 40px;
        gap: 10px;
        align-items: center;
        min-height: 64px;
        padding: 10px 10px 10px 14px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 22px;
        background: linear-gradient(135deg, rgba(25, 34, 50, .96), rgba(20, 29, 43, .96));
        color: #fff;
        box-shadow: 0 22px 62px rgba(0, 0, 0, .32), 0 1px 0 rgba(255, 255, 255, .08) inset;
        backdrop-filter: blur(20px) saturate(140%);
        transition: transform .2s ease, opacity .2s ease;
    }

    html.mobile-sidebar-open .mobile-timer-bar {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }

    .mobile-timer-info {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .mobile-timer-info small,
    .mobile-timer-info strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-timer-info small {
        color: #97a7b5;
        font-size: .7rem;
        font-weight: 850;
    }

    .mobile-timer-info strong {
        font-size: .9rem;
        line-height: 1.15;
    }

    .mobile-timer-bar b {
        font-size: .96rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .mobile-timer-bar form {
        display: grid;
        margin: 0;
    }

    .mobile-timer-stop {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border: 2px solid #ff766b;
        border-radius: 999px;
        background: rgba(255, 118, 107, .1);
        cursor: pointer;
    }

    .mobile-timer-stop .stop-symbol {
        width: 13px;
        height: 13px;
    }

    .inquiry-pipeline,
    .kanban,
    .board-kanban {
        scroll-padding-left: 14px;
        -webkit-overflow-scrolling: touch;
    }

    .machine-run-create-shell[open] .machine-run-create,
    .machine-resource-shell[open] .machine-resource-panel {
        position: static;
        width: 100%;
        margin-top: 12px;
        box-shadow: 0 18px 44px rgba(28, 42, 58, .12);
    }
}

@media (min-width: 901px) and (max-width: 1180px), (hover: none) and (pointer: coarse) and (min-width: 901px) and (max-width: 1368px) {
    body.has-mobile-timer .main {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .main {
        padding: 20px;
    }

    .topbar {
        grid-template-columns: auto minmax(220px, .9fr) minmax(220px, .8fr) auto;
        gap: 10px 16px;
        margin: -20px -20px 18px;
        padding: calc(12px + env(safe-area-inset-top)) 20px 14px;
    }

    .topbar h1 {
        font-size: 1.48rem;
    }

    .top-search {
        grid-column: auto;
        max-width: 440px;
        justify-self: center;
    }

    .user-chip {
        display: flex;
        min-width: 132px;
        justify-self: end;
    }

    .dashboard-grid.three-col,
    .grid.four,
    .project-overview-grid,
    .task-snapshot-grid,
    .inquiry-detail-grid,
    .task-command-grid,
    .task-work-grid,
    .project-support-grid,
    .ai-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .inquiry-workspace,
    .ai-workspace,
    .invoice-editor-layout,
    .workspace,
    .reports-workspace {
        grid-template-columns: 1fr;
    }

    .invoice-checklist {
        position: static;
    }

    .invoice-a4-stage {
        padding: 18px;
    }

    .board-kanban,
    .project-kanban,
    .machine-kanban,
    .inquiry-pipeline {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 14px;
    }

    .board-kanban .kanban-column,
    .project-kanban .kanban-column,
    .machine-kanban .kanban-column,
    .inquiry-pipeline-column {
        flex: 0 0 284px;
        min-width: 284px;
    }

    .sheet-card,
    .liquid-panel,
    .dashboard-panel,
    .project-board-panel,
    .task-section-block {
        border-radius: 20px;
    }

    .machine-board-actions,
    .panel-header .actions,
    .invoice-editor-toolbar .actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .timesheet-shell,
    .table-wrap,
    .sheet-card,
    .invoice-a4-stage {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .timesheet-toolbar {
        grid-template-columns: 1fr;
    }

    .timesheet-toolbar > .actions,
    .timesheet-toolbar > .actions:last-child,
    .week-switcher,
    .view-switch {
        justify-content: flex-start;
    }

    .week-grid {
        grid-template-columns: 58px repeat(7, minmax(230px, 1fr));
    }

    .month-grid {
        grid-template-columns: repeat(7, minmax(132px, 1fr));
    }

    .sheet-row {
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .sheet-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .sidebar,
    html.sidebar-collapsed .sidebar {
        width: min(92vw, 348px);
        padding: 18px;
    }

    .mobile-quick-panel,
    .mobile-account-actions {
        grid-template-columns: 1fr;
    }

    .mobile-timer-bar {
        grid-template-columns: minmax(0, 1fr) auto 38px;
        left: 10px;
        right: 10px;
    }

    .mobile-timer-bar b {
        font-size: .88rem;
    }

    .mobile-timer-info strong {
        font-size: .84rem;
    }
}
