
        :root {
            --bg: #27262d;
            --sidebar: #2c2b33;
            --panel: #33323a;
            --panel-2: #3f3e46;
            --panel-3: #2b2a31;
            --line: #55535d;
            --text: #ecebf0;
            --muted: #aaa6b0;
            --brand: #5d95f7;
            --brand-2: #4b7fe2;
            --danger: #d65a54;
            --warn: #d6a449;
            --green: #44b66a;
            --chip: #4a4851;
            --shadow: rgba(0,0,0,.2);
            font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            font-weight: 400;
        }
        :root[data-theme="light"] {
            --bg: #ffffff;
            --sidebar: #ffffff;
            --panel: #ffffff;
            --panel-2: #f3f5f8;
            --panel-3: #f6f7f9;
            --line: #d8dce5;
            --text: #1e2430;
            --muted: #6f7785;
            --brand: #2f6fec;
            --brand-2: #245bd0;
            --danger: #b42318;
            --warn: #8a5a00;
            --green: #218a48;
            --chip: #edf0f4;
            --shadow: rgba(20,31,48,.1);
        }

        * { box-sizing: border-box; }
        body { margin: 0; color: var(--text); background: var(--bg); font-weight: 400; }
        button, input, select, textarea { font: inherit; }
        h1, h2, h3, strong, b { font-weight: 400; }
        a { color: var(--brand); }
        input, select, textarea {
            width: 100%;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 10px 11px;
            color: var(--text);
            background: var(--panel-3);
        }
        :root[data-theme="light"] input,
        :root[data-theme="light"] select,
        :root[data-theme="light"] textarea {
            background: #f4f6f8;
        }
        input:not([type="file"]), select {
            height: 44px;
        }
        input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); }
        textarea { min-height: 110px; resize: vertical; }
        #editDescription {
            min-height: 64px;
            max-height: 420px;
            overflow-y: auto;
        }
        #editDescription[hidden] { display: none; }
        .description-editor-label { gap: 8px; }
        .editor-shell {
            border: 1px solid var(--line);
            border-radius: 18px;
            background: var(--panel-3);
            overflow: visible;
        }
        :root[data-theme="light"] .editor-shell {
            background: #f4f6f8;
        }
        .editor-toolbar {
            display: flex;
            align-items: center;
            gap: 6px;
            min-height: 52px;
            padding: 8px 14px;
            color: var(--text);
            background: transparent;
            border-radius: 18px 18px 0 0;
        }
        .editor-toolbar > button,
        .editor-menu-wrap > button {
            display: inline-grid;
            place-items: center;
            min-width: 34px;
            height: 34px;
            border: 0;
            border-radius: 8px;
            padding: 0 8px;
            color: var(--text);
            background: transparent;
            cursor: pointer;
            font-size: 24px;
            font-weight: 700;
        }
        .editor-toolbar > button svg,
        .editor-menu-wrap > button svg {
            width: 22px;
            height: 22px;
            stroke: currentColor;
            stroke-width: 2.6;
        }
        .editor-menu-wrap > button .toolbar-chevron {
            margin-left: 4px;
            font-size: 17px;
            font-weight: 700;
            line-height: 1;
        }
        .editor-toolbar > button:hover,
        .editor-toolbar > button.active,
        .editor-menu-wrap > button:hover,
        .editor-menu-wrap > button.active {
            background: var(--chip);
        }
        .editor-toolbar button:disabled {
            opacity: .45;
            cursor: not-allowed;
        }
        .format-underline { text-decoration: underline; }
        .format-strike { text-decoration: line-through; }
        .editor-separator {
            width: 1px;
            height: 26px;
            margin: 0 6px;
            background: var(--line);
        }
        .editor-menu-wrap {
            position: relative;
        }
        .editor-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            z-index: 12;
            display: grid;
            min-width: 280px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 6px;
            background: var(--panel);
            box-shadow: 0 16px 30px var(--shadow);
        }
        .editor-menu[hidden] { display: none; }
        .editor-menu button {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
            min-height: 38px;
            border: 0;
            border-radius: 8px;
            padding: 8px 10px;
            color: var(--text);
            background: transparent;
            font-size: 14px;
            font-weight: 400;
            line-height: 1.25;
            text-align: left;
            cursor: pointer;
        }
        .editor-menu button:hover { background: var(--chip); }
        .rich-description {
            min-height: 92px;
            max-height: 420px;
            overflow: auto;
            padding: 8px 22px 18px;
            color: var(--text);
            font-size: 16px;
            font-weight: 400;
            line-height: 1.45;
            outline: none;
        }
        .rich-description:empty::before {
            content: attr(data-placeholder);
            color: color-mix(in srgb, var(--muted) 78%, transparent);
        }
        .rich-description ul,
        .rich-description ol {
            margin: 8px 0 8px 22px;
            padding: 0;
        }
        .rich-description li { margin: 3px 0; }
        .rich-description a {
            color: var(--brand);
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        input:disabled, select:disabled, textarea:disabled {
            opacity: .68;
            cursor: not-allowed;
        }
        label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 300; }

        .auth-page {
            min-height: 100vh;
            display: grid;
            place-items: center;
            padding: 24px;
            background: var(--bg);
        }
        .auth-box {
            width: min(420px, 100%);
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 26px;
            background: var(--panel);
            box-shadow: 0 18px 42px var(--shadow);
        }
        .auth-box h1 { margin: 0 0 8px; font-size: 28px; }
        .auth-box p { margin: 0 0 18px; color: var(--muted); }
        .auth-box table { width: 100%; }
        .auth-box input[type="text"], .auth-box input[type="password"] { width: 100%; }
        .auth-box input[type="submit"] {
            width: 100%;
            border: 0;
            border-radius: 12px;
            padding: 11px 14px;
            color: #fff;
            background: var(--brand);
            cursor: pointer;
        }
        .auth-form { display: grid; gap: 13px; }
        .auth-error { border-radius: 7px; padding: 10px 12px; color: #7a2515; background: #ffe6dc; font-size: 14px; }

        .app-shell {
            display: grid;
            grid-template-columns: 280px minmax(0, 1fr);
            min-height: 100vh;
        }
        :root[data-sidebar="collapsed"] .app-shell {
            grid-template-columns: 76px minmax(0, 1fr);
        }
        .app-sidebar {
            position: sticky;
            top: 0;
            display: grid;
            align-content: start;
            gap: 18px;
            height: 100vh;
            padding: 22px 34px 22px 22px;
            border-right: 1px solid var(--line);
            background: var(--sidebar);
        }
        :root[data-sidebar="collapsed"] .app-sidebar {
            justify-items: center;
            gap: 12px;
            padding: 14px 10px;
        }
        .sidebar-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        :root[data-sidebar="collapsed"] .sidebar-head {
            display: grid;
            justify-items: center;
            gap: 10px;
        }
        .sidebar-brand-mark {
            display: grid;
            place-items: center;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: url('/tasktracker-icon.svg?v=20260625') center / contain no-repeat;
        }
        .sidebar-brand-text { display: none; }
        :root[data-sidebar="expanded"] .sidebar-brand-mark { display: none; }
        :root[data-sidebar="expanded"] .sidebar-brand-text { display: block; }
        .brand h1 { margin: 0; font-size: 24px; line-height: 1.2; }
        .brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
        .sidebar-icons { display: flex; gap: 8px; }
        :root[data-sidebar="collapsed"] .sidebar-icons { display: grid; gap: 8px; }
        .sidebar-toggle-wrap {
            display: grid;
            justify-items: start;
            margin-top: auto;
        }
        :root[data-sidebar="collapsed"] .sidebar-toggle-wrap { justify-items: center; }
        .icon-button {
            display: inline-grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border: 1px solid transparent;
            border-radius: 10px;
            color: var(--text);
            background: transparent;
            cursor: pointer;
        }
        .icon-button svg {
            width: 22px;
            height: 22px;
            stroke: currentColor;
        }
        .icon-button:hover { border-color: var(--line); background: var(--panel); }
        .sidebar-create {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .sidebar-create svg {
            width: 24px;
            height: 24px;
            stroke: currentColor;
        }
        :root[data-sidebar="collapsed"] .sidebar-create {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            padding: 0;
        }
        :root[data-sidebar="collapsed"] .sidebar-nav-label { display: none; }
        .side-nav {
            display: grid;
            gap: 6px;
            width: 100%;
        }
        :root[data-sidebar="collapsed"] .side-nav {
            gap: 8px;
            justify-items: center;
        }
        .nav-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            border: 0;
            border-radius: 10px;
            padding: 10px 11px;
            color: var(--text);
            background: transparent;
            text-decoration: none;
            font-weight: 400;
            text-align: left;
            cursor: pointer;
        }
        :root[data-sidebar="collapsed"] .nav-item {
            display: inline-grid;
            place-items: center;
            width: 48px;
            height: 48px;
            border-radius: 14px;
            padding: 0;
        }
        .nav-item svg {
            width: 23px;
            height: 23px;
            stroke: currentColor;
        }
        .nav-item:hover, .nav-item.active { background: var(--panel); }
        .userbar {
            overflow-wrap: anywhere;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
        }
        .workspace { min-width: 0; background: var(--bg); }
        .topbar {
            display: grid;
            grid-template-columns: minmax(220px, 1fr) auto;
            align-items: center;
            gap: 18px;
            padding: 12px 20px;
            border-bottom: 1px solid var(--line);
            background: var(--bg);
        }
        .top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
        .top-user {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text);
            text-decoration: none;
        }
        .user-avatar {
            display: inline-grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            color: #fff;
            background: var(--avatar-bg, var(--brand));
            font-size: 15px;
        }
        .top-user svg {
            width: 22px;
            height: 22px;
            color: var(--muted);
            stroke: currentColor;
        }
        .top-user:hover svg { color: var(--text); }

        .layout {
            display: grid;
            grid-template-columns: 1fr;
        }
        .filter-rail {
            display: grid;
            gap: 8px;
            padding: 12px 20px;
            border-bottom: 1px solid var(--line);
            background: var(--bg);
        }
        main { min-width: 0; overflow: auto; padding: 20px; }
        .section { display: grid; gap: 10px; }
        .section-title { color: var(--muted); font-size: 12px; font-weight: 300; text-transform: uppercase; }
        .filter-form {
            position: relative;
            display: grid;
            gap: 8px;
        }
        .filter-toolbar {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            flex-wrap: wrap;
            gap: 6px;
            min-width: 0;
        }
        .filter-search {
            width: min(330px, 34vw);
        }
        .filter-search input {
            height: 34px;
            border-radius: 10px;
            padding: 0 12px;
        }
        .filter-label-text {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }
        .toolbar-select,
        .toolbar-button {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            height: 34px;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 0 10px;
            color: var(--text);
            background: var(--panel);
            font: inherit;
            font-size: 13px;
            text-decoration: none;
            cursor: pointer;
            white-space: nowrap;
        }
        .toolbar-select.active,
        .toolbar-button.active {
            border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
            color: var(--brand);
            background: color-mix(in srgb, var(--brand) 10%, var(--panel));
        }
        .toolbar-select svg,
        .toolbar-button svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            flex: 0 0 auto;
        }
        .toolbar-select select {
            width: auto;
            height: auto;
            min-height: 0;
            border: 0;
            border-radius: 0;
            padding: 0 18px 0 0;
            color: inherit;
            background: transparent;
            font: inherit;
            cursor: pointer;
        }
        .reset-filter-button {
            padding: 0 14px;
            color: var(--muted);
        }
        .reset-filter-button[hidden] {
            display: none;
        }
        .filter-panel {
            position: absolute;
            left: 0;
            top: calc(100% + 8px);
            z-index: 8;
            display: grid;
            grid-template-columns: 170px 210px 170px 150px;
            gap: 10px;
            align-items: end;
            width: min(760px, calc(100vw - 56px));
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
            background: var(--panel);
            box-shadow: 0 18px 34px rgba(15,23,42,.12);
        }
        .filter-panel[hidden] { display: none; }
        .filter-panel label {
            display: grid;
            gap: 5px;
            color: var(--muted);
            font-size: 12px;
        }
        .filter-panel select {
            min-height: 34px;
            border-radius: 10px;
            font-size: 13px;
        }
        .filter-summary {
            display: none;
            align-items: center;
            gap: 10px;
            width: fit-content;
            max-width: 100%;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 9px 10px;
            color: var(--muted);
            background: var(--panel-3);
            font-size: 13px;
        }
        .filter-summary.active { display: flex; }
        .filter-summary-text { overflow-wrap: anywhere; }
        .employee-section { display: none; }
        .settings-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }
        .settings-head h2 { margin: 0; }
        #settingsDrawer .drawer {
            padding: 22px 24px 24px;
        }
        #settingsDrawer .settings-head {
            gap: 16px;
            margin: 0 0 18px;
        }
        #settingsDrawer .settings-head h2 {
            color: var(--text);
            font-size: 22px;
            font-weight: 700;
            line-height: 1.2;
        }
        #settingsDrawer .settings-head .button {
            width: auto;
            min-height: 34px;
            border-radius: 10px;
            padding: 8px 13px;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.2;
        }
        .employee-card-list {
            display: grid;
            gap: 10px;
        }
        #settingsDrawer .employee-card-list {
            gap: 12px;
            padding-bottom: 8px;
        }
        .employee-card-form {
            display: grid;
            gap: 12px;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 12px;
            background: var(--panel-3);
        }
        #settingsDrawer .employee-card-form {
            display: grid;
            gap: 14px;
            border-radius: 12px;
            padding: 14px 16px;
            background: color-mix(in srgb, var(--panel-3) 78%, var(--panel));
        }
        .employee-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        #settingsDrawer .employee-card-head {
            display: grid;
            grid-template-columns: 36px minmax(0, 1fr) auto;
            align-items: start;
            gap: 12px;
        }
        .employee-card-head .employee-avatar { flex: 0 0 auto; }
        #settingsDrawer .employee-card-head .employee-avatar {
            width: 36px;
            height: 36px;
            font-size: 13px !important;
        }
        .employee-card-title {
            display: grid;
            gap: 3px;
            min-width: 0;
            flex: 1 1 auto;
        }
        .employee-card-name-row {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            flex-wrap: wrap;
        }
        .employee-card-title strong { overflow-wrap: anywhere; }
        #settingsDrawer .employee-card-title strong {
            min-width: 0;
            color: var(--text);
            font-size: 15px;
            font-weight: 700;
            line-height: 1.25;
        }
        .employee-card-title span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
        #settingsDrawer .employee-card-title span {
            font-size: 13px;
            line-height: 1.25;
        }
        .employee-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        #settingsDrawer .employee-card-meta {
            gap: 7px;
            margin-top: 7px;
        }
        #settingsDrawer .employee-card-meta .tag,
        #settingsDrawer .employee-card-meta .role,
        #settingsDrawer .employee-card-name-row .tag,
        #settingsDrawer .employee-card-name-row .role,
        #settingsDrawer .mailbox-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 26px;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
        }
        .mailbox-toggle {
            border: 1px solid transparent;
            cursor: pointer;
            color: #8f8ca8;
            background: #eef1f5;
        }
        .mailbox-toggle.active {
            color: #155e32;
            background: #d8f5e2;
            border-color: #9bddb4;
        }
        .mailbox-toggle.inactive {
            color: #8f8ca8;
            background: #eef1f5;
            border-color: transparent;
            box-shadow: none;
        }
        .account-status {
            color: #8f8ca8;
            background: #eef1f5;
        }
        :root[data-theme="dark"] .mailbox-toggle {
            color: #8f8ca8;
            background: rgba(255,255,255,.07);
        }
        :root[data-theme="dark"] .mailbox-toggle.active {
            color: #c7f7d8;
            background: rgba(34,197,94,.24);
            border-color: rgba(34,197,94,.38);
        }
        :root[data-theme="dark"] .mailbox-toggle.inactive,
        :root[data-theme="dark"] .account-status {
            color: #9b98b5;
            background: rgba(255,255,255,.07);
        }
        .employee-card-actions {
            display: flex;
            gap: 6px;
            flex: 0 0 auto;
        }
        #settingsDrawer .employee-card-actions {
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            align-self: start;
            padding-top: 30px;
        }
        #settingsDrawer .employee-card-actions .icon-button {
            width: 34px;
            height: 34px;
            border: 1px solid transparent;
            border-radius: 9px;
            color: var(--muted);
            background: transparent;
        }
        #settingsDrawer .employee-card-actions .icon-button:hover {
            border-color: var(--line);
            color: var(--text);
            background: var(--chip);
        }
        #settingsDrawer .employee-card-actions .icon-button svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 2;
        }
        .employee-card-actions [data-employee-delete] { color: var(--danger); }
        #settingsDrawer .employee-card-actions [data-employee-delete] {
            color: var(--danger);
        }
        #settingsDrawer .employee-card-actions [data-employee-delete]:hover {
            color: var(--danger);
            background: color-mix(in srgb, var(--danger) 14%, transparent);
        }
        .employee-card-fields[hidden], .employee-mailbox-fields[hidden], .new-employee-panel[hidden] { display: none; }
        .employee-mailbox-fields {
            display: grid;
            gap: 12px;
            border-top: 1px solid var(--line);
            padding-top: 12px;
        }
        .employee-mailbox-fields h3 {
            margin: 0;
            color: var(--text);
            font-size: 15px;
            font-weight: 500;
        }
        .mailbox-actions {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        .mailbox-test-result {
            color: var(--muted);
            font-size: 13px;
        }
        .new-employee-panel {
            display: grid;
            gap: 12px;
            margin-bottom: 14px;
            border: 1px dashed var(--line);
            border-radius: 10px;
            padding: 12px;
            background: var(--panel-3);
        }

        .employee {
            display: grid;
            grid-template-columns: 28px minmax(0, 1fr);
            column-gap: 9px;
            align-items: center;
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 10px;
            background: var(--panel);
        }
        .employee-avatar {
            display: inline-grid !important;
            grid-row: span 3;
            place-items: center;
            width: 28px;
            height: 28px;
            border-radius: 999px;
            margin: 0 !important;
            color: #fff !important;
            background: var(--avatar-bg, var(--brand));
            font-size: 11px !important;
            font-weight: 600;
            line-height: 1;
        }
        .employee strong { display: block; min-width: 0; font-size: 14px; }
        .employee span:not(.employee-avatar) { display: block; min-width: 0; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
        .role, .tag {
            display: inline-flex;
            width: fit-content;
            border-radius: 999px;
            padding: 4px 8px;
            color: var(--text);
            background: var(--chip);
            font-size: 12px;
            font-weight: 400;
        }
        .role { margin-top: 8px; color: #bfe5cf; background: color-mix(in srgb, var(--green) 35%, transparent); }

        .board {
            display: grid;
            grid-template-columns: repeat(4, minmax(310px, 1fr));
            gap: 8px;
            align-items: start;
            min-width: 1260px;
        }
        .column {
            min-height: calc(100vh - 174px);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 10px;
            background: color-mix(in srgb, var(--panel-3) 62%, transparent);
            transition: border-color .16s ease, background .16s ease;
        }
        .column-drop-target {
            border-color: color-mix(in srgb, var(--brand) 62%, var(--line));
            background: color-mix(in srgb, var(--brand) 8%, var(--panel-3));
        }
        .column h2 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 0 0 8px;
            padding: 8px 2px 12px;
            color: var(--text);
            font-size: 17px;
        }
        .deleted-board {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            min-width: 0;
        }
        .deleted-date-group {
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 12px;
            background: color-mix(in srgb, var(--panel-3) 62%, transparent);
        }
        .deleted-date-group h2 {
            margin: 0 0 12px;
            padding: 4px 2px 10px;
            color: var(--text);
            font-size: 17px;
        }
        .deleted-date-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
            gap: 8px;
            align-items: start;
        }
        .deleted-date-cards .task {
            margin-bottom: 0;
        }
        .task {
            display: grid;
            gap: 12px;
            margin-bottom: 6px;
            border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
            border-radius: 12px;
            padding: 14px;
            background: var(--panel-2);
            box-shadow: none;
            cursor: grab;
            transition: border-color .16s ease, transform .16s ease;
        }
        .task-drop-placeholder {
            position: relative;
            margin-bottom: 6px;
            border: 1px dashed color-mix(in srgb, var(--brand) 75%, var(--line));
            border-radius: 12px;
            background:
                linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, transparent), transparent 58%),
                color-mix(in srgb, var(--brand) 7%, var(--panel-2));
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent);
        }
        .task-drop-placeholder::before {
            content: "";
            position: absolute;
            inset: 10px;
            border-radius: 8px;
            background: color-mix(in srgb, var(--brand) 8%, transparent);
        }
        .empty.drop-hidden { display: none; }
        :root[data-theme="light"] .task {
            background: #f2f4f7;
        }
        .task:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
        .task.selected-task {
            position: relative;
            z-index: 19;
            border-color: color-mix(in srgb, var(--brand) 70%, var(--line));
            box-shadow: 0 16px 38px rgba(15, 23, 42, .22);
        }
        :root.task-card-dragging .drawer-bg.open {
            pointer-events: none;
        }
        :root.task-card-dragging .task.selected-task {
            z-index: 60;
        }
        .task-title-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
        }
        .task-title-row strong { min-width: 0; }
        .task strong { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
        .task-number {
            color: var(--muted);
            font-weight: 400;
            white-space: nowrap;
        }
        .task-link {
            color: var(--brand);
            text-decoration: underline;
            text-underline-offset: 2px;
            overflow-wrap: anywhere;
        }
        .task-link:hover { color: var(--brand-2); }
        .task-title-side {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
        }
        .inline-created {
            flex: 0 0 auto;
            color: var(--muted);
            font-size: 11px;
            font-weight: 300;
            white-space: nowrap;
        }
        .new-comment-badge {
            display: inline-grid;
            place-items: center;
            width: 24px;
            height: 24px;
            border-radius: 999px;
            color: #fff;
            background: var(--brand);
        }
        .new-comment-badge svg {
            width: 15px;
            height: 15px;
            fill: currentColor;
        }
        :root[data-theme="light"] .new-comment-badge {
            color: #fff;
            background: #315f9f;
        }
        .drawer h2 .inline-created { margin-left: 8px; font-size: 13px; }
        .task p {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .meta { display: flex; flex-wrap: wrap; gap: 6px; }
        .task-group-badge {
            display: inline-flex;
            align-items: center;
            max-width: 100%;
            width: fit-content;
            padding: 5px 10px;
            border-radius: 999px;
            color: #f8ddc8;
            background: rgba(252, 109, 4, .14);
            font-size: 12px;
            font-weight: 400;
            line-height: 1.2;
        }
        .task.has-group {
            border-color: rgba(252, 109, 4, .32);
        }
        .task-group-stack {
            margin: 0 5px 8px;
            border: 1px solid rgba(252, 109, 4, .28);
            border-radius: 16px;
            padding: 8px;
            background: color-mix(in srgb, var(--panel-2) 74%, rgba(252, 109, 4, .08));
        }
        .task-group-stack .task {
            margin-bottom: 6px;
        }
        .task-group-stack .task:last-child {
            margin-bottom: 0;
        }
        .task-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin: 0 0 8px;
            padding: 4px 4px 8px;
            color: var(--text);
            font-size: 13px;
            font-weight: 400;
        }
        .task-group-header span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .task-group-actions {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            gap: 6px;
        }
        .task-change-badge,
        .task-group-updates {
            width: fit-content;
            padding: 3px 8px;
            border-radius: 6px;
            color: #fcd34d;
            background: rgba(217, 119, 6, .18);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.35;
        }
        :root[data-theme="light"] .task-change-badge,
        :root[data-theme="light"] .task-group-updates {
            color: #854500;
        }
        .task-group-actions:has(.task-group-updates:not([hidden])) {
            flex-wrap: wrap;
            max-width: 100%;
        }
        .task-group-count {
            flex: 0 0 auto;
            border-radius: 999px;
            padding: 3px 8px;
            color: #f8ddc8;
            background: rgba(252, 109, 4, .18);
            font-size: 12px;
        }
        .task-group-close {
            border: 0;
            border-radius: 999px;
            padding: 4px 9px;
            color: #f8ddc8;
            background: rgba(252, 109, 4, .22);
            font: inherit;
            font-size: 12px;
            line-height: 1.2;
            cursor: pointer;
        }
        .task-group-close:hover {
            background: rgba(252, 109, 4, .32);
        }
        .task-group-close:disabled {
            cursor: default;
            opacity: .55;
        }
        .task-group-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 30px;
            width: 30px;
            height: 30px;
            padding: 0;
            border: 1px solid var(--line);
            border-radius: 6px;
            background: transparent;
            color: var(--text);
            cursor: pointer;
        }
        .task-group-toggle:hover { background: var(--panel-2); }
        .task-group-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
        .task-group-toggle svg { width: 18px; height: 18px; }
        .task-group-stack.is-collapsed { position: relative; margin-bottom: 26px; }
        .task-group-stack.is-collapsed > .task { display: none; }
        .task-group-stack.is-collapsed .task-group-header { margin-bottom: 0; padding-bottom: 4px; }
        .task-group-stack.is-collapsed .task-group-toggle svg { transform: rotate(180deg); }
        .task-group-stack.is-collapsed::before,
        .task-group-stack.is-collapsed::after {
            content: '';
            position: absolute;
            height: 7px;
            border: 1px solid rgba(252, 109, 4, .28);
            border-top: 0;
            border-radius: 0 0 10px 10px;
            background: var(--panel-2);
            box-shadow: none;
            pointer-events: none;
        }
        .task-group-stack.is-collapsed::before { left: 5px; right: 5px; bottom: -9px; }
        .task-group-stack.is-collapsed::after { left: 10px; right: 10px; bottom: -17px; }
        .task-group-header { flex-wrap: wrap; }
        .task-group-header > span { flex: 1 1 120px; white-space: normal; overflow-wrap: anywhere; }
        .task-group-count { white-space: nowrap; }
        .task-tags { display: flex; flex-wrap: wrap; gap: 6px; }
        .task-tag { color: #21402a; background: #cdeed7; }
        .task-tag:nth-child(4n + 2) { color: #3d2b11; background: #f5dfb5; }
        .task-tag:nth-child(4n + 3) { color: #352850; background: #ddd3f3; }
        .task-tag:nth-child(4n + 4) { color: #123a4a; background: #c6e6ef; }
        .task-assignee { color: var(--text); }
        .task-author { color: var(--text); }
        :root[data-theme="light"] .role,
        :root[data-theme="light"] .tag {
            background: #e9edf2;
        }
        :root[data-theme="light"] .task-assignee {
            color: #263142;
            background: #e8ebf0;
        }
        :root[data-theme="light"] .task-author {
            color: #344054;
            background: #eef0f4;
        }
        :root[data-theme="light"] .task-tag {
            color: #21402a;
            background: #dff3e6;
        }
        :root[data-theme="light"] .task-tag:nth-child(4n + 2) { color: #594019; background: #f8e7c3; }
        :root[data-theme="light"] .task-tag:nth-child(4n + 3) { color: #453568; background: #e8e0f7; }
        :root[data-theme="light"] .task-tag:nth-child(4n + 4) { color: #17465a; background: #d8edf4; }
        :root[data-theme="light"] .task-group-badge {
            color: #9a4104;
            background: #fff0e5;
        }
        :root[data-theme="light"] .task-group-stack {
            border-color: #ffd3b8;
            background: #fff9f4;
        }
        :root[data-theme="light"] .task-group-count {
            color: #9a4104;
            background: #fff0e5;
        }
        :root[data-theme="light"] .task-group-close {
            color: #9a4104;
            background: #fff0e5;
        }
        :root[data-theme="light"] .task-group-close:hover {
            background: #ffe2cf;
        }
        .priority-high { color: #ffd6cf; background: #7b3f3a; }
        .priority-medium { color: #d5e4ff; background: #385994; }
        .priority-low { color: #cef2dc; background: #386d4d; }
        .payment-paid { color: #062b16; background: #22c55e; }
        .payment-pending { color: #ffe8bd; background: #79551b; }
        .payment-canceled, .payment-refunded { color: #ffd6cf; background: #7b3f3a; }
        :root[data-theme="light"] .priority-high {
            color: #8f1d15;
            background: #ffe2df;
        }
        :root[data-theme="light"] .priority-medium {
            color: #ffffff;
            background: #315f9f;
        }
        :root[data-theme="light"] .priority-low {
            color: #17633a;
            background: #dff3e8;
        }
        :root[data-theme="light"] .payment-paid {
            color: #ffffff;
            background: #16a34a;
        }
        :root[data-theme="light"] .payment-pending {
            color: #7a4b00;
            background: #fff1d6;
        }
        :root[data-theme="light"] .payment-canceled,
        :root[data-theme="light"] .payment-refunded {
            color: #8f1d15;
            background: #ffe2df;
        }
        .due-over { color: #ffd6cf; background: #7b3f3a; }
        .empty { border: 1px dashed var(--line); border-radius: 12px; padding: 18px 10px; color: var(--muted); text-align: center; font-size: 13px; }

        .drawer-bg {
            position: fixed;
            inset: 0;
            z-index: 20;
            display: grid;
            justify-items: end;
            background: rgba(18,29,41,0);
            pointer-events: none;
            transition: background .2s ease;
        }
        .drawer-bg.open { background: rgba(18,29,41,.42); pointer-events: auto; }
        .drawer {
            width: min(680px, 100vw);
            height: 100%;
            overflow: auto;
            padding: 20px 40px 20px 20px;
            background: var(--panel);
            box-shadow: none;
            transform: translateX(100%);
            transition: transform .22s ease;
        }
        .drawer-bg.open .drawer { transform: translateX(0); }
        .drawer-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 0 0 12px;
        }
        .drawer-head h2 {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 8px;
            margin: 0;
            min-width: 0;
            flex: 1 1 auto;
        }
        .drawer-task-id {
            font-size: 28px;
            line-height: 1.15;
        }
        .drawer-title-input {
            width: 100%;
            height: auto;
            min-width: 0;
            border: 0;
            border-radius: 8px;
            padding: 2px 4px;
            color: var(--text);
            background: transparent !important;
            font-size: 28px;
            line-height: 1.15;
        }
        .drawer-title-input:focus {
            outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
        }
        .drawer-head .icon-button {
            flex: 0 0 auto;
            margin-top: 2px;
        }
        .drawer > h2 { margin: 0 0 12px; }
        #createDrawer .drawer > h2 {
            margin: 0;
            padding: 20px 24px 0;
        }
        .drawer form { display: grid; gap: 14px; }
        .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .drawer-actions {
            display: flex;
            justify-content: flex-start;
            gap: 12px;
        }
        .drawer-actions .button { min-width: 220px; }
        .drawer-actions[hidden] { display: none; }
        .payment-info {
            display: grid;
            gap: 6px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
            background: var(--panel-3);
            color: var(--muted);
            font-size: 13px;
        }
        .payment-info[hidden] { display: none; }
        .payment-info strong {
            color: var(--text);
            font-size: 14px;
        }
        .payment-info span {
            overflow-wrap: anywhere;
        }
        .comment-actions {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
        }
        .comment-mail-options {
            display: grid;
            gap: 0;
            border: 1px solid var(--line);
            border-radius: 8px;
            overflow: hidden;
            background: var(--panel-2);
        }
        .comment-mail-options[hidden] { display: none; }
        .comment-mail-toggle {
            display: grid;
            grid-template-columns: 18px 16px minmax(0, 1fr);
            align-items: center;
            gap: 9px;
            min-height: 40px;
            padding: 8px 11px;
            color: var(--text);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .comment-mail-toggle input {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }
        .comment-mail-checkbox {
            display: grid;
            place-items: center;
            width: 16px;
            height: 16px;
            border: 2px solid var(--muted);
            border-radius: 4px;
            color: #fff;
        }
        .comment-mail-checkbox svg {
            width: 11px;
            height: 11px;
            stroke: currentColor;
            opacity: 0;
        }
        .comment-mail-toggle input:checked + .comment-mail-checkbox {
            border-color: var(--brand);
            background: var(--brand);
        }
        .comment-mail-toggle input:checked + .comment-mail-checkbox svg { opacity: 1; }
        .comment-mail-icon {
            width: 16px;
            height: 16px;
            color: var(--muted);
            stroke: currentColor;
        }
        .comment-mail-toggle input:focus-visible + .comment-mail-checkbox {
            outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
            outline-offset: 2px;
        }
        .comment-mail-details {
            display: none;
            gap: 8px;
            padding: 10px 11px;
            border-top: 1px solid var(--line);
        }
        .comment-mail-options:has(#commentReplyToMailAuthor:checked) .comment-mail-details {
            display: grid;
        }
        .comment-mail-recipient {
            color: var(--muted);
            font-size: 12px;
            overflow-wrap: anywhere;
        }
        .comment-mail-recipient::first-letter { text-transform: uppercase; }
        .comment-mail-file {
            position: relative;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            color: var(--muted);
            font-size: 12px;
        }
        .comment-mail-file > input {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
        }
        .comment-mail-file-button {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 32px;
            padding: 6px 9px;
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
            background: var(--panel-3);
            cursor: pointer;
        }
        .comment-mail-file-button svg {
            width: 15px;
            height: 15px;
            stroke: currentColor;
        }
        .comment-mail-file-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .danger-subtle {
            display: inline-grid;
            place-items: center;
            width: 44px;
            height: 44px;
            border: 1px solid var(--line);
            border-radius: 12px;
            color: var(--danger);
            background: var(--chip);
            cursor: pointer;
        }
        .danger-subtle:hover {
            border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
            background: color-mix(in srgb, var(--danger) 12%, var(--chip));
        }
        .danger-subtle svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
        }
        .tabs { display: flex; gap: 8px; margin: 16px 0 10px; border-bottom: 1px solid var(--line); }
        .tab { border: 0; border-radius: 7px 7px 0 0; padding: 9px 12px; color: var(--muted); background: transparent; cursor: pointer; }
        .tab.active { color: var(--text); background: var(--panel-2); }
        .tab-panel { display: none; }
        .tab-panel.active { display: grid; gap: 10px; }
        .feed-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-3); }
        .feed-item p { margin: 8px 0; white-space: pre-wrap; }
        .feed-item small { color: var(--muted); }
        .mail-log-section {
            display: grid;
            gap: 8px;
            margin-bottom: 12px;
        }
        .mail-log-section[hidden] { display: none; }
        .mail-log-section h3 {
            margin: 0;
            color: var(--text);
            font-size: 15px;
        }
        .mail-log-item {
            display: grid;
            gap: 4px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 10px;
            background: var(--panel-3);
        }
        .mail-log-item strong { font-size: 14px; }
        .mail-log-item span, .mail-log-item small { color: var(--muted); }
        .mail-log-item.failed strong { color: var(--danger); }
        .comment-files {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }
        .comment-file {
            display: inline-flex;
            align-items: center;
            max-width: 100%;
            gap: 8px;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 6px 8px;
            background: var(--panel);
            color: var(--text);
            font-size: 13px;
        }
        .comment-file-open {
            min-width: 0;
            border: 0;
            padding: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: pointer;
        }
        .comment-file-download {
            flex: 0 0 auto;
            color: var(--text);
            text-decoration: none;
            font-size: 16px;
            line-height: 1;
        }
        .file-link { display: block; color: var(--brand); overflow-wrap: anywhere; }
        .file-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
        .file-drop {
            border: 1px dashed #b8c6d4;
            border-radius: 8px;
            padding: 14px;
            background: var(--panel-3);
        }
        .files-section { display: grid; gap: 10px; margin: 0; }
        .files-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .files-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            flex-wrap: wrap;
            position: relative;
        }
        .files-section h3 { margin: 0; font-size: 16px; }
        .file-action-button {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            width: auto;
            min-height: 36px;
            padding: 0 11px;
            border-radius: 10px;
            font-size: 13px;
            text-decoration: none;
        }
        .file-attach-button svg, .files-menu-button svg, .file-action-button svg {
            width: 22px;
            height: 22px;
            stroke: currentColor;
        }
        .files-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            z-index: 5;
            display: grid;
            min-width: 220px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 6px;
            background: var(--panel);
            box-shadow: 0 14px 34px var(--shadow);
        }
        .files-menu[hidden] { display: none; }
        .files-menu button, .files-menu a {
            display: flex;
            align-items: center;
            gap: 10px;
            border: 0;
            border-radius: 8px;
            padding: 9px 10px;
            color: var(--text);
            background: transparent;
            text-align: left;
            text-decoration: none;
            cursor: pointer;
        }
        .files-menu button:hover, .files-menu a:hover { background: var(--panel-2); }
        .file-upload-panel {
            display: grid;
            gap: 10px;
            margin-top: 2px;
        }
        .file-upload-panel[hidden] { display: none; }
        .file-upload-progress {
            display: grid;
            gap: 8px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 10px;
            background: var(--panel-3);
        }
        .upload-progress-row {
            display: grid;
            gap: 6px;
        }
        .upload-progress-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            color: var(--text);
            font-size: 13px;
        }
        .upload-progress-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 400;
        }
        .upload-progress-meta {
            flex: 0 0 auto;
            color: var(--muted);
            white-space: nowrap;
        }
        .upload-progress-track {
            overflow: hidden;
            height: 7px;
            border-radius: 999px;
            background: var(--panel-2);
        }
        .upload-progress-bar {
            width: 0%;
            height: 100%;
            border-radius: inherit;
            background: var(--brand);
            transition: width .16s ease;
        }
        .upload-progress-row.done .upload-progress-bar { background: #2da44e; }
        .upload-progress-row.error .upload-progress-bar { background: var(--danger); }
        .create-attachment-preview {
            display: grid;
            gap: 8px;
            margin-top: -8px;
        }
        .create-attachment-preview[hidden] { display: none; }
        .create-attachment-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 10px 12px;
            background: var(--panel-3);
            color: var(--text);
            font-size: 14px;
        }
        .create-attachment-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .create-attachment-size {
            flex: 0 0 auto;
            color: var(--muted);
            font-size: 12px;
            white-space: nowrap;
        }
        .create-attachment-remove {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 30px;
            height: 30px;
            border: 1px solid var(--line);
            border-radius: 10px;
            color: var(--danger);
            background: var(--panel);
            cursor: pointer;
        }
        .create-attachment-remove svg {
            width: 17px;
            height: 17px;
            stroke: currentColor;
        }
        .file-input-hidden { display: none; }
        .file-drop-zone {
            border: 1px dashed transparent;
            border-radius: 12px;
            padding: 8px;
            transition: border-color .15s ease, background .15s ease;
        }
        .file-drop-zone.drag-over {
            border-color: var(--brand);
            background: color-mix(in srgb, var(--brand) 8%, transparent);
        }
        .file-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 12px;
        }
        .file-grid.table {
            grid-template-columns: 1fr;
        }
        .file-grid.table .file-card {
            grid-template-columns: minmax(0, 1fr) 112px auto;
            align-items: center;
            gap: 14px;
        }
        .file-grid.table .file-open {
            grid-column: auto;
            grid-template-columns: 76px minmax(0, 1fr);
            align-items: center;
        }
        .file-grid.table .file-thumb {
            min-height: 48px;
        }
        .file-grid.table .file-thumb-img {
            height: 48px;
        }
        .file-grid.table .file-date {
            justify-self: end;
        }
        .file-grid.table .file-card-actions {
            align-self: center;
            justify-content: flex-end;
        }
        .file-card {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            position: relative;
            width: 100%;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 10px;
            color: var(--text);
            background: var(--panel-3);
            text-align: left;
        }
        .file-card:hover { border-color: var(--brand); }
        .file-open {
            display: grid;
            grid-column: 1 / -1;
            gap: 8px;
            min-width: 0;
            border: 0;
            padding: 0;
            color: inherit;
            background: transparent;
            text-align: left;
            cursor: pointer;
        }
        .file-card-actions {
            display: flex;
            justify-content: flex-end;
            gap: 6px;
            align-self: end;
        }
        .file-date {
            align-self: center;
            color: var(--muted);
            font-size: 13px;
            white-space: nowrap;
        }
        .file-download, .file-delete {
            display: inline-grid;
            place-items: center;
            width: 28px;
            height: 28px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            background: color-mix(in srgb, var(--panel) 84%, transparent);
            text-decoration: none;
        }
        .file-download:hover { border-color: var(--brand); color: var(--brand); }
        .file-delete {
            color: var(--muted);
            cursor: pointer;
        }
        .file-delete:hover { border-color: var(--danger); color: var(--danger); }
        .file-thumb {
            display: grid;
            place-items: center;
            min-height: 76px;
            border-radius: 8px;
            color: var(--text);
            background: color-mix(in srgb, var(--brand) 28%, var(--panel-2));
            font-weight: 400;
            overflow: hidden;
        }
        .file-thumb.has-dark-preview-bg,
        .preview-body.has-dark-preview-bg {
            background-color: #2f343b;
            background-image:
                linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,.08) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.08) 75%);
            background-size: 24px 24px;
            background-position: 0 0, 0 12px, 12px -12px, -12px 0;
        }
        .file-thumb-img {
            width: 100%;
            height: 76px;
            object-fit: cover;
            display: block;
        }
        .file-name {
            overflow: hidden;
            color: var(--text);
            font-size: 13px;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .file-date { color: var(--muted); font-size: 12px; }

        .preview-bg {
            position: fixed;
            inset: 0;
            z-index: 40;
            display: none;
            place-items: center;
            padding: 16px;
            background: rgba(0,0,0,.62);
        }
        .preview-bg.open { display: grid; }
        .preview {
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            width: min(1440px, calc(100vw - 32px));
            height: calc(100vh - 32px);
            overflow: hidden;
            border: 1px solid var(--line);
            border-radius: 14px;
            background: var(--panel);
            box-shadow: 0 22px 70px rgba(0,0,0,.35);
        }
        .preview-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            border-bottom: 1px solid var(--line);
        }
        .preview-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
        .preview-actions { display: flex; align-items: center; gap: 8px; }
        .preview-body {
            display: grid;
            place-items: center;
            min-height: 0;
            overflow: auto;
            background: var(--panel-3);
        }
        .modal-bg {
            position: fixed;
            inset: 0;
            z-index: 50;
            display: none;
            place-items: center;
            padding: 18px;
            background: rgba(18,29,41,.42);
        }
        .modal-bg.open { display: grid; }
        .confirm-modal {
            width: min(460px, 100%);
            border: 1px solid var(--line);
            border-radius: 16px;
            padding: 18px;
            background: var(--panel);
            box-shadow: 0 24px 70px rgba(0,0,0,.22);
        }
        .confirm-modal h3 {
            margin: 0 0 8px;
            font-size: 18px;
            line-height: 1.25;
        }
        .confirm-modal p {
            margin: 0 0 12px;
            color: var(--muted);
            line-height: 1.35;
        }
        .ready-recipient {
            margin-bottom: 10px;
            color: var(--muted);
            font-size: 13px;
            overflow-wrap: anywhere;
        }
        .ready-recipient strong { color: var(--text); font-weight: 400; }
        .ready-customer-toggle {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            margin: 10px 0 14px;
            color: var(--text);
            line-height: 1.3;
        }
        .ready-customer-toggle[hidden] { display: none; }
        .ready-customer-toggle input {
            width: auto;
            height: auto;
            margin-top: 2px;
        }
        .modal-actions {
            display: grid;
            gap: 10px;
            justify-items: center;
        }
        .modal-actions-top {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            width: 100%;
        }
        .modal-actions .button {
            justify-content: center;
            width: 100%;
        }
        @media (max-width: 520px) {
            .modal-actions-top { grid-template-columns: 1fr; }
        }
        .preview-body iframe, .preview-body img {
            width: 100%;
            height: 100%;
            border: 0;
            object-fit: contain;
        }
        .link-preview {
            display: grid;
            grid-template-rows: minmax(0, 1fr) auto;
            width: 100%;
            height: 100%;
        }
        .link-preview iframe { min-height: 0; }
        .link-preview.blocked {
            place-items: center;
            padding: 24px;
        }
        .link-preview-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            border-top: 1px solid var(--line);
            padding: 10px 14px;
            background: var(--panel);
            color: var(--muted);
            font-size: 13px;
        }
        .preview-fallback { display: grid; gap: 12px; padding: 24px; text-align: center; }
        .archive-preview-layout {
            display: grid;
            grid-template-columns: minmax(240px, 36%) minmax(0, 1fr);
            width: 100%;
            height: 100%;
            min-height: 0;
        }
        .archive-list {
            display: grid;
            align-content: start;
            gap: 8px;
            width: 100%;
            height: 100%;
            overflow: auto;
            padding: 16px;
            border-right: 1px solid var(--line);
        }
        .archive-entry-preview {
            display: grid;
            place-items: center;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
            background: var(--panel-2);
        }
        .archive-entry-preview iframe, .archive-entry-preview img {
            width: 100%;
            height: 100%;
            border: 0;
            object-fit: contain;
        }
        .archive-entry {
            display: grid;
            grid-template-columns: 1fr auto auto;
            align-items: center;
            gap: 10px;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 10px;
            background: var(--panel);
        }
        .archive-entry-name { min-width: 0; overflow-wrap: anywhere; }
        .archive-entry-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
        .archive-entry-open {
            border: 0;
            padding: 0;
            color: var(--brand);
            background: transparent;
            text-align: left;
            cursor: pointer;
        }
        @media (max-width: 720px) {
            .archive-preview-layout {
                grid-template-columns: 1fr;
                grid-template-rows: minmax(160px, 38%) minmax(0, 1fr);
            }
            .archive-list {
                border-right: 0;
                border-bottom: 1px solid var(--line);
            }
        }

        .button {
            border: 0;
            border-radius: 12px;
            padding: 10px 13px;
            color: #fff;
            background: var(--brand);
            cursor: pointer;
        }
        .button:hover { background: var(--brand-2); }
        .button.secondary { color: var(--text); background: var(--chip); }
        .button.danger { background: var(--danger); }
        .button.link, .button.secondary { text-decoration: none; }
        .button.link { display: inline-flex; align-items: center; justify-content: center; }
        .button:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

        @media (max-width: 900px) {
            .app-shell, :root[data-sidebar="collapsed"] .app-shell { grid-template-columns: 1fr; }
            .app-sidebar, :root[data-sidebar="collapsed"] .app-sidebar {
                position: static;
                height: auto;
                justify-items: stretch;
                padding: 14px;
            }
            .topbar { grid-template-columns: 1fr; align-items: stretch; }
            .top-actions { justify-content: flex-start; }
            .userbar { text-align: left; }
            .filter-form { grid-template-columns: 1fr; }
            .filter-toolbar { justify-content: flex-start; }
            .filter-search { width: 100%; }
            .toolbar-button, .toolbar-select { flex: 0 0 auto; }
            .filter-panel {
                position: static;
                grid-template-columns: 1fr;
                width: 100%;
                box-shadow: none;
            }
            .board { min-width: 1080px; }
            .board.deleted-board { min-width: 0; }
            .grid { grid-template-columns: 1fr; }
        }

        /* FIGMA SOURCE STYLE OVERRIDE */
        :root {
            --bg: #2b2b29;
            --sidebar: #30302e;
            --panel: #333331;
            --panel-2: #3a3a37;
            --panel-3: #383835;
            --line: rgba(255,255,255,.09);
            --text: #f1f0eb;
            --muted: #aaa69e;
            --brand: #d97706;
            --brand-2: #ea580c;
            --danger: #e5424e;
            --warn: #f5a623;
            --green: #3ecf8e;
            --chip: #42423f;
            --shadow: rgba(0,0,0,.22);
            --bg-soft: #333331;
            --column-bg: #333331;
            --card-bg: #3a3a37;
            --card-hover: #42423f;
            --card-border: rgba(255,255,255,.09);
            --status-new: #0a84ff;
            --status-print: #ff9f0a;
            --status-work: #8b5cf6;
            --status-done: #22c55e;
            --status-archived: #6a6a85;
            font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            font-size: 13px;
        }
        :root[data-theme="light"] {
            --bg: #f1f1f6;
            --sidebar: #ffffff;
            --panel: #ffffff;
            --panel-2: #ffffff;
            --panel-3: #f7f7fb;
            --line: rgba(0,0,0,.07);
            --text: #1a1a2e;
            --muted: #8a8aa8;
            --brand: #d97706;
            --brand-2: #ea580c;
            --danger: #e5424e;
            --warn: #f5a623;
            --green: #3ecf8e;
            --chip: #f0f0f6;
            --shadow: rgba(0,0,0,.1);
            --bg-soft: #f7f7fb;
            --column-bg: #f7f7fb;
            --card-bg: #ffffff;
            --card-hover: #f8f8fc;
            --card-border: rgba(0,0,0,.07);
            --status-new: #0a84ff;
            --status-print: #ff9f0a;
            --status-work: #7857ff;
            --status-done: #22c55e;
            --status-archived: #8a8aa8;
        }
        html,
        body,
        button,
        input,
        select,
        textarea {
            font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
            letter-spacing: 0;
        }
        body { background: var(--bg); font-size: 13px; font-weight: 400; }
        h1, h2, h3, strong, b { font-weight: 600; }
        input, select, textarea { border-radius: 6px; background: var(--panel-3); }
        :root[data-theme="light"] input,
        :root[data-theme="light"] select,
        :root[data-theme="light"] textarea { background: #f0f0f6; }

        .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
        :root[data-sidebar="collapsed"] .app-shell { grid-template-columns: 56px minmax(0, 1fr); }
        .app-sidebar {
            display: flex;
            flex-direction: column;
            gap: 0;
            width: 220px;
            padding: 0 0 20px;
            border-right: 1px solid rgba(26, 26, 46, .06);
            background: var(--sidebar);
        }
        .sidebar-head {
            justify-content: flex-start;
            min-height: auto;
            align-items: center;
            gap: 10px;
            padding: 22px 20px 20px;
            border-bottom: 1px solid rgba(0,0,0,.05);
        }
        .sidebar-brand-mark {
            display: grid;
            place-items: center;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            background: var(--brand-gradient);
            box-shadow: none;
            flex: 0 0 auto;
        }
        .sidebar-brand-mark::before { display: none; }
        .sidebar-brand-mark svg { width: 15px; height: 15px; stroke: #fff; }
        .sidebar-brand-text { display: block; }
        :root[data-sidebar="expanded"] .sidebar-brand-mark { display: grid; }
        .app-sidebar .brand h1 { font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 1.15; }
        .app-sidebar .brand p,
        .userbar { color: #8a8aa8; font-size: 10px; font-weight: 400; line-height: 1.25; }
        .sidebar-create.button {
            justify-content: center;
            width: 100%;
            min-height: auto;
            border-radius: 8px;
            padding: 9px 12px;
            background: var(--brand);
            color: #fff;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.2;
            box-shadow: none;
            transition: opacity .15s;
            margin: 16px 14px 8px;
            width: calc(100% - 28px);
        }
        .sidebar-create.button:hover { background: var(--brand); opacity: .85; }
        .sidebar-create svg { width: 14px; height: 14px; }
        .side-nav {
            gap: 8px;
            padding: 8px 10px;
        }
        .nav-item {
            min-height: auto;
            border-radius: 7px;
            padding: 9px 12px;
            color: #9693b0;
            background: transparent;
            font-size: 14.5px;
            font-weight: 400;
            line-height: 1.2;
            gap: 10px;
        }
        .nav-item:hover,
        .nav-item.active,
        :root[data-theme="light"] .nav-item:hover,
        :root[data-theme="light"] .nav-item.active { color: var(--brand); background: rgba(217,119,6,.08); }
        .nav-item.active { font-weight: 500; }
        .nav-item svg {
            width: 15px;
            height: 15px;
            stroke-width: 2;
            flex: 0 0 auto;
        }
        .sidebar-toggle-wrap {
            margin-top: auto;
            padding: 12px 14px 0;
            border-top: 1px solid rgba(0,0,0,.05);
        }
        :root[data-sidebar="collapsed"] .app-sidebar {
            width: 56px;
            min-width: 56px;
            padding: 12px 0;
            align-items: center;
            overflow: hidden;
        }
        :root[data-sidebar="collapsed"] .sidebar-head {
            justify-content: center;
            width: 100%;
            padding: 10px 0 14px;
        }
        :root[data-sidebar="collapsed"] .sidebar-brand-text,
        :root[data-sidebar="collapsed"] .sidebar-label {
            display: none !important;
        }
        :root[data-sidebar="collapsed"] .sidebar-brand-mark {
            display: grid;
            width: 30px;
            height: 30px;
        }
        :root[data-sidebar="collapsed"] .sidebar-create.button {
            justify-content: center;
            width: 36px;
            height: 36px;
            min-height: 36px;
            margin: 12px 10px 8px;
            border-radius: 10px;
            padding: 0;
        }
        :root[data-sidebar="collapsed"] .side-nav {
            width: 100%;
            padding: 8px 0;
            justify-items: center;
        }
        :root[data-sidebar="collapsed"] .nav-item {
            display: inline-grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            padding: 0;
        }
        :root[data-sidebar="collapsed"] .sidebar-toggle-wrap {
            width: 100%;
            padding: 12px 0 0;
            justify-items: center;
        }
        .icon-button { border-radius: 8px; }
        .icon-button:hover { border-color: var(--line); background: var(--chip); }
        #themeToggle {
            width: 34px;
            height: 34px;
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--muted);
            background: var(--panel-3);
        }
        #notificationToggle {
            position: relative;
            width: 34px;
            height: 34px;
            border: 0;
            color: var(--muted);
            background: transparent;
        }
        #themeToggle svg,
        #notificationToggle svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
        }
        #themeToggle:hover,
        #notificationToggle:hover {
            color: var(--text);
            background: var(--chip);
        }
        #notificationToggle .notification-dot {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 7px;
            height: 7px;
            border: 1.5px solid var(--panel);
            border-radius: 999px;
            background: #e5424e;
        }
        :root[data-theme="light"] #themeToggle {
            background: #f0f0f6;
        }
        :root[data-theme="light"] #notificationToggle .notification-dot {
            border-color: #ffffff;
        }
        .topbar { min-height: 72px; padding: 12px 32px; background: var(--panel); }
        .topbar .brand h1 { font-size: 22px; font-weight: 700; }
        .topbar .brand p { font-size: 13px; font-weight: 500; }
        .filter-rail { padding: 18px 32px 10px; background: var(--bg); }
        .toolbar-select, .toolbar-button, .filter-search input { height: 36px; border-radius: 9px; background: var(--panel); }
        main { padding: 18px 32px 24px; }

        .board { grid-template-columns: repeat(4, minmax(330px, 1fr)); gap: 20px; min-width: 1400px; }
        .board.deleted-board { min-width: 0; }
        .column {
            min-height: calc(100vh - 176px);
            max-height: calc(100vh - 176px);
            border: 1px solid var(--line);
            border-radius: 13px;
            padding: 0;
            background: #f8f7fc;
            overflow: hidden auto;
        }
        .column h2 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            top: 0;
            margin: 0 0 16px;
            padding: 21px 18px 18px;
            border-bottom: 1px solid rgba(26, 26, 46, .06);
            background: #f8f7fc;
            font-size: 17px;
            font-weight: 600;
        }
        .column-title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
        .column-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .column-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: var(--status-archived);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-archived) 12%, transparent);
            flex: 0 0 auto;
        }
        .column[data-status="new"] .column-dot { background: var(--status-new); box-shadow: 0 0 0 4px rgba(10, 132, 255, .16); }
        .column[data-status="print"] .column-dot,
        .column[data-status="review"] .column-dot,
        .column[data-status="printing"] .column-dot { background: var(--status-print); box-shadow: 0 0 0 4px rgba(255, 159, 10, .16); }
        .column[data-status="work"] .column-dot,
        .column[data-status="in_work"] .column-dot,
        .column[data-status="progress"] .column-dot,
        .column[data-status="process"] .column-dot { background: var(--status-work); box-shadow: 0 0 0 4px rgba(120,87,255,.16); }
        .column[data-status="done"] .column-dot { background: var(--status-done); box-shadow: 0 0 0 4px rgba(34, 197, 94, .16); }
        .column-count {
            display: inline-grid;
            place-items: center;
            min-width: 26px;
            height: 24px;
            border-radius: 999px;
            padding: 0 8px;
            color: var(--brand);
            background: #fff5e6;
            font-size: 13px;
            font-weight: 600;
        }
        .column[data-status="new"] .column-count { color: var(--status-new); background: color-mix(in srgb, var(--status-new) 12%, transparent); }
        .column[data-status="print"] .column-count, .column[data-status="review"] .column-count, .column[data-status="printing"] .column-count { color: var(--status-print); background: color-mix(in srgb, var(--status-print) 12%, transparent); }
        .column[data-status="work"] .column-count, .column[data-status="in_work"] .column-count, .column[data-status="progress"] .column-count, .column[data-status="process"] .column-count { color: var(--status-work); background: color-mix(in srgb, var(--status-work) 12%, transparent); }
        .column[data-status="done"] .column-count { color: var(--status-done); background: color-mix(in srgb, var(--status-done) 12%, transparent); }
        .column-add {
            display: inline-grid;
            place-items: center;
            width: 28px;
            height: 28px;
            border: 0;
            border-radius: 8px;
            color: #9693b0;
            background: transparent;
            cursor: pointer;
            flex: 0 0 auto;
        }
        .column-add:hover { color: var(--brand); background: #fff5e6; }
        .column[data-status="new"] .column-count { color: var(--status-new); background: color-mix(in srgb, var(--status-new) 12%, transparent); }
        .column[data-status="print"] .column-count, .column[data-status="review"] .column-count, .column[data-status="printing"] .column-count { color: var(--status-print); background: color-mix(in srgb, var(--status-print) 12%, transparent); }
        .column[data-status="work"] .column-count, .column[data-status="in_work"] .column-count, .column[data-status="progress"] .column-count, .column[data-status="process"] .column-count { color: var(--status-work); background: color-mix(in srgb, var(--status-work) 12%, transparent); }
        .column[data-status="done"] .column-count { color: var(--status-done); background: color-mix(in srgb, var(--status-done) 12%, transparent); }
        .column-add svg { width: 18px; height: 18px; stroke: currentColor; }
        .task {
            gap: 12px;
            margin: 0 14px 12px;
            border: 1px solid rgba(26, 26, 46, .08);
            border-left: 0;
            border-radius: 10px;
            padding: 18px 18px 16px;
            background: #fff;
            box-shadow: 0 4px 12px rgba(26, 26, 46, .08);
        }
        .task::before { display: none; }
        .task:hover { border-color: rgba(122, 77, 255, .24); background: #fff; transform: none; box-shadow: 0 8px 20px rgba(26, 26, 46, .12); }
        .task.selected-task { border-color: rgba(122, 77, 255, .34); box-shadow: 0 8px 20px rgba(122, 77, 255, .15); }
        .task strong { color: #25243a; font-size: 17px; font-weight: 600; }
        .task-card-top, .task-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .task-top-badges {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-width: 0;
            margin-left: auto;
        }
        .task-top-badges .tag {
            padding: 3px 8px;
            font-size: 11px;
            line-height: 1.15;
        }
        .task-name { display: block; margin-top: -2px; line-height: 1.22; }
        .task-number { margin-right: 0; padding: 0; color: #9693b0; background: transparent; font-size: 13px; font-weight: 600; }
        .task-comment-attention {
            position: relative;
            display: inline-grid;
            width: 21px;
            height: 21px;
            place-items: center;
            color: var(--muted);
            flex: 0 0 auto;
        }
        .task-comment-attention svg { width: 21px; height: 21px; stroke: currentColor; }
        .task-comment-attention::after {
            position: absolute;
            top: 0;
            right: -1px;
            width: 7px;
            height: 7px;
            border: 2px solid var(--panel);
            border-radius: 50%;
            background: #e5424e;
            content: "";
        }
        .inline-created, .task p { color: var(--muted); }
        .task p {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            margin: 0;
            color: #8f8ca8;
            font-size: 13px;
            font-weight: 400;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .task p .task-link {
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .task-footer { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
        .task-person, .task-author-person, .task-priority, .task-date {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
            color: #8f8ca8;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
        }
        .task-top-badges .task-priority {
            gap: 6px;
            font-size: 12px;
            line-height: 1.15;
        }
        .task-person span:last-child,
        .task-author-person span:last-child,
        .task-author,
        .task-assignee-plain {
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .task-person,
        .task-author-person { max-width: 48%; }
        .assignee-avatar,
        .author-avatar {
            display: inline-grid;
            place-items: center;
            width: 26px;
            height: 26px;
            border-radius: 999px;
            color: #fff;
            background: #35b7e8;
            font-size: 11px;
            font-weight: 600;
            flex: 0 0 auto;
        }
        .author-avatar { background: var(--avatar-bg, #7857ff); }
        .task-assignee-plain {
            color: #8f8ca8;
            font-size: 11px;
            font-weight: 400;
            line-height: 1.2;
            white-space: nowrap;
        }
        .role, .tag { border-radius: 999px; padding: 4px 9px; background: #f4f3f8; color: #8f8ca8; font-size: 12px; font-weight: 500; }
        .task-priority .priority-dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; flex: 0 0 auto; }
        .task-top-badges .task-priority .priority-dot { width: 7px; height: 7px; }
        .task-priority.priority-high { color: #ff9f0a !important; background: transparent !important; padding: 0 !important; }
        .task-priority.priority-medium { color: #0a84ff !important; background: transparent !important; padding: 0 !important; }
        .task-priority.priority-low { color: #6b7280 !important; background: transparent !important; padding: 0 !important; }
        :root[data-theme="light"] .task-priority.priority-high,
        :root[data-theme="dark"] .task-priority.priority-high { color: #ff9f0a !important; background: transparent !important; padding: 0 !important; }
        :root[data-theme="light"] .task-priority.priority-medium,
        :root[data-theme="dark"] .task-priority.priority-medium { color: #0a84ff !important; background: transparent !important; padding: 0 !important; }
        :root[data-theme="light"] .task-priority.priority-low,
        :root[data-theme="dark"] .task-priority.priority-low { color: #6b7280 !important; background: transparent !important; padding: 0 !important; }
        .task-priority,
        .task-priority *,
        .column-count,
        .task-tag,
        .assignee-avatar {
            user-select: none;
        }
        .task-date svg { width: 15px; height: 15px; stroke: currentColor; flex: 0 0 auto; }
        .task-assignee, .task-author { color: #8f8ca8; background: transparent; }
        .task-tag, :root[data-theme="light"] .task-tag { color: #21402a; background: #dff3e6; }
        :root[data-theme="dark"] .app-sidebar { border-right-color: rgba(255,255,255,.09); }
        :root[data-theme="dark"] .nav-item:hover,
        :root[data-theme="dark"] .nav-item.active,
        :root[data-theme="dark"] .column-add:hover { color: #fbbf24; background: rgba(217,119,6, .16); }
        :root[data-theme="dark"] .column,
        :root[data-theme="dark"] .column h2 { border-color: var(--line); background: var(--column-bg); }
        :root[data-theme="dark"] .column h2 { border-bottom-color: var(--line); }
        :root[data-theme="dark"] .task { border-color: var(--card-border); background: var(--card-bg); box-shadow: 0 4px 16px rgba(0,0,0,.16); }
        :root[data-theme="dark"] .task:hover { border-color: rgba(180, 156, 255, .34); background: var(--card-hover); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
        :root[data-theme="dark"] .task strong { color: var(--text); }
        :root[data-theme="dark"] .task p,
        :root[data-theme="dark"] .task-person,
        :root[data-theme="dark"] .task-author,
        :root[data-theme="dark"] .task-date { color: var(--muted); }
        :root[data-theme="dark"] .tag { color: #e2dfd6; background: var(--chip); }

        /* Figma task detail sidebar */
        .drawer-bg.open {
            background: rgba(0,0,0,.35);
        }
        :root[data-theme="dark"] .drawer-bg.open {
            background: rgba(20,20,19,.42);
        }
        .drawer {
            width: 580px;
            max-width: calc(100vw - 12px);
            margin-right: 12px;
            padding: 0;
            border-left: 1px solid var(--line);
            background: var(--panel);
            box-shadow: none !important;
            scrollbar-gutter: stable;
            font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        }
        :root[data-theme="dark"] .drawer {
            box-shadow: none !important;
        }
        .drawer-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin: 0;
            padding: 20px 24px 16px;
            border-bottom: 1px solid var(--line);
        }
        .drawer-head h2 {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
            min-width: 0;
            margin: 0;
        }
        .drawer-task-id {
            display: block;
            color: var(--muted);
            font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
            font-size: 11px;
            font-weight: 500;
            line-height: 1.2;
            letter-spacing: .05em;
        }
        .drawer-title-input {
            height: auto;
            min-height: 0;
            border: 0;
            border-radius: 8px;
            padding: 0;
            color: var(--text);
            background: transparent !important;
            font-size: 24px;
            font-weight: 700 !important;
            line-height: 1.18;
        }
        .drawer-title-input:focus {
            box-shadow: none;
            outline: none;
        }
        .drawer h2 .inline-created {
            margin: 4px 0 0;
            color: var(--muted);
            font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
            font-size: 11px;
            font-weight: 400;
            line-height: 1.3;
        }
        .drawer-head .icon-button {
            width: 30px;
            height: 30px;
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--muted);
            background: var(--chip);
            font-size: 0;
            flex: 0 0 auto;
        }
        .drawer-head .icon-button::before,
        .drawer-head .icon-button::after {
            content: "";
            position: absolute;
            width: 14px;
            height: 2px;
            border-radius: 2px;
            background: currentColor;
        }
        .drawer-head .icon-button::before { transform: rotate(45deg); }
        .drawer-head .icon-button::after { transform: rotate(-45deg); }
        .drawer form {
            display: flex;
            flex-direction: column;
            gap: 20px;
            padding: 20px 24px 0;
        }
        #createDrawer .drawer > h2 {
            margin: 0;
            padding: 20px 24px 0;
        }
        .drawer label,
        .files-section h3,
        .tabs + .tab-panel label {
            color: var(--muted);
            font-size: 10.5px;
            font-weight: 500;
            line-height: 1.2;
            letter-spacing: .07em;
            text-transform: uppercase;
        }
        .description-editor-label {
            gap: 8px;
        }
        .editor-shell {
            border: 0;
            border-radius: 6px;
            background: transparent;
            overflow: hidden;
        }
        .editor-toolbar {
            gap: 2px;
            min-height: 34px;
            padding: 6px 8px;
            border: 1px solid var(--line);
            border-bottom: 0;
            border-radius: 6px 6px 0 0;
            background: var(--panel-3);
        }
        .editor-toolbar > button,
        .editor-menu-wrap > button {
            width: auto;
            min-width: 23px;
            height: 23px;
            border-radius: 4px;
            padding: 3px 5px;
            color: var(--muted);
            font-size: 14px;
            font-weight: 500;
        }
        .editor-toolbar > button svg,
        .editor-menu-wrap > button svg {
            width: 13px;
            height: 13px;
            stroke-width: 2;
        }
        .editor-separator {
            display: none;
        }
        .rich-description {
            min-height: 90px;
            max-height: 260px;
            border: 1px solid var(--line);
            border-radius: 0 0 6px 6px;
            padding: 12px 14px;
            background: var(--panel-3);
            color: var(--text);
            font-size: 13px;
            font-weight: 400;
            line-height: 1.6;
            letter-spacing: 0;
            text-transform: none;
        }
        .files-section {
            gap: 8px;
        }
        .files-head {
            align-items: center;
        }
        .files-section h3 {
            font-size: 10.5px;
            margin: 0;
        }
        .files-actions {
            gap: 8px;
        }
        .file-action-button {
            width: auto;
            height: 30px;
            min-height: 0;
            border-radius: 6px;
            padding: 0 10px;
            color: var(--muted);
            background: color-mix(in srgb, var(--panel) 70%, var(--chip));
            font-size: 12px;
            font-weight: 500;
        }
        .file-action-button svg,
        .files-menu-button svg {
            width: 13px;
            height: 13px;
            stroke-width: 2;
        }
        .files-menu-button {
            width: 30px;
            height: 30px;
            border-radius: 6px;
        }
        .file-drop-zone {
            min-height: 62px;
            border: 1.5px dashed var(--line);
            border-radius: 8px;
            padding: 20px 14px;
            color: var(--muted);
            background: transparent;
            font-size: 12px;
            text-align: center;
        }
        .file-drop-zone:empty::before,
        #drawerFilesPreview:empty::before {
            content: "Перетащите файлы сюда или нажмите на скрепку";
            color: var(--muted);
        }
        #drawerFilesPreview:empty {
            display: block;
        }
        .drawer input:not([type="file"]),
        .drawer select,
        .drawer textarea {
            min-height: 34px;
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 7px 10px;
            color: var(--text);
            background: var(--panel-3);
            font-size: 12px;
            font-weight: 400;
            line-height: 1.35;
            text-transform: none;
            letter-spacing: 0;
        }
        .drawer .grid {
            gap: 10px;
        }
        .drawer label:has(select),
        .drawer label:has(input) {
            gap: 6px;
        }
        .drawer select {
            appearance: auto;
        }
        .drawer input.drawer-title-input {
            display: block;
            width: 100%;
            height: auto;
            min-height: 0;
            margin: 4px 0 0;
            border: 0 !important;
            border-radius: 0;
            padding: 0 !important;
            color: var(--text);
            appearance: none;
            -webkit-appearance: none;
            background: transparent !important;
            box-shadow: none !important;
            font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
            font-size: 24px !important;
            font-weight: 700 !important;
            font-synthesis-weight: auto;
            line-height: 1.18 !important;
            letter-spacing: 0;
            cursor: text;
        }
        .drawer input.drawer-title-input:hover {
            border-color: transparent !important;
        }
        .drawer input.drawer-title-input:focus {
            border-color: transparent !important;
            outline: none;
            background: transparent !important;
        }
        .field-with-dot {
            position: relative;
            display: block;
            width: 100%;
        }
        .field-with-dot select {
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
            padding-left: 30px;
        }
        .field-dot {
            position: absolute;
            left: 12px;
            top: 50%;
            z-index: 1;
            width: 9px;
            height: 9px;
            border-radius: 999px;
            background: #8a8aa8;
            transform: translateY(-50%);
            pointer-events: none;
        }
        .field-select-button {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 10px;
            width: 100%;
            min-height: 34px;
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 7px 10px;
            color: var(--text);
            background: var(--panel-3);
            font: inherit;
            font-size: 12px;
            line-height: 1.35;
            text-align: left;
            cursor: pointer;
        }
        .field-select-button .field-dot,
        .field-select-menu .field-dot {
            position: static;
            z-index: auto;
            width: 9px;
            height: 9px;
            transform: none;
            flex: 0 0 auto;
        }
        .field-select-button svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            color: var(--muted);
        }
        .field-select-text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .field-select-menu {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 4px);
            z-index: 40;
            overflow: hidden;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: var(--panel);
            box-shadow: 0 12px 28px rgba(0,0,0,.14);
        }
        .field-select-menu[hidden] {
            display: none;
        }
        .field-select-menu button {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            min-height: 34px;
            border: 0;
            padding: 8px 10px;
            color: var(--text);
            background: transparent;
            font: inherit;
            font-size: 12px;
            text-align: left;
            cursor: pointer;
        }
        .field-select-menu button:hover,
        .field-select-menu button[aria-selected="true"] {
            background: color-mix(in srgb, var(--brand) 12%, transparent);
        }
        .field-dot.priority-high { background: #ff9f0a; }
        .field-dot.priority-medium { background: #0a84ff; }
        .field-dot.priority-low { background: #6b7280; }
        .field-dot.payment-paid { background: #22c55e; }
        .field-dot.payment-unpaid { background: #ff3b30; }
        .field-dot.payment-pending { background: #ff9f0a; }
        .tabs {
            display: flex;
            gap: 0;
            margin: 20px 24px 0;
            border-bottom: 1px solid var(--line);
        }
        .tab {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 0;
            border-bottom: 2px solid transparent;
            border-radius: 0;
            margin: 0 0 -1px;
            padding: 10px 16px;
            color: var(--muted);
            background: transparent;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.2;
        }
        .tab svg {
            width: 13px;
            height: 13px;
            stroke: currentColor;
            stroke-width: 2;
        }
        .tab.active {
            color: var(--text);
            background: transparent;
            border-bottom-color: var(--brand);
            font-weight: 500;
        }
        .tab-panel {
            padding: 16px 24px 0;
        }
        .tab-panel.active {
            gap: 12px;
        }
        #commentsList:empty::before,
        #mailLogList:empty::before,
        #historyList:empty::before {
            display: block;
            color: var(--muted);
            font-size: 12px;
            text-align: center;
        }
        #commentsList:empty::before { content: "Комментариев пока нет"; }
        #mailLogList:empty::before { content: "Писем нет"; }
        #historyList:empty::before { content: ""; }
        #commentForm {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .comment-text-field > span { display: none; }
        #commentText {
            min-height: 80px;
            resize: vertical;
            padding: 10px 12px;
            font-size: 12px;
        }
        .comment-actions {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
        }
        .comment-actions .button {
            border-radius: 8px;
            padding: 10px 0;
            background: var(--brand);
            font-size: 13px;
            font-weight: 500;
        }
        .comment-actions .button:hover {
            background: var(--brand);
            opacity: .85;
        }

        :root[data-theme="light"] .task,
        :root[data-theme="light"] .task:hover {
            background: #ffffff;
        }

        #settingsDrawer .employee-card-name-row .role {
            margin-top: 0;
        }
        #settingsDrawer .employee-card-name-row .account-status {
            color: #8f8ca8;
            background: #eef1f5;
        }
        #settingsDrawer .mailbox-toggle {
            color: #8f8ca8;
            background: #eef1f5;
            border: 1px solid transparent;
            cursor: pointer;
        }
        #settingsDrawer .mailbox-toggle.active {
            color: #155e32;
            background: #d8f5e2;
            border-color: #9bddb4;
        }
        #settingsDrawer .mailbox-toggle.inactive {
            color: #8f8ca8;
            background: #eef1f5;
            border-color: transparent;
            box-shadow: none;
        }
        :root[data-theme="dark"] #settingsDrawer .employee-card-name-row .account-status,
        :root[data-theme="dark"] #settingsDrawer .mailbox-toggle.inactive,
        :root[data-theme="dark"] #settingsDrawer .mailbox-toggle {
            color: #9b98b5;
            background: rgba(255,255,255,.07);
        }
        :root[data-theme="dark"] #settingsDrawer .mailbox-toggle.active {
            color: #c7f7d8;
            background: rgba(34,197,94,.24);
            border-color: rgba(34,197,94,.38);
        }

        .layout.employees-open {
            grid-template-columns: 1fr;
        }
        .employees-page {
            min-width: 0;
            padding: 22px 28px 48px;
        }
        .employees-page[hidden] {
            display: none;
        }
        .employees-page-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
        }
        .employees-page-head h2 {
            margin: 0;
            color: var(--text);
            font-size: 28px;
            line-height: 1.15;
        }
        .employees-page-head p {
            margin: 6px 0 0;
            color: var(--muted);
            font-size: 14px;
        }
        .employees-grid {
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 14px;
        }
        .employees-page .employee-card-form {
            padding: 0;
            border: 0;
            background: transparent;
        }
        .employee-profile-card {
            display: grid;
            grid-template-columns: 44px minmax(0, 1fr);
            align-items: start;
            gap: 14px;
            width: 100%;
            min-height: 148px;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 18px;
            color: inherit;
            background: var(--panel);
            text-align: left;
            cursor: pointer;
            box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
            transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
        }
        .employee-profile-card:hover {
            border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
            transform: translateY(-1px);
            box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
        }
        .employee-profile-card .employee-avatar {
            width: 44px;
            height: 44px;
            font-size: 15px !important;
        }
        .employee-profile-card .employee-card-title {
            display: grid;
            gap: 6px;
        }
        .employee-profile-card .employee-card-title > span[data-employee-summary="email"] {
            color: var(--muted);
            font-size: 14px;
        }
        .employee-settings-modal {
            z-index: 45;
        }
        .employee-settings-dialog {
            display: grid;
            gap: 18px;
            width: min(920px, calc(100vw - 32px));
            max-height: calc(100vh - 48px);
            overflow: auto;
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 22px;
            background: var(--panel);
            box-shadow: 0 24px 70px rgba(0,0,0,.24);
        }
        .employee-settings-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .employee-settings-head h2 {
            margin: 0;
            color: var(--text);
            font-size: 24px;
            line-height: 1.2;
        }
        .employee-settings-head p {
            margin: 4px 0 0;
            color: var(--muted);
            font-size: 14px;
        }
        .employee-settings-dialog .employee-card-fields,
        .employee-settings-dialog .employee-mailbox-fields {
            display: grid;
            gap: 14px;
        }
        .employee-settings-actions {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            padding-top: 4px;
        }
        .employee-settings-actions .danger {
            color: #fff;
            background: var(--danger);
        }
        .mailbox-toggle-button.active {
            color: #155e32;
            background: #d8f5e2;
            border-color: #9bddb4;
        }
        .mailbox-toggle-button.inactive {
            color: #8f8ca8;
            background: #eef1f5;
            border-color: transparent;
        }
        :root[data-theme="light"] .employee-profile-card,
        :root[data-theme="light"] .employee-settings-dialog {
            background: #ffffff;
        }
        :root[data-theme="dark"] .employee-profile-card,
        :root[data-theme="dark"] .employee-settings-dialog {
            background: var(--panel);
        }
        :root[data-theme="dark"] .mailbox-toggle-button.active {
            color: #c7f7d8;
            background: rgba(34,197,94,.24);
            border-color: rgba(34,197,94,.38);
        }
        :root[data-theme="dark"] .mailbox-toggle-button.inactive {
            color: #9b98b5;
            background: rgba(255,255,255,.07);
        }

        #employeesPage.employees-page {
            margin: 0;
            padding: 0;
            min-height: 100vh;
            background: #f4f2f8;
            font-family: "Plus Jakarta Sans", system-ui, sans-serif;
        }
        .layout.employees-open {
            display: block;
            min-height: 100vh;
        }
        .layout.employees-open #filters,
        .layout.employees-open #board {
            display: none !important;
        }
        #employeesPage .employees-page-head {
            height: 56px;
            margin: 0;
            padding: 0 32px;
            border-bottom: 1px solid rgba(0,0,0,.07);
            background: #ffffff;
            align-items: center;
            justify-content: flex-end;
        }
        #employeesPage .employees-page-head > div:first-child {
            display: none;
        }
        #employeesPage .employees-page-head h2 {
            margin: 0;
            color: #1a1a2e;
            font-size: 15px;
            font-weight: 700;
            line-height: 1.2;
        }
        #employeesPage .employees-page-head p {
            margin: 4px 0 0;
            color: #8a8aa8;
            font-size: 11px;
            line-height: 1.2;
        }
        .employees-page-tools {
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 0 0 auto;
        }
        .employees-search {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 260px;
            height: 36px;
            border: 1px solid rgba(0,0,0,.1);
            border-radius: 8px;
            padding: 0 12px;
            background: #f0f0f6;
            color: #8a8aa8;
        }
        .employees-search svg {
            width: 13px;
            height: 13px;
            stroke: currentColor;
            flex: 0 0 auto;
        }
        .employees-search input {
            width: 100%;
            min-width: 0;
            border: 0;
            padding: 0;
            color: #1a1a2e;
            background: transparent !important;
            font-size: 12px;
            outline: 0;
        }
        .employees-add-button {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            height: 38px;
            border: 0;
            border-radius: 8px;
            padding: 0 14px;
            color: #fff;
            background: var(--brand);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }
        .employees-add-button:hover { opacity: .86; }
        .employees-add-button svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
        }
        #employeesPage .new-employee-panel {
            margin: 18px 32px 0;
            border: 1px solid rgba(0,0,0,.07);
            border-radius: 12px;
            padding: 18px;
            background: #fff;
        }
        .employees-stats {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
            padding: 24px 32px 0;
        }
        .employee-stat-card {
            display: flex;
            align-items: center;
            gap: 14px;
            min-height: 76px;
            border: 1px solid rgba(0,0,0,.07);
            border-radius: 10px;
            padding: 16px 20px;
            background: #fff;
        }
        .employee-stat-card strong {
            display: inline-grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 16px;
            font-weight: 700;
        }
        .employee-stat-card span {
            color: #8a8aa8;
            font-size: 12px;
            line-height: 1.3;
        }
        .employee-stat-purple strong { color: var(--brand); background: rgba(217,119,6,.12); }
        .employee-stat-green strong { color: #3ecf8e; background: rgba(62,207,142,.12); }
        .employee-stat-blue strong { color: #4a90d9; background: rgba(74,144,217,.12); }
        .employee-stat-orange strong { color: #f5a623; background: rgba(245,166,35,.12); }
        #employeesPage .employees-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 12px;
            padding: 24px 32px;
        }
        #employeesPage .employee-profile-card {
            display: flex;
            flex-direction: column;
            gap: 16px;
            min-height: 176px;
            border: 1px solid rgba(0,0,0,.07);
            border-radius: 12px;
            padding: 20px;
            background: #fff;
            box-shadow: 0 1px 4px rgba(0,0,0,.07);
        }
        #employeesPage .employee-profile-card:hover {
            border-color: rgba(217,119,6,.18);
            background: #f8f8fc;
            box-shadow: 0 6px 22px rgba(0,0,0,.1);
            transform: none;
        }
        #employeesPage .employee-profile-card > .employee-avatar {
            position: absolute;
        }
        #employeesPage .employee-profile-card {
            position: relative;
            padding-left: 82px;
        }
        #employeesPage .employee-profile-card .employee-avatar {
            left: 20px;
            top: 20px;
            width: 44px;
            height: 44px;
            font-size: 15px !important;
            font-weight: 700;
        }
        #employeesPage .employee-card-title {
            display: flex;
            flex-direction: column;
            gap: 14px;
            min-width: 0;
        }
        #employeesPage .employee-card-name-row {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
            min-height: 54px;
        }
        #employeesPage .employee-card-name-row strong {
            color: #1a1a2e;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.3;
        }
        .employee-role {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            min-height: 24px;
            border-radius: 20px;
            padding: 3px 9px;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
        }
        .employee-role svg,
        .mailbox-toggle svg,
        .employee-mail-icon svg {
            width: 11px;
            height: 11px;
            stroke: currentColor;
            flex: 0 0 auto;
        }
        .employee-role-user { color: #4a90d9; background: rgba(74,144,217,.12); }
        .employee-role-admin { color: var(--brand); background: rgba(217,119,6,.15); }
        .employee-role-manager { color: #f5a623; background: rgba(245,166,35,.14); }
        .employee-card-divider {
            display: block;
            height: 1px;
            margin-left: -62px;
            background: rgba(0,0,0,.07);
        }
        .employee-email-row {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            margin-left: -62px;
        }
        .employee-email-row [data-employee-summary="email"] {
            overflow: hidden;
            color: #5b5b78;
            font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 11.5px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .employee-mail-icon {
            display: inline-grid;
            place-items: center;
            width: 28px;
            height: 28px;
            border: 1px solid rgba(0,0,0,.07);
            border-radius: 7px;
            color: #8a8aa8;
            background: #f7f7fb;
            flex: 0 0 auto;
        }
        #employeesPage .employee-card-meta {
            display: flex;
            gap: 7px;
            flex-wrap: wrap;
            margin-left: -62px;
        }
        #employeesPage .account-status,
        #employeesPage .mailbox-toggle {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            min-height: 28px;
            border: 0;
            border-radius: 20px;
            padding: 4px 10px;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            box-shadow: none;
        }
        #employeesPage .account-status {
            color: #3ecf8e;
            background: rgba(62,207,142,.12);
        }
        #employeesPage .account-status .status-dot {
            width: 5px;
            height: 5px;
            border-radius: 999px;
            background: currentColor;
        }
        #employeesPage .mailbox-toggle.active {
            color: #4a90d9;
            background: rgba(74,144,217,.12);
            border: 0;
        }
        #employeesPage .mailbox-toggle.inactive {
            color: #8a8aa8;
            background: rgba(138,138,168,.1);
            border: 0;
        }
        #employeesPage .employee-card-form[hidden] {
            display: none;
        }
        :root[data-theme="dark"] #employeesPage.employees-page {
            background: #0b0b12;
        }
        :root[data-theme="dark"] #employeesPage .employees-page-head,
        :root[data-theme="dark"] #employeesPage .employee-profile-card,
        :root[data-theme="dark"] .employee-stat-card,
        :root[data-theme="dark"] #employeesPage .new-employee-panel {
            border-color: rgba(255,255,255,.07);
            background: #111119;
        }
        :root[data-theme="dark"] #employeesPage .employee-card-name-row strong,
        :root[data-theme="dark"] #employeesPage .employees-page-head h2 {
            color: #e2e2ec;
        }
        :root[data-theme="dark"] .employee-card-divider {
            background: rgba(255,255,255,.07);
        }
        :root[data-theme="dark"] .employee-mail-icon {
            border-color: rgba(255,255,255,.07);
            background: #191926;
        }

        @media (max-width: 900px) {
            .app-shell, :root[data-sidebar="collapsed"] .app-shell { grid-template-columns: 1fr; }
            .app-sidebar, :root[data-sidebar="collapsed"] .app-sidebar { position: static; height: auto; padding: 14px; }
            .board { min-width: 1080px; }
            .board.deleted-board { min-width: 0; }
            .employees-page { padding: 16px; }
            .employees-page-head { flex-direction: column; }
            .employees-grid { grid-template-columns: 1fr; }
            .employee-settings-actions { flex-direction: column; }
        }

        .mobile-app-nav {
            display: none;
        }

        @media (max-width: 900px) {
            body {
                padding-bottom: calc(84px + env(safe-area-inset-bottom));
                overflow-x: hidden;
            }
            .app-shell,
            :root[data-sidebar="collapsed"] .app-shell {
                display: block;
                min-height: 100vh;
            }
            .app-sidebar,
            :root[data-sidebar="collapsed"] .app-sidebar {
                display: none;
            }
            .workspace {
                min-width: 0;
                width: 100%;
            }
            .topbar {
                min-height: auto;
                grid-template-columns: 1fr;
                gap: 10px;
                padding: 18px 18px 14px;
            }
            .topbar .brand h1 {
                font-size: 30px;
                line-height: 1.12;
            }
            .topbar .brand p {
                font-size: 14px;
                line-height: 1.35;
            }
            .top-actions {
                gap: 12px;
                justify-content: flex-start;
            }
            .top-actions .top-user .sidebar-label {
                display: inline;
            }
            .filter-rail {
                padding: 14px 18px;
            }
            .filter-toolbar {
                display: flex;
                justify-content: flex-start;
                flex-wrap: wrap;
                gap: 8px;
            }
            .filter-search {
                width: min(360px, 100%);
            }
            .toolbar-select,
            .toolbar-button,
            .filter-search input {
                height: 46px;
                border-radius: 12px;
            }
            .toolbar-button {
                min-width: 54px;
                padding: 0 12px;
            }
            main {
                width: 100%;
                padding: 14px 18px 24px;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            .board {
                display: flex;
                gap: 14px;
                min-width: max-content;
                align-items: stretch;
            }
            .column {
                width: min(78vw, 360px);
                min-width: min(78vw, 360px);
                min-height: calc(100vh - 310px);
                max-height: none;
            }
            .task {
                padding: 18px;
            }
            .mobile-app-nav {
                position: fixed;
                left: 12px;
                right: 12px;
                bottom: max(10px, env(safe-area-inset-bottom));
                z-index: 80;
                display: grid;
                grid-template-columns: 1fr 1fr 72px 1fr 1fr;
                align-items: end;
                gap: 8px;
                min-height: 70px;
                border: 1px solid var(--line);
                border-radius: 22px;
                padding: 8px 10px 10px;
                background: color-mix(in srgb, var(--panel) 94%, transparent);
                box-shadow: 0 18px 44px rgba(0,0,0,.22);
                backdrop-filter: blur(18px);
            }
            .mobile-nav-item,
            .mobile-nav-create {
                border: 0;
                color: var(--muted);
                background: transparent;
                cursor: pointer;
                text-decoration: none;
            }
            .mobile-nav-item {
                display: grid;
                place-items: center;
                gap: 4px;
                min-width: 0;
                height: 52px;
                border-radius: 14px;
                padding: 5px 2px;
                font-size: 10px;
                font-weight: 600;
                line-height: 1.1;
            }
            .mobile-nav-item svg {
                width: 22px;
                height: 22px;
                stroke: currentColor;
            }
            .mobile-nav-item span {
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            .mobile-nav-item.active {
                color: var(--brand);
                background: color-mix(in srgb, var(--brand) 11%, transparent);
            }
            .mobile-nav-create {
                display: grid;
                place-items: center;
                width: 64px;
                height: 64px;
                margin: -22px auto 0;
                border-radius: 22px;
                color: #fff;
                background: var(--brand);
                box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 44%, transparent);
            }
            .mobile-nav-create svg {
                width: 30px;
                height: 30px;
                stroke: currentColor;
            }
            :root[data-theme="light"] .mobile-app-nav {
                background: rgba(255,255,255,.94);
                box-shadow: 0 18px 44px rgba(26,26,46,.16);
            }
            #employeesPage.employees-page {
                padding-bottom: 96px;
            }
        }

        @media (max-width: 560px) {
            .topbar {
                grid-template-columns: minmax(0, 1fr) auto;
                align-items: center;
                gap: 10px;
                padding: 12px 14px;
            }
            .topbar .brand h1 {
                font-size: 24px;
                line-height: 1.1;
            }
            .topbar .brand p {
                font-size: 11px;
                line-height: 1.25;
            }
            .top-actions {
                display: flex;
                align-items: center;
                justify-content: flex-end;
                gap: 8px;
                flex-wrap: nowrap;
            }
            #themeToggle {
                display: none;
            }
            .top-user {
                gap: 6px;
            }
            .top-user .user-avatar {
                width: 34px;
                height: 34px;
            }
            .top-user .sidebar-label {
                max-width: 82px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 13px;
            }
            .top-user svg {
                width: 20px;
                height: 20px;
            }
            .filter-rail {
                padding: 12px 12px;
            }
            .filter-toolbar {
                gap: 8px;
            }
            .filter-search {
                flex: 1 1 190px;
                width: auto;
            }
            .toolbar-select,
            .toolbar-button,
            .filter-search input {
                height: 42px;
                min-width: 0;
                font-size: 13px;
            }
            #toggleFiltersPanel {
                order: 2;
            }
            .filter-search {
                order: 3;
            }
            .toolbar-select {
                order: 1;
            }
            .reset-filter-button {
                order: 4;
                flex: 0 0 auto;
            }
            .toolbar-select {
                padding: 0 8px;
            }
            .toolbar-select select {
                min-width: 0;
                font-size: 13px;
            }
            .toolbar-button {
                min-width: 0;
                padding: 0 10px;
            }
            .toolbar-button svg,
            .toolbar-select svg {
                width: 17px;
                height: 17px;
            }
            main {
                padding: 12px 12px 24px;
                scroll-snap-type: x proximity;
            }
            .board {
                gap: 10px;
                min-width: 0;
            }
            .column {
                width: calc(100vw - 42px);
                min-width: calc(100vw - 42px);
                scroll-snap-align: center;
                border-radius: 12px;
            }
            .column h2 {
                font-size: 18px;
                padding: 14px 16px;
            }
            .task {
                padding: 14px;
                border-radius: 12px;
            }
            .task h3 {
                font-size: 19px;
                line-height: 1.22;
                overflow-wrap: anywhere;
            }
            .task p {
                font-size: 14px;
                line-height: 1.35;
            }
            .task-meta {
                min-width: 0;
                flex-wrap: wrap;
            }
            .task-group-badge {
                width: 100%;
                max-width: 100%;
                border-radius: 18px;
                white-space: normal;
                overflow-wrap: anywhere;
                word-break: break-word;
            }
            .task-group-header {
                align-items: flex-start;
                flex-wrap: wrap;
            }
            .task-group-header span {
                white-space: normal;
                overflow-wrap: anywhere;
                word-break: break-word;
            }
            .mobile-app-nav {
                left: 8px;
                right: 8px;
                bottom: max(2px, env(safe-area-inset-bottom));
                grid-template-columns: 1fr 1fr 58px 1fr 1fr;
                gap: 2px;
                min-height: 54px;
                border-radius: 17px;
                padding: 5px 8px 6px;
            }
            .mobile-nav-item {
                height: 42px;
                font-size: 0;
            }
            .mobile-nav-item span {
                display: none;
            }
            .mobile-nav-item svg {
                width: 24px;
                height: 24px;
            }
            .mobile-nav-create {
                width: 56px;
                height: 56px;
                margin-top: -15px;
                border-radius: 18px;
            }
            .mobile-nav-create svg {
                width: 27px;
                height: 27px;
            }

            #employeesPage.employees-page {
                overflow-x: hidden;
                padding-bottom: 96px;
            }
            #employeesPage .employees-page-head {
                height: auto;
                padding: 12px 14px;
            }
            .employees-page-tools {
                display: grid;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
                width: 100%;
                gap: 10px;
            }
            .employees-search {
                width: 100%;
                min-width: 0;
                height: 44px;
            }
            .employees-add-button {
                width: 100%;
                min-width: 0;
                height: 44px;
                justify-content: center;
                padding: 0 10px;
                font-size: 12px;
                line-height: 1.1;
                text-align: center;
            }
            .employees-stats {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px;
                padding: 14px 14px 0;
            }
            .employee-stat-card {
                min-width: 0;
                min-height: 84px;
                align-items: center;
                gap: 10px;
                padding: 12px;
            }
            .employee-stat-card strong {
                width: 34px;
                height: 34px;
                flex: 0 0 auto;
            }
            .employee-stat-card span {
                min-width: 0;
                overflow-wrap: anywhere;
                font-size: 12px;
            }
            #employeesPage .employees-grid {
                grid-template-columns: 1fr;
                gap: 12px;
                padding: 16px 14px 112px;
            }
            #employeesPage .employee-profile-card {
                min-height: 0;
                padding: 18px 16px 18px 72px;
            }
            #employeesPage .employee-profile-card .employee-avatar {
                left: 16px;
                top: 18px;
            }
            #employeesPage .employee-card-name-row {
                min-height: 48px;
            }
            .employee-email-row,
            #employeesPage [data-employee-summary="email"] {
                min-width: 0;
                overflow-wrap: anywhere;
                word-break: break-word;
            }
            .employee-settings-dialog {
                width: calc(100vw - 24px);
                max-height: calc(100vh - 28px);
                padding: 18px;
            }
        }

        .description-expand-button {
            margin-left: auto;
        }
        .editor-shell.description-expanded .rich-description {
            height: min(680px, calc(100vh - 300px));
            max-height: none;
        }
        @media (max-width: 720px) {
            .editor-shell.description-expanded .rich-description {
                height: min(560px, calc(100vh - 250px));
            }
        }

