:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d8dee6;
  --text: #1f2933;
  --muted: #667085;
  --blue: #1769aa;
  --blue-2: #e8f2fb;
  --green: #087443;
  --green-2: #e7f6ef;
  --amber: #a15c07;
  --amber-2: #fff2d8;
  --red: #b42318;
  --red-2: #fff0ed;
  --slate: #344054;
  --shadow: 0 12px 32px rgba(16, 24, 40, .10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

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

button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
}

button:hover {
  border-color: #9eb3c7;
}

button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

button.success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

button.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

button.purple {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

button.link {
  border: 0;
  padding: 0;
  min-height: auto;
  color: var(--blue);
  background: transparent;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 78px;
  resize: vertical;
}

label {
  display: block;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 5px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #f8fafc;
}

.landing-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 22% 18%, rgba(46, 113, 162, .34), transparent 32%),
    linear-gradient(122deg, #071827 0%, #0b2c45 57%, #103d5c 57%, #0a2337 100%);
}

.landing-page::before {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: clamp(90px, 17vw, 300px);
  content: "";
  background: linear-gradient(160deg, #ff6b1a 0%, #f34b00 58%, #b92b00 100%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: -28px 0 80px rgba(0, 0, 0, .24);
}

.landing-page::after {
  position: absolute;
  z-index: -1;
  right: -12vw;
  bottom: -26vh;
  width: 68vw;
  height: 52vh;
  content: "";
  border: 1px solid rgba(255, 255, 255, .18);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 18px);
  transform: rotate(-8deg);
}

.landing-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.landing-content {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  padding-left: clamp(0px, 5vw, 72px);
}

.landing-content::before {
  display: block;
  width: clamp(76px, 9vw, 128px);
  height: 8px;
  margin-bottom: clamp(24px, 5vh, 58px);
  content: "";
  background: #ff5a0a;
  box-shadow: 34px 0 0 rgba(255, 255, 255, .82);
}

