:root {
  color-scheme: light;
  --ink: #182a27;
  --muted: #536663;
  --brand: #106856;
  --brand-hover: #0a5143;
  --brand-soft: #e0f1ea;
  --brand-stroke: #b7d8cd;
  --focus: #107865;
  --surface: #fff;
  --paper: #f4f8f6;
  --line: #d9e4e0;
  --soft-line: #e9efed;
  --control-line: #cbd9d4;
  --danger: #982f30;
  --danger-bg: #fff1ef;
  --radius: .65rem;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  font-size: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; color: inherit; }
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 2.25rem;
  padding: .35rem .75rem;
  white-space: nowrap;
}
button:hover:not(:disabled) { border-color: var(--brand-stroke); background: var(--paper); }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 680; }
button.primary:hover:not(:disabled) { background: var(--brand-hover); }
button.danger { color: var(--danger); }
button.quiet { border-color: transparent; background: none; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:not([type="checkbox"]), textarea, select {
  border: 1px solid var(--control-line);
  border-radius: .45rem;
  background: var(--surface);
  padding: .45rem .55rem;
  min-height: 2.3rem;
  min-width: 0;
}
textarea { resize: vertical; }
h1, h2, p { margin-block-start: 0; }
h1 { line-height: 1.2; letter-spacing: -.035em; }
.kicker { color: var(--brand); font-weight: 750; font-size: .8rem; letter-spacing: .04em; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: .35rem 0 0; overflow-wrap: anywhere; }
.notice {
  width: max-content;
  max-width: min(90vw, 42rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 .5rem 2rem #233a3020;
  padding: .65rem 1rem;
}
#notices { position: fixed; top: 4.5rem; left: 50%; transform: translateX(-50%); z-index: 6; }
.mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  display: block;
}
/* V45 split sign-in shell. */
.login-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--surface);
}
.login-brand {
  display: grid;
  position: relative;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, var(--paper), var(--brand-soft));
  border-inline-end: 1px solid var(--line);
  padding: 4rem 2rem;
}
.login-word { display: flex; gap: .65rem; align-items: center; font-size: 1.12rem; font-weight: 720; color: var(--ink); }
.login-brand > .login-word { position: absolute; inset-block-start: 1.85rem; inset-inline-start: 2rem; }
.login-art {
  position: relative;
  width: min(90%, 20rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.login-art::before, .login-art::after {
  content: '';
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
  border-radius: 28%;
  inset: 7%;
  z-index: -1;
}
.login-art::after { inset: -6%; opacity: .65; }
.login-art-board {
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 25%;
  background: color-mix(in srgb, var(--surface) 66%, var(--brand-soft));
  color: var(--brand);
  box-shadow: 0 1.1rem 2.6rem color-mix(in srgb, var(--brand) 13%, transparent);
}
.login-art-mark {
  display: block;
  width: 64%;
  height: auto;
  filter: drop-shadow(0 .4rem .85rem #12504335);
}
.login-panel { display: grid; place-items: center; min-width: 0; padding: clamp(1.3rem, 5vw, 4.5rem); }
.login-form-block { width: min(100%, 25.5rem); }
.login-mobile-word { display: none; }
.login-panel h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); margin-bottom: .52rem; }
.login-lead { font-size: .96rem; margin-bottom: 1.75rem; }
.login-form.stack { gap: .9rem; }
.login-credentials { display: grid; gap: 1rem; }
.login-error {
  margin: 0;
  padding: .65rem .8rem;
  border-radius: .5rem;
  background: var(--danger-bg);
  font-size: .9rem;
}
.login-password-wrap { position: relative; }
.login-form .login-password-wrap input { padding-inline-end: 3.1rem; }
.login-password-field { display: grid; gap: .35rem; }
.login-password-visibility {
  position: absolute;
  inset-inline-end: .3rem;
  inset-block-start: 50%;
  transform: translateY(-50%);
}
.login-panel .stack .login-password-visibility { min-width: 2.35rem; min-height: 2.35rem; padding: 0; color: var(--muted); }
.login-panel .login-form input:not([type="checkbox"]) { min-height: 3rem; padding-inline-start: .78rem; }
.login-panel .login-form input[aria-invalid="true"] { border-color: var(--danger); }
.login-factor-field input { font-variant-numeric: tabular-nums; letter-spacing: .2em; }
.login-factor-field small { display: block; margin-top: .45rem; font-size: .88rem; }
.login-form .primary { min-height: 3rem; margin-top: .2rem; }
.login-back { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.stack label { display: grid; gap: .35rem; font-weight: 650; }
.stack input { width: 100%; }
.stack button { min-height: 2.65rem; }
.top {
  min-height: 3.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .55rem clamp(.65rem, 2vw, 1.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brandbar, .top-actions, .grid-action-buttons { display: flex; align-items: center; gap: .55rem; }
.brandbar { min-width: 0; }
.brandbar a { text-decoration: none; font-size: 1rem; font-weight: 770; }
.top-actions .account-name { max-width: 13ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; border-radius: 50%; width: 1.8rem; height: 1.8rem; background: var(--brand-soft); color: var(--brand); font-weight: 740; flex: none; }
.top-actions a { white-space: nowrap; }
.content { width: min(100%, 72rem); margin-inline: auto; padding: clamp(1rem, 4vw, 3.4rem); }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-title h1 { font-size: clamp(1.7rem, 3vw, 2.75rem); margin-bottom: .2rem; }
.page-title p { margin-bottom: 0; }
.doc-list { padding: 0; margin: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.doc-link { display: flex; text-decoration: none; gap: .75rem; justify-content: space-between; align-items: center; padding: .95rem 1rem; color: var(--ink); }
.doc-list li + li { border-top: 1px solid var(--soft-line); }
.doc-link:hover { background: #f1f8f4; }
.doc-link .title { display: flex; gap: .55rem; align-items: center; min-width: 0; }
.doc-link .title strong { overflow-wrap: anywhere; }
.role { display: inline-flex; align-items: center; background: var(--brand-soft); color: #205643; font-size: .78rem; border-radius: .4rem; padding: .22rem .47rem; font-weight: 650; white-space: nowrap; }
.role.read { background: #eaf0f3; color: #415962; }
.empty { padding: clamp(1.5rem, 6vw, 4rem) 1rem; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); display: block; margin-bottom: .35rem; }
.card { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.grid .editing td { background: #eff8f3; border-bottom-color: #d3e6dc; }
.grid .cell-input { display: block; width: 100%; }
.grid textarea.cell-input { min-height: 2.9rem; padding-top: .35rem; }
.grid .field-disabled { color: var(--muted); font-size: .82rem; }
.grid details { background: #fff; border: 1px solid var(--line); border-radius: .42rem; padding: .34rem .45rem; }
.grid details summary { cursor: pointer; white-space: nowrap; }
.grid details label { display: flex; align-items: baseline; gap: .3rem; }
.grid .file-picker { width: 100%; }
.grid .attachment-item { display: flex; align-items: center; gap: .35rem; font-size: .82rem; }
.grid .attachment-item span { min-width: 0; overflow-wrap: anywhere; }
.grid .attachment-item button { flex: none; padding: .1rem .3rem; min-height: 1.5rem; line-height: 1.1; }
.grid-panel-main { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.conflict-note { color: var(--danger); background: var(--danger-bg); border-radius: .45rem; padding: .5rem .7rem; margin: .5rem 0; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; width: min(calc(100vw - 2rem), 27rem); color: var(--ink); box-shadow: 0 1rem 3rem #172d2250; }
dialog::backdrop { background: #132d245c; }
dialog h2 { margin-bottom: .55rem; font-size: 1.25rem; }
.dialog-actions { display: flex; justify-content: end; gap: .5rem; }
@media (max-width: 650px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { align-items: center; }
  .login-mobile-word { display: block; margin-bottom: 2rem; }
  .login-panel .login-form input:not([type="checkbox"]) { font-size: max(1rem, 16px); }
  .top { gap: .3rem; }
  .top-actions { gap: .4rem; }
  .top-actions .account-name { display: none; }
}

.workspace-floating.view-dialog { width: min(30rem, calc(100vw - 16px)); padding: .9rem 1rem; }
.workspace-floating.view-dialog-filtering { width: min(38rem, calc(100vw - 16px)); }
.view-dialog > h2 { font-size: 1.05rem; margin: 0 0 .24rem; line-height: 1.3; }
.view-rule-help { margin: 0 0 .75rem; font-size: .8rem; line-height: 1.4; }
.view-rule-form, .view-rule-list { display: grid; gap: .45rem; }
.view-rule-form label, .view-filter-choice { display: grid; gap: .2rem; min-width: 0; }
.view-rule-mode { display: flex; align-items: center; gap: .5rem; justify-self: start; }
.view-rule-form label > span, .view-filter-choice > span, .view-rule-field > span, .view-rule-mode > span { color: var(--muted); font-size: .8rem; }
.view-rule-mode > span { white-space: nowrap; }
.view-rule-mode .view-choice-trigger { min-width: 7rem; width: auto; }
.view-rule-form :is(select,input) { width: 100%; min-height: 34px; padding-block: .24rem; }
.view-rule { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: end; gap: .5rem; padding-block: .45rem; border-top: 1px solid var(--soft-line); }
.view-dialog-filtering .view-rule { grid-template-columns: minmax(0, 1fr) minmax(0, 2.65fr) auto; }
.view-rule-detail { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: .4rem; min-width: 0; }
.view-dialog-filtering .view-rule-detail:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.view-dialog-filtering .view-rule-detail:has(.view-range) { grid-template-columns: minmax(0, 1fr); }
.view-rule-actions, .view-add-rule { display: flex; align-items: center; gap: .22rem; }
.view-rule-actions .icon-button { width: 30px; min-height: 34px; padding: 0; }
.view-add-rule { gap: .55rem; }
.view-add-rule button { min-height: 32px; color: var(--brand); }
.view-range { display: flex; align-items: end; flex-wrap: wrap; gap: .35rem; }
.view-range label { flex: 1 1 6rem; }
.view-rule-form .dialog-actions { padding-top: .55rem; border-top: 1px solid var(--soft-line); }
.view-rule-form .dialog-actions button { min-height: 32px; }
button.filter-options-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: .3rem; width: 100%;
  min-height: 34px; min-width: 0; padding: .26rem .45rem; text-align: start; border-color: var(--control-line);
}
.filter-options-trigger > span, .filter-option > span { overflow: hidden; text-overflow: ellipsis; }
.filter-options-trigger[aria-expanded="true"] { border-color: var(--brand); }
.filter-options-trigger > svg { flex: none; color: var(--muted); }
.filter-chip-list { display: flex; align-items: center; gap: .2rem; min-width: 0; overflow: hidden; }
.filter-chip, .filter-chip-extra {
  max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: .85rem;
  padding: .08rem .4rem; background: color-mix(in srgb, var(--swatch, var(--brand)) 21%, var(--surface)); font-size: .8rem;
}
.filter-chip-extra { flex: none; font-variant-numeric: tabular-nums; background: var(--paper); }
.filter-options-popover { width: min(16rem, calc(100vw - 16px)); }
.filter-options-popover > input { width: 100%; }
.filter-options-popover .filter-option { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 34px; }
.filter-options-popover .filter-option .filter-chip { max-width: 95%; }
.view-choice-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.workspace-floating.view-choice-popover { width: min(11rem, calc(100vw - 16px)); padding: .24rem; }
.view-choice-popover .view-field-choices { margin: 0; max-height: 18rem; }
.view-choice-popover .filter-option[aria-selected="true"] { color: var(--brand-hover); background: var(--brand-soft); }
.grid .view-group td, .grid .view-group:hover td { padding-block: .12rem; background: #f5faf7; }
.view-group-toggle {
  display: inline-flex;
  position: sticky;
  left: .65rem;
  align-items: baseline;
  gap: .45rem;
  min-height: 1.85rem;
  max-width: min(85vw, 34rem);
  border: 0;
  padding: .2rem .35rem .2rem calc(.35rem + var(--group-depth, 0) * 1.1rem);
  background: transparent;
  font-size: .85rem;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.view-group-field, .view-group-count { color: var(--muted); }
.view-group-count { font-size: .8rem; white-space: nowrap; }
.view-group-chevron { color: var(--brand); }
@media (max-width: 500px) {
  .workspace-floating.view-dialog { padding: .75rem; }
  .view-rule, .view-dialog-filtering .view-rule { grid-template-columns: minmax(0, 1fr) auto; }
  .view-rule > .view-rule-field { grid-column: 1 / -1; }
  .view-rule-actions { justify-content: end; }
}

.table-inline-name { display: flex; align-items: center; gap: .15rem; }
.table-inline-name input { width: clamp(6.5rem, 16vw, 13rem); min-height: 2rem; padding-block: .22rem; }
.table-inline-name button { padding-inline: .3rem; min-height: 1.9rem; }
.table-action-menu { margin: 0; inset: auto; padding: .32rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 .4rem 1.6rem #172d2233; }
.table-action-menu button { display: block; width: 100%; text-align: start; }
.all-table-list { list-style: none; margin: 0; padding: 0; max-height: 45vh; overflow: auto; }
.all-table-list button { width: 100%; text-align: start; white-space: normal; margin-block-end: .25rem; }
.all-table-list .active-table { background: var(--brand-soft); color: var(--brand); }
.table-copy-scope { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.table-copy-scope label { display: flex; align-items: center; justify-content: start; padding: .3rem 0; }
.table-copy-scope input { width: auto; min-height: 0; }
.field-default { display: grid; gap: .35rem; }
.record-detail { width: min(calc(100vw - 2rem), 34rem); }
.record-detail-title { font-weight: 700; overflow-wrap: anywhere; }
.record-detail dl, .conflict-values { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(0, 3fr); gap: .55rem .8rem; }
.record-detail dl { overflow-y: auto; max-height: min(44vh, 28rem); }
.record-detail dt, .conflict-values dt { color: var(--muted); }
.record-detail dd, .conflict-values dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.notice button { min-height: 1.9rem; }
.grid [aria-invalid="true"] { border-color: var(--danger); }

@media (max-width: 590px) {
  .table-inline-name { flex-wrap: wrap; }
}

.attachment-link { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.attachment-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.attachment-preview { display: inline-flex; align-items: center; padding: 1px; min-height: 0; border-color: transparent; }
.attachment-thumbnail { width: 2.35rem; height: 1.95rem; object-fit: cover; border-radius: .25rem; }
.attachment-preview:has(.attachment-thumbnail[hidden])::after { content: "预览"; padding: 0 4px; color: var(--muted); }
.attachment-stack { position: relative; min-width: 0; padding-inline-end: 2.1rem; }
.attachment-tiles { display: flex; align-items: center; gap: .2rem; overflow: hidden; }
.attachment-tiles > .attachment-link { display: flex; align-items: center; min-width: 0; gap: .22rem; }
.attachment-tiles > .attachment-link span { overflow: hidden; text-overflow: ellipsis; }
button.attachment-count {
  position: absolute; inset: 0 0 auto auto; display: flex; align-items: center; gap: .1rem;
  min-height: 1.5rem; padding: 0 .25rem; color: var(--muted); font-size: .76rem;
}
.attachment-menu { width: min(19rem, calc(100vw - 16px)); }
.attachment-menu > h2 { font-size: .96rem; }
.attachment-menu-list { display: grid; gap: .26rem; padding: 0; margin: 0; list-style: none; }
.attachment-menu-list li > :is(button, a) { display: flex; align-items: center; width: 100%; gap: .5rem; text-align: start; }
.attachment-menu-list li > :is(button, a) span { overflow: hidden; text-overflow: ellipsis; }
dialog.attachment-viewer {
  --viewer-margin: clamp(6px, 1vw, 12px);
  position: fixed;
  inset: 0;
  width: calc(100vw - 2 * var(--viewer-margin));
  height: calc(100dvh - 2 * var(--viewer-margin));
  max-width: none;
  max-height: none;
  padding: clamp(.5rem, 1.1vw, .9rem);
  background: var(--surface);
  overflow: hidden;
}
dialog.attachment-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .55rem; }
.attachment-viewer-header { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.attachment-viewer-header h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.attachment-viewer-header button { width: 2rem; min-height: 2rem; padding: 0; }
.attachment-counter { flex: none; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attachment-stage { display: grid; position: relative; min-width: 0; min-height: 0; }
.attachment-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .55rem;
}
.attachment-canvas { display: grid; place-items: center; width: max-content; min-width: 100%; min-height: 100%; }
.attachment-canvas img { display: block; max-width: none; height: auto; }
.attachment-viewer-status { max-width: min(25rem, 65vw); text-align: center; margin: 0; }
.attachment-side {
  position: absolute;
  inset-block-start: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--control-line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px #152d2925;
}
.attachment-side:disabled { opacity: .55; }
.attachment-side-previous { inset-inline-start: .65rem; }
.attachment-side-next { inset-inline-end: .65rem; }
.attachment-viewer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .4rem .65rem;
}
.attachment-viewer-footer > a,
.attachment-navigation { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.attachment-viewer-footer > a { grid-column: 3; justify-self: end; }
.attachment-navigation { grid-column: 2; justify-self: center; }
.attachment-navigation button { min-height: 2rem; padding-inline: .4rem; }
.attachment-zoom { display: flex; align-items: center; gap: .28rem; min-width: 0; justify-self: start; max-width: 100%; }
.attachment-zoom input { accent-color: var(--brand); width: clamp(3rem, 13vw, 10rem); min-width: 2rem; padding: 0; border: 0; }
.attachment-zoom button { padding-inline: .35rem; min-width: 2rem; min-height: 2rem; }
.attachment-zoom-value { min-width: 3.4em; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .attachment-viewer-footer { grid-template-columns: minmax(0, 1fr) auto; }
  .attachment-viewer-footer > a { grid-column: 2; grid-row: 1; }
  .attachment-navigation { grid-column: 1 / -1; grid-row: 2; }
  .attachment-zoom input { width: clamp(3rem, 18vw, 8rem); }
}

.attachment-popover { width: min(19rem, calc(100vw - 16px)); }
.attachment-drop { display: grid; justify-items: center; gap: 7px; padding: 14px 8px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.attachment-editor:not(:empty) { margin-bottom: 8px; }
.attachment-editor .attachment-item { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.attachment-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item .icon-button { margin-inline-start: auto; }
.option-initial { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 10px; }
#notices { max-width: min(32rem, calc(100vw - 20px)); }

.grid-row-menu [role="menuitem"] { display: flex; align-items: center; gap: 7px; }
.grid .option-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-inline-end: 4px;
  min-height: 19px;
  margin-block: 1px;
  border-radius: 4px;
  background: var(--option-color, color-mix(in srgb, var(--swatch, var(--brand)) 15%, var(--surface)));
  padding: 1px 6px;
  font-size: 12px;
  color: var(--option-ink, var(--ink));
}
.grid .option-person { padding-inline: 0 3px; background: transparent; color: var(--ink); }
.filter-chip[data-option-color] { background: var(--option-color); color: var(--option-ink); }