/* Stitch design transfer: header, cards, and create drawer */
.topbar {
    display: grid;
    grid-template-columns: minmax(260px, max-content) minmax(320px, 520px) minmax(240px, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 76px;
    padding: 14px 32px;
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    border-bottom: 1px solid var(--line);
}
.topbar .brand h1 {
    font-size: 25px;
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: 0;
}
.topbar .brand p {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
}
.topbar-search {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--muted);
    background: color-mix(in srgb, var(--panel-2) 72%, var(--panel));
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 5%, transparent);
}
.topbar-search svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    flex: 0 0 auto;
}
.topbar-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0 !important;
    padding: 0 !important;
    color: var(--text);
    background: var(--panel) !important;
    opacity: 1;
    box-shadow: none !important;
    font-size: 14px;
}
.topbar-search input:focus { outline: none; }
.top-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.top-actions::before {
    content: "";
    width: 1px;
    height: 40px;
    margin-right: 10px;
    background: var(--line);
}
.top-user {
    border: 0;
    background: transparent;
}
.top-user .sidebar-label {
    font-weight: 800;
}
:root[data-theme="light"] .topbar {
    background: rgba(255,255,255,.94);
}
:root[data-theme="light"] .topbar-search {
    background: #f4f6ff;
}

.task {
    border-radius: 12px;
    padding: 17px 18px;
}
.task-name {
    letter-spacing: 0;
}
.task-footer {
    padding-top: 2px;
}
.task-author-person {
    padding: 0;
}
.task .payment-paid {
    margin-left: auto;
    padding: 5px 10px;
    color: #062b16;
    background: #22c55e;
    font-weight: 700;
}