.landing-content h1 {
  max-width: 940px;
  margin: 0;
  letter-spacing: .025em;
  text-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

.landing-content h1 span,
.landing-content h1 strong {
  display: block;
}

.landing-content h1 span {
  margin-bottom: .3em;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(22px, 3.5vw, 46px);
  font-weight: 650;
}

.landing-content h1 strong {
  color: #fff;
  font-size: clamp(48px, 8vw, 108px);
  font-weight: 850;
  line-height: 1.06;
}

.landing-records {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 24px;
  color: rgba(255, 255, 255, .64);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.landing-records a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.landing-records a:hover {
  color: #fff;
  text-decoration: underline;
}

.landing-records a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.landing-records span {
  margin: 0 9px;
  color: rgba(255, 255, 255, .34);
}

.landing-start {
  min-width: clamp(190px, 22vw, 270px);
  min-height: clamp(64px, 8vh, 82px);
  margin-top: clamp(46px, 8vh, 86px);
  padding: 0 28px 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 2px;
  color: #fff;
  background: linear-gradient(100deg, #ff5a0a, #e94700);
  box-shadow: 0 22px 50px rgba(220, 58, 0, .34);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: .18em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.landing-start i {
  font-size: 1.25em;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  transition: transform .2s ease;
}

.landing-start:hover {
  border-color: #fff;
  background: linear-gradient(100deg, #ff6b1a, #f24f00);
  box-shadow: 0 26px 62px rgba(220, 58, 0, .46);
  transform: translateY(-3px);
}

.landing-start:hover i {
  transform: translateX(6px);
}

.landing-start:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}

.landing-structure {
  position: absolute;
  z-index: -1;
  width: clamp(180px, 24vw, 410px);
  height: clamp(220px, 42vh, 480px);
  opacity: .28;
  pointer-events: none;
}

.landing-structure span {
  position: absolute;
  display: block;
  background: #80abc8;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}

.landing-structure span:nth-child(1),
.landing-structure span:nth-child(2) {
  top: 0;
  bottom: 0;
  width: 9px;
}

.landing-structure span:nth-child(1) { left: 16%; }
.landing-structure span:nth-child(2) { right: 16%; }

.landing-structure span:nth-child(3),
.landing-structure span:nth-child(4) {
  left: 0;
  right: 0;
  height: 8px;
  transform-origin: center;
}

.landing-structure span:nth-child(3) { top: 27%; transform: rotate(23deg); }
.landing-structure span:nth-child(4) { top: 64%; transform: rotate(-23deg); }
.landing-structure-left { left: -9%; bottom: -16%; transform: rotate(-8deg); }
.landing-structure-right { right: 3%; top: 4%; opacity: .38; transform: rotate(7deg); }

.login-wrap {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    radial-gradient(circle at 20% 12%, #164d71 0, transparent 34%),
    #071c2c;
  background-size: 64px 64px, 64px 64px, auto, auto;
}

.login-wrap::after {
  position: absolute;
  z-index: -1;
  right: -80px;
  bottom: -160px;
  width: 420px;
  height: 560px;
  content: "";
  background: linear-gradient(160deg, #ff6819, #d93f00);
  transform: rotate(18deg);
  box-shadow: 0 0 80px rgba(242, 79, 0, .2);
}

.login-box {
  position: relative;
  width: min(440px, 100%);
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255, 255, 255, .72);
  border-top: 5px solid #f25512;
  border-radius: 10px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .35);
  padding: 30px;
}

.login-box h1 {
  margin: 8px 0 7px;
  color: #102f46;
  font-size: 24px;
  letter-spacing: .02em;
}

.login-box p {
  margin: 0 0 22px;
  color: var(--muted);
}

.login-back {
  min-height: auto;
  padding: 0;
  border: 0;
  color: #49677c;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.login-back:hover {
  border-color: transparent;
  color: #e84c06;
}

.login-box input:focus,
.login-box select:focus,
.login-box textarea:focus {
  border-color: #1769aa;
  outline: 3px solid rgba(23, 105, 170, .14);
}

.password-change-page {
  width: min(480px, 100%);
}

.password-change-page .password-change-logout {
  margin-top: 18px;
}

.modal.password-change-modal {
  width: min(480px, 100%);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
  background: #202b36;
  color: #fff;
  padding: 16px 12px;
}

.brand {
  padding: 8px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: 12px;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span {
  color: rgba(255,255,255,.7);
  font-size: 12px;
}

.nav button {
  width: 100%;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.82);
  background: transparent;
  border-color: transparent;
  text-align: left;
  margin: 2px 0;
}

.nav button.active {
  background: rgba(255,255,255,.13);
  color: #fff;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
}

.maintenance-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
  background: var(--amber-2);
}

.maintenance-banner.danger {
  color: var(--red);
  background: var(--red-2);
}

.maintenance-banner div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-banner span {
  overflow-wrap: anywhere;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.mobile-only {
  display: none;
}

.mobile-card-list {
  display: grid;
  gap: 10px;
}

.mobile-card-list.mobile-only {
  display: none;
}

.mobile-record-card {
  min-width: 0;
}

.mobile-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mobile-record-head strong,
.mobile-record-card strong {
  overflow-wrap: anywhere;
}

.mobile-record-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mobile-record-meta div,
.mobile-record-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mobile-record-note {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--slate);
  line-height: 1.5;
}

.mobile-record-actions {
  margin-top: 10px;
}

.workday-card-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.workday-card-form button {
  grid-column: 1 / -1;
}

.content {
  padding: 18px 20px 40px;
}

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

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

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.panel h2, .panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.collapsible-panel {
  padding: 0;
}

.collapsible-panel > summary {
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.collapsible-panel > summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel > summary h2 {
  margin: 0;
}

.collapsible-panel.collapsed-default > summary {
  background: #fff;
}

.collapsible-body {
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
}

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

.org-review-head {
  min-width: 0;
}

.org-review-meta-line {
  margin-top: 4px;
  line-height: 1.5;
}

.org-review-due {
  margin-top: 6px;
  color: var(--blue);
  font-weight: 700;
  line-height: 1.45;
}

.org-review-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}

.org-review-detail-grid label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.org-review-task-table {
  margin-bottom: 14px;
}

.org-review-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.org-review-expert-list {
  display: grid;
  gap: 8px;
}

.org-review-expert-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.readonly-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  font-weight: 700;
}

@media (max-width: 720px) {
  .org-review-card > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .org-review-summary {
    justify-content: flex-start;
  }

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

  .org-review-detail-grid .span-2 {
    grid-column: 1 / -1;
  }

  .org-review-expert-row {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
}

.storage-panel .toolbar {
  align-items: flex-start;
  flex-wrap: wrap;
}

.storage-panel .toolbar button {
  white-space: normal;
}

.maintenance-panel .toolbar {
  align-items: flex-start;
}

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

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--slate);
  font-size: 13px;
  font-weight: 600;
}

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

.maintenance-note {
  margin: 0;
}

.maintenance-page .row-actions {
  margin-top: 12px;
}

.storage-stat strong {
  font-size: 20px;
  word-break: break-word;
}

.weekly-backup-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #bdd7e9;
  border-left: 4px solid #1769aa;
  border-radius: 9px;
  background: linear-gradient(105deg, #edf7fd, #f9fcfe 68%, #fff6ee);
}

.weekly-backup-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1769aa;
  box-shadow: 0 8px 20px rgba(23, 105, 170, .22);
}

.weekly-backup-mark::before,
.weekly-backup-mark::after,
.weekly-backup-mark span {
  position: absolute;
  content: "";
  background: #fff;
}

.weekly-backup-mark::before {
  left: 13px;
  bottom: 14px;
  width: 27px;
  height: 15px;
  border-radius: 12px;
}

.weekly-backup-mark::after {
  left: 18px;
  bottom: 22px;
  width: 19px;
  height: 15px;
  border-radius: 50%;
}

.weekly-backup-mark span {
  z-index: 1;
  left: 24px;
  top: 12px;
  width: 4px;
  height: 19px;
  border-radius: 3px;
}

.weekly-backup-mark span::before,
.weekly-backup-mark span::after {
  position: absolute;
  top: 0;
  width: 4px;
  height: 12px;
  border-radius: 3px;
  content: "";
  background: #fff;
  transform-origin: top;
}

.weekly-backup-mark span::before { transform: rotate(42deg); }
.weekly-backup-mark span::after { transform: rotate(-42deg); }

.weekly-backup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.weekly-backup-heading h3 {
  margin: 0 0 4px;
  color: #143b57;
  font-size: 16px;
}

.weekly-backup-heading p {
  margin: 0;
  color: #526c7d;
  font-size: 12px;
  line-height: 1.6;
}

.weekly-backup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 11px;
  color: #334e61;
  font-size: 12px;
}

