:root {
  color-scheme: light;
  --ink:#162521; --muted:#586965; --soft:#778680; --line:#e3ebe7; --line-dark:#cedad4;
  --accent:#14654f; --accent-dark:#0d503d; --accent-bg:#e8f4ed; --surface:#f8faf9; --white:#fff;
  --shadow:0 20px 70px #122c2220, 0 4px 14px #193c2a0b;
  font:15px/1.45 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:var(--ink); background:var(--white);
}
* {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0; min-width:320px}
html {scrollbar-gutter:stable}
html:has(.drawer:not([hidden]),dialog[open]),body:has(.drawer:not([hidden]),dialog[open]) {overflow:hidden; overscroll-behavior:none}
a {color:inherit; text-decoration:none}
a:focus-visible,button:focus-visible,summary:focus-visible {outline:2px solid var(--accent); outline-offset:3px}
button,input,textarea,select {font:inherit; color:inherit; letter-spacing:inherit; margin:0}
button {appearance:none; cursor:pointer; border:0; background:none}
button:disabled {opacity:.48; cursor:default}
input:not([type=checkbox]):not([type=file]),select,textarea {
  appearance:none; -webkit-appearance:none; border:1px solid var(--line-dark); border-radius:7px;
  background:var(--white); padding:7px 10px; min-height:35px; min-width:0; outline:none;
}
.field > input:not([type=checkbox]),.field > select {height:37px; line-height:20px; padding-block:7px}
input[type=date] {text-align:left; min-width:0; width:100%}
input[type=date]::-webkit-date-and-time-value {text-align:left; min-height:20px}
input[type=search]::-webkit-search-decoration {appearance:none}
input:focus,select:focus,textarea:focus {border-color:#629f88!important; box-shadow:0 0 0 2px #d8eee4}
input::placeholder,textarea::placeholder {color:#788581}
select {
  padding-right:28px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23586965' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 8px center;
}
input[type=checkbox] {accent-color:var(--accent); width:15px; height:15px; flex:none}
textarea {resize:vertical; width:100%; display:block}
svg {flex:none; vertical-align:middle}
h1,h2,h3,h4,p {margin:0}
h1,h2,h3,h4,b,strong {font-weight:650}
.muted {color:var(--muted)}
.mono {font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; color:var(--muted); letter-spacing:-.02em}
.primary,.secondary {
  min-height:34px; padding:6px 12px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center;
  gap:6px; white-space:nowrap; font-weight:600; font-size:14px; border:1px solid transparent; transition:background .12s;
}
.primary {color:white; background:var(--accent); border-color:var(--accent); box-shadow:0 1px 2px #1a3a2d19}
.primary:hover:not(:disabled) {background:var(--accent-dark)}
.secondary {border-color:var(--line-dark); background:var(--white)}
.secondary:hover:not(:disabled),.icon-button:hover,.text-button:hover {background:var(--accent-bg); color:var(--accent-dark)}
.text-button {color:var(--accent); font-size:13px; font-weight:600; padding:4px 7px; border-radius:5px}
.icon-button {display:inline-grid; place-items:center; flex:none; color:var(--muted); width:29px; height:29px; border-radius:6px; padding:0}
.initial {display:grid; gap:10px; justify-content:center; place-content:center; min-height:100vh; color:var(--muted)}
.eyebrow {display:flex; align-items:center; gap:7px; color:var(--accent); font-size:12px; font-weight:650; letter-spacing:.07em}
.eyebrow i {width:6px; height:6px; background:#3e9b7b; border-radius:50%; box-shadow:0 0 0 3px #e3f3eb}
.brand {display:flex; align-items:center; gap:9px}
.brand img {flex:none}
.brand b {display:block; font-size:16px; letter-spacing:.035em}
.brand small {display:block; font-size:8.5px; letter-spacing:.12em; color:var(--muted); margin-top:1px; white-space:nowrap}
.auth-layout {display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.9fr); min-height:100dvh}
.auth-story {display:flex; flex-direction:column; padding:clamp(28px,5vw,72px); background:#f3f8f5; border-right:1px solid var(--line); position:relative; overflow:hidden}
.auth-story::before {content:""; position:absolute; width:70%; aspect-ratio:1; right:-21%; bottom:-31%; background:repeating-radial-gradient(ellipse at center,transparent 0 26px,#dceae2 27px 28px); pointer-events:none; opacity:.7}
.auth-story > * {position:relative}
.auth-message {margin-top:clamp(52px,11vh,128px)}
.auth-message h1 {font-size:clamp(48px,6vw,92px); line-height:1.08; letter-spacing:-.08em; font-weight:670; margin:15px 0}
.auth-message h1 span {color:var(--accent)}
.auth-message p {font-size:16px; color:var(--muted)}
.auth-preview {background:#fff; box-shadow:0 16px 48px #294b3313; border:1px solid var(--line); border-radius:12px; overflow:hidden; width:min(100%,440px); margin:32px 0}
.preview-head {display:flex; justify-content:space-between; padding:11px 15px; font-size:13px; font-weight:650}
.preview-head svg {margin-right:3px; color:var(--accent)}
.preview-row {display:grid; grid-template-columns:minmax(120px,2fr) minmax(68px,1fr) 56px; gap:8px; padding:8px 15px; align-items:center; font-size:13px; border-top:1px solid var(--line)}
.preview-row > :first-child {white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.preview-row i {display:inline-block; width:6px; height:6px; margin-right:4px; border-radius:2px; background:#86b29e}
.preview-label {background:var(--surface); color:var(--muted); font-size:12px}
.auth-footer {margin-top:auto; font-size:12px; color:var(--muted)}
.auth-panel {display:grid; place-items:center; padding:40px 24px}
.auth-card {width:min(100%,360px)}
.auth-card h2 {font-size:28px; letter-spacing:-.035em}
.auth-card > p {margin:6px 0 23px}
.auth-card form {display:grid; gap:12px}
.auth-card input {min-height:40px!important}
.auth-mobile {display:none}
.auth-submit {width:100%; min-height:41px; justify-content:space-between; padding-inline:13px; margin-top:3px}
.auth-switch {margin:14px -7px 0}
.admin-login-return {display:inline-flex; margin-top:12px}
.layout {display:grid; grid-template-columns:208px minmax(0,1fr); min-height:100dvh}
.sidebar {position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; min-width:0; background:#f8faf9; border-right:1px solid var(--line); padding:15px 10px 10px; z-index:4}
.sidebar > .brand {padding:1px 8px 16px}
.company {margin:0 3px 12px; padding:8px; display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:8px; background:#fff; min-width:0}
.company-logo {width:28px; height:28px; flex:none; display:grid; place-items:center; background:var(--accent-bg); color:var(--accent); border-radius:6px; font-size:14px; font-weight:700}
.company > div {min-width:0}
.company b {display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; font-size:13px}
.company small {display:block; font-size:10px; color:var(--muted)}
.sidebar nav {overflow:auto; flex:1; padding:1px 1px 12px}
.nav-label {color:var(--soft); font-size:11px; padding:7px 8px 5px; font-weight:650; letter-spacing:.055em}
.nav-link {
  display:flex; align-items:center; gap:8px; text-align:left; width:100%; min-height:32px; padding:5px 8px;
  color:#435751; border-radius:6px; font-size:14px; font-weight:550; margin:1px 0;
}
.nav-link:hover,.nav-link.active {color:var(--accent-dark); background:#eaf3ed}
.nav-link.active {font-weight:670}
.nav-link span {overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.sidebar-footer {border-top:1px solid var(--line); padding:9px 2px 0; display:flex; align-items:center; justify-content:space-between; gap:6px}
.sidebar-footer .person {min-width:0; margin-left:4px}
.sidebar-footer .person > :last-child {overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.account-trigger {display:flex; align-items:center; justify-content:space-between; flex:1; min-width:0; gap:8px; border:0; background:transparent; padding:6px 4px; border-radius:6px; color:var(--ink); cursor:pointer}
.account-trigger:hover {background:var(--accent-bg)}
.account-trigger > svg {flex-shrink:0; opacity:.6}
.account-identity {display:flex; flex-direction:column; gap:4px; padding-bottom:16px; overflow-wrap:anywhere}
.workspace {min-width:0}
.workspace-top {height:43px; display:flex; align-items:center; gap:8px; padding:0 24px; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px}
.workspace-top h1 {font-size:inherit; font-weight:650; color:var(--ink)}
.workspace-top :is(.workspace-company,h1) {min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.workspace-top > :is(a,svg,.pill) {flex:none}
.workspace-top > svg {width:12px; color:var(--soft)}
.workspace-top [data-menu] {display:none}
.workspace-body {padding:12px 24px 24px}
.toolbar {display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:8px}
.toolbar select {min-height:31px; padding-block:4px; font-size:13px; max-width:175px}
.search-box {position:relative; color:var(--muted); min-width:0; width:min(100%,220px)}
.search-box svg {position:absolute; top:7px; left:8px; width:15px; pointer-events:none}
.search-box input {width:100%; min-height:31px!important; padding:4px 8px 4px 29px!important; font-size:13px}
.toolbar-total {margin-left:auto; color:var(--muted); font-size:12px}
.table-wrap {overflow:auto; border:1px solid var(--line); border-radius:8px; background:#fff}
table {width:100%; border-collapse:separate; border-spacing:0; text-align:left}
.data-table table {min-width:820px; table-layout:fixed}
th {background:#f6f9f7; color:var(--muted); font-size:12px; font-weight:630; white-space:nowrap}
td,th {padding:5px 9px; height:34px; border-bottom:1px solid var(--line); vertical-align:middle}
td {font-size:14px}
td+td,th+th {border-left:1px solid #f0f4f2}
tbody tr:last-child td {border-bottom:0}
.data-table tbody tr {cursor:pointer}
.data-table tbody tr:nth-child(even) {background:#fcfdfc}
.data-table tbody tr:hover,.data-table tbody tr.current {background:#edf6f0}
.data-table td {overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.title-cell a {font-weight:620; display:block; overflow:hidden; text-overflow:ellipsis}
.title-cell a:hover,.mono a:hover {color:var(--accent); text-decoration:underline}
.date-cell {font-variant-numeric:tabular-nums; font-size:12px}
.pill {display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:2px 7px; min-height:21px; border-radius:5px; font-size:12px; line-height:1.28; font-weight:610; white-space:nowrap}
.pill.gray {color:#4a5e56; background:#edf1ef}
.pill.subtle {color:#506059; background:#f0f5f2}
.pill.green {color:#146348; background:#e3f4e9}
.pill.blue {color:#244e7e; background:#e8f0fb}
.pill.amber {color:#775119; background:#fbf2df}
.pill.red {color:#943a41; background:#fae9e8}
.person {display:inline-flex; align-items:center; gap:6px; vertical-align:middle}
.avatar {width:21px; height:21px; display:inline-grid; place-items:center; border-radius:50%; background:#e7f0eb; color:#356650; flex:none; font-size:11px; font-weight:700}
.table-foot {display:flex; justify-content:space-between; align-items:center; color:var(--muted); font-size:12px; padding:7px 1px}
.table-foot > div {display:flex; align-items:center; gap:6px}
.table-foot button {min-height:27px; font-size:12px}
.empty {display:grid; justify-items:center; gap:7px; padding:34px 14px; border:1px solid var(--line); border-radius:8px; text-align:center}
.empty h2 {font-size:17px}
.empty p,.loading {color:var(--muted); font-size:13px}
.empty .secondary {margin-top:2px}
.empty-icon {width:36px; height:36px; display:grid; place-items:center; border-radius:9px; color:var(--accent); background:var(--accent-bg)}
.loading {padding:15px}
.drawer-backdrop {position:fixed; inset:0; z-index:6; background:#20362614; touch-action:none}
.drawer {position:fixed; z-index:7; right:0; top:0; bottom:0; width:min(640px, calc(100vw - 208px)); background:#fff; box-shadow:-14px 0 40px #193c2a17; border-left:1px solid var(--line); display:flex; flex-direction:column}
.dialog-footer .primary.destructive {background:#a33943; border-color:#a33943; color:#fff}
.dialog-footer .primary.destructive:hover {background:#8d2735; border-color:#8d2735}
.drawer-head {height:44px; display:flex; align-items:center; gap:5px; flex:none; border-bottom:1px solid var(--line); padding:0 13px}
.drawer-kicker {display:flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; margin-right:auto}
.drawer-kicker svg {width:13px}
.drawer-scroll {overflow:auto; overscroll-behavior:contain; flex:1; min-height:0; padding:14px 18px 25px}
.issue-heading {display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:11px}
.issue-heading h2 {font-size:25px; letter-spacing:-.03em; line-height:1.28; overflow-wrap:anywhere}
.properties {display:grid; grid-template-columns:1fr 1fr; gap:0 12px; padding:4px 9px; background:var(--surface); border:1px solid var(--line); border-radius:8px}
.properties > div {min-height:32px; display:flex; align-items:center; gap:6px; min-width:0; padding:3px 0}
.properties > div > span:first-child {flex:0 0 63px; color:var(--muted); font-size:12px; overflow-wrap:anywhere}
.properties b {font-weight:580; overflow-wrap:anywhere; white-space:pre-wrap; font-size:13px}
.properties select {min-height:24px; font-size:12px; width:auto; max-width:calc(100% - 69px); padding-block:2px}
.drawer-scroll > section {margin-top:14px}
.section-title {display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:28px; margin-bottom:4px}
.section-title h3 {font-size:15px}
.section-title + .muted {font-size:13px}
.issue-link {color:var(--accent); font-weight:600; overflow-wrap:anywhere}
.issue-link:hover,.prose a:hover {text-decoration:underline}
.issue-link span {font:11px ui-monospace,monospace; margin-right:3px; opacity:.8}
.prose {font-size:15px; line-height:1.62; overflow-wrap:anywhere}
.prose p {margin:3px 0 7px}
.prose :is(h1,h2,h3) {margin:9px 0 4px; line-height:1.3}
.prose h1 {font-size:24px}.prose h2 {font-size:20px}.prose h3 {font-size:17px}
.prose :is(ol,ul) {padding-left:24px; margin:5px 0}
.prose li p {margin:1px 0}
.prose a {color:var(--accent); text-decoration:underline; text-underline-offset:2px}
.prose a:not([href]) {color:var(--muted)}
.prose a.issue-link {text-decoration:none; border-radius:4px; background:#e9f4ed; padding:1px 4px}
.prose blockquote {border-left:3px solid #abcbb9; color:var(--muted); margin:7px 0; padding-left:10px}
.prose pre {white-space:pre-wrap; border-radius:6px; background:#f2f5f3; padding:9px 10px; margin:6px 0; font-size:13px}
.prose :not(pre)>code {padding:1px 4px; background:#f2f5f3; border-radius:4px}
.prose img {max-width:100%; max-height:420px; width:auto; height:auto; display:block; border-radius:6px; margin:5px 0}
.prose table {border:1px solid var(--line-dark); table-layout:fixed; margin:7px 0}
.prose td,.prose th {border:1px solid var(--line-dark); height:auto; min-width:1em}
.relation-section {border-top:1px solid var(--line); padding-top:7px}
.relation-group {margin:3px 0 6px}
.relation-group h4 {font-size:11px; color:var(--muted); margin:0 0 3px}
.relation-row {min-height:27px; display:flex; align-items:center; gap:6px; font-size:13px; border-bottom:1px solid #f0f3f2}
.relation-row button {margin-left:auto; height:24px}
.relation-row small {display:block; color:var(--muted); font-size:12px; padding-bottom:2px}
.tabs {display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--line); margin-bottom:8px}
.tabs button {display:flex; align-items:center; gap:5px; font-size:13px; color:var(--muted); padding:6px 2px; border-bottom:2px solid transparent}
.tabs button.active {color:var(--accent); border-color:var(--accent); font-weight:650}
.tabs button span,.count {font-size:11px; color:var(--muted); background:#edf2ef; border-radius:4px; padding:1px 4px}
.tabs svg {width:14px}
.comments > .muted {font-size:13px; padding:3px 0 6px}
.thread {border-bottom:1px solid var(--line); padding:5px 0}
.comment {display:grid; grid-template-columns:24px 1fr; gap:7px; padding:4px 0; overflow-wrap:anywhere}
.comment.nested {margin-left:29px; border-left:1px solid var(--line-dark); padding-left:8px}
.comment .avatar {width:23px; height:23px}
.comment-meta {display:flex; align-items:center; gap:8px; font-size:13px}
.comment time,.comment small,.events time,.run time {font-size:11px; color:var(--muted); white-space:nowrap}
.comment p {white-space:pre-wrap; margin:1px 0 2px; font-size:14px}
.comment p:empty {display:none}
.reply {padding:1px 0; font-size:12px}
.attachments,.selected-files {display:flex; align-items:center; flex-wrap:wrap; gap:4px}
.comment-photo img {display:block; max-width:150px; max-height:120px; border-radius:6px; border:1px solid var(--line)}
.attachment {display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); border-radius:5px; padding:3px 5px; font-size:12px; max-width:100%; overflow-wrap:anywhere}
.attachment svg {width:12px}
.comment-form {margin-top:9px; position:relative}
.comment-form textarea {min-height:64px}
.comment-actions {display:flex; align-items:center; gap:3px; margin-top:4px}
.comment-actions .primary {margin-left:auto; min-height:29px; font-size:13px}
.selected-files:not(:empty) {margin-top:4px}
.reply-to {display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted)}
.comment-pop {position:absolute; z-index:2; left:3px; bottom:34px; display:flex; flex-wrap:wrap; gap:4px; width:max-content; max-width:240px; padding:5px; background:white; border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow)}
.comment-pop button {border-radius:5px; padding:3px 5px; font-size:13px}
.comment-pop button:hover {background:var(--accent-bg)}
.events {list-style:none; margin:0; padding:0}
.events li {display:grid; grid-template-columns:8px 1fr auto; gap:7px; border-bottom:1px solid var(--line); padding:6px 0; font-size:13px}
.events li i {width:6px; height:6px; border-radius:50%; margin-top:6px; background:#76a692}
.events small {display:block; color:var(--muted); font-size:12px; overflow-wrap:anywhere}
.case-content {margin-bottom:9px}
.case-content h3 {font-size:14px}
.case-content p,.run p {white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; margin-top:3px}
.run {padding:7px 9px; border:1px solid var(--line); border-radius:6px; margin:5px 0; font-size:13px}
.run-head {display:flex; align-items:center; gap:7px}
.run-head time {margin-left:auto}
.run details {margin:4px 0; color:var(--muted)}
.run details summary {cursor:pointer; font-size:12px}
.run details[open] summary {margin-bottom:5px}
.settings-grid {display:grid; gap:9px}
.settings-two {display:grid; grid-template-columns:1fr 1fr; gap:9px}
.settings-panel {border:1px solid var(--line); border-radius:8px; min-width:0}
.settings-panel > header {display:flex; justify-content:space-between; align-items:center; gap:5px; padding:6px 9px}
.settings-panel h2 {font-size:15px}
.settings-panel .secondary {min-height:29px; font-size:12px}
.settings-panel .table-wrap {border-radius:0 0 7px 7px; border-width:1px 0 0}
.settings-panel td {font-size:13px}
.settings-panel tr td:last-child {width:40px}
.pills .pill {margin:1px}
.wecom-summary {display:flex; gap:8px; align-items:center; padding:4px 9px 7px}
.wecom-summary .pill {margin-left:auto}
.wecom-summary p {font-size:12px}
.wecom-icon {width:30px; height:30px; border-radius:6px; display:grid; place-items:center; color:var(--accent); background:var(--accent-bg)}
.wecom-stats {display:flex; gap:18px; border-top:1px solid var(--line); padding:6px 9px; color:var(--muted); font-size:12px}
.wecom-stats b {color:var(--ink); margin-left:3px}
dialog {padding:0; border:1px solid var(--line-dark); border-radius:11px; box-shadow:var(--shadow); width:min(470px,calc(100vw - 22px)); max-height:calc(100dvh - 28px); color:var(--ink); background:#fff}
dialog.wide {width:min(705px,calc(100vw - 22px))}
dialog::backdrop {background:#14282042}
dialog > form {display:flex; flex-direction:column; max-height:calc(100dvh - 30px)}
.dialog-header,.dialog-footer {display:flex; align-items:center; flex:none; padding:8px 12px; gap:6px}
.dialog-header {justify-content:space-between; border-bottom:1px solid var(--line)}
.dialog-header h2 {font-size:17px}
.dialog-content {padding:10px 12px; overflow:auto; display:grid; gap:8px}
.dialog-content,.editor-canvas {overscroll-behavior:contain}
.dialog-footer {justify-content:flex-end; border-top:1px solid var(--line)}
.field {min-width:0; display:grid; gap:3px}
.field > span {font-size:13px; font-weight:600; color:#3d524a}
.field > input,.field > select {width:100%}
.form-grid {display:grid; grid-template-columns:1fr 1fr; gap:7px}
.form-grid:empty {display:none}
.span-2 {grid-column:1/-1}
.form-hint {font-size:12px; color:var(--muted)}
.form-error {color:#a12b35; background:#fcecef; border-radius:5px; padding:6px 8px; font-size:13px}
.checkbox {display:flex; align-items:center; gap:5px; color:var(--muted); font-size:13px}
fieldset {margin:0; border:1px solid var(--line); padding:6px 8px; border-radius:6px}
fieldset legend {font-size:13px}
.custom-list {display:grid; gap:5px}
.custom-config {position:relative; display:grid; gap:4px; padding:6px 30px 6px 6px; border:1px solid var(--line); border-radius:6px}
.custom-config > button {position:absolute; right:2px; top:4px; width:24px}
.editor-head {display:flex; align-items:center; justify-content:space-between; color:#3d524a; font-size:13px; font-weight:600}
.editor-head .active {background:var(--accent-bg)}
.editor-body {position:relative; border:1px solid var(--line-dark); border-radius:7px; background:white}
.editor-body:focus-within {border-color:#629f88}
.editor-prose {min-height:145px; outline:none; padding:7px 9px 12px 34px}
.editor-prose:empty {min-height:145px}
.editor-prose .selectedCell::after {background:#d9eee4; content:""; inset:0; position:absolute; pointer-events:none; opacity:.6}
.editor-prose td,.editor-prose th {position:relative}
.editor-prose .tableWrapper {overflow:auto}
.md-source {border:none!important; min-height:155px!important; box-shadow:none!important; font:13px/1.5 ui-monospace,monospace}
.insert-button {position:absolute; top:5px; left:5px; width:23px; height:23px; border-radius:5px; background:#ecf4ef; color:var(--accent); padding:0}
.editor-menu,.editor-suggestions,.editor-bubble {position:absolute; z-index:5; border:1px solid var(--line-dark); border-radius:7px; background:white; box-shadow:var(--shadow)}
.editor-menu {left:6px; width:156px; padding:4px}
.editor-command {display:flex; align-items:center; gap:7px; width:100%; text-align:left; padding:4px 5px; border-radius:4px; font-size:13px}
.editor-command span {display:inline-grid; width:23px; height:21px; place-items:center; border:1px solid var(--line); border-radius:4px; color:var(--muted); font-size:11px}
.editor-command:hover,.editor-bubble button:hover {background:var(--accent-bg)}
.editor-suggestions {width:min(290px,calc(100% - 32px)); max-height:155px; overflow:auto; padding:3px}
.editor-bubble {display:flex; gap:2px; padding:3px; white-space:nowrap}
.editor-bubble button {padding:4px 5px; font-size:12px; border-radius:4px}
.picker-body {padding:9px; display:grid; gap:5px}
.picker-body input,.picker-body select {width:100%}
.choice-list {max-height:45dvh; overflow:auto}
.choice {display:flex; width:100%; gap:6px; align-items:center; text-align:left; font-size:13px; padding:4px 5px; min-height:27px; border-radius:4px}
.choice.active,.choice:hover {background:var(--accent-bg); color:var(--accent-dark)}
.choice b {overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.choice small {margin-left:auto; color:var(--muted); white-space:nowrap}
.choice .mono {white-space:nowrap}
.choice-list p,.editor-suggestions p {font-size:12px; padding:5px}
#toast {position:fixed; z-index:20; inset:auto; top:clamp(72px,12vh,130px); left:50%; transform:translate(-50%,0); margin:0; border:0; pointer-events:none; background:#173b30; color:white; padding:8px 12px; border-radius:7px; box-shadow:var(--shadow); font-size:13px; max-width:calc(100vw - 28px)}
#toast.danger {background:#8d2735}
@media (max-width:1050px) {
  .layout {grid-template-columns:168px minmax(0,1fr)}
  .sidebar {padding-inline:7px}
  .workspace-body,.workspace-top {padding-inline:15px}
  .drawer {width:min(610px,calc(100vw - 168px))}
}
@media (max-width:700px) {
  .layout {display:block}
  .sidebar {display:none; position:fixed; left:0; width:195px; box-shadow:var(--shadow); z-index:9}
  .sidebar.visible {display:flex}
  .workspace-top [data-menu] {display:grid}
  .sidebar.visible ~ .workspace [data-menu] {position:fixed; z-index:10; left:194px; top:4px; background:white; box-shadow:var(--shadow)}
  .workspace-body,.workspace-top {padding-inline:10px}
  .workspace-body {padding-top:10px}
  .workspace-top {height:35px}
  .drawer {width:100vw}
  .drawer-scroll {padding-inline:12px}
  .settings-two {grid-template-columns:1fr}
  .auth-layout {display:block}
  .auth-story {display:none}
  .auth-mobile {display:flex; margin-bottom:16px}
  .auth-panel {min-height:100dvh}
  .search-box {width:min(100%,175px)}
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important; transition:none!important}
}

.admin-sidebar {background:#f4f7f2}
.admin-nav-group + .admin-nav-group {margin-top:10px}
.admin-nav-group .nav-link {padding-inline:10px}
.admin-top .admin-return {margin-left:auto; display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border-radius:6px}
.admin-top .admin-return:hover {background:var(--accent-bg); text-decoration:none}
.admin-return svg {width:14px; transform:rotate(180deg)}
.admin-content {background:#fafbf9; min-height:calc(100dvh - 46px)}
.admin-content .settings-panel {min-width:0; background:#fff}
.admin-company-profile {margin:0; padding:16px; display:grid; grid-template-columns:92px minmax(0,1fr); gap:10px; align-items:baseline}
.admin-company-profile dt {font-size:13px; color:var(--muted)}
.admin-company-profile dd {margin:0; font-weight:600; overflow-wrap:anywhere}
.project-tabs {margin-bottom:10px}
.project-tabs a {display:inline-flex; align-items:center; gap:5px; padding:6px 4px; border-bottom:2px solid transparent; color:var(--muted); font-size:13px}
.project-tabs a.active {color:var(--accent); border-color:var(--accent); font-weight:650}
.work-table table {min-width:560px}
.work-table th:nth-child(2) {width:24%}
.work-table th:nth-child(n+3) {width:112px}
.work-table .mono {margin-right:6px}
.work-table .overdue {color:#943a41; font-weight:650}

dialog.item-dialog {width:min(1080px,calc(100vw - 26px)); height:min(760px,calc(100dvh - 30px))}
dialog.item-dialog.editor-focused {width:min(1370px,calc(100vw - 26px)); height:calc(100dvh - 30px)}
.item-dialog > form {height:100%}
.item-dialog .dialog-content {flex:1; min-height:0; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; padding:12px}
.item-form-columns {display:grid; grid-template-columns:minmax(0,1fr) 245px; min-height:0; gap:12px}
.item-form-properties {min-height:0; overflow:auto; align-self:start; max-height:100%; display:grid; gap:8px; border:1px solid var(--line); border-radius:7px; background:var(--surface); padding:10px}
.item-form-properties h3 {font-size:13px}
.item-form-properties .form-grid {grid-template-columns:minmax(0,1fr)}
.item-form-properties .form-grid:empty {display:none}
.item-dialog.editor-focused .item-form-columns {grid-template-columns:minmax(0,1fr)}
.item-dialog.editor-focused .item-form-properties {display:none}
.item-dialog [data-editor] {min-height:0; min-width:0; display:flex; flex-direction:column}
.item-dialog .editor-head {flex:none; min-height:31px}
.editor-actions {display:flex; align-items:center; gap:4px}
.editor-actions svg {width:13px; height:13px; margin-right:2px}
.editor-actions [aria-pressed=true] {background:var(--accent-bg)}
.item-dialog .editor-body {flex:1; min-height:0; overflow:hidden}
.item-dialog .editor-canvas {height:100%; overflow:auto}
.item-dialog .editor-prose {min-height:100%; padding-top:10px; padding-right:12px; font-size:15px}
.item-dialog .editor-prose:empty {min-height:100%}
.item-dialog .md-source {height:100%; min-height:0!important; resize:none; padding:10px}
.editor-menu,.editor-bubble {overflow:auto; overscroll-behavior:contain}
@media (max-width:700px), (max-height:480px) {
  .item-dialog .dialog-content {display:block; overflow:auto}
  .item-form-columns {grid-template-columns:minmax(0,1fr); margin-top:8px}
  .item-dialog [data-editor] {height:clamp(295px,60dvh,530px)}
  .item-dialog.editor-focused [data-editor] {height:clamp(245px,calc(100dvh - 170px),1000px)}
  .item-form-properties .form-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
.workspace-top > a {color:var(--accent); text-decoration:none}
.workspace-top > a:hover {text-decoration:underline}
.project-overview-toolbar {justify-content:space-between; font-size:13px}
.project-stats {display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:0 0 8px; color:var(--muted); font-size:13px}
.project-stats:empty {display:none}
.project-stats strong {color:var(--ink); font-size:12px}
.project-stats small {font-size:11px; color:var(--muted)}
.project-stats > :is(a,span) {padding:4px 7px; border-radius:5px; white-space:nowrap}
.project-stats b {margin-inline-start:2px; color:var(--ink); font-variant-numeric:tabular-nums}
.project-stats a:hover,.project-stats a[aria-current=true] {background:var(--accent-bg); color:var(--accent)}
.project-stats .overdue-stat,.project-stats .overdue-stat b,.project-stat-link.overdue-stat {color:#943a41}
.project-stats-table table {min-width:570px}
.project-stats-table td:not(:first-child),.project-stats-table th:not(:first-child) {width:110px; text-align:center; white-space:nowrap}
.project-stats-table td:first-child .pill {margin-inline-start:6px}
.project-actions {display:flex; align-items:center; justify-content:flex-end; gap:4px}
.project-actions .text-button {min-width:44px; min-height:32px; padding:4px 8px; white-space:nowrap}
.project-actions .danger-text {color:#a33943}
.project-actions .danger-text:hover {background:#fff0f1}
.project-stats-table :is(th,td).project-actions-cell,.settings-panel tr :is(th,td).project-actions-cell {width:116px; min-width:116px; text-align:right; white-space:nowrap}
.project-stat-name {font-weight:650}
.project-stat-link {display:inline-block; min-width:28px; padding:3px 5px; border-radius:4px; color:var(--accent); font-variant-numeric:tabular-nums}
.project-stat-link:hover,.project-stat-link:focus-visible {background:var(--accent-bg)}
.data-table.project-table table {min-width:0; table-layout:auto}
.project-table td {max-width:200px}
.project-table td.title-cell {min-width:188px; max-width:clamp(188px,34vw,450px)}
.project-table td.title-cell > a {width:100%}
.project-table .item-actions-cell {width:52px; min-width:52px; text-align:center; padding-inline:6px}
.item-actions summary {cursor:pointer; list-style:none; margin-inline:auto}
.item-actions summary::-webkit-details-marker {display:none}
.item-actions-options {position:fixed; z-index:5; display:grid; width:132px; padding:4px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow)}
.item-actions-options button {justify-content:flex-start; text-align:left; padding:6px 9px}
.item-actions-options .danger-text {color:#a33943}
.item-actions-options .danger-text:hover {background:#fff0f1}
.quick-cell select,.quick-cell input[type=date] {width:100%; max-width:144px; min-height:26px; padding-block:2px; font-size:12px}
.quick-cell input[type=date] {min-width:120px}
.date-cell.overdue input {color:#943a41}
.work-table th:nth-child(2) {width:20%}
.work-table th:nth-last-child(1) {width:145px}
.work-table:has(th:nth-child(5)) table {min-width:680px}
.inbox-badge {margin-left:auto; min-width:21px; padding:1px 5px; border-radius:8px; text-align:center; color:#146348; background:#e3f4e9; font-size:11px}
.inbox-table table {min-width:520px}
.inbox-table th:first-child,.inbox-table th:nth-child(3),.inbox-table th:last-child {width:120px}
.unread-dot {display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:var(--accent)}
.target-comment {background:var(--accent-bg); border-radius:5px}
.draft-note {font-size:11px; color:var(--muted); margin-top:3px}
.draft-note:empty {display:none}
.agent-connect {display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; padding:12px 12px 0}
.agent-connect .field {width:min(420px,100%)}
.agent-note {margin:10px 12px; font-size:13px}
.agent-settings table {min-width:480px}

.spotlight-trigger {display:inline-flex; align-items:center; gap:5px; flex:none; margin-left:auto; padding:4px 6px; border-radius:5px; white-space:nowrap; color:var(--muted)}
.spotlight-trigger:hover {background:var(--accent-bg); color:var(--accent)}
.spotlight-trigger svg {width:15px; height:15px}
.spotlight kbd,.spotlight-trigger kbd {padding:1px 4px; border:1px solid var(--line-dark); border-radius:4px; font:inherit; font-size:11px; color:var(--muted)}
dialog.spotlight {
  --spotlight-top:clamp(12px,12dvh,108px);
  position:fixed;
  inset:var(--spotlight-top) 0 auto;
  margin:0 auto;
  width:min(650px,calc(100vw - 24px));
  max-height:min(610px,calc(100dvh - var(--spotlight-top) - 12px));
  background:#f7faf7;
  border-radius:13px;
}
dialog.spotlight[open] {display:flex; flex-direction:column; overflow:hidden}
.spotlight::backdrop {background:#16251e73; backdrop-filter:blur(3px)}
.spotlight-input {display:flex; flex:none; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); color:var(--accent)}
.spotlight-input > svg {width:21px; height:21px; flex:none}
.spotlight-input input[type=search] {min-width:0; flex:1; padding:5px 0; border:0; border-radius:0; outline:none; background:transparent; box-shadow:none; font-size:19px; color:var(--ink)}
.spotlight-close {padding:5px}
.spotlight-scope,.spotlight-footer {display:flex; justify-content:space-between; align-items:center; gap:6px 10px; padding:8px 16px; flex:none; font-size:12px; color:var(--muted)}
.spotlight-scope select {max-width:min(260px,65vw); min-height:27px; padding-block:2px; font-size:12px}
.spotlight-results {min-height:0; max-height:380px; overflow:auto; overscroll-behavior:contain; padding:0 8px 8px}
.spotlight-label,.spotlight-empty {padding:4px 8px; font-size:12px; color:var(--muted)}
.spotlight-row {display:grid; grid-template-columns:28px minmax(0,1fr) 16px; align-items:start; gap:8px; padding:8px; border-radius:7px; cursor:pointer}
.spotlight-row:hover,.spotlight-row[aria-selected=true] {background:#fff; box-shadow:inset 0 0 0 1px var(--line)}
.spotlight-result-icon {width:26px; height:26px; display:grid; place-items:center; border-radius:5px; background:var(--accent-bg); color:var(--accent)}
.spotlight-title {line-height:1.45; overflow-wrap:anywhere}
.spotlight-title .mono,.spotlight-meta {font-size:12px; color:var(--muted)}
.spotlight-snippet {font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.spotlight-arrow {align-self:center; color:var(--accent)}
.spotlight-footer {border-top:1px solid var(--line); flex-wrap:wrap}
@media (max-width:700px) {
  .spotlight-trigger :is(span,kbd) {display:none}
  .spotlight-input input[type=search] {font-size:16px}
}

.settings-panel tr td:last-child {min-width:84px; width:84px; white-space:nowrap}
.actions-cell {min-width:130px; white-space:nowrap}
.actions-cell button,.agent-settings button {white-space:nowrap}
.iteration-filter {display:flex; gap:6px}
.iteration-filter input {width:130px}
.iteration-filter select {max-width:180px}

/* Shared light workspace controls, inspired by 灵感. */
:root {--ink:#283d32; --muted:#67786d; --soft:#87948b; --line:#e4e9e1; --line-dark:#d5dfd4; --accent:#477b5b; --accent-dark:#365f45; --accent-bg:#eaf1e7; --surface:#f7f9f5; --shadow:0 22px 70px #203d221c; -webkit-font-smoothing:antialiased}
.sidebar {background:#f5f7f2}
.company {background:#fff; border-color:var(--line); border-radius:10px}
.brand small {letter-spacing:.1em; color:var(--soft)}
.nav-link {font-size:14px; border-radius:7px}
.nav-link.active {background:#e7efe3; color:#345d41}
.workspace-top {height:46px; background:#fff}
.workspace-body {padding-top:14px}
.tabs {gap:16px}
.tabs a,.tabs button {font-size:14px; font-weight:550}
.project-tabs {margin-bottom:12px}
.project-tabs a {padding:8px 2px}
.project-stats {font-size:13px; gap:6px 10px; padding:0 0 4px}
.project-stats small {color:var(--soft)}
.toolbar {gap:8px; margin-bottom:10px; min-height:34px}
.toolbar :is(select,input:not([type=hidden]),summary,.primary,.secondary) {height:34px; min-height:34px!important; font-size:14px; line-height:20px; border-radius:7px; padding-block:6px}
.toolbar select {min-width:112px; max-width:180px}
.search-box {width:min(100%,240px)}
.search-box svg {top:9px; left:10px; width:15px; height:15px}
.search-box input {height:34px; padding:6px 10px 6px 32px!important; font-size:14px}
.toolbar-total {font-size:13px; white-space:nowrap}
.primary {font-weight:550; box-shadow:none}
.secondary {font-weight:550}
.field {gap:6px}
.field > span {font-size:13px; color:var(--muted); font-weight:550}
.field > input:not([type=checkbox]),.field > select {height:38px; min-height:38px; border-radius:8px}
.table-wrap {border-radius:9px; border-color:var(--line)}
th {height:35px; background:#f5f7f2; font-weight:550; font-size:13px}
td {height:37px; padding-block:6px; font-size:14px}
td+td,th+th {border-left-color:#f3f5f0}
.title-cell a {font-weight:550}
.data-table tbody tr:nth-child(even) {background:#fdfefb}
.data-table tbody tr:hover,.data-table tbody tr.current {background:#eef4ea}
.empty {padding:32px 16px; background:#fcfdfb; gap:9px}
.empty h2 {font-size:16px; font-weight:550}
.empty p {font-size:13px; color:var(--soft)}
.empty .empty-icon {background:#eef4e9; color:var(--accent)}
.dialog-header {padding:12px 16px}
.dialog-footer {padding:10px 16px}
dialog {border-radius:12px; border-color:var(--line); box-shadow:var(--shadow)}
dialog::backdrop {background:#20362638; backdrop-filter:blur(2px)}
.dialog-content {padding:16px; gap:14px}
dialog.item-dialog {width:min(1120px,calc(100vw - 40px))}
.item-dialog .dialog-content {padding:16px; gap:16px}
.item-form-columns {grid-template-columns:minmax(0,1fr) 240px; gap:20px}
.item-form-properties {border:0; border-left:1px solid var(--line); background:#fafbf8; border-radius:8px; padding:14px; gap:12px}
.item-form-properties .form-grid {gap:12px}
.item-form-properties h3 {font-weight:550; color:var(--muted)}
.item-dialog .editor-head {min-height:28px; color:var(--muted); font-size:13px}
.item-dialog .editor-body {border-color:var(--line); border-radius:8px; box-shadow:none}
.item-dialog .editor-prose {font-size:16px; line-height:1.75; padding-top:14px; padding-right:20px}
.item-dialog .editor-body:focus-within {border-color:#a7bfa5; box-shadow:0 0 0 2px #eff4eb}
.editor-menu,.editor-bubble,.editor-suggestions {border-color:var(--line); box-shadow:0 8px 28px #203d2217; border-radius:9px}
.iteration-filter {display:block; min-width:132px; max-width:180px}
.iteration-choice {position:relative; width:100%; font-size:14px; font-weight:400}
.iteration-choice summary {display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; border:1px solid var(--line-dark); border-radius:8px; background:#fff; padding:8px 10px; height:38px; min-width:0}
.iteration-choice summary::-webkit-details-marker {display:none}
.iteration-choice summary span:first-child {overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.iteration-options {position:absolute; z-index:15; top:calc(100% + 5px); left:0; width:max(100%,240px); max-width:calc(100vw - 48px); padding:8px; background:#fff; border:1px solid var(--line-dark); border-radius:10px; box-shadow:0 8px 26px #203d2220}
.iteration-options .search-box {display:block; width:100%; margin-bottom:6px}
.iteration-options .search-box input {width:100%; font-weight:400; font-size:14px}
.iteration-options [role=listbox] {max-height:210px; overflow:auto; overscroll-behavior:contain}
.iteration-option {display:block; width:100%; text-align:left; padding:8px 10px; border-radius:6px; font-size:14px; font-weight:400}
.iteration-option:hover,.iteration-option[aria-selected=true] {background:var(--accent-bg); color:var(--accent-dark)}
.item-form-properties .iteration-options {left:auto; right:0}
.iterations-table table {table-layout:fixed; min-width:720px}
.iterations-table th:first-child {width:44%}
.iterations-table th:nth-child(2) {width:170px}
.iterations-table th:nth-child(3) {width:100px}
.iterations-table th:nth-child(4) {width:120px}
.iterations-table td:first-child .muted {overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; margin-top:3px}
@media(max-width:700px) {
 .workspace-body {padding:12px}
 .toolbar select {min-width:100px}
 .item-form-columns {grid-template-columns:minmax(0,1fr)}
 .item-form-properties {border-left:0; padding:12px}
 dialog.item-dialog {width:calc(100vw - 16px)}
}

.picker-label {display:block; margin-bottom:6px; font-size:13px; color:var(--muted); font-weight:550}
.iteration-options {position:fixed; overflow:auto; overscroll-behavior:contain}
.item-form-properties .iteration-options {right:auto}

/* Document composition and shared workspace rhythm. */
:root {--ink:#24352d; --muted:#637269; --soft:#7e8b82; --line:#e5eae5; --line-dark:#d4ded5; --surface:#f8faf7}
.workspace-top {font-size:13px}
.sidebar .nav-link {min-height:35px}
.settings-panel {overflow:hidden; border-radius:10px}
.settings-panel > header {min-height:48px; padding:9px 12px; border-bottom:0}
.settings-panel h2 {font-size:15px; font-weight:600}
.settings-panel td {font-size:14px}
.settings-panel .secondary {min-height:32px; font-size:13px}
.table-wrap th {background:#f6f8f5}
.table-wrap td + td,.table-wrap th + th {border-left-color:transparent}
.table-wrap tbody tr:hover {background:#f3f7f0}
.table-foot {padding:10px 2px; gap:10px; font-variant-numeric:tabular-nums}
.table-foot button {min-height:30px}
.quick-cell :is(select,input[type=date]) {border-color:transparent; background-color:transparent; border-radius:5px}
.quick-cell :is(select,input[type=date]):hover {border-color:var(--line-dark); background-color:#fff}
.project-stats {min-height:33px; align-items:center}
.project-stats button {border-radius:5px}
.tabs a,.tabs button {min-height:35px}
.empty {min-height:180px; align-content:center; background:#fdfefc}
.empty p {font-size:14px; color:var(--muted)}
.drawer-head {height:48px; padding-inline:20px}
.drawer-scroll {padding:20px 24px 28px}
.issue-heading {margin-bottom:16px}
.issue-heading h2 {font-size:24px; line-height:1.45; letter-spacing:0}
.properties {border:0; border-radius:6px; padding:8px 12px; background:#f7f9f5}
.properties > div {min-height:35px}
.properties > div > span:first-child {font-size:13px}
.properties b,.properties select {font-size:14px}
.drawer-scroll > section {margin-top:20px}
.relation-section {padding-top:12px}
.comment-meta {gap:8px}
.dialog-header {min-height:50px; padding:10px 20px}
.dialog-header h2 {font-size:15px; font-weight:600}
.dialog-content {padding:20px; gap:16px}
.dialog-footer {min-height:56px; padding:10px 20px; gap:8px}
.dialog-footer .secondary {border-color:transparent}
.dialog-footer .secondary:hover {background:var(--surface)}
dialog.item-dialog {height:min(740px,calc(100dvh - 40px)); width:min(1120px,calc(100vw - 40px))}
.item-dialog .dialog-header {border-bottom:0; color:var(--muted)}
.item-dialog .dialog-content {padding:4px 24px 20px; gap:12px}
.item-document-title {min-width:0; padding-left:32px}
.item-dialog input.document-title {display:block; width:100%; height:52px; padding:4px 0; border:0; border-radius:0; background:transparent; font-size:26px; line-height:1.45; font-weight:600; box-shadow:none}
.item-dialog input.document-title:focus {border-color:transparent!important; box-shadow:none}
.item-dialog input.document-title::placeholder {color:#8c988f; font-weight:500}
.item-form-columns {grid-template-columns:minmax(0,1fr) 260px; gap:20px}
.item-form-properties {align-self:stretch; align-content:start; background:transparent; border:0; border-left:1px solid var(--line); border-radius:0; padding:4px 0 8px 18px; gap:10px}
.item-form-properties h3 {font-size:12px; font-weight:500; color:var(--soft); padding:4px 0 6px}
.item-form-properties .form-grid {gap:4px; grid-template-columns:minmax(0,1fr)}
.item-form-properties .field {display:grid; grid-template-columns:64px minmax(0,1fr); gap:6px; align-items:center; min-height:36px; grid-column:auto}
.item-form-properties .field > span,.item-form-properties .picker-label {font-size:13px; font-weight:400; margin:0; color:var(--muted)}
.item-form-properties .field > :is(select,input:not([type=hidden]),textarea),.item-form-properties .iteration-choice summary {width:100%; height:34px; min-height:34px; padding:6px 8px; border:1px solid transparent; border-radius:6px; font-size:14px; line-height:20px; background-color:transparent; box-shadow:none}
.item-form-properties .field > select {padding-right:24px}
.item-form-properties .field > textarea {height:auto; min-height:68px}
.item-form-properties .field > :is(select,input,textarea):hover,.item-form-properties .iteration-choice summary:hover {background-color:var(--surface); border-color:var(--line)}
.item-form-properties .field > :is(select,input,textarea):focus,.item-form-properties .iteration-choice summary:focus-visible {background-color:#fff; border-color:#a7bda7!important; outline:none; box-shadow:0 0 0 2px #edf3e9}
.item-form-properties [data-custom]:not(:empty) {padding-top:10px; margin-top:8px; border-top:1px solid var(--line)}
.item-dialog .editor-head {display:none}
.item-dialog .editor-body,.item-dialog .editor-body:focus-within {border:0; border-radius:0; box-shadow:none; background:#fff}
.item-dialog .editor-prose {font-size:16px; line-height:1.8; padding:6px 14px 100px 32px; outline:none}
.item-dialog .editor-canvas.is-empty .editor-prose > p:first-child::before {content:'写下事项描述…'; float:left; height:0; color:#8c988f; pointer-events:none}
.item-dialog .insert-button {background:transparent; color:#82927f; border-radius:5px}
.item-dialog .insert-button:hover {background:var(--accent-bg); color:var(--accent)}
.item-dialog .dialog-footer {padding-inline:24px; background:#fcfdfa}
.item-dialog .dialog-footer .draft-note {flex:1; margin:0; min-width:0; font-size:12px; color:var(--muted)}
@media (max-width:700px) {
 dialog.item-dialog {width:calc(100vw - 16px); height:calc(100dvh - 16px)}
 .item-dialog .dialog-content {padding:4px 16px 16px; overflow:auto; display:block}
 .item-document-title {padding-left:0}
 .item-dialog input.document-title {font-size:23px}
 .item-form-columns {grid-template-columns:minmax(0,1fr); gap:14px}
 .item-form-properties {border-left:0; border-top:1px solid var(--line); padding:12px 0 0; overflow:visible}
 .item-form-properties .form-grid {grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:12px}
 .item-form-properties .field {grid-template-columns:58px minmax(0,1fr)}
 .item-dialog [data-editor] {height:clamp(260px,45dvh,440px)}
 .drawer-scroll {padding:16px}
}
@media (max-width:440px) {
 .item-form-properties .form-grid {grid-template-columns:minmax(0,1fr)}
 .table-foot {flex-wrap:wrap}
 .item-dialog .dialog-footer {padding-inline:16px}
}

/* Shared dropdown geometry and full row targets. */
:root {--dropdown-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23637269' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
select,.iteration-choice summary {background-image:var(--dropdown-arrow); background-repeat:no-repeat; background-position:right 10px center; background-size:12px 12px}
.iteration-choice summary {padding:7px 30px 7px 10px; line-height:20px; align-items:center; color:var(--ink)}
.toolbar select,.toolbar .iteration-choice summary {height:34px; min-height:34px!important; padding:6px 30px 6px 10px; line-height:20px; border-radius:7px; font-size:14px}
.toolbar .search-box {display:flex; align-items:center; height:34px}
.toolbar .search-box svg {top:50%; transform:translateY(-50%)}
.field > select {padding-inline:10px 30px}
.item-form-properties .field > select,.item-form-properties .iteration-choice summary {padding-inline:8px 30px}

.item-drawer-head {height:54px; padding-inline:22px; gap:4px; background:#fcfdfa}
.item-drawer-head .drawer-kicker {gap:9px; min-width:0}
.item-drawer-head .drawer-kicker .mono {white-space:nowrap; color:var(--muted)}
.item-drawer-head .drawer-kicker .pill {min-width:0; overflow:hidden; text-overflow:ellipsis; display:block}
.item-drawer-head [data-close-detail] {margin-left:5px}
.item-drawer-head [data-delete-item]:hover {color:#a33943; background:#fff0f1}
.item-drawer-scroll {padding:22px 24px 32px}
.issue-summary {padding-bottom:20px; border-bottom:1px solid var(--line)}
.issue-summary h2 {font-size:25px; line-height:1.36; margin:0 0 17px; font-weight:650; overflow-wrap:anywhere}
.issue-metadata {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 20px; margin:0; padding:12px 14px; background:#f5f8f3; border-radius:8px}
.issue-metadata > div {display:grid; grid-template-columns:64px minmax(0,1fr); align-items:baseline; gap:6px; min-width:0}
.issue-metadata dt {font-size:12px; color:var(--muted); overflow-wrap:anywhere}
.issue-metadata dd {margin:0; min-width:0; font-size:14px; font-weight:530; white-space:pre-wrap; overflow-wrap:anywhere}
.issue-metadata select {min-height:28px; max-width:100%; padding-block:3px; font-size:13px; color:var(--accent-dark)}
.item-drawer-scroll > :is(.description,.relation-section,.activity) {margin-top:19px}
.item-drawer-scroll .section-title {margin-bottom:7px}
.item-drawer-scroll .section-title h3 {font-size:13px; font-weight:630; color:var(--muted)}
.item-drawer-scroll .description .prose {line-height:1.72}
.item-drawer-scroll .relation-section {padding-top:10px}
.item-drawer-scroll .activity .tabs {gap:18px}
.item-drawer-scroll .comment-form {padding:10px; border:1px solid var(--line); border-radius:8px; background:#fcfdfa}
.item-drawer-scroll .comment-form textarea {display:block; background:#fff}
.image-trigger {display:inline-block; padding:0; max-width:100%; text-align:left; cursor:zoom-in; border-radius:7px}
.prose .image-trigger {vertical-align:top; margin:4px 0; border:1px solid var(--line)}
.prose .image-trigger img {margin:0; object-fit:contain}
.prose img {cursor:zoom-in}

dialog.image-preview {width:min(1280px,calc(100vw - 48px)); height:min(900px,calc(100dvh - 48px)); max-width:none; max-height:none; background:#18221e; color:#fff; border-color:#34423b; overflow:hidden}
dialog.image-preview[open] {display:flex; flex-direction:column}
dialog.image-preview::backdrop {background:#09110ccc; backdrop-filter:none}
.image-preview-toolbar {display:flex; align-items:center; gap:9px; flex:none; padding:8px 12px; border-bottom:1px solid #ffffff26}
.image-preview-toolbar > span {flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px}
.image-preview-toolbar .icon-button,.image-zoom-toggle {color:#f4f8f4}
.image-zoom-toggle {border:1px solid #ffffff45; border-radius:6px; padding:4px 10px; font-size:13px}
.image-preview-toolbar :is(.icon-button,.image-zoom-toggle):hover {background:#ffffff1a; color:#fff}
.image-preview-stage {display:flex; justify-content:center; align-items:center; flex:1; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain}
.image-preview-stage img {display:block; max-width:100%; max-height:100%; object-fit:contain}
.image-preview-stage.is-original {display:block}
.image-preview-stage.is-original img {max-width:none; max-height:none; margin-inline:auto}
@media (max-width:720px) {
  .item-drawer-head {padding-inline:14px}
  .item-drawer-scroll {padding:16px 16px 24px}
  .issue-summary h2 {font-size:22px}
  .issue-metadata {gap:10px 14px; padding:10px}
  .issue-metadata > div {grid-template-columns:1fr; gap:2px}
  dialog.image-preview {width:calc(100vw - 16px); height:calc(100dvh - 16px)}
}
.quick-cell select {padding-inline:8px 30px; height:28px; line-height:20px}
tr[data-url] {cursor:pointer}
tr[data-url]:hover,tr[data-url]:focus-within {background:#eef4ea}
.project-stats-table td:not(:first-child):has(.project-stat-link) {padding:0}
.project-stats-table .project-stat-link {display:flex; align-items:center; justify-content:center; width:100%; min-height:38px; padding:6px 9px; border-radius:0}
.project-stats-table .project-stat-link:hover {background:#e7efe3}
.project-stat-name,.iteration-name {display:inline-flex; align-items:center; min-height:26px}
.iterations-table th:last-child {width:150px}
.iterations-table :is(th,td):last-child {text-align:right}