#createDrawer .drawer > h2 {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.15;
}
#createDrawer .drawer form {
    padding-top: 20px;
}
#createDrawer .drawer form > label,
#createDrawer .drawer form > .grid,
#createDrawer .file-help {
    position: relative;
}
#createDrawer .file-drop {
    display: grid;
    gap: 10px;
    min-height: 88px;
    border: 1.5px dashed color-mix(in srgb, var(--brand) 42%, var(--line));
    border-radius: 10px;
    padding: 18px;
    background: color-mix(in srgb, var(--brand) 5%, transparent);
}
#createDrawer .file-drop input[type="file"] {
    width: 100%;
    max-width: 100%;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}
#createDrawer .create-attachment-preview {
    margin-top: -10px;
}
#createDrawer .button[type="submit"] {
    min-height: 42px;
    border-radius: 10px;
    margin-top: 4px;
}
#createDrawer #createClose {
    min-height: 42px;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }
    .topbar-search {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
    }
    .top-actions::before { display: none; }
}
@media (max-width: 560px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 14px 14px 12px;
    }
    .topbar .brand h1 {
        font-size: 25px;
    }
    .topbar-search {
        display: none;
    }
    #createDrawer .drawer {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }
    #createDrawer .drawer > h2 {
        padding: 20px 20px 16px;
    }
}