.weekly-backup-meta span {
  display: inline-flex;
  gap: 7px;
  min-width: 160px;
  overflow-wrap: anywhere;
}

.weekly-backup-meta b {
  color: #667f90;
  font-weight: 600;
}

.storage-safe-note {
  margin: 12px 0;
}

.storage-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.storage-details span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  background: #f8fafc;
  font-size: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

[data-meeting-task-field],
[data-assignee-field] {
  align-self: start;
}

.notice-recipient-box {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.notice-recipient-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.notice-recipient-actions {
  display: flex;
  gap: 8px;
}

.notice-recipient-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.ip-author-box {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.ip-author-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ip-author-list {
  display: grid;
  gap: 8px;
}

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

.overtime-worker-box {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.overtime-worker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.overtime-worker-list {
  display: grid;
  gap: 8px;
}

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

.notice-recipient-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notice-recipient-item input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
}

.notice-recipient-item span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notice-recipient-item strong,
.notice-recipient-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-recipient-item small {
  color: var(--muted);
}

.notice-reply-field,
.notice-reply-block,
.notice-receipts {
  margin-top: 12px;
}

.notice-reply-field textarea {
  min-height: 110px;
}

.notice-reply-block,
.notice-receipts {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.notice-reply-block div {
  margin-top: 6px;
  white-space: pre-wrap;
}

.notice-receipt-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.notice-receipt-item {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(130px, auto);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notice-receipt-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notice-receipt-item strong,
.notice-receipt-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-receipt-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--slate);
  white-space: pre-wrap;
}

.notice-record {
  padding: 0;
  overflow: hidden;
}

.notice-summary {
  min-height: 48px;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.notice-summary::-webkit-details-marker {
  display: none;
}

.notice-summary-main {
  min-width: 0;
}

.notice-summary-main strong {
  margin-right: 6px;
  overflow-wrap: anywhere;
}

.notice-summary-status {
  flex: 0 0 auto;
}

.notice-record-body {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.notice-record-content {
  white-space: pre-line;
  line-height: 1.55;
}

.forced-notice-form {
  display: contents;
}

.project-create-form {
  display: grid;
  grid-template-columns: minmax(160px, .9fr) minmax(240px, 1.4fr) minmax(220px, 1.2fr) minmax(120px, auto);
  gap: 10px;
  align-items: end;
}

.subitem-edit-hint {
  margin: 10px 0 0;
}

.project-edit-hint {
  margin: 10px 0 0;
}

.project-transfer-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--blue-2);
  line-height: 1.6;
}

.designer-material-panel {
  border-color: #bfdbfe;
  box-shadow: inset 3px 0 0 var(--blue);
}

.designer-material-panel .toolbar {
  margin-bottom: 12px;
}

.designer-material-panel .toolbar h2 {
  margin-bottom: 3px;
}

.subitem-row.subitem-editable {
  cursor: pointer;
}

.subitem-row.subitem-editable:hover td {
  background: #f2f7fc;
}

.subitem-edit-modal {
  max-width: 980px;
}

.task-draft-edit-modal {
  max-width: 1040px;
}

.subitem-edit-actions {
  justify-content: space-between;
  margin-top: 4px;
}

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

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

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

.span-2 {
  grid-column: span 2;
}

.span-4 {
  grid-column: span 4;
}

.project-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 12px;
}

.project-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-right: 4px;
}

.project-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px;
  text-align: left;
}

.project-item.active {
  border-color: var(--blue);
  background: var(--blue-2);
}

.project-detail-section h2 {
  margin-bottom: 12px;
}

.project-detail-section table {
  margin-top: 0;
}

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

.small {
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f6;
  color: var(--slate);
}

.badge.blue {
  background: var(--blue-2);
  color: var(--blue);
}

.badge.green {
  background: var(--green-2);
  color: var(--green);
}

.badge.amber {
  background: var(--amber-2);
  color: var(--amber);
}

.badge.red {
  background: var(--red-2);
  color: var(--red);
}

.badge.purple {
  background: #f3e8ff;
  color: #7c3aed;
}

.badge.teal {
  background: #e6faf5;
  color: #0d9488;
}

.badge.slate {
  background: #f1f5f9;
  color: #475569;
}

.stack {
  display: grid;
  gap: 12px;
}

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

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.tabs button.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-self: end;
  width: fit-content;
}

.task-submit-actions button {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
}

.form-grid .task-submit-actions {
  grid-column: 1 / -1;
  justify-self: end;
}