.topbar-search input {
    background: transparent !important;
}

/* Compact task card header */
.task-card-top {
    flex-wrap: nowrap;
}
.task-priority-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 7px;
    padding: 4px 10px;
    color: #f59e0b;
    background: #fff0d7;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.task-tags-inline {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
    overflow: hidden;
}
.task-tags-inline .task-tag {
    flex: 0 0 auto;
    white-space: nowrap;
}
.task-card-top .task-top-badges {
    flex: 0 0 auto;
}
.task-card-top .task-priority {
    width: 12px;
    height: 12px;
    gap: 0;
}
.task-card-top .task-priority .priority-dot,
.task-top-badges .task-priority .priority-dot {
    width: 11px;
    height: 11px;
}

/* Open card targeted field layout */
#taskDrawer .drawer-head {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}
#taskDrawer .drawer-head h2 {
    gap: 6px;
}
#taskDrawer .drawer-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
#taskDrawer .drawer-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    border-radius: 6px;
    padding: 4px 10px;
    color: #0f8a5f;
    background: #e6f6ee;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
#taskDrawer .drawer-status-badge[hidden] { display: none; }
#taskDrawer #editTaskForm {
    gap: 18px;
}
#taskDrawer .drawer-main-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
    gap: 18px;
    margin-bottom: 4px;
}
#taskDrawer .drawer-main-fields label {
    color: transparent;
    font-size: 0;
    letter-spacing: 0;
}
#taskDrawer .drawer-main-fields .field-select-button {
    min-height: 58px;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 20px;
    font-weight: 750;
}
#taskDrawer .drawer-main-fields [data-select-shell="priority"] .field-select-button {
    border-color: #dfe6f6;
    color: var(--text);
    background: #f3f6fd;
}
#taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button {
    border-color: #f8e3e3;
    color: #c72222;
    background: #fffafa;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot,
#taskDrawer .drawer-main-fields .field-select-menu .field-dot {
    width: 12px;
    height: 12px;
}
#taskDrawer .drawer-main-fields .field-select-button svg {
    width: 19px;
    height: 19px;
}
#taskDrawer .drawer-meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
:root[data-theme="dark"] #taskDrawer .drawer-status-badge {
    color: #7ee0a3;
    background: rgba(34, 197, 94, .16);
}
:root[data-theme="dark"] #taskDrawer .drawer-main-fields [data-select-shell="priority"] .field-select-button,
:root[data-theme="dark"] #taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button {
    border-color: var(--line);
    color: var(--text);
    background: var(--panel-3);
}
@media (max-width: 700px) {
    #taskDrawer .drawer-main-fields,
    #taskDrawer .drawer-meta-row {
        grid-template-columns: 1fr;
    }
}

#taskDrawer #accountingCalculationList {
    display: grid;
    gap: 8px;
    margin-bottom: 0;
}
#taskDrawer #accountingCalculationList > .empty {
    border: 0;
    padding: 4px;
    background: transparent;
    font-size: 12px;
}
#taskDrawer .accounting-calculation-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
}
#taskDrawer .accounting-calculation-item strong,
#taskDrawer .accounting-calculation-item small {
    display: block;
}
#taskDrawer .accounting-calculation-item strong {
    color: var(--text);
    font-size: 12.5px;
}
#taskDrawer .accounting-calculation-item p {
    margin: 6px 0;
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
#taskDrawer .accounting-calculation-item small {
    color: var(--muted);
    font-size: 11px;
}
#taskDrawer .accounting-calculation-item.failed strong {
    color: var(--danger);
}
#taskDrawer #accountingCalculationForm {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 0;
}
#taskDrawer .accounting-calculation-composer {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
}
#taskDrawer #accountingCalculationText {
    display: block;
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    color: var(--text);
    background: transparent;
    resize: none;
    font-size: 12.5px;
    line-height: 1.55;
    text-transform: none;
}
#taskDrawer #accountingCalculationText:focus {
    outline: none;
    box-shadow: none;
}
#taskDrawer .accounting-calculation-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px;
    min-height: 38px;
    padding: 5px 7px;
    border-top: 1px solid var(--line);
}
#taskDrawer .accounting-calculation-tools {
    display: flex;
    align-items: center;
}
#taskDrawer .accounting-calculation-tools button,
#taskDrawer .accounting-calculation-tools label {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 4px 6px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
#taskDrawer .accounting-calculation-tools svg {
    width: 14px;
    height: 14px;
}
#taskDrawer #accountingCalculationFiles {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
#taskDrawer #accountingCalculationSubmit {
    position: relative;
    grid-column: 3;
    justify-self: end;
    width: auto;
    min-width: 94px;
    min-height: 28px;
    margin-left: 10px;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}
#taskDrawer #accountingCalculationSubmit::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -7px;
    width: 1px;
    height: 16px;
    background: var(--line);
    transform: translateY(-50%);
}
#taskDrawer .accounting-calculation-file-name,
#taskDrawer .accounting-calculation-status {
    min-height: 0;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
#taskDrawer .accounting-calculation-file-name:empty,
#taskDrawer .accounting-calculation-status:empty {
    display: none;
}
#taskDrawer .accounting-calculation-status.error {
    color: var(--danger);
}

.column-add {
    display: none;
}

/* Figma sidebar, header and task people */
.app-sidebar {
    padding: 0 0 14px;
}
.sidebar-head {
    min-height: 60px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
}
.sidebar-head .sidebar-brand-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}
.sidebar-head .sidebar-brand-text {
    min-width: 0;
}
.sidebar-head .sidebar-brand-text h1 {
    font-size: 14px;
    font-weight: 700;
}
.sidebar-collapse-button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}
.sidebar-collapse-button:hover {
    color: var(--text);
    background: var(--chip);
}
.sidebar-collapse-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.sidebar-current-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: auto;
    padding: 12px 12px 0;
    border-top: 1px solid var(--line);
}
.sidebar-current-user .user-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    font-size: 11px;
}
.sidebar-current-user-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
.sidebar-current-user-copy strong,
.sidebar-current-user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-current-user-copy strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}
.sidebar-current-user-copy small {
    color: var(--muted);
    font-size: 10px;
}
:root[data-sidebar="collapsed"] .sidebar-head {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0;
}
:root[data-sidebar="collapsed"] .sidebar-head .sidebar-brand-mark,
:root[data-sidebar="collapsed"] .sidebar-head .sidebar-brand-text,
:root[data-sidebar="collapsed"] .sidebar-current-user-copy {
    display: none;
}
:root[data-sidebar="collapsed"] .sidebar-collapse-button {
    margin-left: 0;
}
:root[data-sidebar="collapsed"] .sidebar-current-user {
    justify-content: center;
    width: 100%;
    padding: 12px 0 0;
}
.topbar > .brand {
    display: flex;
    align-items: center;
}
.topbar > .brand > p {
    margin: 0;
}
.top-user.top-logout {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--chip);
}
.top-user.top-logout svg {
    display: block;
    width: 15px;
    height: 15px;
}
.top-user.top-logout:hover {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
    background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.task-people {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-right: auto;
}
.task-avatar-stack {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.task-person-avatar {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--panel);
    border-radius: 50%;
    color: #fff;
    background: var(--avatar-bg, #7857ff);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.task-person-avatar-text {
    font-size: 12px;
    line-height: 1;
}
.task-author-avatar {
    margin-left: -8px;
}
.task-author-name {
    overflow: hidden;
    max-width: 100px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Open task drawer: 500px reference width + 50px. */
#taskDrawer .drawer {
    width: 550px;
}

/* Create drawer parity with the task drawer. */
#taskDrawer .drawer {
    width: 550px;
}
#createDrawer .drawer {
    width: 550px;
    max-width: 100vw;
    margin-right: 0;
}
#createDrawer #createTaskForm {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}
#createDrawer .create-drawer-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 14px;
}
#createDrawer .create-drawer-kicker {
    display: block;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
#createDrawer .create-title-field {
    display: block;
    margin-top: 6px;
    font-size: 0;
}
#createDrawer .create-title-field input {
    width: 100%;
    height: auto;
    border: 0;
    padding: 0 !important;
    color: var(--text);
    background: transparent !important;
    box-shadow: none !important;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}
#createDrawer .create-title-field input:focus {
    outline: 0;
}
#createDrawer .create-drawer-head #createClose {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    min-height: 30px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0;
    color: var(--muted);
    background: var(--chip);
}
#createDrawer .create-drawer-head #createClose::before,
#createDrawer .create-drawer-head #createClose::after {
    display: none;
}
#createDrawer .create-drawer-head #createClose svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#createDrawer .create-main-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px;
}
#createDrawer label,
#createDrawer .create-files-section h3 {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .07em;
    text-transform: uppercase;
}
#createDrawer .create-select-control {
    position: relative;
    display: block;
    margin-top: 6px;
}
#createDrawer .create-select-control::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 11px;
    z-index: 1;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2f65a7;
    box-shadow: 0 0 6px currentColor;
    transform: translateY(-50%);
    pointer-events: none;
}
#createDrawer .create-payment-control::before {
    background: #c91f1f;
}
#createDrawer .create-priority-control:has(option[value="high"]:checked)::before {
    background: #ffad1f;
}
#createDrawer .create-priority-control:has(option[value="low"]:checked)::before {
    background: #8a8aa8;
}
#createDrawer .create-payment-control:has(option[value="paid"]:checked)::before {
    background: #22c55e;
}
#createDrawer .create-select-control select {
    width: 100%;
    height: 34px;
    min-height: 34px;
    border-color: var(--line);
    border-radius: 6px;
    padding: 0 28px 0 16px;
    text-indent: 14px;
    color: var(--text);
    background: var(--panel-3);
    font-size: 13px;
    font-weight: 400;
}

#createDrawer .create-description-label {
    display: grid;
    gap: 8px;
    margin: 16px 20px 0;
}
#createDrawer .create-editor-shell {
    display: block;
}
#createDrawer .editor-toolbar {
    min-height: 29px;
    padding: 4px 8px;
}
#createDrawer .editor-toolbar > button {
    min-width: 22px;
    height: 21px;
    padding: 2px 4px;
}
#createDrawer .editor-toolbar > button svg {
    width: 13px;
    height: 13px;
}
#createDrawer .create-rich-description {
    display: block;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 0 0 6px 6px;
    padding: 11px 13px;
    color: var(--text);
    background: var(--panel-3);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    text-transform: none;
    outline: none;
}
#createDrawer .create-rich-description:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

#createDrawer .create-files-section {
    display: grid;
    gap: 8px;
    margin: 18px 20px 0;
}
#createDrawer .create-files-section h3 {
    margin: 0;
}
#createDrawer .create-files-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
#createDrawer .create-file-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 29px;
    min-height: 29px;
    border-radius: 6px;
    padding: 0 9px;
    color: var(--muted);
    background: transparent;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
#createDrawer .create-file-action svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}
#createDrawer .create-attachment-preview {
    display: grid;
    gap: 7px;
    margin: 0;
}
#createDrawer .create-attachment-preview[hidden] {
    display: none;
}
#createDrawer .create-attachment-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
    min-height: 51px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--panel-3);
}
#createDrawer .create-attachment-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 13%, var(--panel-3));
}
#createDrawer .create-attachment-icon svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}
#createDrawer .create-attachment-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}
#createDrawer .create-attachment-name {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#createDrawer .create-attachment-size {
    color: var(--muted);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 10.5px;
}
#createDrawer .create-attachment-remove {
    position: static;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 5px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}
#createDrawer .create-attachment-remove svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}
#createDrawer .create-file-drop-zone {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    border: 1.5px dashed var(--line);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--muted);
    background: transparent;
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
#createDrawer .create-file-drop-zone.drag-over {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
}
#createDrawer .create-file-drop-zone svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

#createDrawer .create-meta-row,
#createDrawer .create-deadline-row,
#createDrawer .create-people-row {
    gap: 10px;
    margin: 16px 20px 0;
}
#createDrawer .create-deadline-row {
    grid-template-columns: 1fr;
}
#createDrawer .create-meta-control {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 6px;
}
#createDrawer .create-meta-control > svg {
    position: absolute;
    left: 11px;
    z-index: 1;
    width: 13px;
    height: 13px;
    color: var(--muted);
    stroke: currentColor;
    pointer-events: none;
}
#createDrawer .create-meta-control > input {
    width: 100%;
    height: 34px;
    padding-left: 32px !important;
    font-size: 12px;
}
#createDrawer .create-people-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
#createDrawer .create-people-row > label:only-child {
    grid-column: 1 / -1;
}
#createDrawer .create-person-select {
    position: relative;
    display: block;
    height: 50px;
    margin-top: 6px;
}
#createDrawer .create-person-select > select {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
#createDrawer .create-person-display {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 13px;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 9px;
    color: var(--text);
    background: var(--panel-3);
}
#createDrawer .create-person-select .create-person-display {
    position: absolute;
    inset: 0;
    margin: 0;
}
#createDrawer .create-author-display {
    grid-template-columns: 26px minmax(0, 1fr);
}
#createDrawer .create-person-avatar {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    background: var(--avatar-bg, #7857ff);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
}
#createDrawer .create-person-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
#createDrawer .create-person-copy strong,
#createDrawer .create-person-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#createDrawer .create-person-copy strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}
#createDrawer .create-person-copy small {
    color: var(--muted);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    font-weight: 400;
    text-transform: lowercase;
}
#createDrawer .create-person-display > svg {
    width: 13px;
    height: 13px;
    color: var(--muted);
    stroke: currentColor;
}
#createDrawer .create-actions {
    margin: 18px 20px 20px;
}
#createDrawer .create-actions .button {
    width: 100%;
    min-height: 38px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 560px) {
    #createDrawer .create-drawer-head {
        padding: 15px 16px 13px;
    }
    #createDrawer .create-main-fields {
        padding: 10px 16px;
    }
    #createDrawer .create-description-label,
    #createDrawer .create-files-section,
    #createDrawer .create-meta-row,
    #createDrawer .create-deadline-row,
    #createDrawer .create-people-row,
    #createDrawer .create-actions {
        margin-right: 16px;
        margin-left: 16px;
    }
    #createDrawer .create-people-row {
        grid-template-columns: 1fr;
    }
    #createDrawer .create-file-action span {
        display: none;
    }
    #createDrawer .create-file-action {
        width: 30px;
        padding: 0;
    }
}
/* Open card targeted field layout fix */
#taskDrawer .drawer-main-fields {
    grid-template-columns: minmax(0, 300px) minmax(0, 220px) !important;
    justify-content: start;
    align-items: start;
    gap: 18px;
}
#taskDrawer .drawer-main-fields .field-with-dot > .field-dot:not(.field-select-dot) {
    display: none !important;
}
#taskDrawer .drawer-main-fields .field-select-button {
    min-height: 58px !important;
    height: 58px !important;
    border-radius: 14px !important;
    padding: 0 18px !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}
#taskDrawer .drawer-main-fields .field-select-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot {
    width: 12px !important;
    height: 12px !important;
    flex: 0 0 12px;
}
#taskDrawer .drawer-main-fields .field-select-button svg {
    width: 18px !important;
    height: 18px !important;
}
#taskDrawer .drawer-main-fields [data-select-shell="priority"] .field-select-button .field-dot {
    background: #ffad1f !important;
}
#taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button .field-dot {
    background: #c91f1f !important;
}

@media (max-width: 700px) {
    #taskDrawer .drawer-main-fields {
        grid-template-columns: 1fr !important;
    }
}

/* Open card targeted field compact */
#taskDrawer .drawer-main-fields {
    grid-template-columns: 220px 170px !important;
    gap: 14px !important;
}
#taskDrawer .drawer-main-fields .field-select-button {
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    font-weight: 650 !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot {
    width: 10px !important;
    height: 10px !important;
    flex-basis: 10px !important;
}
#taskDrawer .drawer-main-fields .field-select-button svg {
    width: 15px !important;
    height: 15px !important;
}

/* Open card targeted field font */
#taskDrawer .drawer-main-fields .field-select-button {
    font-size: 12px !important;
    font-weight: 400 !important;
}

/* Open card targeted field dynamic colors */
#taskDrawer .drawer-main-fields .field-select-button .field-dot.priority-high {
    background: #ffad1f !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot.priority-medium {
    background: #2f65a7 !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot.priority-low {
    background: #8a8aa8 !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot.payment-unpaid {
    background: #c91f1f !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot.payment-paid {
    background: #22c55e !important;
}
#taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button:has(.payment-paid) {
    border-color: #d8f1e2 !important;
    color: #13743d !important;
    background: #f4fff7 !important;
}
#taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button:has(.payment-unpaid) {
    border-color: #f8e3e3 !important;
    color: #c72222 !important;
    background: #fffafa !important;
}

/* Header, board status badge, and compact task cards */
.topbar {
    grid-template-columns: minmax(260px, max-content) minmax(320px, 520px) minmax(300px, 1fr);
}
.top-actions::before {
    display: none;
}
.top-user {
    min-height: 40px;
    margin-left: 8px;
    border-left: 1px solid var(--line);
    padding-left: 20px;
}
.filter-toolbar {
    justify-content: flex-start;
}