.task-create-form {
  display: grid;
  gap: 16px;
}

.task-create-fields {
  gap: 12px 14px;
  align-items: start;
}

.task-create-fields > div {
  min-width: 0;
  align-self: start;
}

.task-create-footer {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid #e8edf3;
}

.task-create-footer .task-attachment-field {
  min-width: 0;
}

.task-attachment-heading {
  min-height: 18px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 6px;
}

.task-attachment-heading label,
.task-attachment-heading .task-attachment-hint {
  margin: 0;
}

.task-create-footer input[type="file"] {
  min-height: 40px;
  padding: 5px 8px;
}

.task-create-footer .task-submit-actions {
  align-items: stretch;
  gap: 10px;
  margin: 0;
}

.task-create-footer .task-submit-actions button {
  flex: 0 0 auto;
  width: auto;
  min-width: 172px;
  min-height: 40px;
  padding: 0 18px;
  line-height: 1.35;
  white-space: nowrap;
}

.account-password-cell {
  min-width: 170px;
}

.account-password-cell strong {
  display: block;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}

.task-generator-entry {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
}

.task-generator-entry h2 {
  margin-bottom: 6px;
}

.task-generator-entry p {
  margin: 0;
}

.task-group-list {
  display: grid;
  gap: 8px;
}

.task-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-group summary {
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
}

.task-group-body {
  border-top: 1px solid var(--line);
  padding: 10px;
  background: #f8fafc;
}

.file-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.message.unread {
  border-left: 4px solid var(--blue);
}

.message.archived-message {
  background: #f8fafc;
}

.message-content {
  white-space: pre-line;
  line-height: 1.55;
}

.message-archive-panel .collapsible-body {
  background: #f8fafc;
}

.market-task-row {
  cursor: pointer;
}

.task-detail-trigger {
  cursor: zoom-in;
}

.task-detail-trigger:hover {
  border-color: #b9c9dc;
}

tr.task-detail-trigger:hover td {
  background: #f8fbff;
}

.market-task-row:hover td {
  background: #f8fbff;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  text-decoration: none;
  background: #fff;
}

.button-link:hover {
  border-color: var(--blue);
}