.task p {
    -webkit-line-clamp: 2;
}
.task-footer {
    margin-top: 2px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}
.task .payment-paid {
    margin-left: 0;
}
.task-payment-row {
    display: flex;
    margin-top: 8px;
}
.task-payment-row .tag {
    gap: 6px;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
}
.task .task-payment-row .payment-paid {
    display: inline-flex;
    align-items: center;
    color: #2fc98a;
    background: #ddf5ed;
}
.task .task-payment-row .payment-paid::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}
.task-attachment-status {
    display: inline-grid;
    place-items: center;
    order: 99;
    width: 26px;
    height: 26px;
    margin-left: auto;
    color: var(--muted);
    flex: 0 0 26px;
}
.task-attachment-status svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

#taskDrawer .drawer-status-badge {
    --drawer-status-color: var(--status-archived);
    color: var(--drawer-status-color);
    background: color-mix(in srgb, var(--drawer-status-color) 13%, transparent);
}
#taskDrawer .drawer-status-badge[data-status="new"] {
    --drawer-status-color: var(--status-new);
}
#taskDrawer .drawer-status-badge[data-status="print"],
#taskDrawer .drawer-status-badge[data-status="review"],
#taskDrawer .drawer-status-badge[data-status="printing"] {
    --drawer-status-color: var(--status-print);
}
#taskDrawer .drawer-status-badge[data-status="work"],
#taskDrawer .drawer-status-badge[data-status="in_work"],
#taskDrawer .drawer-status-badge[data-status="progress"],
#taskDrawer .drawer-status-badge[data-status="process"] {
    --drawer-status-color: var(--status-work);
}
#taskDrawer .drawer-status-badge[data-status="done"] {
    --drawer-status-color: var(--status-done);
}
:root[data-theme="dark"] #taskDrawer .drawer-status-badge {
    color: var(--drawer-status-color);
    background: color-mix(in srgb, var(--drawer-status-color) 18%, transparent);
}

@media (max-width: 900px) {
    .top-user {
        min-height: 0;
        margin-left: 0;
        border-left: 0;
        padding-left: 0;
    }
}
        /* Employees table — reference-aligned layout. */
        #employeesPage.employees-page {
            min-height: 100vh;
            padding: 36px 32px 48px;
            color: #14233a;
            background: #f8faff;
        }
        #employeesPage .employees-page-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            height: auto;
            padding: 0;
            border: 0;
            background: transparent;
        }
        #employeesPage .employees-page-head > div:first-child { display: block; }
        #employeesPage .employees-page-head h2 {
            color: #14233a;
            font-size: 28px;
            font-weight: 800;
            letter-spacing: -.04em;
        }
        #employeesPage .employees-page-head p {
            margin-top: 8px;
            color: #697386;
            font-size: 14px;
        }
        #employeesPage .employees-page-tools { gap: 10px; }
        #employeesPage .employees-search {
            width: 230px;
            height: 44px;
            border-color: #dde3ef;
            border-radius: 9px;
            background: #fff;
        }
        #employeesPage .employees-add-button {
            height: 44px;
            border-radius: 9px;
            padding: 0 18px;
            background: #4b49d8;
            font-size: 13px;
            box-shadow: 0 6px 16px rgba(75,73,216,.18);
        }
        #employeesPage .employees-stats {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
            padding: 30px 0 0;
        }
        #employeesPage .employee-stat-card {
            justify-content: space-between;
            min-height: 96px;
            border-color: #dce3f0;
            border-radius: 12px;
            padding: 20px;
            background: #f0f4ff;
            box-shadow: none;
        }
        #employeesPage .employee-stat-card > span { display: grid; gap: 8px; }
        #employeesPage .employee-stat-card small {
            color: #71798a;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .07em;
            text-transform: uppercase;
        }
        #employeesPage .employee-stat-card strong {
            display: block;
            width: auto;
            height: auto;
            border-radius: 0;
            color: #14233a;
            background: transparent;
            font-family: inherit;
            font-size: 30px;
            font-weight: 800;
            line-height: 1;
        }
        #employeesPage .employee-stat-card i {
            display: grid;
            place-items: center;
            width: 50px;
            height: 50px;
            border-radius: 10px;
            font-style: normal;
        }
        #employeesPage .employee-stat-card i svg {
            width: 24px;
            height: 24px;
            stroke: currentColor;
            stroke-width: 2;
        }
        #employeesPage .employee-stat-purple i { color: #5c5ee5; background: #dce3ff; }
        #employeesPage .employee-stat-orange i { color: #a66c00; background: #f7ead4; }
        #employeesPage .employee-stat-green i { color: #238761; background: #d7eee7; }
        #employeesPage .new-employee-panel { margin: 18px 0 0; }
        #employeesPage .employees-table {
            overflow: hidden;
            margin-top: 30px;
            border: 1px solid #e2e7f0;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 4px 18px rgba(25,35,58,.05);
        }
        #employeesPage .employees-table-head,
        #employeesPage .employee-profile-card {
            display: grid;
            grid-template-columns: minmax(210px, 1.6fr) minmax(140px, 1.2fr) minmax(220px, 2fr) minmax(120px, .8fr) minmax(110px, .9fr) 36px;
            align-items: center;
            column-gap: 18px;
        }
        #employeesPage .employees-table-head {
            min-width: 920px;
            min-height: 50px;
            padding: 0 24px;
            color: #596174;
            background: #eef3ff;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .025em;
            text-transform: uppercase;
        }
        #employeesPage .employees-table-body {
            display: block;
            min-width: 920px;
        }
        #employeesPage .employee-card-form {
            display: block;
            border: 0;
            border-radius: 0;
            padding: 0;
            background: transparent;
        }
        #employeesPage .employee-profile-card {
            position: static;
            width: 100%;
            min-height: 74px;
            border: 0;
            border-top: 1px solid #edf0f5;
            border-radius: 0;
            padding: 0 24px;
            color: #283247;
            background: #fff;
            box-shadow: none;
            cursor: pointer;
            text-align: left;
        }
        #employeesPage .employee-profile-card:hover {
            border-color: #edf0f5;
            background: #f9faff;
            box-shadow: none;
        }
        #employeesPage .employee-card-title {
            display: contents;
        }
        #employeesPage .employee-profile-card .employee-avatar {
            position: static;
            grid-column: 1;
            width: 38px;
            height: 38px;
            font-size: 12px !important;
            justify-self: start;
        }
        #employeesPage .employee-card-name-row {
            display: contents;
            min-height: 0;
        }
        #employeesPage .employee-card-name-row strong {
            grid-column: 1;
            padding-left: 50px;
            color: #1d2c44;
            font-size: 14px;
            font-weight: 700;
        }
        #employeesPage .employee-role {
            grid-column: 2;
            min-height: 0;
            padding: 0;
            color: #444c5f;
            background: transparent;
            font-size: 13px;
            font-weight: 500;
        }
        #employeesPage .employee-card-divider { display: none; }
        #employeesPage .employee-email-row {
            display: block;
            grid-column: 3;
            overflow: hidden;
            margin: 0;
            color: #50586b;
            font-size: 13px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        #employeesPage .employee-mail-icon { display: none; }
        #employeesPage .employee-email-row [data-employee-summary="email"] {
            color: inherit;
            font-family: inherit;
            font-size: inherit;
        }
        #employeesPage .employee-card-meta { display: contents; }
        #employeesPage .employee-card-meta .mailbox-toggle { display: none; }
        #employeesPage .employee-task-count {
            display: inline-grid;
            grid-column: 4;
            place-items: center;
            justify-self: start;
            min-width: 34px;
            height: 34px;
            border-radius: 999px;
            padding: 0 8px;
            color: #5356d8;
            background: #eef0ff;
            font-size: 13px;
            font-weight: 700;
        }
        #employeesPage .account-status {
            display: inline-flex;
            grid-column: 5;
            justify-self: start;
            min-height: 24px;
            border-radius: 999px;
            padding: 4px 9px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
        }
        #employeesPage .account-status.active { color: #237b5b; background: #e7f3ee; }
        #employeesPage .account-status.inactive { color: #6e7280; background: #f0f0f4; }
        #employeesPage .employee-row-action {
            grid-column: 6;
            color: #53596a;
            font-size: 24px;
            line-height: 1;
            text-align: center;
        }
        #employeesPage .employees-table-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-width: 920px;
            min-height: 58px;
            border-top: 1px solid #edf0f5;
            padding: 0 24px;
            color: #6a7283;
            font-size: 12px;
        }
        #employeesPage .employee-card-form[hidden] { display: none; }
        :root[data-theme="dark"] #employeesPage.employees-page { color: #e5e7f0; background: #0b0b12; }
        :root[data-theme="dark"] #employeesPage .employees-page-head h2,
        :root[data-theme="dark"] #employeesPage .employee-stat-card strong,
        :root[data-theme="dark"] #employeesPage .employee-card-name-row strong { color: #eceef8; }
        :root[data-theme="dark"] #employeesPage .employees-page-head p,
        :root[data-theme="dark"] #employeesPage .employee-stat-card small { color: #989caf; }
        :root[data-theme="dark"] #employeesPage .employees-search,
        :root[data-theme="dark"] #employeesPage .employee-stat-card,
        :root[data-theme="dark"] #employeesPage .employees-table,
        :root[data-theme="dark"] #employeesPage .employee-profile-card { border-color: #282a38; background: #12131b; }
        :root[data-theme="dark"] #employeesPage .employees-table-head { color: #aeb2c1; background: #1a1c28; }
        :root[data-theme="dark"] #employeesPage .employee-profile-card { border-top-color: #282a38; }
        :root[data-theme="dark"] #employeesPage .employee-profile-card:hover { background: #181a25; }
        :root[data-theme="dark"] #employeesPage .employee-role,
        :root[data-theme="dark"] #employeesPage .employee-email-row { color: #c4c7d4; }
@media (max-width: 900px) {
    #employeesPage.employees-page { padding: 24px 16px 96px; }
    #employeesPage .employees-page-head { align-items: stretch; flex-direction: column; gap: 20px; }
    #employeesPage .employees-page-tools { width: 100%; }
    #employeesPage .employees-search { flex: 1 1 auto; width: auto; }
    #employeesPage .employees-stats { grid-template-columns: 1fr; }
    #employeesPage .employees-table { overflow-x: auto; }
}

/* Employees table row alignment fix. */
#employeesPage .employee-profile-card {
    height: 56px;
    min-height: 56px;
}
#employeesPage .employee-profile-card .employee-avatar {
    grid-row: 1 !important;
    align-self: center;
    width: 30px;
    height: 30px;
    font-size: 10px !important;
}
#employeesPage .employee-card-name-row strong {
    grid-row: 1;
    align-self: center;
    padding-left: 42px;
    line-height: 1.2;
}
#employeesPage .employee-role,
#employeesPage .employee-email-row,
#employeesPage .employee-task-count,
#employeesPage .account-status,
#employeesPage .employee-row-action {
    grid-row: 1;
    align-self: center;
    margin: 0;
}
#employeesPage .employee-task-count {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
}
#employeesPage .account-status {
    min-height: 22px;
    padding: 3px 8px;
    font-size: 10px;
}

/* Mobile layout stabilization. Keep this after desktop design overrides. */
@media (max-width: 900px) {
    html,
    body,
    .app-shell,
    .workspace {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        gap: 10px;
        padding: 12px 16px;
    }
    .topbar .brand {
        min-width: 0;
    }
    .topbar .brand h1,
    .topbar .brand p {
        overflow-wrap: anywhere;
    }
    .topbar-search {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: none;
    }
    .top-actions {
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 6px;
    }
    #themeToggle {
        display: none;
    }
    .top-user {
        min-height: 36px;
        margin-left: 0;
        border-left: 0;
        padding-left: 0;
    }
    .top-user .sidebar-label,
    .top-user > svg {
        display: none;
    }

    main {
        max-width: 100%;
        overflow-x: auto;
    }
    .board {
        align-items: flex-start;
    }
    .column {
        height: max(360px, calc(100dvh - 278px));
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }

    .drawer-bg {
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
    }
    .drawer,
    #taskDrawer .drawer,
    #createDrawer .drawer {
        width: min(640px, 100vw);
        max-width: 100vw;
        margin-right: 0;
    }
    .drawer-bg.open .drawer {
        transition: none;
        transform: none !important;
    }

    body:has(.drawer-bg.open, .modal-bg.open, .preview-bg.open) .mobile-app-nav {
        display: none;
    }

    #employeesPage .employees-table {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    #employeesPage .employees-table-head {
        display: none;
    }
    #employeesPage .employees-table-body {
        display: grid;
        min-width: 0;
        gap: 12px;
    }
    #employeesPage .employee-card-form {
        min-width: 0;
    }
    #employeesPage .employee-profile-card {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto auto;
        gap: 5px 12px;
        width: 100%;
        height: auto;
        min-height: 0;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 16px;
    }
    #employeesPage .employee-profile-card .employee-avatar {
        grid-column: 1;
        grid-row: 1 / 3 !important;
        align-self: start;
        width: 38px;
        height: 38px;
    }
    #employeesPage .employee-card-name-row strong {
        grid-column: 2;
        grid-row: 1;
        padding-left: 0;
        overflow-wrap: anywhere;
    }
    #employeesPage .employee-role {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
    }
    #employeesPage .employee-email-row {
        grid-column: 1 / -1;
        grid-row: 3;
        min-width: 0;
        padding-top: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #employeesPage .employee-task-count {
        grid-column: 1;
        grid-row: 4;
        justify-self: start;
    }
    #employeesPage .account-status {
        grid-column: 2;
        grid-row: 4;
        justify-self: start;
    }
    #employeesPage .employee-row-action {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
    }
    #employeesPage .employees-table-footer {
        min-width: 0;
        padding: 12px 0;
        gap: 12px;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    #taskDrawer .drawer-main-fields,
    #taskDrawer .drawer-meta-row {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
    }
    #taskDrawer .drawer-main-fields .field-select-button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 10px 12px;
    }
    .topbar .brand h1 {
        font-size: 21px;
    }
    .topbar .brand p {
        font-size: 11px;
    }
    .topbar-search {
        display: flex;
        height: 40px;
    }
    .top-actions .icon-button,
    .top-user .user-avatar {
        width: 36px;
        height: 36px;
    }
    .filter-rail {
        padding: 10px 12px;
    }
    .filter-toolbar {
        flex-wrap: nowrap;
    }
    .toolbar-select,
    #toggleFiltersPanel {
        flex: 1 1 0;
    }
    .toolbar-select select {
        width: 100%;
    }
    .reset-filter-button {
        flex: 0 0 auto;
    }

    .drawer,
    #taskDrawer .drawer,
    #createDrawer .drawer {
        width: 100vw;
        max-width: 100vw;
        border-left: 0;
    }

    #employeesPage.employees-page {
        padding-right: 12px;
        padding-left: 12px;
    }
    #employeesPage .employees-page-tools {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    #employeesPage .employees-add-button {
        width: 44px;
        padding: 0;
        font-size: 0;
    }
    #employeesPage .employees-add-button svg {
        margin: 0;
    }
    #employeesPage .employees-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Figma task drawer visual parity. */
#taskDrawer .drawer {
    width: 550px;
    max-width: 100vw;
    margin-right: 0;
    scrollbar-gutter: auto;
}
#taskDrawer .drawer-head {
    gap: 14px;
    padding: 16px 20px 14px;
}
#taskDrawer .drawer-head h2 {
    width: 100%;
    gap: 5px;
}
#taskDrawer .drawer-kicker {
    gap: 8px;
}
#taskDrawer .drawer-task-id {
    font-size: 11px;
    letter-spacing: .05em;
}
#taskDrawer .drawer-status-badge {
    gap: 6px;
    min-height: 22px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}
#taskDrawer .drawer-status-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
#taskDrawer .drawer input.drawer-title-input {
    margin-top: 3px;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
#taskDrawer .drawer h2 .inline-created {
    margin-top: 3px;
    font-size: 11px;
}
#taskDrawer .drawer-head .icon-button {
    width: 30px;
    height: 30px;
    margin-top: 0;
    border-radius: 6px;
    background: var(--chip);
}
#taskDrawer .drawer-head .icon-button::before,
#taskDrawer .drawer-head .icon-button::after {
    display: none;
}
#taskDrawer .drawer-head .icon-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#taskDrawer #editTaskForm {
    display: flex;
    gap: 0;
    padding: 0;
}
#taskDrawer .drawer-main-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px;
}
#taskDrawer .drawer-main-fields .field-select-button {
    width: 100%;
    min-height: 34px !important;
    height: 34px !important;
    border-color: var(--line) !important;
    border-radius: 6px !important;
    padding: 0 10px !important;
    color: var(--text) !important;
    background: var(--panel-3) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}
#taskDrawer .drawer-main-fields .field-select-button .field-dot {
    width: 8px !important;
    height: 8px !important;
    flex-basis: 8px !important;
    box-shadow: 0 0 6px currentColor;
}
#taskDrawer .drawer-main-fields .field-select-button svg {
    width: 13px !important;
    height: 13px !important;
}

#taskDrawer .description-editor-label {
    display: grid;
    gap: 8px;
    margin: 16px 20px 0;
}
#taskDrawer .editor-toolbar {
    min-height: 29px;
    padding: 4px 8px;
}
#taskDrawer .editor-toolbar > button,
#taskDrawer .editor-menu-wrap > button {
    min-width: 22px;
    height: 21px;
    padding: 2px 4px;
}
#taskDrawer .editor-toolbar > button svg,
#taskDrawer .editor-menu-wrap > button svg {
    width: 13px;
    height: 13px;
}
#taskDrawer .description-expand-button {
    margin-left: auto;
}
#taskDrawer .rich-description {
    min-height: 72px;
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.55;
}

#taskDrawer .files-section {
    gap: 8px;
    margin: 18px 20px 0;
}
#taskDrawer .files-section h3,
#taskDrawer .drawer label,
#taskDrawer .tabs + .tab-panel label {
    font-size: 10.5px;
    font-weight: 600;
}
#taskDrawer .files-head {
    align-items: flex-end;
}
#taskDrawer .files-actions {
    gap: 8px;
    flex-wrap: nowrap;
}
#taskDrawer .file-action-button {
    height: 29px;
    min-height: 29px;
    border-radius: 6px;
    padding: 0 9px;
    font-size: 11.5px;
}
#taskDrawer .file-action-button svg {
    width: 13px;
    height: 13px;
}
#taskDrawer .files-menu-button {
    display: none;
}
#taskDrawer .file-drop-zone {
    min-height: 0;
    border: 0;
    padding: 0;
}
#taskDrawer .file-grid {
    grid-template-columns: 1fr;
    gap: 7px;
}
#taskDrawer .file-card,
#taskDrawer .file-grid.table .file-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 51px;
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--panel-3);
}
#taskDrawer .file-open,
#taskDrawer .file-grid.table .file-open {
    display: grid;
    grid-column: 1;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
#taskDrawer .file-thumb,
#taskDrawer .file-grid.table .file-thumb {
    width: 38px;
    min-height: 38px;
    border-radius: 6px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 13%, var(--panel-3));
}
#taskDrawer .file-thumb svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}
#taskDrawer .file-thumb-img,
#taskDrawer .file-grid.table .file-thumb-img {
    width: 38px;
    height: 38px;
    object-fit: cover;
}
#taskDrawer .file-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}
#taskDrawer .file-name {
    font-size: 12px;
    font-weight: 600;
}
#taskDrawer .file-date {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 10.5px;
}
#taskDrawer .file-card-actions {
    grid-column: 2;
    align-self: center;
    gap: 3px;
}
#taskDrawer .file-download,
#taskDrawer .file-delete {
    width: 26px;
    height: 26px;
    border-color: transparent;
    border-radius: 5px;
    background: transparent;
}
#taskDrawer .file-download svg,
#taskDrawer .file-delete svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}
#taskDrawer .file-drop-hint {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 34px;
    margin-top: 7px;
    border: 1.5px dashed var(--line);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--muted);
    font-size: 11.5px;
}
#taskDrawer .file-drop-hint svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}
#taskDrawer .file-upload-panel {
    margin-top: 0;
}
#taskDrawer .payment-info {
    margin: 14px 20px 0;
}

#taskDrawer .drawer-meta-row,
#taskDrawer .drawer-deadline-row,
#taskDrawer .drawer-people-row {
    gap: 10px;
    margin: 16px 20px 0;
}
#taskDrawer .drawer-deadline-row {
    grid-template-columns: 1fr;
}
#taskDrawer .task-meta-field,
#taskDrawer .task-person-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}
#taskDrawer .task-meta-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}
#taskDrawer .task-meta-control > svg {
    position: absolute;
    left: 11px;
    z-index: 1;
    width: 13px;
    height: 13px;
    color: var(--muted);
    stroke: currentColor;
    pointer-events: none;
}
#taskDrawer .task-meta-control > input {
    width: 100%;
    height: 34px;
    padding-left: 32px !important;
    font-size: 12px;
}
#taskDrawer .task-tag-pills {
    position: absolute;
    left: 32px;
    right: 8px;
    z-index: 1;
    display: flex;
    gap: 4px;
    overflow: hidden;
    pointer-events: none;
}
#taskDrawer .task-tag-pills[hidden] {
    display: none;
}
#taskDrawer .task-tag-pills span {
    overflow: hidden;
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
#taskDrawer .task-tag-pills:not([hidden]) ~ input:not(:focus) {
    color: transparent;
    caret-color: transparent;
}
#taskDrawer .task-tags-control:focus-within .task-tag-pills {
    display: none;
}
#taskDrawer #editDueDate::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#taskDrawer .drawer-people-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
#taskDrawer .task-person-select {
    position: relative;
    display: block;
    min-width: 0;
    height: 50px;
}
#taskDrawer .task-person-select > select {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
#taskDrawer .task-person-display {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 13px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 9px;
    color: var(--text);
    background: var(--panel-3);
}
#taskDrawer .task-person-select:focus-within .task-person-display {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
}
#taskDrawer .task-person-avatar {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    background: var(--avatar-bg, #7857ff);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
}
#taskDrawer .task-person-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
#taskDrawer .task-person-copy strong,
#taskDrawer .task-person-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#taskDrawer .task-person-copy strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}
#taskDrawer .task-person-copy small {
    color: var(--muted);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    font-weight: 400;
}
#taskDrawer .task-person-display > svg {
    width: 13px;
    height: 13px;
    color: var(--muted);
    stroke: currentColor;
}
#taskDrawer .drawer-actions {
    margin: 16px 20px 0;
}

#taskDrawer .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 20px 20px 0;
}
#taskDrawer .tab {
    justify-content: center;
    min-width: 0;
    padding: 10px 6px;
    font-size: 12px;
    white-space: nowrap;
}
#taskDrawer .tab.active {
    background: transparent;
    font-weight: 600;
}
#taskDrawer .tab-panel {
    padding: 15px 20px 20px;
}
#taskDrawer #commentsList > .empty,
#taskDrawer #mailLogList > .empty,
#taskDrawer #historyList > .empty {
    border: 0;
    padding: 4px;
    background: transparent;
    font-size: 12px;
}
#taskDrawer #commentText {
    min-height: 80px;
    border-radius: 6px;
}
#taskDrawer .comment-actions .button {
    min-height: 36px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

/* Compact comment composer */
.sidebar-brand-mark {
    border-radius: 8px;
    background: url('/tracker-icon.svg?v=20260903-amber') center / contain no-repeat !important;
}
.sidebar-brand-mark svg { display: none; }
#taskDrawer #commentForm {
    gap: 8px;
}
#taskDrawer .comment-composer {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
}
#taskDrawer #commentText {
    min-height: 72px;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    resize: none;
    font-size: 12.5px;
    line-height: 1.55;
}
#taskDrawer #commentText:focus {
    outline: none;
    box-shadow: none;
}
#taskDrawer .comment-actions {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px;
    min-height: 38px;
    padding: 5px 7px;
    border-top: 1px solid var(--line);
}
#taskDrawer .comment-format-tools {
    display: flex;
    align-items: center;
    gap: 0;
}
#taskDrawer .comment-format-tools button,
#taskDrawer .comment-attach-tool {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 4px 6px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
#taskDrawer .comment-format-tools button:hover,
#taskDrawer .comment-attach-tool:hover { color: var(--text); }
#taskDrawer .comment-attach-tool svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}
#taskDrawer .comment-mail-deliveries {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
#taskDrawer .comment-mail-delivery {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 5px;
    color: var(--success);
    background: color-mix(in srgb, var(--success) 10%, transparent);
    font-size: 11px;
}
#taskDrawer .comment-mail-delivery.failed {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, transparent);
}
#taskDrawer .comment-mail-delivery button {
    padding: 2px 5px;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
#taskDrawer .comment-mail-options {
    justify-self: end;
    overflow: visible;
    border: 0;
    background: transparent;
}
#taskDrawer .comment-mail-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
#taskDrawer .comment-mail-toggle:has(input:checked) {
    border-color: color-mix(in srgb, var(--brand) 45%, transparent);
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}
#taskDrawer .comment-mail-icon {
    width: 12px;
    height: 12px;
}
#taskDrawer .comment-mail-details {
    display: none;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
    border-radius: 7px;
    background: var(--panel-2);
}
#taskDrawer #commentForm:has(#commentReplyToMailAuthor:checked) > .comment-mail-details { display: grid; }
#taskDrawer .comment-mail-recipient,
#taskDrawer .comment-mail-file {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
}
#taskDrawer .comment-mail-recipient > span,
#taskDrawer .comment-mail-file > span:first-child {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
#taskDrawer .comment-mail-recipient code {
    color: var(--text);
    font-size: 11.5px;
}
#taskDrawer .comment-mail-file-button {
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
}
#taskDrawer .comment-mail-file-button svg {
    width: 11px;
    height: 11px;
}
#taskDrawer .comment-mail-file-name { font-size: 11px; }
#taskDrawer .comment-actions .button {
    position: relative;
    min-height: 28px;
    margin-left: 10px;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}
#taskDrawer .comment-actions .button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -7px;
    width: 1px;
    height: 16px;
    background: var(--line);
    transform: translateY(-50%);
}
#taskDrawer .comment-delete-actions {
    display: flex;
    justify-content: flex-end;
}
#taskDrawer .comment-delete-actions .danger-subtle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    height: 30px;
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0;
}
#taskDrawer .comment-delete-actions .danger-subtle svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

#taskDrawer .drawer label,
#taskDrawer .files-section h3,
#taskDrawer .tabs + .tab-panel label,
#createDrawer label,
#createDrawer .create-files-section h3,
#taskDrawer .comment-mail-recipient > span,
#taskDrawer .comment-mail-file > span:first-child {
    letter-spacing: 0;
    text-transform: none;
}
#taskDrawer #historyList {
    display: grid;
    gap: 9px;
}
#taskDrawer #historyList .feed-item {
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 3px 10px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
#taskDrawer #historyList .feed-item::before {
    content: "";
    grid-column: 1;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}
#taskDrawer #historyList .feed-item strong {
    grid-column: 2;
    color: var(--text);
    font-size: 12px;
    font-weight: 400;
}
#taskDrawer #historyList .feed-item p {
    grid-column: 2 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}
#taskDrawer #historyList .feed-item small {
    grid-column: 3;
    grid-row: 1;
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    white-space: nowrap;
}

:root[data-theme="dark"] #taskDrawer .file-card,
:root[data-theme="dark"] #taskDrawer .task-person-display,
:root[data-theme="dark"] #taskDrawer .task-meta-control > input,
:root[data-theme="dark"] #taskDrawer .drawer-main-fields .field-select-button {
    background: var(--panel-3) !important;
}

@media (max-width: 560px) {
    #taskDrawer .drawer-head {
        padding: 15px 16px 13px;
    }
    #taskDrawer .drawer-main-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: 10px 16px;
    }
    #taskDrawer .description-editor-label,
    #taskDrawer .files-section,
    #taskDrawer .drawer-meta-row,
    #taskDrawer .drawer-deadline-row,
    #taskDrawer .drawer-people-row,
    #taskDrawer .drawer-actions {
        margin-right: 16px;
        margin-left: 16px;
    }
    #taskDrawer .tabs {
        margin-right: 16px;
        margin-left: 16px;
    }
    #taskDrawer .tab-panel {
        padding-right: 16px;
        padding-left: 16px;
    }
    #taskDrawer .file-action-button span {
        display: none;
    }
    #taskDrawer .file-action-button {
        width: 30px;
        padding: 0;
    }
    #taskDrawer .drawer-people-row {
        grid-template-columns: 1fr;
    }
    #taskDrawer .task-person-select {
        height: 48px;
    }
    #taskDrawer .tab {
        font-size: 11px;
    }
}

/* Dark theme and list-menu corrections. */
:root[data-theme="dark"] .task-tag {
    color: #86efac;
    background: rgba(34, 197, 94, .18);
}
:root[data-theme="dark"] .task-tag:nth-child(4n + 2) {
    color: #fcd34d;
    background: rgba(245, 158, 11, .18);
}
:root[data-theme="dark"] .task-tag:nth-child(4n + 3) {
    color: #c4b5fd;
    background: rgba(139, 92, 246, .2);
}
:root[data-theme="dark"] .task-tag:nth-child(4n + 4) {
    color: #67e8f9;
    background: rgba(6, 182, 212, .18);
}

:root[data-theme="dark"] #taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button {
    border-color: var(--line) !important;
    color: var(--text) !important;
    background: var(--panel-3) !important;
}
:root[data-theme="dark"] #taskDrawer .drawer-main-fields [data-select-shell="payment"] .field-select-button .field-dot {
    box-shadow: none;
}

#taskDrawer #listMenuButton {
    width: 22px;
    min-width: 22px;
    overflow: hidden;
    padding: 2px 4px;
}
#taskDrawer .editor-menu {
    top: calc(100% + 4px);
    min-width: 154px;
    border-radius: 6px;
    padding: 4px;
}
#taskDrawer .editor-menu button {
    min-height: 28px;
    border-radius: 4px;
    padding: 5px 7px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

:root[data-theme="dark"] #employeesPage.employees-page {
    color: var(--text);
    background: var(--bg);
}
:root[data-theme="dark"] #employeesPage .employees-page-head h2,
:root[data-theme="dark"] #employeesPage .employee-stat-card strong,
:root[data-theme="dark"] #employeesPage .employee-card-name-row strong {
    color: var(--text);
}
:root[data-theme="dark"] #employeesPage .employees-page-head p,
:root[data-theme="dark"] #employeesPage .employee-stat-card small,
:root[data-theme="dark"] #employeesPage .employee-role,
:root[data-theme="dark"] #employeesPage .employee-email-row,
:root[data-theme="dark"] #employeesPage .employees-table-footer {
    color: var(--muted);
}
:root[data-theme="dark"] #employeesPage .employees-search,
:root[data-theme="dark"] #employeesPage .employee-stat-card,
:root[data-theme="dark"] #employeesPage .employees-table,
:root[data-theme="dark"] #employeesPage .employee-profile-card {
    border-color: var(--line);
    background: var(--panel);
}
:root[data-theme="dark"] #employeesPage .employees-table-head {
    color: var(--muted);
    background: var(--panel-2);
}
:root[data-theme="dark"] #employeesPage .employee-profile-card {
    border-top-color: var(--line);
}
:root[data-theme="dark"] #employeesPage .employee-profile-card:hover {
    background: var(--panel-2);
}

/* Compact board header and navigation. */
.topbar {
    grid-template-columns: minmax(230px, max-content) minmax(0, 1fr) auto;
    gap: 18px;
    min-height: 68px;
    padding: 10px 24px;
}
.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}
.topbar-tools .topbar-search {
    flex: 1 1 300px;
    max-width: 480px;
    height: 38px;
}
.topbar #filters {
    display: block;
    flex: 0 0 auto;
    border: 0;
    padding: 0;
    background: transparent;
}
.topbar #filters .section {
    gap: 0;
}
.topbar #filters .filter-form {
    display: block;
}
.topbar #filters .filter-toolbar {
    flex-wrap: nowrap;
}
.topbar #filters .filter-summary,
.topbar #filters .employee-section {
    display: none !important;
}
.topbar #filters .filter-panel {
    right: 0;
    left: auto;
}
.top-actions {
    min-height: 40px;
    border-left: 1px solid var(--line);
    padding-left: 18px;
}
.workspace:has(.layout.employees-open) .topbar-tools {
    display: none;
}
.workspace:has(.layout.employees-open) .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.sidebar-create.button,
.nav-item {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.column h2 {
    min-height: 52px;
    margin-bottom: 10px;
    padding: 12px 14px;
    font-size: 15px;
}
.column-title-wrap {
    gap: 10px;
}
.column-count {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .topbar-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }
    .topbar-tools .topbar-search {
        max-width: none;
    }
}

/* Admin analytics */
.analytics-page { min-width: 0; padding: 24px 28px 48px; background: var(--bg); }
.analytics-page[hidden], .analytics-drawer[hidden], .analytics-drawer-overlay[hidden] { display: none !important; }
.analytics-header { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.analytics-header h2 { margin: 0; color: var(--text); font-size: 24px; font-weight: 700; }
.analytics-header p { margin: 5px 0 0; color: var(--muted); }
.analytics-refresh-state { margin-left: auto; color: var(--muted); font-size: 11px; }
.analytics-refresh-state::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.analytics-filters { display: flex; align-items: end; gap: 10px; margin-bottom: 22px; }
.analytics-filters label { display: grid; gap: 5px; min-width: 145px; }
.analytics-filters label span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.analytics-filters input, .analytics-filters select { height: 36px; border-radius: 7px; padding: 0 10px; background: var(--panel-3); font-size: 12px; }
.analytics-reset { height: 36px; border: 0; padding: 0 10px; color: var(--brand-2); background: transparent; cursor: pointer; }
.analytics-loading, .analytics-error, .analytics-empty { padding: 34px 18px; color: var(--muted); text-align: center; }
.analytics-error { border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 10px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.analytics-section { margin-bottom: 24px; }
.analytics-section > h3 { margin: 0 0 12px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.analytics-kpis { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; }
.analytics-kpi { position: relative; min-height: 140px; border: 1px solid var(--card-border); border-radius: 12px; padding: 18px 20px; color: var(--text); background: var(--card-bg); text-align: left; cursor: pointer; transition: background .15s, box-shadow .15s, transform .15s; }
.analytics-kpi:hover { background: var(--card-hover); box-shadow: 0 8px 22px var(--shadow); transform: translateY(-1px); }
.analytics-kpi:focus-visible, .analytics-row-metrics button:focus-visible, .analytics-task-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analytics-kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; }
.analytics-kpi-icon svg, .analytics-kpi-arrow svg { width: 17px; height: 17px; stroke: currentColor; }
.analytics-kpi.blue .analytics-kpi-icon { color: var(--status-new); background: color-mix(in srgb, var(--status-new) 16%, transparent); }
.analytics-kpi.violet .analytics-kpi-icon { color: var(--status-work); background: color-mix(in srgb, var(--status-work) 16%, transparent); }
.analytics-kpi.green .analytics-kpi-icon { color: var(--status-done); background: color-mix(in srgb, var(--status-done) 15%, transparent); }
.analytics-kpi.red .analytics-kpi-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.analytics-kpi-arrow { position: absolute; top: 21px; right: 20px; color: var(--muted); }
.analytics-kpi > b { display: block; margin-top: 13px; color: var(--text); font: 600 26px "JetBrains Mono", ui-monospace, monospace; }
.analytics-kpi > strong { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.analytics-kpi > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.analytics-main-grid { display: grid; grid-template-columns: minmax(520px, 1fr) 320px; gap: 16px; align-items: start; }
.analytics-panel { overflow: hidden; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card-bg); }
.analytics-panel > header { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.analytics-panel > header h3 { margin: 0; color: var(--text); font-size: 13px; font-weight: 700; }
.analytics-panel > header small { margin-left: auto; color: var(--muted); }
.analytics-employee-row { padding: 13px 20px; border-bottom: 1px solid var(--line); }
.analytics-employee-row:last-child { border-bottom: 0; }
.analytics-employee-head { display: flex; align-items: center; gap: 9px; }
.analytics-employee-head strong { color: var(--text); font-size: 12.5px; font-weight: 600; }
.analytics-employee-head > span:last-child { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); font-size: 10px; }
.analytics-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--brand); font-size: 9px; font-weight: 700; }
.analytics-bar { display: flex; gap: 4px; height: 5px; margin-top: 9px; border-radius: 4px; overflow: hidden; background: var(--panel-3); }
.analytics-bar i { min-width: 0; border-radius: 4px; }
.analytics-bar .queue, .analytics-row-metrics i.queue { background: var(--status-new); }
.analytics-bar .work, .analytics-row-metrics i.work { background: var(--status-work); }
.analytics-bar .done, .analytics-row-metrics i.done { background: var(--status-done); }
.analytics-row-metrics { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.analytics-row-metrics button { display: flex; align-items: center; gap: 4px; border: 0; padding: 0; color: var(--muted); background: transparent; font-size: 10.5px; cursor: pointer; }
.analytics-row-metrics i { width: 6px; height: 6px; border-radius: 50%; }
.analytics-time { padding-bottom: 14px; }
.analytics-time-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 20px; }
.analytics-time-row strong { display: block; color: var(--text); font-size: 12px; font-weight: 500; }
.analytics-time-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.analytics-time-row b { align-self: center; color: var(--text); font: 600 18px "JetBrains Mono", ui-monospace, monospace; }
.analytics-drawer-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); }
.analytics-drawer { position: fixed; z-index: 81; top: 0; right: 0; width: min(430px, 100vw); height: 100vh; border-left: 1px solid var(--line); background: var(--panel-2); box-shadow: -4px 0 24px rgba(0,0,0,.4); transform: translateX(102%); transition: transform .18s; }
.analytics-drawer.open { transform: none; }
.analytics-drawer > header { display: flex; align-items: flex-start; min-height: 76px; border-bottom: 1px solid var(--line); padding: 16px 18px; }
.analytics-drawer > header h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; }
.analytics-drawer > header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.analytics-drawer > header button { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--panel-3); cursor: pointer; }
.analytics-drawer-list { height: calc(100vh - 76px); overflow-y: auto; padding: 12px 14px 28px; }
.analytics-task-row { display: block; width: 100%; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); background: var(--card-bg); text-align: left; cursor: pointer; }
.analytics-task-row:hover { background: var(--card-hover); }
.analytics-task-row > div { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.analytics-task-row em { border-radius: 999px; padding: 2px 6px; color: var(--status-work); background: color-mix(in srgb, var(--status-work) 15%, transparent); font-style: normal; }
.analytics-task-row em[data-status="new"] { color: var(--status-new); background: color-mix(in srgb, var(--status-new) 15%, transparent); }
.analytics-task-row em[data-status="done"] { color: var(--status-done); background: color-mix(in srgb, var(--status-done) 15%, transparent); }
.analytics-task-row > strong { display: block; margin: 5px 0 4px; color: var(--text); font-size: 12.5px; font-weight: 600; }
.analytics-task-row > small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; }
.analytics-task-row > small svg { width: 11px; height: 11px; stroke: currentColor; }

@media (max-width: 1100px) {
    .analytics-main-grid { grid-template-columns: 1fr; }
    .analytics-time { max-width: none; }
}
@media (max-width: 760px) {
    .analytics-page { padding: 18px 14px 96px; }
    .analytics-header { display: block; }
    .analytics-refresh-state { display: block; margin-top: 8px; }
    .analytics-filters { align-items: stretch; flex-wrap: wrap; }
    .analytics-filters label { flex: 1 1 140px; min-width: 0; }
    .analytics-kpis { grid-template-columns: 1fr; }
    .analytics-kpi { min-height: 126px; }
    .analytics-main-grid { display: block; }
    .analytics-time { margin-top: 12px; }
}

/* Keep the task comment composer aligned with the drawer fields. */
#taskDrawer #commentForm,
#taskDrawer .comment-composer {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}
#taskDrawer #commentForm { padding: 0; }
#taskDrawer .comment-actions {
    grid-template-columns: auto minmax(0, 1fr) max-content;
}
#taskDrawer .comment-format-tools { grid-column: 1; }
#taskDrawer .comment-mail-options { grid-column: 2; }
#taskDrawer #commentSubmitButton {
    grid-column: 3;
    justify-self: end;
    width: auto;
    min-width: 94px;
    flex: 0 0 auto;
}

/* Preserve the compact square controls and aligned header rule when collapsed. */
:root[data-sidebar="collapsed"] .app-sidebar {
    padding-top: 0;
}
:root[data-sidebar="collapsed"] .sidebar-create.button,
:root[data-sidebar="collapsed"] .nav-item {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
}

/* Figma filter and sort dropdowns. */
:root[data-theme="light"] {
    --bg: #fff;
    --text: #1a1a2e;
}
.topbar #filters .filter-form,
.topbar #filters .filter-toolbar {
    overflow: visible;
}
.topbar #filters .toolbar-select {
    position: relative;
    gap: 6px;
    overflow: visible;
}
.topbar #filters .toolbar-select select {
    width: auto;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 12px;
}
.topbar #filters .toolbar-select .sort-direction-select {
    min-width: 68px;
    border-left: 1px solid var(--line);
    padding-left: 8px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
}
.filter-active-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 5px;
    color: #fff;
    background: var(--brand);
    font-size: 10px;
    font-weight: 700;
}
.filter-active-count[hidden] {
    display: none;
}
.topbar #filters .filter-panel {
    display: block;
    top: calc(100% + 6px);
    right: 0;
    width: 260px;
    max-height: 380px;
    overflow: hidden auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0;
    background: var(--panel);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}
.topbar #filters .filter-panel[hidden] {
    display: none;
}
.filter-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px 8px;
}
.filter-panel-head strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}
.filter-panel-head .reset-filter-button {
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    cursor: pointer;
}
.filter-panel-section {
    display: grid;
    gap: 5px;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px 12px;
}
.filter-panel-section:last-child {
    border-bottom: 0;
}
.filter-panel-section > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.filter-panel-section select {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 9px;
    color: var(--text);
    background: var(--panel-3);
    font-size: 12px;
}

.sort-dropdown {
    position: relative;
}
.sort-dropdown .toolbar-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 11px;
    color: var(--muted);
    background: var(--panel-3);
    font-size: 12px;
    cursor: pointer;
}
.sort-dropdown .sort-chevron {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    transition: transform .15s ease;
}
.sort-dropdown .toolbar-select[aria-expanded="true"] .sort-chevron {
    transform: rotate(180deg);
}
.sort-panel {
    position: absolute;
    z-index: 210;
    top: calc(100% + 6px);
    right: 0;
    width: 220px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    background: var(--panel);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}
.sort-panel[hidden] {
    display: none;
}
.sort-panel > strong {
    display: block;
    padding: 6px 10px 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 8px 10px;
    color: var(--text);
    background: transparent;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}
.sort-option:hover,
.sort-option.active {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.sort-option span {
    flex: 1;
}
.sort-option em {
    color: var(--brand);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}
.filter-panel-section {
    gap: 1px;
    padding: 4px 8px 8px;
}
.filter-panel-section > span {
    padding: 8px 6px 5px;
}
.topbar #filters .filter-panel .filter-check-row {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
}
.filter-check-row:hover,
.filter-check-row.active {
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.filter-check-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.filter-check-row i {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    flex: 0 0 15px;
}
.filter-check-row input:checked + i {
    border-color: var(--brand);
    background: var(--brand);
}
.filter-check-row input:checked + i::after {
    width: 7px;
    height: 4px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    transform: translateY(-1px) rotate(-45deg);
}
.filter-check-row b {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--filter-dot, var(--muted));
    flex: 0 0 7px;
}
.filter-check-row span {
    flex: 1;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 400;
}
.filter-check-row.active span {
    color: var(--brand);
    font-weight: 600;
}

.column[data-status="done"] .task {
    opacity: .7;
    transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.column[data-status="done"] .task:hover,
.column[data-status="done"] .task.selected-task {
    opacity: 1;
}

@media (max-width: 700px) {
    .topbar-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
    }
    .topbar-tools .topbar-search {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
    }
    .topbar #filters {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
    }
    .topbar #filters .filter-toolbar {
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .topbar #filters .filter-panel {
        right: auto;
        left: 0;
    }
}