.notice-block {
  border: 1px solid var(--amber);
  background: var(--amber-2);
  border-radius: 8px;
  padding: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #111827;
  color: #fff;
  padding: 11px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 30;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.modal-head, .modal-foot {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 14px;
  overflow: auto;
}

.modal iframe {
  width: 100%;
  height: min(70vh, 760px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-primary-actions {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.history-task-actions {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.task-action-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.task-submission-modal {
  width: min(900px, 100%);
}

.pending-submit-modal {
  width: min(560px, 100%);
}

.market-task-modal {
  width: min(1280px, 100%);
}

.bonus-detail-modal {
  width: min(1180px, 100%);
}

.market-task-summary {
  align-items: start;
}

.task-initiator-detail h3,
.task-current-detail h3 {
  margin: 0 0 3px;
}

.task-current-detail {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.market-task-note,
.market-generator-detail {
  margin-top: 14px;
}

.task-detail-attachments {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.task-detail-attachments h3 {
  margin: 0 0 3px;
}

.weekly-task {
  padding: 5px 6px;
  border-radius: 5px;
}

.weekly-task:hover {
  background: #eef6ff;
}

.market-generator-detail {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.market-generator-detail h3 {
  margin: 0 0 3px;
}

.market-detail-table {
  margin-top: 10px;
  overflow-x: auto;
}

.market-detail-table table {
  min-width: 1050px;
}

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

.task-submission-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.task-submission-box .toolbar {
  align-items: flex-start;
}

.task-submission-box h3 {
  margin-bottom: 4px;
}

.forced {
  width: min(560px, 100%);
}

.gantt-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.gantt-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gantt-legend i {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}

.gantt-legend i.density-high { background: #ef4444; }
.gantt-legend i.density-medium { background: #f59e0b; }
.gantt-legend i.density-low { background: #22c55e; }

.gantt-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-color: #94a3b8 #e2e8f0;
  scrollbar-width: auto;
}

.gantt-scroll::-webkit-scrollbar { height: 12px; }
.gantt-scroll::-webkit-scrollbar-track { background: #e2e8f0; }
.gantt-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  background: #94a3b8;
}

.gantt-timeline {
  --gantt-label-width: 190px;
  display: grid;
  grid-template-columns: var(--gantt-label-width) var(--gantt-width);
  width: max-content;
  min-width: 100%;
}

.gantt-corner,
.gantt-group-name,
.gantt-task-name,
.gantt-density-name {
  position: sticky;
  left: 0;
  z-index: 4;
  border-right: 1px solid var(--line);
}

.gantt-corner {
  z-index: 6;
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f1f5f9;
  font-weight: 700;
}

.gantt-calendar-head {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.gantt-month-row,
.gantt-day-row {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days), var(--gantt-day-width));
}

.gantt-month {
  padding: 5px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.gantt-day {
  height: 25px;
  border-right: 1px solid var(--line);
  text-align: center;
  color: #64748b;
  font-size: 11px;
  line-height: 25px;
}

.gantt-day.weekend { background: #f1f5f9; }
.gantt-day.today { background: #dbeafe; color: #1d4ed8; font-weight: 700; }

.gantt-group-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #1e293b;
}

.gantt-group-name span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.gantt-group-track {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.gantt-task-name {
  min-height: 48px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.gantt-task-name strong,
.gantt-task-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-task-name strong { font-size: 13px; }
.gantt-task-name span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.gantt-density-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border-top: 2px solid var(--line);
  background: #f8fafc;
  color: #1e293b;
}

.gantt-density-name span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.gantt-task-track {
  position: relative;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background-color: #fff;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--gantt-day-width) - 1px),
    #edf1f5 calc(var(--gantt-day-width) - 1px),
    #edf1f5 var(--gantt-day-width)
  );
  overflow: hidden;
}

.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(37, 99, 235, .35);
  z-index: 1;
}

.gantt-bar {
  position: absolute;
  top: 9px;
  z-index: 2;
  height: 28px;
  min-width: 24px;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  line-height: 28px;
  padding: 0 7px;
  overflow: hidden;
  white-space: nowrap;
}

.gantt-bar.density-high { background: #ef4444; }
.gantt-bar.density-medium { background: #f59e0b; color: #1f2933; }
.gantt-bar.density-low { background: #22c55e; }

.gantt-density-track {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days), var(--gantt-day-width));
  min-height: 36px;
  border-top: 2px solid var(--line);
  background: #fff;
}

.gantt-density-cell {
  min-height: 36px;
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 36px;
}

.gantt-density-cell.weekend {
  box-shadow: inset 0 0 0 999px rgba(241, 245, 249, .25);
}

.gantt-density-cell.today {
  box-shadow: inset 2px 0 rgba(37, 99, 235, .4), inset -2px 0 rgba(37, 99, 235, .4);
}

.gantt-note {
  margin-top: 8px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

/* Workflow stepper */
.workflow-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 12px 0;
  padding: 8px 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  color: var(--muted);
  font-size: 11px;
}
.step::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.step:last-child::before { display: none; }
.step.done::before { background: var(--green); }
.step-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  z-index: 1;
  position: relative;
}
.step.done .step-dot { background: var(--green); border-color: var(--green); }
.step.active .step-dot { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-2); }
.step-label { margin-top: 4px; text-align: center; max-width: 80px; }

.signature-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.reject-reason {
  background: var(--red-2);
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 10px;
  margin-top: 6px;
  font-size: 13px;
}

.rejection-notice {
  overflow-wrap: anywhere;
}

.rejection-notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 4px 0;
}

.danger-text {
  color: var(--red);
}

.success-text {
  color: var(--green);
}

/* ── Search bar ── */
.search-bar input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--muted);
}

/* ── Generator work order area ── */
.generator-workorder {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.generator-workorder h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--slate);
}

.task-attachment-hint {
  margin: 0 0 6px;
}

.balance-card {
  text-align: center;
  padding: 24px;
}
.balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--blue);
}
.balance-amount.negative { color: var(--red); }

.weekly-section {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  min-height: 60px;
}
.weekly-section h3 { font-size: 13px; margin: 0 0 6px; }
.weekly-section.running h3 { color: var(--blue); }
.weekly-section.not-started h3 { color: var(--amber); }
.weekly-section.overdue h3 { color: var(--red); }
.weekly-section .small { padding: 2px 0; }

.violation-alert {
  border-left: 4px solid var(--red);
  background: var(--red-2);
}

.rank-cell { font-weight: 700; }
.rank-1 { color: #b8860b; }
.rank-2 { color: #808080; }
.rank-3 { color: #cd7f32; }

.balance-link {
  font-weight: 700;
}

.unreported-cell {
  cursor: pointer;
  text-decoration: underline dotted;
}

.bonus-allocation-table th,
.bonus-allocation-table td {
  vertical-align: middle;
}

.bonus-allocation-table input {
  min-width: 72px;
}

/* 2026-08-26 用户要求: 列宽统一 —— 院补/科补/部长调整约64px，隐藏spinner让数字完整显示 */
.bonus-allocation-table td input[data-field="institute_subsidy"],
.bonus-allocation-table td input[data-field="department_subsidy"],
.bonus-allocation-table td input[data-field="minister_adjustment"] {
  min-width: 64px;
  width: 64px;
  padding-left: 4px;
  padding-right: 4px;
  -moz-appearance: textfield;
}
.bonus-allocation-table td input[data-field="institute_subsidy"]::-webkit-outer-spin-button,
.bonus-allocation-table td input[data-field="institute_subsidy"]::-webkit-inner-spin-button,
.bonus-allocation-table td input[data-field="department_subsidy"]::-webkit-outer-spin-button,
.bonus-allocation-table td input[data-field="department_subsidy"]::-webkit-inner-spin-button,
.bonus-allocation-table td input[data-field="minister_adjustment"]::-webkit-outer-spin-button,
.bonus-allocation-table td input[data-field="minister_adjustment"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bonus-message-input {
  min-width: 180px !important;
}

.bonus-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.bonus-table-wrap table {
  min-width: 1200px;
}

.bonus-allocation-table.compact {
  min-width: 760px;
}

.bonus-draft-table {
  min-width: 1500px;
}

.bonus-additional-table {
  min-width: 1580px;
}

.bonus-draft-panel .toolbar {
  align-items: flex-start;
}

.bonus-draft-panel .toolbar .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bonus-history-item {
  padding: 0;
}

.bonus-history-item > summary {
  min-height: 52px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.bonus-history-item > summary::-webkit-details-marker {
  display: none;
}

.bonus-history-body {
  border-top: 1px solid var(--line);
  padding: 11px;
}

.bonus-group-input {
  width: 86px;
  min-width: 64px !important;
  text-align: center;
}

.bonus-confirm-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 2px;
}

.bonus-confirm-person {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) minmax(90px, 1.4fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bonus-confirm-person input {
  width: 16px;
  height: 16px;
}

.bonus-confirm-person span {
  font-weight: 700;
}

.bonus-confirm-person small {
  color: var(--muted);
}

.bonus-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 700;
}

.bonus-settings-grid {
  margin-bottom: 12px;
}

.bonus-source-picker {
  min-width: 0;
}

.bonus-source-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.bonus-source-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bonus-source-option input {
  width: 16px;
  height: 16px;
  grid-row: span 2;
}

.bonus-source-option span,
.bonus-source-option small {
  overflow-wrap: anywhere;
}

.bonus-source-option span {
  font-weight: 700;
}

.bonus-source-option small {
  color: var(--muted);
}

.bonus-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.bonus-summary strong {
  color: var(--text);
}

.bonus-summary.danger strong {
  color: var(--red);
}

.bonus-privacy-note {
  margin: 8px 0 12px;
  padding: 9px 12px;
  border: 1px solid #f3d38b;
  border-radius: 8px;
  color: #7a4a00;
  background: var(--amber-2);
}

.bonus-submit-row {
  align-items: center;
  margin: 10px 0 0;
}

.bonus-submit-summary {
  min-width: 0;
}

.load-query-panel {
  max-width: 1100px;
}

.load-query-form {
  margin-top: 14px;
}

.load-query-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.load-query-rule {
  margin-top: 14px;
}

.load-query-modal {
  width: min(1040px, 100%);
  min-width: 0;
}

.load-query-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
}

.load-query-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.load-query-modal .modal-body {
  min-width: 0;
}

.load-query-modal .table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.load-query-table {
  min-width: 860px;
  table-layout: fixed;
}

.load-query-table th,
.load-query-table td {
  vertical-align: middle;
}

.load-query-table th:nth-child(1),
.load-query-table td:nth-child(1) {
  width: 64px;
  text-align: center;
}

.load-query-table th:nth-child(2),
.load-query-table td:nth-child(2) {
  width: 104px;
}

.load-query-table th:nth-child(3),
.load-query-table td:nth-child(3) {
  width: 214px;
}

.load-query-table th:nth-child(4),
.load-query-table td:nth-child(4) {
  width: 150px;
  text-align: center;
}

.load-query-table th:nth-child(5),
.load-query-table td:nth-child(5),
.load-query-table th:nth-child(6),
.load-query-table td:nth-child(6) {
  width: 112px;
  text-align: center;
}

.load-density-value {
  display: inline-flex;
  min-width: 64px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .load-query-summary {
    grid-template-columns: 1fr;
  }
}

.workload-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.wl-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wl-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 3px;
}

.workload-scroll {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workload-table {
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

.workload-table th,
.workload-table td {
  white-space: nowrap;
}

.workload-table .wl-fixed {
  position: sticky;
  z-index: 1;
  background: #fff;
}

.workload-table th.wl-fixed {
  background: #f8fafc;
  z-index: 2;
}

.workload-table tr > .wl-fixed:nth-child(1) {
  left: 0;
  min-width: 220px;
}

.workload-table tr > .wl-fixed:nth-child(2) {
  left: 220px;
  min-width: 120px;
}

.workload-table tr > .wl-fixed:nth-child(3) {
  left: 340px;
  min-width: 96px;
}

.workload-table .wl-date,
.workload-table .wl-cell {
  width: 62px;
  min-width: 62px;
  text-align: center;
}

.workload-table .wl-cell {
  font-weight: 700;
}

.workload-total-row td {
  border-top: 2px solid var(--line);
}

.workload-total-row .wl-fixed {
  background: #f8fafc;
}

.workload-people-table tr > .wl-fixed:first-child {
  left: 0;
  min-width: 170px;
}

.workload-person-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.workload-person-link:hover {
  text-decoration: underline;
}

.workload-table .today {
  box-shadow: inset 2px 0 rgba(37, 99, 235, .4), inset -2px 0 rgba(37, 99, 235, .4);
}

.workload-table th.today {
  color: #1d4ed8;
  background: #dbeafe;
}

.workday-row-form,
.evaluation-approve-form {
  display: grid;
  grid-template-columns: 150px 100px auto;
  gap: 8px;
  align-items: center;
}

.evaluation-approve-form {
  grid-template-columns: 100px auto;
}

.evaluation-approve-form.has-reject {
  grid-template-columns: 100px auto auto;
}

.workday-task-table td:last-child {
  min-width: 360px;
}

.record-focus {
  animation: recordFocus 1.8s ease;
}

@keyframes recordFocus {
  0% { background: #e8f2fb; }
  100% { background: transparent; }
}

.layout-mobile body,
body.layout-mobile {
  overflow-x: hidden;
}

.layout-mobile button,
.layout-mobile .button-link,
.layout-mobile input,
.layout-mobile select,
.layout-mobile textarea {
  min-height: 44px;
}

.layout-mobile button,
.layout-mobile .button-link {
  justify-content: center;
  padding: 7px 12px;
}

.layout-mobile .desktop-only,
.layout-mobile .desktop-table {
  display: none !important;
}

.layout-mobile .mobile-only {
  display: block;
}

.layout-mobile .content {
  padding: 10px 10px calc(90px + env(safe-area-inset-bottom));
}

.layout-mobile .maintenance-banner {
  flex-direction: column;
  padding: 9px 12px;
}

.layout-mobile .panel {
  padding: 12px;
}

.layout-mobile .topbar {
  height: auto;
  min-height: 58px;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  z-index: 12;
}

.layout-mobile .topbar h1 {
  font-size: 17px;
}

.layout-mobile .user-area {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.layout-mobile .user-area span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-mobile .toolbar {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.layout-mobile .toolbar .actions,
.layout-mobile .row-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.layout-mobile .toolbar .actions button,
.layout-mobile .row-actions button,
.layout-mobile .row-actions .button-link {
  width: 100%;
}

.layout-mobile .row-actions input,
.layout-mobile .row-actions select,
.layout-mobile .row-actions textarea {
  grid-column: 1 / -1;
  width: 100% !important;
}

.layout-mobile .mobile-bottom-nav.mobile-only {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -10px 24px rgba(16, 24, 40, .10);
}

.layout-mobile .mobile-bottom-nav button {
  min-width: 0;
  min-height: 52px;
  padding: 4px 2px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.layout-mobile .mobile-bottom-nav button.active {
  border-color: var(--blue);
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 700;
}

.layout-mobile .mobile-bottom-nav span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-mobile .mobile-more-panel.mobile-only {
  display: none;
}

.layout-mobile .mobile-more-panel.open {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: block;
}

.layout-mobile .mobile-more-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, .45);
}

.layout-mobile .mobile-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(82vh, 620px);
  padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
  overflow: auto;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -18px 38px rgba(16, 24, 40, .18);
}

.layout-mobile .mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

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

.layout-mobile .mobile-more-list button {
  justify-content: flex-start;
  text-align: left;
  background: #f8fafc;
}

.layout-mobile .mobile-more-list button.active {
  border-color: var(--blue);
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 700;
}

.layout-mobile .mobile-card-list.mobile-only {
  display: grid;
}

.layout-mobile .message,
.layout-mobile .mobile-record-card {
  padding: 12px;
}

.layout-mobile .message .toolbar {
  margin-bottom: 10px;
}

.layout-mobile .mobile-record-meta {
  grid-template-columns: 1fr;
}

.layout-mobile .workday-card-form {
  grid-template-columns: 1fr;
}

.layout-mobile .file-form {
  grid-template-columns: 1fr;
}

.layout-mobile .task-generator-entry {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

.layout-mobile .gantt-timeline {
  --gantt-label-width: 145px;
}

.layout-mobile .gantt-scroll,
.layout-mobile .workload-scroll,
.layout-mobile .bonus-table-wrap,
.layout-mobile .market-detail-table {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}

.layout-mobile .panel > table:not(.desktop-table),
.layout-mobile .collapsible-body > table,
.layout-mobile .modal-body > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.layout-mobile .modal-backdrop {
  place-items: stretch;
  padding: 0;
}

.layout-mobile .modal,
.layout-mobile .task-submission-modal,
.layout-mobile .pending-submit-modal,
.layout-mobile .market-task-modal,
.layout-mobile .bonus-detail-modal,
.layout-mobile .forced {
  width: 100%;
  max-height: 100svh;
  min-height: 100svh;
  border-radius: 0;
}

.layout-mobile .modal-head,
.layout-mobile .modal-foot {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.layout-mobile .modal-head button,
.layout-mobile .modal-foot button {
  width: 100%;
}

.layout-mobile .task-submit-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.layout-mobile .task-submit-actions button {
  min-width: 0;
  width: 100%;
}

.layout-mobile .task-create-footer {
  grid-template-columns: 1fr;
  gap: 12px;
}

.layout-mobile .task-create-footer .task-submit-actions {
  grid-template-columns: 1fr;
}

.layout-mobile .modal-body {
  flex: 1;
  min-height: 0;
}

.layout-mobile .modal iframe {
  height: calc(100svh - 140px);
}

.layout-mobile .workday-row-form,
.layout-mobile .evaluation-approve-form {
  grid-template-columns: 1fr;
}

.layout-mobile .workday-task-table td:last-child {
  min-width: 0;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
  }
  .project-layout,
  .task-submission-grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid,
  .form-grid.two,
  .form-grid.three,
  .form-grid.four,
  .project-create-form {
    grid-template-columns: 1fr;
  }
  .span-2,
  .span-4 {
    grid-column: auto;
  }
  .project-list {
    max-height: none;
  }
  .task-create-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .task-create-footer .task-submit-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .landing-page {
    place-items: center start;
    padding: 34px 22px 92px;
  }

  .landing-page::before {
    width: 118px;
    opacity: .86;
  }

  .landing-page::after {
    right: -42vw;
    width: 120vw;
  }

  .landing-grid {
    background-size: 44px 44px;
  }

  .landing-content {
    padding-left: 0;
  }

  .landing-content::before {
    height: 6px;
    margin-bottom: 32px;
  }

  .landing-content h1 span {
    font-size: 22px;
    line-height: 1.45;
  }

  .landing-content h1 strong {
    max-width: 8em;
    font-size: clamp(44px, 14vw, 64px);
    line-height: 1.12;
  }

  .landing-start {
    width: min(240px, 78vw);
    min-height: 68px;
    margin-top: 52px;
    padding: 0 24px 0 32px;
  }

  .landing-records {
    right: 16px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
    font-size: 12px;
  }

  .landing-records span {
    margin: 0 5px;
  }

  .landing-structure-left {
    left: -32%;
  }

  .landing-structure-right {
    right: -28%;
    opacity: .22;
  }

  .login-wrap {
    align-items: start;
    padding: 20px 14px;
  }

  .login-box {
    margin: auto 0;
    padding: 24px 20px;
  }

  .weekly-backup-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .weekly-backup-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .weekly-backup-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  button,
  .button-link,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  button,
  .button-link {
    justify-content: center;
    padding: 7px 12px;
  }

  .desktop-only,
  .desktop-table {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .content {
    padding: 10px 10px calc(90px + env(safe-area-inset-bottom));
  }

  .panel {
    padding: 12px;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    z-index: 12;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .user-area {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
  }

  .user-area span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .toolbar .actions,
  .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .toolbar .actions button,
  .row-actions button,
  .row-actions .button-link {
    width: 100%;
  }

  .row-actions input,
  .row-actions select,
  .row-actions textarea {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  .mobile-bottom-nav.mobile-only {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -10px 24px rgba(16, 24, 40, .10);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 52px;
    padding: 4px 2px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
  }

  .mobile-bottom-nav button.active {
    border-color: var(--blue);
    background: var(--blue-2);
    color: var(--blue);
    font-weight: 700;
  }

  .mobile-bottom-nav span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-panel.mobile-only {
    display: none;
  }

  .mobile-more-panel.open {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
  }

  .mobile-more-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .45);
  }

  .mobile-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(82vh, 620px);
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
    overflow: auto;
    border-radius: 8px 8px 0 0;
    background: #fff;
    box-shadow: 0 -18px 38px rgba(16, 24, 40, .18);
  }

  .mobile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

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

  .mobile-more-list button {
    justify-content: flex-start;
    text-align: left;
    background: #f8fafc;
  }

  .mobile-more-list button.active {
    border-color: var(--blue);
    background: var(--blue-2);
    color: var(--blue);
    font-weight: 700;
  }

  .mobile-card-list.mobile-only {
    display: grid;
  }

  .message,
  .mobile-record-card {
    padding: 12px;
  }

  .message .toolbar {
    margin-bottom: 10px;
  }

  .mobile-record-meta {
    grid-template-columns: 1fr;
  }

  .workday-card-form {
    grid-template-columns: 1fr;
  }

  .file-form {
    grid-template-columns: 1fr;
  }

  .task-generator-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .gantt-timeline { --gantt-label-width: 145px; }

  .gantt-scroll,
  .workload-scroll,
  .bonus-table-wrap,
  .market-detail-table {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .panel > table:not(.desktop-table),
  .collapsible-body > table,
  .modal-body > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-backdrop {
    place-items: stretch;
    padding: 0;
  }

  .modal,
  .task-submission-modal,
  .pending-submit-modal,
  .market-task-modal,
  .bonus-detail-modal,
  .forced {
    width: 100%;
    max-height: 100svh;
    min-height: 100svh;
    border-radius: 0;
  }

  .modal-head,
  .modal-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .modal-head button,
  .modal-foot button {
    width: 100%;
  }

  .task-submit-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .task-submit-actions button {
    min-width: 0;
    width: 100%;
  }

  .task-create-footer .task-submit-actions {
    grid-template-columns: 1fr;
  }

  .task-create-footer .task-submit-actions button {
    min-width: 0;
  }

  .modal-body {
    flex: 1;
    min-height: 0;
  }

  .modal iframe {
    height: calc(100svh - 140px);
  }

  .workday-row-form,
  .evaluation-approve-form {
    grid-template-columns: 1fr;
  }

  .workday-task-table td:last-child {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-start,
  .landing-start i {
    transition: none;
  }
}