/* Figma task-card proportions. */
.task {
    position: relative;
    overflow: hidden;
    gap: 7px;
    margin: 0 9px 7px;
    border-radius: 8px;
    padding: 11px 12px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
}
.task strong,
.task-name {
    margin-top: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.task-number {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .05em;
}
.task-created-date {
    border-left: 1px solid var(--line);
    padding-left: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.task:not(:has(.task-created-date))::after {
    position: absolute;
    top: 11px;
    left: 54px;
    border-left: 1px solid var(--line);
    padding-left: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    content: attr(data-created-date-label);
}
.task-card-top {
    justify-content: flex-start;
    gap: 7px;
    margin-bottom: 8px;
}
.task-card-top .task-comment-attention {
    margin-left: auto;
}
.task-priority-badge {
    min-height: 0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 9.5px;
    font-weight: 700;
}
.task p {
    font-size: 11px;
    line-height: 1.4;
}
.task-tags-inline {
    flex: 0 1 auto;
    gap: 4px;
    width: fit-content;
}
.task-tags-inline .task-tag {
    padding: 2px 7px;
    font-size: 10.5px;
}
.task-payment-row {
    margin-top: 0;
}
.task-payment-row:has(.payment-paid) {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 0;
    margin: 0;
}
.task-payment-row .tag {
    min-height: 0;
    gap: 5px;
    padding: 2px 9px;
    font-size: 10.5px;
    font-weight: 600;
}
.task .task-payment-row .payment-paid {
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0 12px 0 0;
    color: #22c55e;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
}
.task .task-payment-row .payment-paid::before {
    display: block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}
.task:has(.task-payment-row .payment-paid) .task-card-top {
    padding-right: 92px;
}
.task-footer {
    margin: 3px -12px 0;
    border-top: 1px solid var(--line);
    padding: 7px 12px;
    gap: 7px;
}
.task-author-name {
    max-width: 110px;
    font-size: 11px;
}
.task-attachment-status {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}
.task-attachment-status svg {
    width: 13px;
    height: 13px;
}
.task-restore-button {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0;
    color: var(--brand);
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.task-restore-button:hover {
    background: color-mix(in srgb, var(--brand) 18%, transparent);
}
.task-restore-button:disabled {
    opacity: .5;
    cursor: wait;
}
.task-restore-button svg {
    width: 18px;
    height: 18px;
    fill: none !important;
    stroke: #d97706 !important;
}

/* Figma tracker header proportions. */
.sidebar-head {
    min-height: 52px;
    height: 52px;
    padding: 0 12px;
}
.sidebar-head .sidebar-brand-mark {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}
.sidebar-head .sidebar-brand-text h1 {
    font-size: 13px;
    font-weight: 700;
}
.topbar {
    grid-template-columns: max-content minmax(300px, 1fr) auto;
    gap: 12px;
    min-height: 52px;
    height: 52px;
    padding: 0 16px;
    background: var(--panel);
}
.topbar .brand p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.topbar .brand p strong {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    color: var(--text);
    background: var(--panel-3);
    font-size: 11.5px;
    font-weight: 600;
}
.topbar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.topbar-tools .topbar-search {
    flex: 1 1 auto;
    width: min(480px, 100%);
    max-width: 480px;
    height: 34px;
    margin: 0 auto;
    border-radius: 8px;
}
.topbar #filters {
    flex: 0 0 auto;
    margin-left: auto;
}
.topbar #filters .toolbar-select,
.topbar #filters .toolbar-button {
    height: 34px;
    border-radius: 7px;
    padding-right: 11px;
    padding-left: 11px;
    font-size: 12px;
}
.top-actions {
    gap: 6px;
    min-height: 34px;
    border-left: 1px solid var(--line);
    padding-left: 10px;
    flex-wrap: nowrap;
}
.top-actions .icon-button,
.top-actions .top-logout {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0;
    background: var(--panel-3);
}
.top-actions .top-logout svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 1180px) {
    .topbar {
        height: auto;
        min-height: 52px;
        grid-template-columns: max-content minmax(0, 1fr) auto;
    }
    .topbar-tools {
        grid-column: auto;
        grid-row: auto;
    }
}


/* Task discussion directly below description */
#taskDrawer .drawer { display: flex; flex-direction: column; }
#taskDrawer #editTaskForm { display: contents; }
#taskDrawer #editTaskForm > * { order: 5; }
#taskDrawer .drawer-head { order: 0; }
#taskDrawer #editTaskForm > .drawer-main-fields { order: 1; }
#taskDrawer #editTaskForm > .description-editor-label { order: 2; }
#taskDrawer > .drawer > .tabs { order: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#taskDrawer > .drawer > .tab-panel { order: 4; }
#taskDrawer #commentsList .feed-item p {
    display: block;
    max-height: none;
    overflow: visible;
    -webkit-line-clamp: unset;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Compact task comments */
#taskDrawer #commentsList {
    display: grid;
    gap: 6px;
}
#taskDrawer #commentsList .comment-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--panel-3);
}
#taskDrawer .comment-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: var(--comment-avatar-bg, var(--brand));
    font-size: 11px;
    font-weight: 700;
}
#taskDrawer .comment-body {
    min-width: 0;
}
#taskDrawer .comment-head {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
}
#taskDrawer .comment-author {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#taskDrawer .comment-role {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--chip);
    font-size: 9px;
    font-weight: 700;
}
#taskDrawer .comment-role.author {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}
#taskDrawer .comment-role.customer {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
}
#taskDrawer .comment-time {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    white-space: nowrap;
}
#taskDrawer #commentsList .comment-text {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}
#taskDrawer #commentsList .comment-files {
    gap: 5px;
    margin-top: 7px;
}
#taskDrawer #commentsList .comment-file {
    gap: 5px;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
}
#taskDrawer #commentsList .comment-mail-deliveries {
    gap: 5px;
    margin-top: 6px;
}
#taskDrawer #commentsList .comment-mail-delivery {
    min-height: 20px;
    padding: 2px 5px;
    background: transparent;
    font-size: 10px;
}
#taskDrawer #commentsList .comment-mail-delivery svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}
@media (max-width: 620px) {
    #taskDrawer #commentsList .comment-item {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
        padding: 9px 10px;
    }
    #taskDrawer .comment-avatar {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    #taskDrawer .comment-head {
        flex-wrap: wrap;
    }
    #taskDrawer .comment-time {
        width: 100%;
        margin-left: 0;
    }
}


/* Exact task drawer hierarchy: meta row, description, discussion tabs */
#taskDrawer #editTaskForm > .drawer-main-fields {
    order: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: auto;
}
#taskDrawer #editTaskForm > .description-editor-label { order: 2; }
#taskDrawer > .drawer > .tabs {
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
#taskDrawer > .drawer > .tab-panel { order: 4; }
#taskDrawer > .drawer > .tab-panel:not(.active) { display: none; }
#taskDrawer > .drawer > .tab-panel.active { display: block; }


/* Task content tabs */
#taskDrawer > .drawer > .tabs {
    order: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
#taskDrawer #editTaskForm > .description-editor-label { order: 3; }
#taskDrawer > .drawer > .tab-panel { order: 3; }
#taskDrawer #editTaskForm > .tab-panel:not(.active) { display: none; }
#taskDrawer #editTaskForm > .tab-panel.active { display: block; }
#taskDrawer .tab { display: inline-flex; align-items: center; gap: 6px; }
#taskDrawer .tab-icon {
    position: relative;
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
#taskDrawer .tab-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
#taskDrawer .tab[data-tab="comments"].has-unread .tab-icon::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -4px;
    width: 7px;
    height: 7px;
    border: 2px solid var(--panel);
    border-radius: 50%;
    background: #ff3b30;
}
#taskDrawer .tab[data-tab="comments"].has-unread .tab-count {
    color: #fff;
    background: var(--brand);
}
#taskDrawer .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--panel-3);
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
}
#taskDrawer .description-editor-label.tab-panel {
    margin: 0;
    padding: 15px 20px 20px;
}
#taskDrawer .description-editor-label.tab-panel > :first-child {
    display: none;
}


/* Create drawer follows task drawer field hierarchy */
#createDrawer .create-main-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: end;
}
#createDrawer .create-main-fields > label { min-width: 0; }
@media (max-width: 700px) {
    #createDrawer .create-main-fields { grid-template-columns: 1fr !important; }
}


/* Description view mode */
#taskDrawer .description-edit-button {
    display: flex;
    width: max-content;
    margin: 0 0 10px auto;
}
#taskDrawer .description-edit-button[hidden] { display: none; }
#taskDrawer .description-editor-label:not(.is-editing) .editor-toolbar { display: none; }
#taskDrawer .description-editor-label:not(.is-editing) .editor-shell {
    border: 0;
    box-shadow: none;
    background: transparent;
}
#taskDrawer .description-editor-label:not(.is-editing) .rich-description {
    min-height: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}


/* Description save button placement */
#taskDrawer .description-editor-label .drawer-actions {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 0;
}
#taskDrawer .description-editor-label .drawer-actions[hidden] { display: none; }
#taskDrawer .description-editor-label .drawer-actions .button {
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
}


/* Save button inside description editor */
#taskDrawer .description-editor-label.is-editing .editor-shell {
    position: relative;
}
#taskDrawer .description-editor-label.is-editing .rich-description {
    padding-bottom: 50px;
}
#taskDrawer .description-editor-label .drawer-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    width: auto;
    margin: 0;
}
#taskDrawer .description-editor-label .drawer-actions .button {
    width: 110px;
    min-width: 110px;
}


/* Clean description view and edit control */
#taskDrawer .description-editor-label.tab-panel {
    position: relative;
}
#taskDrawer .description-edit-button {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 3;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--line) !important;
    border-radius: 6px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    font-size: 11.5px;
    font-weight: 500;
}
#taskDrawer .description-editor-label:not(.is-editing) .editor-shell,
#taskDrawer .description-editor-label:not(.is-editing) .rich-description {
    border: 0 !important;
    border-radius: 0;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
#taskDrawer .description-editor-label:not(.is-editing) .editor-shell {
    overflow: visible;
}


/* Compact edit description button */
#taskDrawer .description-edit-button {
    width: 96px;
    min-width: 96px;
    min-height: 26px;
    padding: 3px 6px;
    font-size: 11px;
}


/* Visible edit control and header delete action */
#taskDrawer .description-editor-label.tab-panel > #descriptionEditButton {
    display: flex !important;
}
#taskDrawer .description-editor-label.tab-panel > #descriptionEditButton[hidden] {
    display: none !important;
}
#taskDrawer .drawer-head #deleteTaskButton {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    min-height: 30px;
    margin-left: auto;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
}
#taskDrawer .drawer-head #deleteTaskButton svg {
    width: 14px;
    height: 14px;
}
#taskDrawer .drawer-head #drawerClose {
    margin-left: 6px;
}


/* Delete action matches close button */
#taskDrawer .drawer-head #deleteTaskButton {
    display: inline-grid;
    place-items: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 6px;
}
#taskDrawer .drawer-head #deleteTaskButton span {
    display: none;
}
#taskDrawer .drawer-head #deleteTaskButton svg {
    width: 16px;
    height: 16px;
}

/* Final mobile guard: late desktop overrides must not widen the phone layout. */
@media (max-width: 900px) {
    .topbar {
        height: auto;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 10px 12px;
    }
    .topbar .brand {
        min-width: 0;
        overflow: hidden;
    }
    .topbar .brand p,
    .topbar .brand p strong {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        position: relative;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto;
        gap: 10px;
        width: 100%;
    }
    .topbar-tools .topbar-search {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        max-width: none;
        height: 46px;
        margin: 0;
    }
    .topbar #filters {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        margin: 0;
    }
    .topbar #filters .section,
    .topbar #filters .filter-form,
    .topbar #filters .sort-dropdown {
        position: static;
    }
    .topbar #filters .filter-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }
    .topbar #filters .sort-dropdown,
    .topbar #filters .toolbar-select,
    .topbar #filters .toolbar-button {
        width: 100%;
        min-width: 0;
    }
    .topbar #filters .toolbar-select,
    .topbar #filters .toolbar-button {
        justify-content: center;
        height: 48px;
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 0 12px;
        font-size: 12px;
        font-weight: 600;
    }
    .topbar #filters .filter-panel,
    .topbar #filters .sort-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        z-index: 210;
        width: 100%;
        max-height: min(520px, calc(100dvh - 190px));
        overflow-y: auto;
        border-radius: 12px;
        box-shadow: 0 16px 42px rgba(0, 0, 0, .2);
    }
    .top-actions {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        margin: 0;
        border-left: 0;
        padding-left: 0;
    }
    #themeToggle {
        display: inline-grid;
    }
    main {
        padding-right: 12px;
        padding-left: 12px;
    }
    .board {
        gap: 12px;
    }
    .column {
        width: calc(100vw - 24px);
        min-width: calc(100vw - 24px);
    }
    .mobile-app-nav:has([data-mobile-action="analytics"]) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .topbar .brand p span {
        display: none;
    }
    .topbar #filters .toolbar-select,
    .topbar #filters .toolbar-button {
        padding-right: 9px;
        padding-left: 9px;
    }
    .topbar #filters .toolbar-select svg,
    .topbar #filters .toolbar-button svg {
        width: 18px;
        height: 18px;
    }
    .mobile-app-nav:has([data-mobile-action="analytics"]) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Quick assignee filter below the board header. */
.quick-assignee-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 42px;
    border-bottom: 1px solid var(--line);
    padding: 5px 16px;
    background: var(--panel);
}
.quick-assignee-filter[hidden] { display: none !important; }
.quick-assignee-label {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.quick-assignee-list {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.quick-assignee-list::-webkit-scrollbar { display: none; }
.quick-assignee-button,
.quick-assignee-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 9px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.quick-assignee-button:hover { background: var(--panel-3); }
.quick-assignee-button i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aaa9b8;
}
.quick-assignee-button.active {
    border-color: color-mix(in srgb, var(--assignee-color) 28%, transparent);
    color: var(--assignee-color);
    background: color-mix(in srgb, var(--assignee-color) 12%, transparent);
}
.quick-assignee-button.active i { background: var(--assignee-color); }
.quick-assignee-reset {
    margin-left: auto;
    border-color: var(--line);
    color: var(--muted);
    background: var(--panel-3);
}
.quick-assignee-reset:hover { color: var(--text); }
@media (max-width: 700px) {
    .quick-assignee-filter { padding-right: 10px; padding-left: 10px; }
    .quick-assignee-label { display: none; }
    .quick-assignee-button { padding-right: 8px; padding-left: 8px; }
}

/* Compact employee workload in the desktop sidebar. */
.sidebar-workload {
    display: grid;
    gap: 5px;
    margin: auto 10px 0;
    border-top: 1px solid var(--line);
    padding: 11px 4px 0;
}
.sidebar-workload[hidden],
.sidebar-workload-item[hidden] { display: none !important; }
.sidebar-workload + .sidebar-current-user { margin-top: 12px; }
.sidebar-workload[hidden] + .sidebar-current-user { margin-top: auto; }
.sidebar-workload-title {
    padding: 0 6px 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.sidebar-workload-list { display: grid; gap: 3px; }
.sidebar-workload-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    border-radius: 8px;
    padding: 6px;
    color: var(--text);
    text-decoration: none;
}
.sidebar-workload-item:hover { background: var(--panel-3); }
.sidebar-workload-item .employee-avatar {
    width: 26px;
    height: 26px;
    font-size: 9px;
}
.sidebar-workload-copy { display: grid; min-width: 0; gap: 5px; }
.sidebar-workload-copy > span:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}
.sidebar-workload-copy strong {
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-workload-copy em {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px;
    font-style: normal;
}
.sidebar-workload-bar {
    display: flex;
    width: 100%;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--panel-3);
}
.sidebar-workload-bar i { display: block; height: 100%; }
.sidebar-workload-bar .queue { background: var(--status-new); }
.sidebar-workload-bar .work { background: var(--status-work); }
.sidebar-workload-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}
.sidebar-workload-legend > span { display: inline-flex; align-items: center; gap: 3px; }
.sidebar-workload-legend i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.sidebar-workload-legend .queue { background: var(--status-new); }
.sidebar-workload-legend .work { background: var(--status-work); }
:root[data-sidebar="collapsed"] .sidebar-workload { display: none; }

@media (max-width: 900px) {
    .sidebar-workload { display: none; }
}

.board[aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
    transition: opacity .12s ease;
}

/* Unified board header controls. */
.topbar #filters .toolbar-select,
.topbar #filters .toolbar-button,
.topbar #filters .sort-dropdown .toolbar-select,
.top-actions .icon-button,
.top-actions .top-logout {
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: var(--panel);
    box-shadow: none;
}
.topbar #filters .toolbar-select.active,
.topbar #filters .toolbar-button.active,
.topbar #filters .sort-dropdown .toolbar-select.active,
.top-actions #notificationToggle,
.top-actions #themeToggle {
    border-color: var(--line);
    color: var(--text);
    background: var(--panel);
}
.topbar #filters .toolbar-select:hover,
.topbar #filters .toolbar-button:hover,
.topbar #filters .sort-dropdown .toolbar-select:hover,
.top-actions .icon-button:hover,
.top-actions .top-logout:hover {
    border-color: var(--line);
    color: var(--text);
    background: var(--panel-3);
}

/* Theme button follows the unified header control style. */
:root[data-theme="light"] .top-actions #themeToggle,
:root[data-theme="dark"] .top-actions #themeToggle {
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: var(--panel);
    box-shadow: none;
}
:root[data-theme="light"] .top-actions #themeToggle:hover,
:root[data-theme="dark"] .top-actions #themeToggle:hover {
    color: var(--text);
    background: var(--panel-3);
}

/* Mobile columns must not clip or frame the task list. */
@media (max-width: 900px) {
    :root .board .column {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    :root .board .column h2 {
        background: transparent;
    }
}

/* Employees page follows the tracker UI. */
#employeesPage.employees-page {
    padding: 24px;
    color: var(--text);
    background: var(--bg);
    font-family: inherit;
}
#employeesPage .employees-page-head h2 {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
}
#employeesPage .employees-page-head p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}
#employeesPage .employees-page-tools {
    align-items: center;
    gap: 10px;
}
#employeesPage .employees-search,
#employeesPage .employees-add-button {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
}
#employeesPage .employees-search {
    color: var(--muted);
    background: var(--panel);
}
#employeesPage .employees-search input {
    color: var(--text);
    background: transparent;
    font-family: inherit;
}
#employeesPage .employees-search:focus-within {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
#employeesPage .employees-add-button {
    color: #fff;
    background: var(--brand);
    box-shadow: none;
    transition: background .16s ease, transform .16s ease;
}
#employeesPage .employees-add-button:hover {
    background: var(--brand-2);
    transform: translateY(-1px);
}
#employeesPage .employees-stats {
    gap: 12px;
    padding-top: 20px;
}
#employeesPage .employee-stat-card {
    min-height: 88px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
#employeesPage .employee-stat-card:hover {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
}
#employeesPage .employee-stat-card small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}
#employeesPage .employee-stat-card strong {
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
}
#employeesPage .employee-stat-card i {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}
#employeesPage .employee-stat-purple i {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
}
#employeesPage .employee-stat-orange i {
    color: var(--status-print);
    background: color-mix(in srgb, var(--status-print) 14%, transparent);
}
#employeesPage .employee-stat-green i {
    color: var(--status-done);
    background: color-mix(in srgb, var(--status-done) 14%, transparent);
}
#employeesPage .employees-table {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
#employeesPage .employees-table-head {
    min-height: 44px;
    color: var(--muted);
    background: var(--panel-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
}
#employeesPage .employee-profile-card {
    color: var(--text);
    background: var(--panel);
    border-top-color: var(--line);
    font-family: inherit;
    transition: background .14s ease, box-shadow .14s ease;
}
#employeesPage .employee-profile-card:hover {
    border-color: var(--line);
    background: var(--panel-3);
    box-shadow: inset 3px 0 0 var(--brand);
}
#employeesPage .employee-profile-card:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}
#employeesPage .employee-card-name-row strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
#employeesPage .employee-role,
#employeesPage .employee-email-row,
#employeesPage .employees-table-footer {
    color: var(--muted);
}
#employeesPage .employee-task-count {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}
#employeesPage .account-status.active {
    color: var(--status-done);
    background: color-mix(in srgb, var(--status-done) 12%, transparent);
}
#employeesPage .account-status.inactive {
    color: var(--muted);
    background: var(--panel-3);
}
#employeesPage .employee-row-action {
    color: var(--muted);
    transition: color .14s ease, transform .14s ease;
}
#employeesPage .employee-profile-card:hover .employee-row-action {
    color: var(--brand);
    transform: translateX(2px);
}
#employeesPage .employees-table-footer {
    min-height: 48px;
    border-top-color: var(--line);
    font-size: 11px;
}

@media (max-width: 900px) {
    #employeesPage.employees-page {
        padding: 18px 12px 96px;
    }
    #employeesPage .employees-page-head h2 {
        font-size: 20px;
    }
    #employeesPage .employees-stats {
        grid-template-columns: 1fr;
    }
}

/* Employee directory composition. */
#employeesPage .employees-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
#employeesPage .employee-stat-card {
    min-width: 0;
}
#employeesPage .employee-stat-card strong {
    white-space: nowrap;
}
#employeesPage .employees-directory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}
#employeesPage .employees-directory-main {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}
#employeesPage .employees-directory-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}
#employeesPage .employees-directory-filters .employees-search {
    flex: 1 1 240px;
    width: auto;
}
#employeesPage .employee-directory-select {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    color: var(--muted);
    background: var(--panel);
    font-size: 12px;
    font-weight: 600;
}
#employeesPage .employee-directory-select select {
    min-width: 64px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}
#employeesPage .employees-directory-main .employees-table {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
#employeesPage .employee-card-form.selected .employee-profile-card {
    background: color-mix(in srgb, var(--brand) 7%, var(--panel));
    box-shadow: inset 3px 0 0 var(--brand);
}
#employeesPage .employee-inspector {
    position: sticky;
    top: 20px;
    min-height: 410px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    color: var(--text);
    background: var(--panel);
    box-shadow: var(--shadow);
}
#employeesPage .employee-inspector[hidden] {
    display: none;
}
#employeesPage .employee-inspector-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
#employeesPage .employee-inspector-close:hover {
    color: var(--text);
    background: var(--panel-3);
}
#employeesPage .employee-inspector-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 28px;
}
#employeesPage .employee-inspector-head .employee-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: #fff;
    background: var(--avatar-bg, var(--brand));
    font-size: 17px;
    font-weight: 700;
}
#employeesPage .employee-inspector h2 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}
#employeesPage .employee-inspector p {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 12px;
}
#employeesPage .employee-inspector-data {
    display: grid;
    gap: 14px;
    margin: 24px 0;
}
#employeesPage .employee-inspector-data div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}
#employeesPage .employee-inspector-data dt {
    color: var(--muted);
    font-size: 12px;
}
#employeesPage .employee-inspector-data dd {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}
#employeesPage .employee-inspector-edit {
    width: 100%;
    min-height: 38px;
    border-color: var(--brand);
    color: #fff;
    background: var(--brand);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 28%, transparent);
}
#employeesPage .employee-inspector-edit:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
}

@media (max-width: 1180px) {
    #employeesPage .employees-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #employeesPage .employees-directory-layout {
        grid-template-columns: 1fr;
    }
    #employeesPage .employee-inspector {
        position: static;
        min-height: 0;
    }
}
@media (max-width: 700px) {
    #employeesPage .employees-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #employeesPage .employees-directory-filters {
        flex-wrap: wrap;
        padding: 12px;
    }
    #employeesPage .employees-directory-filters .employees-search {
        flex-basis: 100%;
    }
    #employeesPage .employee-directory-select {
        flex: 1 1 0;
        justify-content: space-between;
    }
}
/* Shared brand accents. Status and employee colors stay independent. */
:root {
    --brand-gradient: linear-gradient(135deg, #d97706, #ea580c);
    --brand-soft: rgba(217, 119, 6, .12);
}
:root .button:not(.secondary):not(.danger),
:root .employees-add-button {
    background: var(--brand-gradient) !important;
}
:root .button:not(.secondary):not(.danger):not(:disabled):hover,
:root .employees-add-button:not(:disabled):hover {
    filter: brightness(1.08);
}
:root .topbar .brand p strong,
:root .employee-role-admin,
:root #employeesPage .employee-task-count,
:root #employeesPage .employee-stat-purple i {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: rgba(217, 119, 6, .25);
}
:root[data-theme="dark"] .topbar .brand p strong,
:root[data-theme="dark"] .employee-role-admin,
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .mobile-nav-item.active {
    color: #fbbf24;
    background: var(--brand-soft);
}
