
:root {
  color-scheme: light;
  --bg: #f5f4f0;
  --bg-alt: #ece8df;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #faf8f4;
  --sidebar-bg: #111318;
  --sidebar-surface: rgba(255, 255, 255, .055);
  --sidebar-surface-hover: rgba(255, 255, 255, .09);
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --text: #0f172a;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: rgba(15, 23, 42, .08);
  --line-strong: rgba(15, 23, 42, .16);
  --primary: #10a37f;
  --primary-hover: #0d8c6d;
  --primary-weak: rgba(16, 163, 127, .1);
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --orange: #b45309;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 10px 28px rgba(15, 23, 42, .05);
  --shadow-pop: 0 28px 80px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(16, 163, 127, .16);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.login-mode {
  display: block;
  overflow: hidden;
}

/* Keep the application shell completely out of the login viewport. */
body.login-mode .sidebar[hidden],
body.login-mode .main[hidden] {
  display: none !important;
}

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

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

input[type="number"],
input[type="number"]:hover,
input[type="number"]:focus {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-textfield-decoration-container {
  padding: 0;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  white-space: nowrap;
  box-shadow: none;
}

button:hover {
  background: #fff;
  border-color: var(--line-strong);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.file-chip:focus-visible,
.button-link:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
  border-color: rgba(16, 163, 127, .56);
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 163, 127, .12);
}

button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button.ghost {
  background: rgba(255, 255, 255, .72);
}

button.danger {
  color: var(--danger);
  border-color: rgba(225, 29, 72, .16);
  background: rgba(255, 241, 245, .88);
}

.icon-btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.project-back-btn {
  font-size: 18px;
}

.page-title-back {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 10px;
}

.page-title-back .project-back-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  font-size: 17px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px 16px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04), 18px 0 50px rgba(15, 23, 42, .06);
  color-scheme: dark;
}

.brand {
  padding: 4px 8px 2px;
}

.brand strong {
  display: block;
  font-size: 16px;
  font-weight: 680;
  color: #f8fafc;
}

.brand span {
  display: inline-flex;
  margin-top: 6px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.user-switch {
  display: grid;
  gap: 8px;
  color: var(--sidebar-muted);
  font-size: 12px;
  padding: 0 8px;
}

.user-switch select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #f8fafc;
  border-radius: 8px;
  padding: 9px 11px;
}

.user-switch select option {
  color: #0f172a;
}

.login-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  box-shadow: none;
}

.login-panel input {
  min-height: 36px;
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .05);
  color: #f8fafc;
}

.login-panel input::placeholder,
.user-switch select:disabled {
  color: rgba(226, 232, 240, .58);
}

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

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

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 22% 18%, rgba(16, 163, 127, .1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, 0) 240px),
    var(--bg);
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-pop);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.login-brand p {
  margin-top: 2px;
}

.login-mark,
.avatar-btn {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 700;
}

.login-mark {
  width: 48px;
  height: 48px;
}

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

.sidebar-tools {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-tools button {
  width: 100%;
  justify-content: center;
}

nav {
  display: grid;
  gap: 6px;
  padding: 2px 0;
  overflow: auto;
}

nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-text);
  min-height: 40px;
  padding: 0 12px 0 28px;
  font-weight: 570;
  box-shadow: none;
  border-radius: 8px;
  position: relative;
}

nav button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: .22;
}

nav button:hover {
  background: var(--sidebar-surface-hover);
  border-color: transparent;
  color: #fff;
}

nav button.active {
  background: rgba(16, 163, 127, .18);
  border-color: rgba(16, 163, 127, .22);
  color: #fff;
  box-shadow: none;
}

.main {
  min-width: 0;
  padding: 22px 24px 40px;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -22px -24px 18px;
  padding: 18px 24px 14px;
  background: rgba(245, 244, 240, .9);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset, 0 8px 30px rgba(15, 23, 42, .03);
  backdrop-filter: blur(16px) saturate(1.03);
  -webkit-backdrop-filter: blur(16px) saturate(1.03);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  color: var(--text);
}

h1 {
  font-size: 28px;
  line-height: 1.14;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 680;
}

h3 {
  font-size: 14.5px;
  line-height: 1.25;
  font-weight: 620;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#estimateCosts [data-k="amount"]:disabled {
  background: #f1f5f9;
  color: #64748b;
  border-color: rgba(148, 163, 184, .45);
}

#view {
  display: grid;
  gap: 14px;
  width: min(100%, 1440px);
  margin: 0 auto;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-menu {
  position: relative;
}

.avatar-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
}

.avatar-btn:hover {
  background: #0f172a;
}

.avatar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  z-index: 40;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-pop);
}

.avatar-user {
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.avatar-user strong,
.avatar-user span {
  display: block;
}

.avatar-user span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-dropdown button {
  width: 100%;
}

.project-search {
  width: 260px;
}

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

.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)); }
.grid .span-2 { grid-column: span 2; }

.finance-grid,
.payroll-grid,
.settings-grid,
.detail-grid {
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  overflow-x: auto;
}

.surface-section,
.page-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.project-page .surface-section {
  background: #fcfcfb;
}

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

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.hero-copy h2 {
  font-size: 24px;
  line-height: 1.16;
}

.hero-copy p {
  margin-top: 0;
}

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

.surface-section {
  overflow: hidden;
}

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(250, 250, 248, .98), rgba(255, 255, 255, .98));
}

.surface-head h3 {
  font-size: 14px;
}

.surface-head .filters,
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.surface-head .filters {
  justify-content: flex-end;
  min-width: 0;
}

.surface-head-subtle {
  background: var(--panel-soft);
}

.surface-head-subtle .detail-meta {
  margin-top: 0;
}

.surface-body {
  padding: 14px 16px 16px;
}

.project-page .surface-body {
  padding: 16px;
}

.form-spaced {
  margin-top: 12px;
}

.table-shell-spaced {
  margin-top: 10px;
}

.grid-spaced {
  margin-bottom: 12px;
}

.hint-panel-spaced {
  margin-bottom: 12px;
}

.detail-meta-tight {
  margin-top: 8px;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.detail-info {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  display: grid;
  gap: 6px;
}

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

.detail-info strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  word-break: break-word;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding: 12px 0 2px;
  border-top: 1px solid rgba(17, 24, 39, .05);
  min-width: 0;
}

.detail-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.detail-grid > .detail-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.detail-grid > .detail-section:first-child {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.detail-grid .table-shell {
  max-width: 100%;
}

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

.detail-stack > .detail-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-stack > .detail-section:first-child {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.detail-stack .table-shell {
  max-width: 100%;
}

.detail-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-section-head h3 {
  font-size: 14.5px;
  line-height: 1.25;
  font-weight: 650;
}

.detail-section-body {
  min-width: 0;
}

.detail-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.inline-section-actions {
  padding-top: 0;
  padding-bottom: 4px;
}

.surface-table {
  overflow: visible;
}

.surface-table .surface-body {
  padding-top: 0;
}

.surface-table .table-shell {
  margin-top: 0;
}

.card.pad {
  padding: 14px;
}

.metric {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

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

.metric strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  margin-top: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-panel {
  gap: 10px;
}

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

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

.inline-edit {
  display: flex;
  gap: 7px;
  align-items: center;
}

.inline-edit input {
  min-width: 120px;
}

.inline-edit button {
  white-space: nowrap;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.compact-table {
  min-width: 640px;
}

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

th {
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  background: #edf4ff;
  border-bottom-color: #cbdcff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, .14);
}

.project-table-shell th {
  position: relative;
}

.project-th-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-height: 28px;
}

.table-head-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .88);
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}

.table-head-icon:hover,
.table-head-icon.active {
  color: #0f172a;
  background: rgba(255, 255, 255, .98);
  border-color: rgba(15, 23, 42, .16);
}

.project-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
  display: grid;
  gap: 10px;
}

.project-filter-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.project-filter-popover input,
.project-filter-popover select {
  width: 100%;
}

.project-filter-popover .field.compact {
  gap: 6px;
}

.project-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

tr:hover td {
  background: rgba(16, 163, 127, .03);
}

.clickable {
  cursor: pointer;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .05);
  color: #374151;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid rgba(17, 24, 39, .06);
}

.tag.blue {
  background: rgba(16, 163, 127, .1);
  color: #0f7a5f;
}

.tag.orange {
  background: rgba(196, 127, 24, .12);
  color: var(--orange);
}

.tag.green {
  background: rgba(15, 157, 102, .12);
  color: var(--ok);
}

.tag.red {
  background: rgba(225, 29, 72, .12);
  color: var(--danger);
}

.hint-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 163, 127, .12);
  border-radius: 8px;
  background: rgba(16, 163, 127, .06);
  color: #0f5f4d;
  font-size: 13px;
}

.hint-panel.warning {
  border-color: rgba(196, 127, 24, .18);
  background: rgba(196, 127, 24, .08);
  color: #8a5b0e;
}

.hint-panel.danger {
  border-color: rgba(225, 29, 72, .2);
  background: rgba(225, 29, 72, .08);
  color: var(--danger);
}

.hint-panel.success {
  border-color: rgba(5, 150, 105, .22);
  background: rgba(5, 150, 105, .08);
  color: var(--ok);
}

.selected-row td {
  background: rgba(16, 163, 127, .06);
}

.hint-panel.selected-row {
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .1);
}

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

.form > .detail-section:not(.detail-grid > .detail-section) {
  background: #fff;
}

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

.field label,
.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: none;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--primary);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
  background: #fff;
}

[data-prep-choice-group] {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  width: auto;
  min-width: 0;
}

[data-prep-choice-group] label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--text);
}

[data-prep-choice-group] input[data-prep-choice] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 16px;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(15, 23, 42, .28);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

[data-prep-choice-group] input[data-prep-choice]:checked {
  border-color: var(--primary);
  background:
    radial-gradient(circle at center, var(--primary) 0 4px, transparent 4.5px);
}

[data-prep-choice-group] input[data-prep-choice]:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .14);
}

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

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  overflow-x: auto;
  width: 100%;
}

.tabs button {
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  min-height: 38px;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: none;
}

.tabs button:hover {
  color: var(--text);
  background: rgba(16, 163, 127, .05);
}

.tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 -1px 0 var(--line) inset, 0 1px 0 #fff;
}

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

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

.calendar-shell {
  position: relative;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
}

.day-name,
.day {
  min-height: 84px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
}

.day-name {
  min-height: auto;
  background: #fafaf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.day:nth-child(7n),
.day-name:nth-child(7n) {
  border-right: 0;
}

.day-btn {
  width: 100%;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  color: inherit;
  box-shadow: none;
}

.day-btn:hover {
  color: var(--primary);
  background: rgba(16, 163, 127, .06);
}

.day-num {
  font-weight: 650;
}

.day.other {
  background: rgba(248, 247, 244, .72);
  color: var(--subtle);
}

.event-dot {
  margin-top: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.calendar-event-unrelated {
  border: 1px solid #d8e1ee;
  background: #edf2f7;
  color: #526172;
  box-shadow: none;
}

.event-dot[aria-disabled="true"] {
  cursor: default;
}

.calendar-list-related {
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, .42);
}

.calendar-list-unrelated {
  background: #f8fafc;
  color: #596579;
  box-shadow: inset 3px 0 0 #cbd5e1;
}

.calendar-unrelated-status {
  border-color: #d8e1ee;
  background: #edf2f7;
  color: #526172;
}

.calendar-popover-related {
  border-left: 3px solid rgba(37, 99, 235, .45);
}

.calendar-popover-unrelated {
  border-left: 3px solid #cbd5e1;
  background: #f8fafc;
}

.s-立项 { background: #6b7280; }
.s-待执行 { background: #10a37f; }
.s-执行中 { background: #f59e0b; }
.s-执行完毕,
.s-已完成,
.s-已结清 { background: #059669; }

.calendar-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(17, 24, 39, .2);
}

.calendar-popover {
  position: fixed;
  z-index: 21;
  width: min(400px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 24px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-pop);
}

.calendar-popover[data-calendar-popover] {
  left: 24px;
  top: 24px;
}

.popover-head {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .98);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.popover-list {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.popover-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.popover-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.popover-item .tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-popover-meta {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.calendar-popover-meta p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .calendar-popover {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .popover-head {
    padding: 10px;
  }

  .popover-list {
    padding: 8px;
  }

  .popover-item {
    padding: 9px;
  }
}

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

.compact-list {
  gap: 8px;
}

.compact-list .row-card {
  padding: 10px 12px;
  align-items: center;
}

.compact-list .row-card input {
  max-width: 120px;
}

.row-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
  min-width: 0;
}

.row-card > div {
  min-width: 0;
}

.row-card strong {
  word-break: break-word;
}

.row-card.clickable:hover {
  border-color: rgba(16, 163, 127, .22);
  background: #fcfdfd;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.row-card.my-task-row {
  border-color: rgba(225, 29, 72, .28);
  border-left: 4px solid var(--danger);
  background: rgba(255, 241, 245, .72);
}

.row-card.my-task-row strong {
  color: #b91c1c;
}

.muted { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.danger-text { color: var(--danger); }

.file-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.file-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  position: relative;
}

.file-entry-actions {
  display: inline-flex;
  align-items: center;
}

.file-entry.removable {
  padding: 0;
}

.file-chip-wrap {
  position: relative;
  display: inline-flex;
  padding-top: 4px;
  padding-right: 4px;
}

.file-remove-btn {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #dfe8f6;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .10);
  z-index: 2;
}

.file-remove-btn:hover {
  color: #dc2626;
  border-color: rgba(220, 38, 38, .22);
  background: #fff;
}

.exec-file-section,
.archive-link-row {
  display: grid;
  gap: 8px;
}

.archive-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.archive-link-row .file-chip {
  min-width: 0;
}

.archive-link-row .file-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list a,
.file-chip,
.button-link {
  color: #0f766e;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(100%, 360px);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.file-chip {
  width: auto;
  cursor: pointer;
}

.file-chip > span:not(.file-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-chip.static {
  cursor: default;
  color: var(--muted);
}

.file-action-btn,
.file-preview-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #0f766e;
  white-space: nowrap;
}

.file-preview-btn {
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 650;
}

.file-action-btn:hover,
.file-preview-btn:hover {
  border-color: rgba(16, 163, 127, .24);
  background: transparent;
}

.insurance-voucher {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.insurance-voucher.hidden {
  display: none;
}

.insurance-voucher-box {
  position: relative;
  min-height: 50px;
  padding: 10px 44px 10px 10px;
  border: 1px solid #dfe8f6;
  border-radius: 10px;
  background: #f8fbff;
}

.insurance-voucher-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-icon {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--primary-weak);
  color: #0f766e;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.file-list a:hover,
.file-chip:hover,
.button-link:hover {
  border-color: rgba(16, 163, 127, .24);
  background: #fff;
}

.inline-voucher-editor {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.inline-voucher-editor-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-voucher-file-input {
  display: none !important;
}

.inline-voucher-editor-compact.dragover [data-inline-voucher-display],
.inline-voucher-editor-compact.uploading [data-inline-voucher-display] {
  border-color: rgba(16, 163, 127, .42);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .12);
}

.inline-voucher-editor-compact [data-inline-voucher-display] {
  min-width: 0;
  width: 100%;
}

.inline-voucher-editor-compact.has-file [data-inline-voucher-display] {
  color: var(--text);
}

.inline-voucher-icon-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.inline-voucher-icon-button svg {
  width: 16px;
  height: 16px;
  display: block;
}

.inline-voucher {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(15, 23, 42, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  outline: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.inline-voucher:focus-visible {
  border-color: rgba(16, 163, 127, .34);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .12);
}

.inline-voucher.disabled {
  background: rgba(248, 250, 252, .92);
  cursor: default;
}

.inline-voucher-existing,
.inline-voucher-queue {
  min-height: 32px;
}

.inline-voucher-queue .file-list,
.inline-voucher-queue .upload-queue,
.inline-voucher-existing .file-list {
  margin-top: 0;
}

.inline-voucher-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-voucher-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.inline-voucher-button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
}

.reimbursement-detail-table {
  table-layout: fixed;
}

.reimbursement-detail-table th:nth-child(1),
.reimbursement-detail-table td:nth-child(1) {
  width: 48%;
}

.reimbursement-detail-table th:nth-child(2),
.reimbursement-detail-table td:nth-child(2) {
  width: 16%;
}

.reimbursement-detail-table th:nth-child(3),
.reimbursement-detail-table td:nth-child(3) {
  width: 24%;
}

.reimbursement-detail-table th:nth-child(4),
.reimbursement-detail-table td:nth-child(4) {
  width: 12%;
  white-space: nowrap;
}

.reimbursement-detail-table [data-reim-detail-desc] {
  width: 100%;
}

.actual-voucher-editor {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 170px;
  min-height: 40px;
  padding: 0;
  border: 1px dashed rgba(15, 23, 42, .14);
  border-radius: 8px;
  background: transparent;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.reim-voucher-editor {
  min-width: 128px;
  min-height: 38px;
  max-width: 180px;
  padding: 3px 4px;
}

.reim-voucher-editor .actual-voucher-thumbs {
  max-width: 82px;
}

.reim-voucher-editor .actual-voucher-add {
  min-height: 28px;
  padding: 4px 8px;
}

.actual-voucher-editor.dragover,
.actual-voucher-editor.uploading {
  border-color: rgba(16, 163, 127, .38);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .1);
}

.actual-voucher-editor.disabled {
  background: transparent;
  cursor: default;
}

.archive-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: 8px;
  background: #fff5f5;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.5;
}

.archive-warning strong {
  flex: 0 0 auto;
  color: #b91c1c;
}

.field-error {
  margin-top: 4px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.3;
}

.tab-issue-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.tab-issue-badge.danger {
  background: #ef4444;
}

.collection-voided {
  opacity: .62;
}

.collection-voided td {
  background: #f8fafc;
  color: #64748b;
}

.collection-voided .readonly-table-value {
  text-decoration: line-through;
}

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

.actual-voucher-thumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 84px;
  overflow: hidden;
}

.actual-voucher-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 5px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.actual-voucher-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actual-voucher-file-icon {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.actual-voucher-remove {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  min-width: 12px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #b91c1c;
  font-size: 10px;
  line-height: 1;
}

.actual-voucher-add {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.actual-voucher-editor .upload-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
}

.actual-voucher-preview {
  position: fixed;
  z-index: 1200;
  width: 260px;
  height: 200px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
}

.actual-voucher-preview img,
.actual-voucher-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 7px;
  object-fit: contain;
  background: #f8fafc;
}

.actual-voucher-preview-file {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.actual-voucher-preview-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border-radius: 999px;
  background: #fff;
}

.stack-sm {
  display: grid;
  gap: 6px;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions button {
  min-height: 30px;
  padding: 0 10px;
  box-shadow: none;
}

.prep-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.prep-head-actions button {
  min-height: 32px;
  padding: 0 12px;
  box-shadow: none;
}

.exec-flow-frame {
  height: 420px;
  min-height: 240px;
  max-height: 78vh;
  overflow: auto;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.exec-flow-frame .flow-content-view {
  min-height: 100%;
}

.exec-flow-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(78vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  margin: 0 auto 12px;
}

.project-library-section .surface-body {
  padding-top: 0;
}

.project-library-section {
  --library-grid: minmax(240px, 1.45fr) minmax(142px, .55fr) minmax(92px, .35fr) minmax(188px, 220px);
}

.project-library-head {
  align-items: flex-start;
  gap: 14px;
}

.project-library-head > div:first-child {
  min-width: 160px;
}

.library-head-filters {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(150px, .7fr) minmax(190px, .85fr);
  gap: 10px;
  align-items: center;
}

.library-head-filters input,
.library-head-filters select {
  width: 100%;
  min-height: 38px;
}

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

.library-table {
  display: grid;
  gap: 8px;
}

.library-table-head {
  display: grid;
  grid-template-columns: var(--library-grid);
  gap: 14px;
  align-items: center;
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.library-table-head span:last-child {
  text-align: center;
}

.library-row {
  display: grid;
  grid-template-columns: var(--library-grid);
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.library-row:hover {
  border-color: rgba(37, 99, 235, .22);
  background: #fbfdff;
  box-shadow: var(--shadow-sm);
}

.library-row-main,
.library-row-date {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-row-main strong,
.library-row-main span,
.library-row-date span,
.library-row-date small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-row-main span,
.library-row-date small {
  color: var(--muted);
}

.library-row-assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.library-asset-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid #d8e5f7;
  border-radius: 999px;
  background: #f7fbff;
  color: #375579;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.library-asset-pill svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.library-asset-pill svg path,
.library-asset-pill svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.library-asset-pill strong {
  min-width: 1ch;
  color: #193250;
  font-size: 12px;
  font-weight: 800;
}

.library-asset-plan {
  color: #315c9a;
  background: #f5f8ff;
}

.library-asset-design,
.library-asset-drawing {
  color: #825b1f;
  background: #fffaf1;
  border-color: #f1dfbe;
}

.library-asset-material {
  color: #25605f;
  background: #f0fbf9;
  border-color: #ccebe5;
}

.library-asset-archive,
.library-asset-delivery {
  color: #276045;
  background: #f2fbf6;
  border-color: #cdebd9;
}

.library-asset-pill::after {
  content: attr(data-asset-label);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 7px);
  z-index: 20;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid #dce6f4;
  border-radius: 8px;
  background: #fff;
  color: #1a2b46;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 3px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}

.library-asset-pill:hover::after {
  opacity: 1;
  transform: translate(50%, 0);
}

dialog.library-modal {
  width: min(1040px, calc(100vw - 28px));
}

.project-library-detail {
  display: grid;
  gap: 14px;
}

.library-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 64%);
}

.library-detail-hero h3 {
  margin: 8px 0 6px;
  font-size: 22px;
}

.library-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.library-detail-counts {
  display: flex;
  gap: 10px;
}

.library-detail-counts span {
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.library-detail-counts strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.library-detail-section {
  display: grid;
  gap: 10px;
}

.library-detail-section h3 {
  margin: 0;
  font-size: 15px;
}

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

.library-info-item {
  min-width: 0;
  padding: 0;
}

.library-info-item span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.library-info-item strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.library-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.library-resource-card {
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.library-resource-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.library-link-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.library-flow-frame {
  height: 360px;
  min-height: 240px;
}

.leave-daily-page .surface-body {
  display: grid;
  gap: 14px;
}

.leave-form textarea,
.daily-form textarea {
  min-height: 96px;
  resize: vertical;
}

.leave-form-hint {
  min-height: 18px;
  margin-top: -4px;
  font-size: 12px;
  line-height: 1.4;
}

.daily-form textarea {
  min-height: 140px;
}

.leave-admin-head {
  align-items: flex-start;
}

.leave-admin-head input[type="month"],
.leave-admin-head select {
  min-height: 38px;
}

.leave-list .row-card,
.daily-report-list .row-card {
  align-items: flex-start;
}

.daily-report-list .row-card p {
  white-space: pre-wrap;
}

.admin-daily-employee-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.admin-daily-employee {
  display: flex;
  width: 100%;
  min-height: 58px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel);
  text-align: left;
}

.admin-daily-employee-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 680;
}

.admin-daily-employee-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.admin-daily-dialog-list {
  display: grid;
  gap: 10px;
}

.admin-daily-dialog-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-daily-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-daily-dialog-item p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .library-head-filters,
  .library-row,
  .library-detail-hero,
  .library-info-grid,
  .library-resource-grid {
    grid-template-columns: 1fr;
  }

  .library-table-head {
    display: none;
  }

  .library-row-assets {
    grid-template-columns: repeat(3, minmax(52px, 68px));
    justify-content: flex-start;
  }

  .library-detail-counts {
    justify-content: flex-start;
  }
}

.collection-overview {
  display: grid;
  gap: 16px;
}

.collection-overview-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
}

.collection-overview-top > div,
.collection-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px 16px;
}

.collection-overview span,
.collection-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.collection-overview-top strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.collection-status {
  min-width: 190px;
  text-align: right;
}

.collection-status p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.collection-progress-block {
  display: grid;
  gap: 8px;
}

.collection-progress-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.collection-progress-head strong {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
}

.collection-progress-head .collection-paid {
  color: #2563eb;
  font-weight: 900;
}

.collection-progress-head .collection-total {
  color: #64748b;
  font-weight: 800;
}

.collection-progress-head .collection-divider {
  color: #94a3b8;
  font-weight: 800;
}

.collection-progress-head em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.collection-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef9;
}

.collection-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f7cff, #27c4a8);
}

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

.collection-detail-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, .08);
  background: rgba(17, 24, 39, .04);
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.unpaid {
  background: rgba(17, 24, 39, .05);
  color: #4b5563;
}

.status-pill.partial {
  background: rgba(196, 127, 24, .12);
  border-color: rgba(196, 127, 24, .18);
  color: var(--orange);
}

.status-pill.paid {
  background: rgba(15, 157, 102, .12);
  border-color: rgba(15, 157, 102, .18);
  color: var(--ok);
}

.custom-field-table th.drag-cell,
.custom-field-table td.drag-cell {
  width: 44px;
  min-width: 44px;
  padding-right: 4px;
  padding-left: 10px;
}

.cost-drag-table th.drag-cell,
.cost-drag-table td.drag-cell {
  width: 44px;
  min-width: 44px;
  padding-right: 4px;
  padding-left: 10px;
}

.custom-field-row {
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.custom-field-row td,
.cost-row td {
  will-change: transform;
}

.drag-source-hidden {
  display: none;
}

.drag-placeholder td {
  background: rgba(15, 23, 42, .035);
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}

.drag-floating-table {
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  transform: rotate(.15deg);
}

.drag-floating-table td {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.drag-floating-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.drag-floating-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

.custom-field-row.dragging td {
  background: rgba(16, 163, 127, .08);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, .22);
}

.cost-row {
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.cost-row.dragging td {
  background: rgba(16, 163, 127, .08);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, .22);
}

.cost-row.dragging {
  position: relative;
  z-index: 2;
}

.drag-handle {
  width: 28px;
  min-width: 28px;
  min-height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(75, 85, 99, .82) 1.4px, transparent 1.5px) center 8px / 8px 8px repeat-y,
    #fff;
  cursor: grab;
}

.drag-handle:hover {
  border-color: var(--line-strong);
  background:
    radial-gradient(circle, rgba(15, 23, 42, .9) 1.4px, transparent 1.5px) center 8px / 8px 8px repeat-y,
    #fff;
}

.drag-handle:active {
  cursor: grabbing;
}

.preview-wrap {
  width: 100%;
  min-height: min(68vh, 640px);
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 640px);
  object-fit: contain;
}

.preview-frame {
  width: 100%;
  height: min(68vh, 640px);
  border: 0;
  background: #fff;
}

.contract-file-panel {
  display: block;
}

.contract-file-field {
  min-width: 0;
}

.contract-file-list-box {
  position: relative;
  min-height: 158px;
  padding: 12px 50px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.contract-file-list-content .file-list {
  margin-top: 0;
  align-items: flex-start;
}

.contract-file-list-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contract-upload-round {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #fff;
  z-index: 1;
}

.contract-upload-round svg {
  width: 15px;
  height: 15px;
  display: block;
}

.contract-upload-queue {
  margin-top: 8px;
}

.contract-file-list-box .upload-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
}

.upload-box {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .72);
}

.upload-dropzone {
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.upload-dropzone.dragover {
  border-color: rgba(16, 163, 127, .42);
  background: rgba(16, 163, 127, .06);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .12);
}

.upload-dropzone.uploading {
  border-color: rgba(16, 163, 127, .28);
}

.upload-picker {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(15, 23, 42, .14);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.upload-picker strong {
  font-size: 13px;
  font-weight: 620;
}

.upload-queue {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  overflow: hidden;
  opacity: 0;
  transform: scaleY(.85);
  transition: opacity .16s ease, transform .16s ease;
}

.upload-progress.active {
  opacity: 1;
  transform: scaleY(1);
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #10a37f, #36c7a4);
  transition: width .18s ease;
}

.upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.upload-box-compact {
  padding: 10px;
  gap: 10px;
}

.upload-box-compact .upload-picker {
  min-height: 158px;
  align-content: start;
}

.flow-image-upload {
  gap: 10px;
}

.activity-flow-editor {
  display: grid;
  gap: 10px;
}

.flow-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flow-editor-toolbar button {
  min-height: 32px;
  padding: 6px 10px;
}

.flow-editor-surface {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-editor {
  min-height: 300px;
  padding: 16px;
  outline: none;
  color: var(--text);
  line-height: 1.72;
  white-space: normal;
}

.flow-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.flow-editor p,
.flow-content-view p {
  margin: 0 0 12px;
}

.flow-editor hr,
.flow-content-view hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px dashed var(--line-strong);
}

.flow-editor img,
.flow-content-view img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.flow-editor-file {
  display: none !important;
}

.flow-content-view {
  display: grid;
  gap: 10px;
  line-height: 1.72;
}

.flow-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.flow-image-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.flow-image-card:hover {
  border-color: rgba(16, 163, 127, .24);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.flow-image-card.static {
  cursor: default;
}

.flow-image-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: var(--panel-soft);
}

.flow-image-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.flow-image-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.flow-image-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog {
  width: min(920px, calc(100vw - 24px));
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 14px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow-pop);
}

dialog::backdrop {
  background: rgba(17, 24, 39, .38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.modal header {
  background: #fff;
}

.modal footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
  background: #fbfcfd;
}

#modalBody {
  padding: 12px;
  max-height: 72vh;
  overflow: auto;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.topbar h1,
.detail-head h2,
.toolbar h3 {
  letter-spacing: 0;
}

.card,
dialog,
.popover-item,
.upload-box,
.hint-panel,
.empty {
  background-clip: padding-box;
}

.table-shell table {
  border: 0;
  min-width: 100%;
  table-layout: auto;
}

.table-shell thead th:last-child,
.table-shell tbody td:last-child {
  white-space: nowrap;
}

#taskRows td:nth-child(3) {
  width: 34%;
  min-width: 320px;
}

#taskRows td:nth-child(4) {
  width: 24%;
  min-width: 220px;
}

#taskRows table {
  min-width: 980px;
}

#taskRows th:nth-child(1),
#taskRows td:nth-child(1) {
  width: 150px;
  min-width: 150px;
}

#taskRows th:nth-child(2),
#taskRows td:nth-child(2) {
  width: 280px;
  min-width: 280px;
}

#taskRows [data-task-identity] {
  min-width: 132px;
}

#taskRows textarea {
  min-height: 38px;
  height: 38px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  resize: none;
}

.task-person-control {
  display: grid;
  grid-template-columns: minmax(96px, .72fr) minmax(140px, 1fr);
  gap: 8px;
  align-items: center;
}

.task-person-control select,
.task-person-control input {
  min-width: 0;
}

.task-person-control input[readonly] {
  background: var(--panel-soft);
  color: var(--text);
}

.task-person-cell.invalid {
  background: rgba(220, 38, 38, .06);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .18);
}

.task-person-cell.invalid input[data-task-person-name] {
  border-color: rgba(220, 38, 38, .48);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.field-error {
  display: none;
  margin-top: 6px;
  color: #b42318;
  font-size: 12px;
}

.field.invalid-field input,
.field.invalid-field select,
.field.invalid-field textarea {
  border-color: rgba(220, 38, 38, .70);
  background: #fff1f2;
}

.field.invalid-field .field-error {
  display: block;
}

.task-person-cell.invalid .field-error {
  display: block;
}

#actualRows [data-actual-estimate] {
  background: var(--panel-soft);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}

#actualRows [data-actual-paid] {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--line);
}

.actual-cost-table {
  min-width: 1120px;
}

#actualRows td:nth-child(1),
#actualRows th:nth-child(1) {
  width: 180px;
  min-width: 180px;
}

#actualRows td:nth-child(3),
#actualRows th:nth-child(3) {
  width: 130px;
  min-width: 130px;
}

.cost-drag-table {
  min-width: 760px;
}

.cost-drag-table th:nth-child(2),
.cost-drag-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
}

.cost-drag-table th:nth-child(3),
.cost-drag-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
}

.readonly-table-value {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
}

.auto-status-panel {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.payment-entry {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.payment-entry input {
  min-width: 0;
}

.task-day-list {
  display: grid;
  gap: 14px;
}

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

.task-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 2px;
}

.task-day-head strong {
  font-size: 14px;
  color: var(--text);
}

.surface-section .table-shell,
.detail-section .table-shell {
  border-radius: 8px;
}

.detail-section.unsaved-warning {
  border-color: rgba(220, 38, 38, .22);
  background: rgba(220, 38, 38, .035);
}

tr.invalid-row td {
  background: rgba(220, 38, 38, .06);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .16);
}

.page-stack .surface-section .card,
.surface-section .card,
.surface-body .card {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.sidebar,
.topbar {
  backdrop-filter: blur(18px) saturate(1.02);
  -webkit-backdrop-filter: blur(18px) saturate(1.02);
}

section {
  min-width: 0;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--sidebar-bg);
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 220px;
    overflow: auto;
  }

  nav button {
    text-align: center;
    justify-content: center;
  }

  .main {
    padding: 16px 12px 28px;
  }

  .topbar {
    position: static;
    margin: -16px -12px 14px;
    padding: 14px 12px 12px;
  }

  .top-actions,
  .toolbar,
  .toolbar .filters {
    width: 100%;
  }

  .top-actions button,
  .toolbar button,
  .toolbar select,
  .toolbar input,
  .filters input,
  .filters select {
    width: 100%;
  }

  .project-search {
    width: 100%;
  }

  .topbar,
  .detail-head,
  .row-card {
    flex-direction: column;
    align-items: stretch;
  }

  .page-hero,
  .surface-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    justify-content: stretch;
  }

  .hero-actions > * {
    width: 100%;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

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

  .detail-grid .grid.cols-3,
  .detail-grid .grid.cols-4,
  .detail-stack .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .calendar {
    grid-template-columns: 1fr;
    max-height: 72vh;
    overflow: auto;
  }

  .day {
    min-height: 70px;
  }

  .day-name {
    display: none;
  }

  table {
    min-width: 680px;
  }

  .card {
    -webkit-overflow-scrolling: touch;
  }

  dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal footer {
    position: sticky;
    bottom: 0;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal footer button,
  .modal footer .button-link {
    width: 100%;
    justify-content: center;
  }

  .calendar-popover {
    left: 8px !important;
    right: 8px;
    top: 8px !important;
    width: auto;
    max-height: calc(100vh - 16px);
  }

  .file-list a,
  .file-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .row-actions {
    width: 100%;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  h1 {
    font-size: 24px;
  }

  nav {
    grid-template-columns: 1fr;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: auto;
  }

  .metric strong {
    font-size: 21px;
  }

  .card.pad,
  #modalBody {
    padding: 12px;
  }

  .page-hero,
  .surface-head,
  .surface-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-hero {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .detail-info {
    padding: 12px;
  }

  table {
    min-width: 620px;
  }
}

/* OpenAI-style refresh overrides */
:root {
  --bg: #f7f7f4;
  --bg-alt: #efede8;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #faf9f7;
  --sidebar-bg: #111827;
  --sidebar-surface: rgba(255, 255, 255, .05);
  --sidebar-surface-hover: rgba(255, 255, 255, .09);
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --text: #111827;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: rgba(17, 24, 39, .08);
  --line-strong: rgba(17, 24, 39, .16);
  --primary: #10a37f;
  --primary-hover: #0e8f70;
  --primary-weak: rgba(16, 163, 127, .08);
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --orange: #b45309;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 10px 28px rgba(15, 23, 42, .06);
  --shadow-pop: 0 28px 80px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(16, 163, 127, .16);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0)),
    var(--bg);
}

.sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04), 14px 0 38px rgba(15, 23, 42, .04);
}

.brand strong {
  letter-spacing: -.01em;
}

nav button {
  border-radius: 10px;
  letter-spacing: 0;
}

nav button.active {
  background: rgba(16, 163, 127, .18);
  border-color: rgba(16, 163, 127, .18);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, .08);
}

.main {
  padding: 20px 22px 36px;
}

.topbar {
  margin: -20px -22px 18px;
  padding: 18px 22px 14px;
  background: rgba(247, 247, 244, .92);
  border-bottom: 1px solid rgba(17, 24, 39, .06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset, 0 8px 24px rgba(15, 23, 42, .03);
  backdrop-filter: blur(16px) saturate(1.02);
  -webkit-backdrop-filter: blur(16px) saturate(1.02);
}

#view {
  width: min(100%, 1480px);
  gap: 16px;
}

.page-stack {
  gap: 16px;
}

.page-hero,
.surface-section {
  border-radius: 12px;
  border-color: rgba(17, 24, 39, .08);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-sm);
}

.page-hero {
  padding: 18px 20px;
}

.hero-copy h2 {
  font-size: 23px;
  letter-spacing: -.01em;
}

.surface-head {
  background: #fff;
}

.surface-body,
.project-page .surface-body {
  padding: 16px 18px 18px;
}

.detail-info,
.metric,
.hint-panel,
.empty,
.row-card,
.table-shell,
dialog,
.calendar-popover,
.upload-box,
.file-chip,
.button-link {
  border-radius: 10px;
}

.detail-info,
.metric,
.row-card,
.calendar-popover,
.empty {
  background: #fff;
  border-color: rgba(17, 24, 39, .08);
}

.metric {
  min-height: 86px;
  box-shadow: var(--shadow-sm);
}

.metric strong {
  font-size: 19px;
}

button,
input,
select,
textarea {
  border-radius: 10px;
}

button {
  background: #fff;
  border-color: rgba(17, 24, 39, .1);
}

button:hover {
  border-color: rgba(17, 24, 39, .16);
}

button.primary {
  box-shadow: 0 8px 20px rgba(16, 163, 127, .14);
}

input,
select,
textarea {
  background: #fff;
  border-color: rgba(17, 24, 39, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.field > span,
.field label {
  color: #5b6472;
}

.tabs {
  gap: 8px;
}

.tabs button {
  border-radius: 10px 10px 0 0;
}

.tabs button.active {
  box-shadow: 0 -1px 0 rgba(17, 24, 39, .08) inset, 0 1px 0 #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #edf4ff;
  color: #334155;
  border-bottom-color: #cbdcff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, .14);
}

tr:hover td {
  background: rgba(16, 163, 127, .025);
}

.tag {
  border-radius: 999px;
}

.hint-panel {
  background: rgba(16, 163, 127, .05);
  border-color: rgba(16, 163, 127, .12);
}

.hint-panel.warning {
  background: rgba(196, 127, 24, .08);
}

.hint-panel.danger {
  background: rgba(225, 29, 72, .08);
}

.hint-panel.success {
  background: rgba(5, 150, 105, .08);
}

.row-card {
  border-color: rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-sm);
}

.row-card.clickable:hover {
  background: #fff;
  border-color: rgba(16, 163, 127, .22);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
  transform: translateY(-1px);
}

.empty {
  background: var(--panel-soft);
  border-style: dashed;
}

.table-shell {
  border-color: rgba(17, 24, 39, .08);
  background: #fff;
}

.calendar-popover {
  box-shadow: var(--shadow-pop);
}

.popover-head {
  background: rgba(255, 255, 255, .98);
}

.popover-item {
  border-color: rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-sm);
}

dialog {
  border-color: rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-pop);
}

.modal header,
.modal footer {
  background: #fff;
}

.modal footer {
  background: #fbfcfd;
}

#modalBody {
  background: #fff;
}

/* Workbench polish */
:root {
  --bg: #f8f8f6;
  --bg-alt: #f1f0ec;
  --panel-soft: #fbfaf8;
  --line: rgba(17, 24, 39, .075);
  --line-strong: rgba(17, 24, 39, .14);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .035), 0 10px 30px rgba(17, 24, 39, .035);
  --shadow: 0 18px 50px rgba(17, 24, 39, .06);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, 0) 280px),
    var(--bg);
}

.sidebar {
  background: #101114;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
}

.brand {
  padding-top: 6px;
  padding-bottom: 4px;
}

nav button {
  min-height: 38px;
  padding-left: 26px;
  font-size: 13.5px;
}

nav button.active {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

nav button.active::before {
  background: var(--primary);
  opacity: 1;
}

.main {
  padding-left: 28px;
  padding-right: 28px;
}

.topbar {
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
  background: rgba(248, 248, 246, .86);
}

#view {
  width: min(100%, 1500px);
  gap: 16px;
}

.page-stack {
  gap: 16px;
}

.page-hero,
.surface-section {
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.page-hero {
  padding: 20px 22px;
  background: rgba(255, 255, 255, .98);
}

.hero-copy h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.surface-head {
  padding: 14px 18px;
  background: rgba(255, 255, 255, .98);
}

.surface-body,
.project-page .surface-body {
  padding: 18px;
}

.metric,
.detail-info,
.detail-grid > .detail-section,
.row-card,
.table-shell {
  border-color: var(--line);
  box-shadow: none;
}

.metric {
  min-height: 82px;
  padding: 13px 15px;
  background: #fff;
}

.metric strong {
  font-size: 18px;
  font-weight: 700;
}

th,
td {
  padding: 11px 12px;
}

th {
  background: #edf4ff;
  color: #334155;
  border-bottom-color: #cbdcff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, .14);
}

.tag {
  min-height: 23px;
  padding: 0 9px;
  background: rgba(17, 24, 39, .045);
}

.tabs {
  gap: 4px;
  border-bottom: 0;
}

.tabs button {
  border-radius: 8px;
  min-height: 34px;
}

.tabs button.active {
  background: #f3f3f0;
  box-shadow: none;
}

button.primary {
  box-shadow: none;
}

input,
select,
textarea {
  background: #fff;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding-bottom: 12px;
  }

  nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  nav button {
    min-height: 36px;
    padding: 0 14px;
  }

  nav button::before {
    display: none;
  }

  .main {
    padding-top: 16px;
  }
}

@media (max-width: 720px) {
  .topbar {
    margin: -16px -16px 14px;
    padding: 14px 16px 12px;
  }

  .main {
    padding: 16px 16px 28px;
  }

  .page-hero,
  .surface-body,
  .project-page .surface-body {
    padding: 14px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .top-actions {
    justify-content: flex-start;
  }

  .project-search {
    width: 100%;
  }

  .page-hero {
    flex-direction: column;
  }
}

/* Screenshot-matched final theme. Keep this block last. */
:root {
  --bg: #f3f8ff;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #f8fbff;
  --sidebar-bg: #f4f9ff;
  --sidebar-surface: rgba(255, 255, 255, .72);
  --sidebar-surface-hover: rgba(245, 249, 255, .96);
  --sidebar-text: #52617b;
  --sidebar-muted: #7b8ba4;
  --text: #101a35;
  --muted: #63718c;
  --subtle: #8996ad;
  --line: #dfe8f6;
  --line-strong: #c8d6ef;
  --primary: #4778ff;
  --primary-hover: #3e6cea;
  --primary-weak: #eef4ff;
  --danger: #e11d48;
  --ok: #10a37f;
  --warn: #d98b16;
  --orange: #d98b16;
  --shadow-sm: 0 8px 24px rgba(47, 72, 122, .055);
  --shadow: 0 18px 50px rgba(47, 72, 122, .08);
  --shadow-pop: 0 30px 90px rgba(25, 44, 84, .18);
  --focus: 0 0 0 4px rgba(71, 120, 255, .14);
}

html {
  background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 58%, #f9f5ff 100%);
}

body {
  grid-template-columns: 303px minmax(0, 1fr);
  padding: 0 14px 0 0;
  background:
    radial-gradient(circle at 96% 0%, rgba(206, 226, 255, .72), transparent 28%),
    radial-gradient(circle at 86% 100%, rgba(240, 219, 255, .58), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 58%, #f9f5ff 100%);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.login-mode {
  display: block;
  padding: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 303px;
  height: 100vh;
  margin: 0;
  padding: 26px 20px 22px;
  background: rgba(244, 249, 255, .78);
  color: var(--sidebar-text);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  min-height: 54px;
  padding: 3px 0 0 68px;
  display: grid;
  align-content: start;
}

.brand::before {
  content: "d";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 33px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(145deg, #2d95ff 0%, #5968ff 100%);
  box-shadow: 0 12px 24px rgba(60, 105, 255, .24);
}

.brand strong {
  color: #14203a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.brand span {
  margin-top: 5px;
  color: #6f7f98;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 20px;
  padding: 28px 0 0;
  overflow: auto;
}

.nav-group {
  display: grid;
  gap: 8px;
  padding: 0;
}

.nav-group + .nav-group {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nav-group-title {
  padding: 0 8px 1px;
  color: #667795;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

nav button {
  min-height: 49px;
  padding: 0 14px 0 52px;
  color: #53617b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 650;
}

nav button::before {
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 6px;
  background: transparent;
  color: #546682;
  opacity: 1;
  font-size: 17px;
  line-height: 1;
  content: "◇";
}

nav button[data-view="dashboard"]::before { content: "▱"; }
nav button[data-view="todos"]::before { content: "▿"; }
nav button[data-view="logs"]::before { content: "◇"; }
nav button[data-view="projects"]::before { content: "⬡"; }
nav button[data-view="calendar"]::before { content: "□"; }
nav button[data-view="reimbursements"]::before { content: "♡"; }
nav button[data-view="finance"]::before { content: "◈"; }
nav button[data-view="payroll"]::before { content: "工"; }
nav button[data-view="permissions"]::before { content: "◇"; }
nav button[data-view="accounts"]::before { content: "♙"; }
nav button[data-view="people"]::before { content: "♧"; }
nav button[data-view="settings"]::before { content: "⚙"; }

.collapse-section {
  overflow: visible;
}

.collapse-section > summary.surface-head {
  cursor: pointer;
  list-style: none;
}

.collapse-section > summary.surface-head::-webkit-details-marker {
  display: none;
}

.collapse-section > summary.surface-head::after {
  content: "展开";
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.collapse-section[open] > summary.surface-head::after {
  content: "收起";
}

.collapse-section:not([open]) {
  box-shadow: none;
}

.permissions-page .permission-table select {
  min-width: 92px;
}

nav button:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, .58);
  border-color: rgba(199, 214, 244, .70);
}

nav button.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(239, 245, 255, .98), rgba(248, 251, 255, .86));
  border-color: rgba(147, 174, 255, .54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .70), 0 10px 22px rgba(68, 100, 168, .08);
}

nav button.active::before {
  color: var(--primary);
  background: rgba(71, 120, 255, .10);
}

.sidebar-tools {
  gap: 10px;
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 0;
}

.sidebar-tools button {
  min-height: 56px;
  justify-content: flex-start;
  padding-left: 58px;
  border: 1px solid rgba(229, 237, 250, .9);
  border-radius: 11px;
  color: #53617b;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 28px rgba(47, 72, 122, .07);
  position: relative;
}

.sidebar-tools button::before {
  position: absolute;
  left: 20px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(71, 120, 255, .11);
  color: var(--primary);
}

#exportBtn::before {
  content: "□";
  background: rgba(16, 163, 127, .12);
  color: #10a37f;
}

.main {
  min-height: calc(100vh - 32px);
  margin: 16px 0 16px;
  padding: 0;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(47, 72, 122, .10);
  overflow: clip;
  backdrop-filter: blur(20px) saturate(1.06);
  -webkit-backdrop-filter: blur(20px) saturate(1.06);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0;
  padding: 27px 33px 18px;
  background: rgba(255, 255, 255, .40);
  border-bottom: 0;
  box-shadow: none;
}

#pageTitle {
  color: #111b34;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
}

#pageSub {
  margin-top: 8px;
  color: #647490;
  font-size: 14px;
}

.avatar-btn {
  width: 50px;
  min-width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #17223c;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 26, 53, .16);
}

.avatar-btn:hover {
  background: #111a31;
}

#view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 33px 34px;
  gap: 18px;
}

.page-stack {
  gap: 18px;
}

.page-hero {
  min-height: 128px;
  padding: 23px 25px;
  align-items: center;
  background: rgba(255, 255, 255, .74);
  border: 1px solid #dfe8f6;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(47, 72, 122, .055);
}

.hero-copy {
  gap: 10px;
}

.hero-copy h2 {
  color: #101a35;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
}

.hero-copy p,
.muted,
.surface-head .muted {
  color: #647490;
}

.toolbar {
  gap: 14px;
  margin-bottom: 22px;
}

.filters {
  gap: 9px;
}

.project-search {
  width: 309px;
  min-height: 54px;
  padding: 0 18px 0 48px;
  border: 1px solid #d6e0f2;
  border-radius: 11px;
  color: #111b34;
  background:
    radial-gradient(circle at 24px 50%, rgba(71, 120, 255, .24) 0 6px, transparent 7px),
    rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

input,
select,
textarea {
  min-height: 42px;
  color: #14203a;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #d6e0f2;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

input::placeholder,
textarea::placeholder {
  color: #8a99b2;
}

button {
  min-height: 40px;
  padding: 0 16px;
  color: #18233c;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #d6e0f2;
  border-radius: 9px;
  box-shadow: none;
  font-weight: 650;
}

button:hover {
  background: #fff;
  border-color: #b9cafa;
  box-shadow: 0 8px 18px rgba(47, 72, 122, .06);
}

button.primary {
  min-height: 49px;
  padding: 0 26px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #5d8cff, #5667f7);
  box-shadow: 0 15px 30px rgba(79, 105, 245, .28);
}

button.primary:hover {
  background: linear-gradient(135deg, #4f7cff, #4659ec);
  box-shadow: 0 17px 34px rgba(79, 105, 245, .34);
}

button.ghost {
  background: rgba(255, 255, 255, .72);
}

.icon-btn {
  border-radius: 9px;
}

.page-title-back {
  margin-right: 10px;
}

.page-title-back .project-back-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  background: #fff;
  border-color: #d6e0f2;
}

.surface-section {
  overflow: visible;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dfe8f6;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(47, 72, 122, .052);
}

.surface-head {
  min-height: 64px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .58);
  border-bottom: 1px solid #e3ebf8;
}

.surface-head h3 {
  color: #111b34;
  font-size: 18px;
  font-weight: 800;
}

.surface-body,
.project-page .surface-body {
  padding: 18px 22px 22px;
}

.detail-meta {
  gap: 8px;
}

.tag {
  min-height: 28px;
  padding: 4px 12px;
  color: #50617d;
  background: #f5f8ff;
  border: 1px solid #d9e4f6;
  border-radius: 999px;
  font-weight: 700;
}

.tag.blue {
  color: #2f61e6;
  background: #edf3ff;
  border-color: #bfd0ff;
}

.tag.green {
  color: #0f8a68;
  background: #def8ef;
  border-color: #a9ead4;
}

.tag.orange {
  color: #b76b00;
  background: #fff3d9;
  border-color: #f1d294;
}

.tag.red {
  color: #c51f46;
  background: #ffe9ef;
  border-color: #f2b5c4;
}

.metric,
.detail-info,
.row-card,
.hint-panel,
.empty {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dfe8f6;
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(47, 72, 122, .045);
}

.metric {
  min-height: 88px;
  padding: 16px;
}

.metric span,
.detail-info span,
.field > span,
.field label {
  color: #75849d;
  font-size: 13px;
  font-weight: 700;
}

.metric strong,
.detail-info strong {
  color: #12203b;
  font-weight: 800;
}

.table-shell {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

table {
  min-width: 760px;
  width: 100%;
  background: transparent;
  border-collapse: separate;
  border-spacing: 0 12px;
}

thead tr {
  background: linear-gradient(180deg, #f6f9ff, #f1f6ff);
}

th {
  height: 68px;
  padding: 16px 24px;
  color: #22304d;
  background: transparent;
  border-top: 1px solid #dfe8f6;
  border-bottom: 1px solid #dfe8f6;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

th:first-child {
  border-left: 1px solid #dfe8f6;
  border-radius: 10px 0 0 10px;
}

th:last-child {
  border-right: 1px solid #dfe8f6;
  border-radius: 0 10px 10px 0;
}

tbody tr {
  background: rgba(255, 255, 255, .90);
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

td {
  min-height: 66px;
  padding: 18px 24px;
  color: #17233d;
  background: transparent;
  border-top: 1px solid #dfe8f6;
  border-bottom: 1px solid #dfe8f6;
}

td:first-child {
  border-left: 1px solid #dfe8f6;
  border-radius: 10px 0 0 10px;
}

td:last-child {
  border-right: 1px solid #dfe8f6;
  border-radius: 0 10px 10px 0;
}

tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(47, 72, 122, .07);
}

tr:hover td {
  background: rgba(255, 255, 255, .98);
}

.project-table-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-table-shell table {
  border-spacing: 0 12px;
}

.project-table-shell th {
  height: 68px;
}

.project-table-shell td {
  height: 108px;
}

.project-th-wrap {
  align-items: center;
  gap: 10px;
}

.table-head-icon {
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  color: var(--primary);
  background: #f0f5ff;
  border-color: #d0dcff;
  box-shadow: none;
  font-size: 13px;
}

.tabs {
  gap: 18px;
  padding: 0 14px;
  border-bottom: 1px solid #e2eaf7;
}

.tabs button {
  min-height: 54px;
  padding: 0 10px;
  color: #738198;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.tabs button:hover {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.tabs button.active {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.tabs button.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.detail-section {
  border: 1px solid #dfe8f6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 26px rgba(47, 72, 122, .04);
}

.detail-section,
.detail-grid > .detail-section,
.detail-stack > .detail-section {
  padding: 0;
  border-top: 1px solid #dfe8f6;
}

.detail-section-head {
  min-height: 64px;
  padding: 18px 22px;
  border-bottom: 1px solid #e3ebf8;
}

.detail-section-head h3 {
  color: #111b34;
  font-size: 18px;
  font-weight: 800;
}

.detail-section-body {
  padding: 18px 22px 22px;
}

.detail-section-actions button.primary {
  min-height: 40px;
  padding: 0 18px;
  background: #17223c;
  box-shadow: 0 10px 22px rgba(18, 32, 59, .16);
}

.card,
.upload-box,
.file-chip,
.button-link,
.calendar-popover,
.modal,
dialog {
  border-radius: 12px;
}

dialog {
  border-color: #dfe8f6;
  box-shadow: var(--shadow-pop);
}

.modal header,
.modal footer,
#modalBody {
  background: rgba(255, 255, 255, .98);
}

.login-screen {
  background:
    radial-gradient(circle at 20% 15%, rgba(71, 120, 255, .16), transparent 34%),
    radial-gradient(circle at 90% 85%, rgba(217, 188, 255, .22), transparent 36%),
    linear-gradient(135deg, #f8fbff, #eef5ff 52%, #faf7ff);
}

.login-card {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .90);
  box-shadow: var(--shadow-pop);
}

.login-mark {
  border-radius: 10px;
  background: linear-gradient(145deg, #2d95ff 0%, #5968ff 100%);
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 12px;
  }

  .sidebar {
    width: auto;
    height: auto;
    margin: 0 0 12px;
    border-radius: 18px;
  }

  nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .nav-group {
    min-width: max-content;
  }

  .nav-group-title {
    display: none;
  }

  nav button {
    padding: 0 14px 0 42px;
  }

  nav button::before {
    display: grid;
    left: 13px;
  }

  .main {
    min-height: auto;
    margin: 0;
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    padding: 18px 18px 14px;
  }

  #view {
    padding: 0 18px 22px;
  }

  .page-hero,
  .surface-body,
  .project-page .surface-body,
  .detail-section-body {
    padding: 16px;
  }

  .surface-head,
  .detail-section-head {
    padding: 16px;
  }

  .project-search {
    width: 100%;
  }
}

/* Phase 3 final override: this must remain at the very end of styles.css. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f9fafb;
  --sidebar-bg: #151922;
  --text: #111827;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-weak: rgba(37, 99, 235, .10);
  --accent: #0f766e;
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow: 0 8px 20px rgba(15, 23, 42, .06);
  --shadow-pop: 0 18px 42px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(37, 99, 235, .18);
}

body {
  grid-template-columns: 272px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  overflow-x: hidden;
}

.sidebar {
  background: var(--sidebar-bg);
  box-shadow: none;
}

.main {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  min-height: 72px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

#view {
  padding: 18px 28px 32px;
}

button,
input,
select,
textarea,
.page-hero,
.surface-section,
.card,
.row-card,
.detail-section,
.modal,
.login-card {
  border-radius: var(--radius);
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
}

button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.page-hero,
.surface-section,
.card,
.row-card,
.detail-section,
.detail-grid > .detail-section,
.detail-stack > .detail-section,
.stat-card,
.metric-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: none;
}

.page-hero {
  min-height: 0;
  padding: 16px 18px;
}

.surface-head,
.detail-section-head {
  min-height: 52px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.surface-body,
.detail-section-body {
  padding: 14px 16px 16px;
}

.surface-table,
.table-wrap,
.spreadsheet-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.row-card {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
}

.row-card > div {
  min-width: 0;
}

.row-card strong,
.row-card p {
  overflow-wrap: anywhere;
}

.hero-actions,
.top-actions,
.detail-section-actions,
.modal footer {
  flex-wrap: wrap;
  gap: 8px;
}

th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

td,
th {
  border-color: var(--line);
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 10px;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 0 10px;
    border-radius: var(--radius-lg);
  }

  nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-group {
    display: contents;
  }

  .nav-group-title,
  .sidebar-tools {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    position: relative;
    min-height: 0;
    padding: 14px;
  }

  #view {
    padding: 12px 0 18px;
  }

  .hero-actions button,
  .top-actions button,
  .detail-section-actions button,
  .modal footer button {
    flex: 1 1 140px;
  }

  .row-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-grid,
  .dashboard-grid,
  .finance-grid,
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Phase 3 modern OA UI layer. Keep this last so it normalizes the legacy style stack. */
:root {
  --bg: #f6f7f9;
  --bg-alt: #eef2f6;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #f9fafb;
  --sidebar-bg: #151922;
  --sidebar-surface: rgba(255, 255, 255, .06);
  --sidebar-surface-hover: rgba(255, 255, 255, .11);
  --sidebar-text: #f8fafc;
  --sidebar-muted: #a7b0bf;
  --text: #111827;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-weak: rgba(37, 99, 235, .10);
  --accent: #0f766e;
  --accent-weak: rgba(15, 118, 110, .10);
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --orange: #b45309;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 20px rgba(15, 23, 42, .06);
  --shadow-pop: 0 18px 42px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(37, 99, 235, .18);
}

html,
body {
  background: var(--bg);
}

body {
  grid-template-columns: 272px minmax(0, 1fr);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select,
textarea {
  border-radius: var(--radius);
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
}

button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button.ghost {
  background: #fff;
}

.sidebar {
  padding: 16px 12px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: none;
}

.brand {
  padding: 4px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0;
}

nav {
  gap: 6px;
}

.nav-group {
  gap: 4px;
}

.nav-group-title {
  padding: 12px 10px 4px;
  color: var(--sidebar-muted);
  font-size: 11px;
  letter-spacing: 0;
}

.nav-btn,
nav button {
  min-height: 36px;
  border-radius: var(--radius);
}

.sidebar-tools {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.main {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 72px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75) inset;
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 20px;
  line-height: 1.3;
}

.topbar p {
  max-width: 840px;
  color: var(--subtle);
}

#view {
  padding: 18px 28px 32px;
}

.page-stack {
  gap: 14px;
}

.page-hero {
  min-height: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.hero-copy {
  gap: 4px;
}

.hero-copy h2 {
  font-size: 18px;
  line-height: 1.35;
}

.hero-copy p {
  color: var(--muted);
}

.hero-actions,
.top-actions,
.detail-section-actions,
.modal footer {
  flex-wrap: wrap;
  gap: 8px;
}

.surface-section,
.card,
.row-card,
.detail-section,
.detail-grid > .detail-section,
.detail-stack > .detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.surface-head,
.detail-section-head {
  min-height: 52px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.surface-body,
.detail-section-body {
  padding: 14px 16px 16px;
}

.stat-grid,
.dashboard-grid,
.finance-grid,
.overview-grid {
  gap: 12px;
}

.stat-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.row-card {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
}

.row-card > div {
  min-width: 0;
}

.row-card strong,
.row-card p {
  overflow-wrap: anywhere;
}

.tag,
.badge,
.status-pill {
  border-radius: 999px;
  letter-spacing: 0;
}

.tag.orange,
.badge.warning {
  color: #92400e;
  background: rgba(180, 83, 9, .10);
  border-color: rgba(180, 83, 9, .22);
}

.tag.green,
.badge.success {
  color: #166534;
  background: rgba(21, 128, 61, .10);
  border-color: rgba(21, 128, 61, .22);
}

.surface-table,
.table-wrap,
.spreadsheet-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

table {
  border-color: var(--line);
}

th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

td,
th {
  border-color: var(--line);
}

input,
select,
textarea {
  border-color: var(--line);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, .56);
}

.modal {
  max-width: min(920px, calc(100vw - 28px));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.modal header,
.modal footer {
  padding: 14px 16px;
}

.login-screen {
  background: var(--bg);
}

.login-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 10px;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 0 10px;
    border-radius: var(--radius-lg);
  }

  nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-group {
    display: contents;
  }

  .nav-group-title {
    display: none;
  }

  .sidebar-tools {
    display: none;
  }

  .main {
    min-height: auto;
  }

  .topbar {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    position: relative;
    min-height: 0;
    padding: 14px;
  }

  .topbar,
  .page-hero,
  .surface-head,
  .detail-section-head {
    align-items: flex-start;
  }

  #view {
    padding: 12px 0 18px;
  }

  .page-hero,
  .surface-head,
  .detail-section-head,
  .surface-body,
  .detail-section-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-actions,
  .top-actions,
  .detail-section-actions,
  .modal footer {
    width: 100%;
  }

  .hero-actions button,
  .top-actions button,
  .detail-section-actions button,
  .modal footer button {
    flex: 1 1 140px;
  }

  .row-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-grid,
  .dashboard-grid,
  .finance-grid,
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-05-24 interaction polish: denser, clearer internal system UI */
:root {
  --ui-radius: 8px;
  --ui-radius-sm: 6px;
  --ui-head: #eef5ff;
  --ui-head-strong: #d6e5ff;
  --ui-section: rgba(255, 255, 255, .86);
  --ui-section-head: rgba(247, 250, 255, .92);
  --ui-danger-bg: #fff1f3;
  --ui-danger-line: #fecdd3;
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*:hover {
  scrollbar-color: rgba(97, 113, 143, .36) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

*:hover::-webkit-scrollbar-thumb {
  background: rgba(97, 113, 143, .32);
}

#view {
  padding-bottom: 30px;
}

button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--ui-radius-sm);
  font-size: 13px;
}

button.primary,
.modal footer button.primary {
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--ui-radius-sm);
  background: #17233d;
  box-shadow: 0 10px 22px rgba(18, 32, 59, .14);
}

button.danger {
  color: #be123c;
  background: #fff1f3;
  border-color: #fecdd3;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #8792a6;
  background: #f5f7fb;
  border-color: #e4eaf3;
  box-shadow: none;
}

.readonly-table-value {
  color: #7a869a;
  padding: 0;
  background: transparent;
  border: 0;
}

.project-page .page-hero {
  min-height: 0;
  padding: 18px 22px;
  align-items: stretch;
  border-radius: 14px;
}

.project-page .hero-copy {
  min-width: 0;
}

.project-page .hero-copy h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.2;
}

.project-page .hero-copy p {
  margin-top: 4px;
}

.project-page .hero-actions {
  gap: 10px;
  align-content: start;
}

.auto-status-panel {
  max-width: 280px;
  padding: 9px 11px;
  border-radius: var(--ui-radius);
}

.project-detail-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(108px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.projects-list-page {
  gap: 14px;
}

.projects-list-toolbar .surface-body {
  display: grid;
  gap: 12px;
}

.project-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-summary-chip {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfe8f6;
  border-radius: var(--ui-radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-summary-chip span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.project-summary-chip strong {
  display: block;
  margin-top: 4px;
  color: #17233d;
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.project-summary-chip.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.project-summary-chip.warning strong {
  color: #c2410c;
}

.project-list-controls {
  margin: 0;
}

.project-list-controls .filters,
.project-list-controls .project-search {
  width: 100%;
}

.project-list-controls .filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
}

.project-list-controls button {
  white-space: nowrap;
}

.project-summary-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(214, 226, 246, .9);
  border-radius: var(--ui-radius);
  background: rgba(255, 255, 255, .72);
}

.project-summary-item span {
  display: block;
  color: #6b7890;
  font-size: 12px;
  line-height: 1.2;
}

.project-summary-item strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #17233d;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-section {
  border-radius: 14px;
}

.surface-section > .surface-head:has(.tabs) {
  min-height: 48px;
}

.tabs {
  gap: 8px;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  min-height: 48px;
  padding: 0 12px;
  white-space: nowrap;
  overflow: visible;
}

.tabs button.has-issues {
  position: relative;
}

.tab-issue-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.tab-issue-badge.warning {
  background: #d97706;
}

.tab-issue-badge.danger {
  background: #e11d48;
}

.tab-issue-popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  max-width: 320px;
  display: none;
  transform: translateX(-50%);
  padding: 9px 10px;
  color: #334155;
  background: #fff;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(29, 45, 82, .14);
  text-align: left;
  white-space: normal;
}

.tab-issue-popover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
  border-left: 1px solid #dbe6f5;
  border-top: 1px solid #dbe6f5;
}

.tab-issue-popover .tab-issue-title {
  display: block;
  margin-bottom: 5px;
  color: #17233d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.tab-issue-list {
  display: grid;
  gap: 4px;
  counter-reset: tab-issue;
}

.tab-issue-item {
  position: relative;
  display: block;
  padding-left: 18px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.tab-issue-item::before {
  counter-increment: tab-issue;
  content: counter(tab-issue) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: #64748b;
  font-weight: 800;
}

.tabs button.has-issues:hover .tab-issue-popover,
.tabs button.has-issues:focus-visible .tab-issue-popover {
  display: block;
}

.surface-section:has(.tabs) {
  overflow: visible !important;
}

.detail-stack,
.form-spaced,
.detail-grid {
  gap: 14px;
}

.detail-section,
.detail-grid > .detail-section,
.detail-stack > .detail-section {
  overflow: hidden;
  border: 1px solid #dbe6f5;
  border-radius: var(--ui-radius);
  background: var(--ui-section);
  box-shadow: 0 8px 22px rgba(47, 72, 122, .035);
}

.detail-section-head {
  min-height: 48px;
  align-items: center;
  padding: 11px 15px;
  background: var(--ui-section-head);
  border-bottom: 1px solid #e4edf8;
}

.detail-section-head h3 {
  color: #17233d;
  font-size: 15px;
  font-weight: 800;
}

.detail-section-actions {
  gap: 6px;
}

.detail-section-actions button,
.detail-actions button {
  min-height: 34px;
}

.detail-section-body {
  padding: 14px 15px 16px;
}

.detail-info {
  min-height: 62px;
  padding: 9px 11px;
  border-radius: var(--ui-radius);
  box-shadow: none;
}

.detail-info strong {
  font-size: 13px;
}

.metric {
  min-height: 68px;
  padding: 10px 12px;
  border-radius: var(--ui-radius);
  box-shadow: none;
}

.metric strong {
  margin-top: 6px;
  font-size: 18px;
}

.field {
  gap: 6px;
}

.field span {
  color: #64748b;
  font-size: 12px;
}

.field input,
.field select,
.field textarea,
.table-shell input,
.table-shell select,
.table-shell textarea {
  min-height: 36px;
  border-radius: var(--ui-radius-sm);
}

.field textarea,
.table-shell textarea {
  min-height: 38px;
  resize: vertical;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid #dfe8f6;
  border-radius: var(--ui-radius);
  background: #fff;
}

table,
.project-table-shell table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

thead tr {
  background: var(--ui-head);
}

th {
  height: 42px;
  padding: 10px 12px;
  color: #25344f;
  background: var(--ui-head);
  border-top: 0;
  border-bottom: 1px solid var(--ui-head-strong);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: inset 0 -1px 0 rgba(79, 124, 255, .08);
}

th:first-child,
th:last-child {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

tbody tr,
.project-table-shell tbody tr {
  background: #fff;
}

td {
  padding: 10px 12px;
  border-top: 0;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

td:first-child,
td:last-child {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

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

tr:hover td {
  background: #f8fbff;
}

.project-table-shell td {
  height: auto;
  min-height: 72px;
}

.project-cell-main,
.project-people-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-cell-main strong {
  color: #17233d;
  font-size: 14px;
  line-height: 1.25;
}

.project-cell-main span,
.project-address-cell,
.project-people-cell span {
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.35;
}

.project-cell-main strong,
.project-cell-main span,
.project-address-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-people-cell {
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
}

.project-people-cell span {
  padding: 4px 7px;
  border: 1px solid #e2eaf7;
  border-radius: 999px;
  background: #f8fbff;
  white-space: nowrap;
}

.project-status-cell {
  display: flex;
  justify-content: flex-start;
}

.table-actions,
.row-actions,
.stack-sm {
  gap: 6px;
}

.upload-box,
.contract-file-list-box,
.insurance-voucher-box,
.actual-voucher-editor,
.inline-voucher-editor,
.inline-voucher {
  border-radius: var(--ui-radius);
  border-color: #dfe8f6;
  background: #fbfdff;
}

.upload-picker {
  min-height: 42px;
  padding: 8px 10px;
}

.contract-file-list-box {
  min-height: 40px;
}

.contract-upload-round,
.inline-voucher-icon-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.file-chip {
  max-width: 180px;
  min-height: 28px;
  border-radius: var(--ui-radius-sm);
}

.invalid-row td,
.detail-section.unsaved-warning,
.archive-warning {
  background: var(--ui-danger-bg);
  border-color: var(--ui-danger-line);
}

.invalid-row td {
  box-shadow: inset 3px 0 0 #fb7185;
}

.section-hint,
.hint-panel {
  border-radius: var(--ui-radius);
}

.modal {
  border-radius: 14px;
}

.exec-project-panel {
  gap: 12px;
}

.exec-flow-prep-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: 12px;
  align-items: start;
}

.exec-project-summary,
.exec-panel-section,
.exec-file-section {
  padding: 13px 14px;
  border: 1px solid #dfe8f6;
  border-radius: var(--ui-radius);
  background: #fff;
}

.exec-project-summary h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.exec-project-summary p {
  margin: 8px 0 0;
  color: #64748b;
}

.exec-panel-section h3,
.exec-file-section h3 {
  margin: 0 0 10px;
  color: #17233d;
  font-size: 14px;
  font-weight: 800;
}

.exec-flow-frame {
  min-height: 180px;
  max-height: 360px;
  height: 240px;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid #e1e9f6;
  border-radius: var(--ui-radius);
  background: #f8fbff;
  resize: vertical;
}

.exec-flow-frame .flow-content-view {
  min-height: auto;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

.exec-flow-frame .flow-content-view > p,
.exec-flow-frame .flow-content-view > div:not(.flow-image-grid) {
  margin: 0 0 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exec-flow-frame p:empty,
.exec-flow-frame .flow-content-view > div:empty,
.exec-flow-frame li:empty {
  display: none;
}

.exec-flow-frame ul,
.exec-flow-frame ol {
  margin: 6px 0 8px 20px;
  padding-left: 14px;
}

.exec-flow-frame li {
  padding-left: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exec-flow-frame img {
  display: block;
  width: calc(100% - 4px);
  max-width: calc(100% - 4px);
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 8px auto 10px;
}

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

.exec-prep-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  background: #f8fbff;
}

.exec-prep-item > span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.exec-prep-item > div {
  color: #17233d;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.exec-prep-item .file-list {
  margin-top: 6px;
}

.exec-task-text-list {
  display: grid;
  gap: 10px;
}

.exec-task-day {
  display: grid;
  gap: 5px;
}

.exec-task-day h4 {
  margin: 0;
  color: #17233d;
  font-size: 14px;
  font-weight: 850;
}

.exec-task-day ul {
  margin: 0;
  padding-left: 18px;
}

.exec-task-day li {
  margin: 3px 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.exec-task-day li.my-task-line {
  color: #dc2626;
  font-weight: 750;
}

@media (max-width: 1100px) {
  .exec-flow-prep-grid {
    grid-template-columns: 1fr;
  }
}

.exec-flow-frame:empty::before {
  content: "暂无内容";
  color: #8a97ad;
}

.flow-editor ul,
.flow-editor ol,
.exec-flow-frame ul,
.exec-flow-frame ol,
.library-flow-frame ul,
.library-flow-frame ol {
  margin: 8px 0 8px 22px;
  padding: 0;
}

.flow-editor li,
.exec-flow-frame li,
.library-flow-frame li {
  margin: 4px 0;
  line-height: 1.6;
}

.exec-flow-frame ul,
.exec-flow-frame ol {
  margin: 6px 0 8px 20px;
  padding-left: 14px;
}

.exec-flow-frame li {
  padding-left: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exec-flow-frame img {
  width: calc(100% - 4px);
  max-width: calc(100% - 4px);
  height: auto;
  max-height: none;
}

.exec-file-section .file-list,
.exec-file-section .upload-queue {
  margin-top: 0;
}

.archive-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.collection-overview,
.finance-page,
.payroll-page,
.todos-page,
.leave-daily-page {
  --finance-accent: #1f3b68;
}

.collection-overview-top,
.collection-summary-grid {
  gap: 10px;
}

.collection-overview .metric,
.finance-page .metric,
.payroll-page .metric {
  min-height: 64px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.collection-overview .metric strong,
.finance-page .metric strong,
.payroll-page .metric strong {
  color: var(--finance-accent);
  font-variant-numeric: tabular-nums;
}

.row-card {
  padding: 11px 13px;
  border-radius: var(--ui-radius);
  box-shadow: none;
}

.row-card strong {
  color: #17233d;
  line-height: 1.3;
}

.row-card p {
  margin-top: 4px;
  color: #64748b;
  line-height: 1.45;
}

.row-card.clickable:hover {
  border-color: #c7d8f6;
  background: #f8fbff;
  transform: translateY(-1px);
}

.list,
.compact-list {
  gap: 8px;
}

.project-library-detail {
  gap: 12px;
}

.library-detail-hero {
  padding: 14px;
  border-radius: var(--ui-radius);
  background: #f8fbff;
}

.library-head-filters {
  grid-template-columns: minmax(260px, 1.45fr) minmax(150px, .7fr) minmax(190px, .85fr) auto;
}

.library-head-filters button {
  white-space: nowrap;
}

.library-detail-hero h3 {
  margin: 6px 0;
  font-size: 20px;
}

.library-detail-section {
  padding: 13px 14px;
  border: 1px solid #dfe8f6;
  border-radius: var(--ui-radius);
  background: #fff;
}

.library-resource-card {
  min-height: 96px;
  border-radius: var(--ui-radius);
}

.library-flow-frame {
  border: 1px solid #dfe8f6;
  border-radius: var(--ui-radius);
  background: #f8fbff;
}

.calendar .day {
  border-radius: var(--ui-radius);
}

.event-dot {
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 6px;
  line-height: 1.25;
}

.calendar-popover {
  border-radius: 12px;
}

.popover-item {
  border-radius: var(--ui-radius);
}

.modal header,
.modal footer {
  padding: 14px 18px;
}

#modalBody {
  padding: 18px;
}

@media (max-width: 1280px) {
  .project-detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .project-page .page-hero {
    padding: 16px;
  }

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

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

  .project-list-controls .filters {
    grid-template-columns: 1fr;
  }

  .library-head-filters {
    grid-template-columns: 1fr;
  }

  .project-people-cell {
    grid-template-columns: 1fr;
  }

  .detail-section-head {
    align-items: flex-start;
  }
}

/* Project detail density overrides */
.business-detail-grid {
  align-items: stretch;
}

.business-detail-grid > .detail-section {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

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

.business-detail-grid .detail-section-body {
  display: flex;
  flex-direction: column;
}

.business-detail-grid .contract-file-panel,
.business-detail-grid .contract-file-field,
.business-detail-grid .contract-file-list-box {
  flex: 1;
  min-height: 0;
}

.business-detail-grid .contract-file-list-box {
  min-height: 86px;
  padding: 12px 46px 12px 12px;
}

.detail-section-head,
.surface-head {
  min-height: 56px;
  padding: 14px 22px;
}

.detail-section-head h3,
.surface-head h3 {
  line-height: 1.25;
}

th {
  height: 56px;
  padding: 12px 24px;
}

.file-chip > span:not(.file-icon) {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .detail-grid .business-info-grid.grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .detail-grid .business-info-grid.grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Final header normalization: keep repeated theme blocks from drifting apart. */
.surface-head,
.detail-section-head {
  min-height: 56px !important;
  padding: 14px 22px !important;
  align-items: center !important;
}

.surface-head h3,
.detail-section-head h3 {
  line-height: 1.25 !important;
  margin: 0;
}

.table-shell th,
th {
  height: 56px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.surface-section > .surface-head:has(.tabs) {
  overflow: visible !important;
}

.surface-section > .surface-head:has(.tabs) .tabs,
.tabs {
  overflow: visible !important;
  flex-wrap: wrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Deep UI audit: project detail panels must scan on a stable grid. */
.detail-grid,
.business-detail-grid {
  align-items: stretch !important;
}

.detail-grid > .detail-section,
.business-detail-grid > .detail-section {
  display: grid !important;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.detail-grid > .detail-section > .detail-section-head,
.business-detail-grid > .detail-section > .detail-section-head {
  height: 72px !important;
  min-height: 72px !important;
  box-sizing: border-box;
}

.detail-section-head > div {
  min-width: 0;
}

.detail-section-head .muted,
.field-note {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.field-note {
  margin-top: 4px;
}

.surface-section > .surface-head:has(.tabs)::-webkit-scrollbar,
.surface-section > .surface-head:has(.tabs) .tabs::-webkit-scrollbar,
.tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Sidebar polish: hide old pseudo icons and show scrollbar only while scrolling. */
nav button::before {
  content: none !important;
  display: none !important;
}

.sidebar,
nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar,
nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar.is-scrolling,
nav.is-scrolling {
  scrollbar-width: thin;
  scrollbar-color: rgba(83, 97, 123, .42) transparent;
}

.sidebar.is-scrolling::-webkit-scrollbar,
nav.is-scrolling::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar.is-scrolling::-webkit-scrollbar-track,
nav.is-scrolling::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar.is-scrolling::-webkit-scrollbar-thumb,
nav.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(83, 97, 123, .42);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

/* Sidebar alignment fix */
.nav-group-title {
  padding-left: 16px !important;
  padding-right: 16px !important;
  text-align: left;
}

nav button {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-left: 16px !important;
  padding-right: 16px !important;
  text-align: left;
}

nav button span {
  min-width: 0;
  text-align: left;
}

.nav-icon {
  justify-self: center;
}

/* Screenshot detail pass: real line icons and tighter reference spacing. */
nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 16px;
}

nav button::before {
  display: none;
}

.nav-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: #566783;
}

nav button.active .nav-icon,
nav button:hover .nav-icon {
  color: var(--primary);
}

.sidebar-tools button::before {
  font-size: 17px;
}

.project-page .page-hero {
  min-height: 162px;
  align-items: flex-start;
  padding: 24px 26px;
}

.project-page .hero-copy h2 {
  margin-top: 2px;
  font-size: 29px;
}

.project-page .hero-actions {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.project-page .hero-actions select {
  width: 176px;
  min-height: 42px;
}

.project-page .hero-actions button {
  min-width: 70px;
}

.tabs {
  align-items: center;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.surface-section > .surface-head:has(.tabs) {
  min-height: 54px;
  padding-top: 0;
  padding-bottom: 0;
}

.surface-section > .surface-head:has(.tabs) .tabs {
  width: 100%;
}

#projectTable .table-shell,
.project-table-shell {
  margin-top: 0;
}

.toolbar:has(.project-search) {
  margin-bottom: 20px;
}

.toolbar:has(.project-search) .primary {
  min-width: 148px;
}

.table-shell input,
.table-shell select,
.table-shell textarea {
  min-height: 36px;
}

.custom-field-table td,
.cost-drag-table td,
#preparationRows td,
#taskRows td {
  padding-top: 10px;
  padding-bottom: 10px;
}

@media (max-width: 720px) {
  nav button {
    padding-left: 14px;
  }
}

/* 2026-05-22 reference UI refresh */
:root {
  --bg: #eef4ff;
  --bg-alt: #f5f7fb;
  --panel: rgba(255, 255, 255, .92);
  --panel-strong: #ffffff;
  --panel-soft: #f7faff;
  --sidebar-bg: rgba(248, 251, 255, .82);
  --sidebar-surface: rgba(255, 255, 255, .72);
  --sidebar-surface-hover: rgba(239, 246, 255, .96);
  --sidebar-text: #52617b;
  --sidebar-muted: #7b8aa4;
  --text: #101a35;
  --muted: #65728c;
  --subtle: #8a97ad;
  --line: rgba(121, 143, 184, .20);
  --line-strong: rgba(75, 109, 190, .34);
  --primary: #4f7cff;
  --primary-hover: #3f68ea;
  --primary-weak: rgba(79, 124, 255, .12);
  --danger: #e11d48;
  --ok: #10a37f;
  --warn: #d98b16;
  --orange: #d98b16;
  --shadow-sm: 0 10px 24px rgba(43, 70, 122, .055);
  --shadow: 0 20px 56px rgba(43, 70, 122, .09);
  --shadow-pop: 0 30px 90px rgba(25, 44, 84, .18);
  --focus: 0 0 0 4px rgba(79, 124, 255, .16);
}

html {
  background:
    radial-gradient(circle at 92% 4%, rgba(198, 221, 255, .72), transparent 30%),
    radial-gradient(circle at 82% 100%, rgba(239, 213, 255, .58), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #eef5ff 47%, #f7f3ff 100%);
}

body {
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px 18px 18px 0;
  background:
    radial-gradient(circle at 98% 0%, rgba(186, 213, 255, .74), transparent 28%),
    radial-gradient(circle at 85% 105%, rgba(235, 211, 255, .56), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 46%, #faf7ff 100%);
  color: var(--text);
  font-size: 14px;
}

body.login-mode {
  padding: 0;
}

.sidebar {
  top: 0;
  height: calc(100vh - 36px);
  margin: 0 0 0 18px;
  padding: 14px 14px 16px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, .66);
  border-right-color: rgba(255, 255, 255, .66);
  border-radius: 0;
  box-shadow: 18px 18px 54px rgba(58, 86, 135, .08);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.brand {
  position: relative;
  min-height: 58px;
  padding: 6px 8px 8px 62px;
  display: grid;
  align-content: center;
}

.brand::before {
  content: "d";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(145deg, #2f94ff 0%, #5a68ff 100%);
  box-shadow: 0 14px 28px rgba(64, 107, 255, .24), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.brand strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

.brand span {
  margin-top: 4px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

nav {
  gap: 16px;
  padding: 10px 2px 4px;
}

.nav-group {
  padding: 0;
  gap: 6px;
}

.nav-group + .nav-group {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nav-group-title {
  padding: 0 9px 4px;
  color: #687793;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

nav button {
  min-height: 48px;
  padding: 0 14px 0 54px;
  color: #53627d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
}

nav button::before {
  left: 18px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 7px;
  background: transparent;
  color: #556783;
  opacity: 1;
  font-size: 16px;
  line-height: 1;
  content: "◇";
}

nav button[data-view="dashboard"]::before { content: "▣"; }
nav button[data-view="todos"]::before { content: "▤"; }
nav button[data-view="logs"]::before { content: "◎"; }
nav button[data-view="projects"]::before { content: "⬡"; }
nav button[data-view="calendar"]::before { content: "□"; }
nav button[data-view="reimbursements"]::before { content: "♡"; }
nav button[data-view="finance"]::before { content: "◈"; }
nav button[data-view="payroll"]::before { content: "工"; }
nav button[data-view="accounts"]::before { content: "♙"; }
nav button[data-view="people"]::before { content: "♧"; }
nav button[data-view="settings"]::before { content: "⚙"; }

nav button:hover {
  color: var(--primary);
  background: var(--sidebar-surface-hover);
  border-color: rgba(119, 151, 224, .18);
}

nav button.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(239, 245, 255, .98), rgba(247, 250, 255, .84));
  border-color: rgba(80, 124, 255, .32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 10px 24px rgba(74, 109, 181, .08);
}

nav button.active::before {
  color: var(--primary);
  background: rgba(79, 124, 255, .10);
}

.sidebar-tools {
  gap: 10px;
  padding: 12px 4px 0;
  border-top: 0;
}

.sidebar-tools button {
  min-height: 56px;
  justify-content: flex-start;
  padding-left: 54px;
  color: #4f5f79;
  background: rgba(255, 255, 255, .76);
  border-color: rgba(255, 255, 255, .86);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(45, 74, 128, .07);
  position: relative;
}

.sidebar-tools button::before {
  position: absolute;
  left: 18px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(79, 124, 255, .11);
  color: var(--primary);
}

#exportBtn::before {
  content: "□";
  color: #10a37f;
  background: rgba(16, 163, 127, .10);
}

.main {
  min-height: calc(100vh - 36px);
  margin-left: 10px;
  padding: 0;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(57, 84, 135, .10);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  overflow: clip;
}

.topbar {
  position: sticky;
  top: 0;
  margin: 0;
  padding: 28px 34px 20px;
  background: rgba(255, 255, 255, .50);
  border-bottom: 0;
  box-shadow: none;
}

#pageTitle {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
}

#pageSub {
  margin-top: 8px;
  color: #657593;
  font-size: 14px;
}

.avatar-btn {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 999px;
  background: #17223c;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 26, 53, .16);
}

.avatar-btn:hover {
  background: #111a31;
}

#view {
  width: 100%;
  max-width: none;
  padding: 0 34px 34px;
  gap: 18px;
}

.page-stack {
  gap: 18px;
}

.page-hero {
  min-height: 128px;
  align-items: center;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(250, 252, 255, .90)),
    radial-gradient(circle at 82% 8%, rgba(214, 227, 255, .7), transparent 36%);
  border: 1px solid rgba(222, 231, 247, .88);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(48, 76, 128, .06);
}

.hero-copy {
  gap: 10px;
}

.hero-copy h2 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 800;
  color: var(--text);
}

.hero-copy p,
.surface-head .muted {
  color: #657593;
}

.hero-actions {
  align-items: center;
}

.surface-section {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(218, 228, 244, .92);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(48, 76, 128, .055);
  overflow: visible;
}

.surface-head {
  min-height: 64px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .58);
  border-bottom: 1px solid rgba(218, 228, 244, .72);
}

.surface-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.surface-body,
.project-page .surface-body {
  padding: 18px 22px 22px;
}

.toolbar {
  gap: 14px;
  margin-bottom: 22px;
}

.filters {
  gap: 9px;
}

.project-search,
input,
select,
textarea {
  min-height: 44px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(190, 204, 230, .72);
  border-radius: 10px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

.project-search {
  width: 320px;
  padding-left: 42px;
  background:
    linear-gradient(rgba(255, 255, 255, .78), rgba(255, 255, 255, .78)),
    radial-gradient(circle at 24px 50%, rgba(79, 124, 255, .20) 0 5px, transparent 6px);
}

input::placeholder,
textarea::placeholder {
  color: #8796b0;
}

button {
  min-height: 40px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(190, 204, 230, .72);
  border-radius: 10px;
  color: #18233c;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(48, 76, 128, .045);
}

button:hover {
  background: #fff;
  border-color: rgba(79, 124, 255, .34);
  box-shadow: 0 10px 24px rgba(48, 76, 128, .08);
}

button.primary {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #5d8cff, #5464f5);
  box-shadow: 0 16px 32px rgba(79, 105, 245, .28);
}

button.primary:hover {
  background: linear-gradient(135deg, #4f7cff, #4656e7);
  box-shadow: 0 18px 36px rgba(79, 105, 245, .34);
}

button.ghost {
  background: rgba(255, 255, 255, .66);
}

.icon-btn,
.page-title-back .project-back-btn {
  border-radius: 10px;
}

.page-title-back {
  margin-right: 12px;
}

.page-title-back .project-back-btn {
  background: #fff;
  border-color: rgba(206, 218, 240, .88);
}

.detail-meta {
  gap: 8px;
}

.tag {
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #50617d;
  background: rgba(246, 249, 255, .92);
  border-color: rgba(207, 219, 241, .86);
  font-weight: 700;
}

.tag.blue {
  color: #2f61e6;
  background: rgba(232, 239, 255, .96);
  border-color: rgba(184, 205, 255, .86);
}

.tag.green {
  color: #0f8a68;
  background: rgba(221, 250, 240, .95);
  border-color: rgba(167, 232, 211, .88);
}

.tag.orange {
  color: #b76b00;
  background: rgba(255, 244, 220, .96);
  border-color: rgba(246, 213, 150, .84);
}

.tag.red {
  color: #c51f46;
  background: rgba(255, 232, 238, .96);
  border-color: rgba(248, 184, 199, .84);
}

.metric,
.detail-info,
.row-card,
.hint-panel,
.empty {
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(218, 228, 244, .92);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(48, 76, 128, .045);
}

.metric {
  min-height: 92px;
  padding: 18px;
}

.metric span,
.detail-info span,
.field > span,
.field label {
  color: #77849d;
  font-size: 13px;
  font-weight: 700;
}

.metric strong,
.detail-info strong {
  color: #12203b;
  font-weight: 800;
}

.table-shell {
  border: 1px solid rgba(218, 228, 244, .96);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 34px rgba(48, 76, 128, .045);
  overflow: visible;
}

table {
  background: transparent;
  border-spacing: 0 10px;
  border-collapse: separate;
  min-width: 760px;
}

thead tr {
  background: linear-gradient(180deg, rgba(244, 248, 255, .96), rgba(239, 245, 255, .96));
}

th {
  height: 58px;
  color: #22304d;
  background: transparent;
  border-top: 1px solid rgba(218, 228, 244, .92);
  border-bottom: 1px solid rgba(218, 228, 244, .92);
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

th:first-child {
  border-left: 1px solid rgba(218, 228, 244, .92);
  border-radius: 10px 0 0 10px;
}

th:last-child {
  border-right: 1px solid rgba(218, 228, 244, .92);
  border-radius: 0 10px 10px 0;
}

tbody tr {
  background: rgba(255, 255, 255, .88);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

td {
  min-height: 58px;
  padding: 16px 13px;
  border-top: 1px solid rgba(218, 228, 244, .82);
  border-bottom: 1px solid rgba(218, 228, 244, .82);
  color: #1a2742;
}

td:first-child {
  border-left: 1px solid rgba(218, 228, 244, .82);
  border-radius: 10px 0 0 10px;
}

td:last-child {
  border-right: 1px solid rgba(218, 228, 244, .82);
  border-radius: 0 10px 10px 0;
}

tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(48, 76, 128, .07);
}

tr:hover td {
  background: rgba(255, 255, 255, .96);
}

.project-table-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-table-shell table {
  border-spacing: 0 12px;
}

.project-table-shell tbody tr {
  box-shadow: 0 10px 26px rgba(48, 76, 128, .045);
}

.project-th-wrap {
  align-items: center;
}

.table-head-icon {
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  color: var(--primary);
  background: rgba(238, 244, 255, .96);
  border-color: rgba(196, 211, 252, .82);
  box-shadow: none;
}

.tabs {
  padding: 0 14px;
  gap: 18px;
  border-bottom-color: rgba(218, 228, 244, .88);
}

.tabs button {
  min-height: 54px;
  padding: 0 10px;
  color: #738198;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.tabs button:hover {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.tabs button.active {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.tabs button.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.detail-section {
  border-color: rgba(218, 228, 244, .92);
  border-radius: 12px;
  background: rgba(255, 255, 255, .70);
  box-shadow: 0 12px 30px rgba(48, 76, 128, .04);
}

.detail-section-head {
  min-height: 64px;
  padding: 18px 22px;
  border-bottom-color: rgba(218, 228, 244, .76);
}

.detail-section-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.detail-section-body {
  padding: 18px 22px 22px;
}

.card,
.upload-box,
.file-chip,
.button-link,
.calendar-popover,
.modal,
dialog {
  border-radius: 12px;
}

dialog {
  border-color: rgba(218, 228, 244, .92);
  box-shadow: var(--shadow-pop);
}

.modal header,
.modal footer,
#modalBody {
  background: rgba(255, 255, 255, .96);
}

.login-screen {
  background:
    radial-gradient(circle at 20% 15%, rgba(79, 124, 255, .16), transparent 34%),
    radial-gradient(circle at 90% 85%, rgba(217, 188, 255, .22), transparent 36%),
    linear-gradient(135deg, #f8fbff, #eef5ff 52%, #faf7ff);
}

.login-card {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-pop);
}

.login-mark {
  border-radius: 12px;
  background: linear-gradient(145deg, #2f94ff 0%, #5a68ff 100%);
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 12px;
  }

  .sidebar {
    height: auto;
    margin: 0 0 12px;
    border-radius: 18px;
  }

  nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .nav-group {
    min-width: max-content;
  }

  .nav-group-title {
    display: none;
  }

  nav button {
    padding: 0 14px 0 42px;
  }

  nav button::before {
    display: grid;
    left: 13px;
  }

  .main {
    min-height: auto;
    margin-left: 0;
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    padding: 18px 18px 14px;
  }

  #view {
    padding: 0 18px 22px;
  }

  .page-hero,
  .surface-body,
  .project-page .surface-body,
  .detail-section-body {
    padding: 16px;
  }

  .surface-head,
  .detail-section-head {
    padding: 16px;
  }

  .project-search {
    width: 100%;
  }
}

/* OpenAI workspace refinement */
:root {
  --bg: #f7f7f5;
  --bg-alt: #efefec;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #fbfbfa;
  --sidebar-bg: #101114;
  --sidebar-surface: rgba(255, 255, 255, .055);
  --sidebar-surface-hover: rgba(255, 255, 255, .1);
  --sidebar-text: #ececf1;
  --sidebar-muted: #a1a1aa;
  --text: #111111;
  --muted: #5f6368;
  --subtle: #71717a;
  --line: rgba(17, 17, 17, .09);
  --line-strong: rgba(17, 17, 17, .16);
  --primary: #10a37f;
  --primary-hover: #0e8f70;
  --primary-weak: rgba(16, 163, 127, .08);
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, .04);
  --shadow: 0 8px 24px rgba(17, 17, 17, .06);
  --shadow-pop: 0 24px 64px rgba(17, 17, 17, .2);
}

* {
  letter-spacing: 0 !important;
}

body {
  background: var(--bg);
}

.sidebar {
  background: var(--sidebar-bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
}

.brand strong {
  color: #f7f7f8;
  font-weight: 660;
}

.brand span,
.nav-group-title,
.user-switch,
.login-panel span {
  color: var(--sidebar-muted);
}

nav button {
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 560;
}

nav button:hover,
nav button.active {
  background: var(--sidebar-surface-hover);
  color: #ffffff;
}

nav button.active {
  border-color: rgba(255, 255, 255, .08);
}

.main {
  background: transparent;
}

.topbar {
  background: rgba(247, 247, 245, .92);
  box-shadow: none;
}

h1 {
  font-size: 26px;
  font-weight: 680;
}

h2,
.hero-copy h2 {
  font-size: 21px;
  font-weight: 680;
}

h3,
.surface-head h3,
.detail-section-head h3 {
  font-weight: 620;
}

.page-hero,
.surface-section,
.card,
.metric,
.detail-info,
.detail-grid > .detail-section,
.row-card,
.table-shell,
.calendar,
.calendar-popover,
.popover-item,
.upload-box,
.empty,
.hint-panel {
  border-radius: 8px;
  border-color: var(--line);
  box-shadow: none;
}

.page-hero,
.surface-section,
.metric,
.detail-info,
.detail-grid > .detail-section,
.row-card,
.table-shell,
.popover-item {
  background: var(--panel);
}

.page-hero {
  padding: 18px 20px;
}

.surface-head {
  background: var(--panel);
  border-bottom-color: var(--line);
}

.surface-body,
.project-page .surface-body {
  padding: 16px;
}

button,
input,
select,
textarea,
.file-chip,
.button-link {
  border-radius: 8px;
}

button {
  background: #ffffff;
  border-color: var(--line);
  font-weight: 540;
  box-shadow: none;
}

button:hover {
  background: #fafafa;
  border-color: var(--line-strong);
}

button.primary {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
  box-shadow: none;
}

button.primary:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

input,
select,
textarea {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

.tag {
  min-height: 22px;
  border-color: rgba(17, 17, 17, .08);
  background: rgba(17, 17, 17, .045);
}

.tag.blue,
.tag.green {
  background: var(--primary-weak);
  color: #0b7f65;
}

th {
  background: #edf4ff;
  color: #334155;
  font-weight: 620;
  border-bottom-color: #cbdcff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, .14);
}

td {
  color: var(--text);
}

tr:hover td {
  background: rgba(17, 17, 17, .025);
}

.tabs {
  gap: 4px;
}

.tabs button {
  border-radius: 8px;
}

.tabs button.active {
  background: #f0f0ed;
  box-shadow: none;
}

.row-card.clickable:hover {
  background: #fafafa;
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
}

.empty {
  background: var(--panel-soft);
  border-style: dashed;
}

dialog {
  border-color: var(--line);
  box-shadow: var(--shadow-pop);
}

.modal footer {
  background: var(--panel-soft);
}

/* Final visual pass */
:root {
  --bg: #f5f6f8;
  --bg-alt: #eceff3;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #fafbfc;
  --sidebar-bg: #111318;
  --sidebar-surface: rgba(255, 255, 255, .05);
  --sidebar-surface-hover: rgba(255, 255, 255, .09);
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --text: #111827;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: rgba(17, 24, 39, .075);
  --line-strong: rgba(17, 24, 39, .14);
  --primary: #10a37f;
  --primary-hover: #0d8f70;
  --primary-weak: rgba(16, 163, 127, .08);
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --orange: #b45309;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 14px rgba(17, 24, 39, .03);
  --shadow: 0 10px 26px rgba(17, 24, 39, .06);
  --shadow-pop: 0 24px 60px rgba(15, 23, 42, .16);
  --focus: 0 0 0 3px rgba(16, 163, 127, .16);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, 0) 220px),
    var(--bg);
  font-feature-settings: "liga" 1, "calt" 1;
}

.sidebar {
  background: var(--sidebar-bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
}

.brand strong {
  letter-spacing: -.01em;
}

.nav-group {
  display: grid;
  gap: 6px;
  padding: 0 4px;
}

.nav-group + .nav-group {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.nav-group-title {
  padding: 0 12px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

nav button {
  min-height: 38px;
  padding-left: 26px;
  border-radius: 8px;
  font-size: 13.5px;
}

nav button.active {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

nav button.active::before {
  background: var(--primary);
  opacity: 1;
}

.main {
  padding: 20px 22px 36px;
}

.topbar {
  margin: -20px -22px 18px;
  padding: 18px 22px 14px;
  background: rgba(245, 246, 248, .92);
  border-bottom: 1px solid rgba(17, 24, 39, .06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset, 0 8px 24px rgba(15, 23, 42, .03);
  backdrop-filter: blur(16px) saturate(1.02);
  -webkit-backdrop-filter: blur(16px) saturate(1.02);
}

#view {
  width: min(100%, 1500px);
  gap: 16px;
}

.page-stack {
  gap: 16px;
}

.page-hero,
.surface-section {
  border-radius: 8px;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.page-hero {
  padding: 18px 20px;
  background: rgba(255, 255, 255, .98);
}

.hero-copy h2 {
  font-size: 21px;
  font-weight: 700;
}

.surface-head {
  padding: 13px 16px;
  background: rgba(255, 255, 255, .98);
}

.surface-body,
.project-page .surface-body {
  padding: 16px;
}

.detail-info,
.metric,
.hint-panel,
.empty,
.row-card,
.table-shell,
dialog,
.calendar-popover,
.upload-box,
.file-chip,
.button-link {
  border-radius: 8px;
}

.detail-info,
.metric,
.row-card,
.calendar-popover,
.empty {
  background: #fff;
  border-color: var(--line);
}

.metric {
  min-height: 82px;
  box-shadow: var(--shadow-sm);
}

.metric strong {
  font-size: 18px;
}

button,
input,
select,
textarea {
  border-radius: 8px;
}

button {
  background: #fff;
  border-color: rgba(17, 24, 39, .1);
}

button:hover {
  border-color: rgba(17, 24, 39, .16);
}

button.primary {
  box-shadow: 0 8px 20px rgba(16, 163, 127, .14);
}

input,
select,
textarea {
  background: #fff;
  border-color: rgba(17, 24, 39, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.field > span,
.field label {
  color: #5b6472;
}

.tabs {
  gap: 6px;
}

.tabs button {
  border-radius: 8px 8px 0 0;
}

.tabs button.active {
  box-shadow: 0 -1px 0 rgba(17, 24, 39, .08) inset, 0 1px 0 #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #edf4ff;
  color: #334155;
  border-bottom-color: #cbdcff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, .14);
}

tr:hover td {
  background: rgba(16, 163, 127, .025);
}

.tag {
  border-radius: 999px;
}

.hint-panel {
  background: rgba(16, 163, 127, .05);
  border-color: rgba(16, 163, 127, .12);
}

.hint-panel.warning {
  background: rgba(196, 127, 24, .08);
}

.hint-panel.danger {
  background: rgba(225, 29, 72, .08);
}

.hint-panel.success {
  background: rgba(5, 150, 105, .08);
}

.row-card {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.row-card.clickable:hover {
  background: #fff;
  border-color: rgba(16, 163, 127, .22);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
  transform: translateY(-1px);
}

.empty {
  background: var(--panel-soft);
  border-style: dashed;
}

.table-shell {
  border-color: var(--line);
  background: #fff;
}

.calendar-popover {
  box-shadow: var(--shadow-pop);
}

.popover-head {
  background: rgba(255, 255, 255, .98);
}

.popover-item {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

dialog {
  border-color: var(--line);
  box-shadow: var(--shadow-pop);
}

.modal header,
.modal footer {
  background: #fff;
}

.modal footer {
  background: #fbfcfd;
}

#modalBody {
  background: #fff;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding-bottom: 12px;
  }

  nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  nav button {
    min-height: 36px;
    padding: 0 14px;
  }

  nav button::before {
    display: none;
  }

  .main {
    padding-top: 16px;
  }
}

@media (max-width: 720px) {
  .topbar {
    margin: -16px -16px 14px;
    padding: 14px 16px 12px;
  }

  .main {
    padding: 16px 16px 28px;
  }

  .page-hero,
  .surface-body,
  .project-page .surface-body {
    padding: 14px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .top-actions {
    justify-content: flex-start;
  }

  .project-search {
    width: 100%;
  }

  .page-hero {
    flex-direction: column;
  }
}
/* Screenshot-matched final override. This block must stay at EOF. */
:root {
  --bg: #f3f8ff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --sidebar-bg: #f4f9ff;
  --sidebar-text: #52617b;
  --sidebar-muted: #7b8ba4;
  --text: #101a35;
  --muted: #63718c;
  --line: #dfe8f6;
  --line-strong: #c8d6ef;
  --primary: #4778ff;
  --primary-hover: #3e6cea;
  --primary-weak: #eef4ff;
  --danger: #e11d48;
  --ok: #10a37f;
  --warn: #d98b16;
  --orange: #d98b16;
  --shadow-sm: 0 8px 24px rgba(47, 72, 122, .055);
  --shadow: 0 18px 50px rgba(47, 72, 122, .08);
  --shadow-pop: 0 30px 90px rgba(25, 44, 84, .18);
  --focus: 0 0 0 4px rgba(71, 120, 255, .14);
}

html,
body {
  background:
    radial-gradient(circle at 96% 0%, rgba(206, 226, 255, .72), transparent 28%),
    radial-gradient(circle at 86% 100%, rgba(240, 219, 255, .58), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 58%, #f9f5ff 100%);
}

body {
  grid-template-columns: 303px minmax(0, 1fr);
  padding: 0 14px 0 0;
  color: var(--text);
}

body.login-mode {
  display: block;
  padding: 0;
}

.sidebar {
  top: 0;
  width: 303px;
  height: 100vh;
  margin: 0;
  padding: 26px 20px 22px;
  background: rgba(244, 249, 255, .78);
  color: var(--sidebar-text);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  min-height: 54px;
  padding: 3px 0 0 68px;
  display: grid;
  align-content: start;
}

.brand::before {
  content: "d";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 33px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(145deg, #2d95ff 0%, #5968ff 100%);
  box-shadow: 0 12px 24px rgba(60, 105, 255, .24);
}

.brand strong {
  color: #14203a;
  font-size: 18px;
  font-weight: 800;
}

.brand span,
.nav-group-title {
  color: var(--sidebar-muted);
}

nav {
  display: grid;
  gap: 20px;
  padding: 28px 0 0;
}

.nav-group {
  display: grid;
  gap: 8px;
  padding: 0;
}

.nav-group + .nav-group {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nav-group-title {
  padding: 0 8px 1px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

nav button {
  min-height: 49px;
  padding: 0 14px 0 52px;
  color: #53617b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 650;
}

nav button::before {
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 6px;
  background: transparent;
  color: #546682;
  opacity: 1;
  font-size: 17px;
  line-height: 1;
  content: "◇";
}

nav button[data-view="dashboard"]::before { content: "▱"; }
nav button[data-view="todos"]::before { content: "▿"; }
nav button[data-view="logs"]::before { content: "◇"; }
nav button[data-view="projects"]::before { content: "⬡"; }
nav button[data-view="calendar"]::before { content: "□"; }
nav button[data-view="reimbursements"]::before { content: "♡"; }
nav button[data-view="finance"]::before { content: "◈"; }
nav button[data-view="payroll"]::before { content: "工"; }
nav button[data-view="accounts"]::before { content: "♙"; }
nav button[data-view="people"]::before { content: "♧"; }
nav button[data-view="settings"]::before { content: "⚙"; }

nav button:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, .58);
  border-color: rgba(199, 214, 244, .70);
}

nav button.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(239, 245, 255, .98), rgba(248, 251, 255, .86));
  border-color: rgba(147, 174, 255, .54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .70), 0 10px 22px rgba(68, 100, 168, .08);
}

nav button.active::before {
  color: var(--primary);
  background: rgba(71, 120, 255, .10);
}

.sidebar-tools {
  gap: 10px;
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 0;
}

.sidebar-tools button {
  min-height: 56px;
  justify-content: flex-start;
  padding-left: 58px;
  border: 1px solid rgba(229, 237, 250, .9);
  border-radius: 11px;
  color: #53617b;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 28px rgba(47, 72, 122, .07);
  position: relative;
}

.sidebar-tools button::before {
  position: absolute;
  left: 20px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(71, 120, 255, .11);
  color: var(--primary);
}

#exportBtn::before {
  content: "□";
  background: rgba(16, 163, 127, .12);
  color: #10a37f;
}

.main {
  min-height: calc(100vh - 32px);
  margin: 16px 0;
  padding: 0;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(47, 72, 122, .10);
  overflow: clip;
  backdrop-filter: blur(20px) saturate(1.06);
  -webkit-backdrop-filter: blur(20px) saturate(1.06);
}

.topbar {
  top: 0;
  margin: 0;
  padding: 27px 33px 18px;
  background: rgba(255, 255, 255, .40);
  border-bottom: 0;
  box-shadow: none;
}

#pageTitle {
  color: #111b34;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
}

#pageSub {
  margin-top: 8px;
  color: #647490;
  font-size: 14px;
}

.avatar-btn {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: #17223c;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 26, 53, .16);
}

#view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 33px 34px;
  gap: 18px;
}

.page-stack {
  gap: 18px;
}

.page-hero,
.surface-section {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dfe8f6;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(47, 72, 122, .052);
}

.page-hero {
  min-height: 128px;
  padding: 23px 25px;
  align-items: center;
}

.hero-copy h2 {
  color: #101a35;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
}

.hero-copy p,
.muted,
.surface-head .muted {
  color: #647490;
}

.surface-head {
  min-height: 64px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .58);
  border-bottom: 1px solid #e3ebf8;
}

.surface-head h3 {
  color: #111b34;
  font-size: 18px;
  font-weight: 800;
}

.surface-body,
.project-page .surface-body {
  padding: 18px 22px 22px;
}

.toolbar {
  gap: 14px;
  margin-bottom: 22px;
}

.project-search {
  width: 309px;
  min-height: 54px;
  padding: 0 18px 0 48px;
  border: 1px solid #d6e0f2;
  border-radius: 11px;
  color: #111b34;
  background:
    radial-gradient(circle at 24px 50%, rgba(71, 120, 255, .24) 0 6px, transparent 7px),
    rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

input,
select,
textarea {
  min-height: 42px;
  color: #14203a;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #d6e0f2;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

button {
  min-height: 40px;
  padding: 0 16px;
  color: #18233c;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #d6e0f2;
  border-radius: 9px;
  box-shadow: none;
  font-weight: 650;
}

button.primary {
  min-height: 49px;
  padding: 0 26px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #5d8cff, #5667f7);
  box-shadow: 0 15px 30px rgba(79, 105, 245, .28);
}

.tag {
  min-height: 28px;
  padding: 4px 12px;
  color: #50617d;
  background: #f5f8ff;
  border: 1px solid #d9e4f6;
  border-radius: 999px;
  font-weight: 700;
}

.tag.blue {
  color: #2f61e6;
  background: #edf3ff;
  border-color: #bfd0ff;
}

.tag.green {
  color: #0f8a68;
  background: #def8ef;
  border-color: #a9ead4;
}

.tag.orange {
  color: #b76b00;
  background: #fff3d9;
  border-color: #f1d294;
}

.tag.red {
  color: #c51f46;
  background: #ffe9ef;
  border-color: #f2b5c4;
}

.metric,
.detail-info,
.row-card,
.hint-panel,
.empty {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dfe8f6;
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(47, 72, 122, .045);
}

.table-shell {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

table {
  min-width: 760px;
  width: 100%;
  background: transparent;
  border-collapse: separate;
  border-spacing: 0 12px;
}

thead tr {
  background: linear-gradient(180deg, #f6f9ff, #f1f6ff);
}

th {
  height: 68px;
  padding: 16px 24px;
  color: #22304d;
  background: transparent;
  border-top: 1px solid #dfe8f6;
  border-bottom: 1px solid #dfe8f6;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

th:first-child {
  border-left: 1px solid #dfe8f6;
  border-radius: 10px 0 0 10px;
}

th:last-child {
  border-right: 1px solid #dfe8f6;
  border-radius: 0 10px 10px 0;
}

tbody tr {
  background: rgba(255, 255, 255, .90);
  transition: transform .16s ease, box-shadow .16s ease;
}

td {
  padding: 18px 24px;
  color: #17233d;
  background: transparent;
  border-top: 1px solid #dfe8f6;
  border-bottom: 1px solid #dfe8f6;
}

td:first-child {
  border-left: 1px solid #dfe8f6;
  border-radius: 10px 0 0 10px;
}

td:last-child {
  border-right: 1px solid #dfe8f6;
  border-radius: 0 10px 10px 0;
}

tr:hover td {
  background: rgba(255, 255, 255, .98);
}

.project-table-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-table-shell table {
  border-spacing: 0 12px;
}

.project-table-shell td {
  height: 108px;
}

.tabs {
  gap: 18px;
  padding: 0 14px;
  border-bottom: 1px solid #e2eaf7;
}

.tabs button {
  min-height: 54px;
  padding: 0 10px;
  color: #738198;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.tabs button.active {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.tabs button.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.detail-section,
.detail-grid > .detail-section,
.detail-stack > .detail-section {
  padding: 0;
  border: 1px solid #dfe8f6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 26px rgba(47, 72, 122, .04);
}

.detail-section-head {
  min-height: 64px;
  padding: 18px 22px;
  border-bottom: 1px solid #e3ebf8;
}

.detail-section-body {
  padding: 18px 22px 22px;
}

.detail-section-actions button.primary {
  min-height: 40px;
  padding: 0 18px;
  background: #17223c;
  box-shadow: 0 10px 22px rgba(18, 32, 59, .16);
}

@media (max-width: 1100px) {
  body {
    display: block;
    padding: 12px;
  }

  .sidebar {
    width: auto;
    height: auto;
    margin: 0 0 12px;
    border-radius: 18px;
  }

  nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .nav-group-title {
    display: none;
  }

  .main {
    min-height: auto;
    margin: 0;
  }
}

@media (max-width: 720px) {
  body {
    padding: 8px;
  }

  .topbar {
    padding: 18px 18px 14px;
  }

  #view {
    padding: 0 18px 22px;
  }

  .project-search {
    width: 100%;
  }
}
/* Project management card/list workspace. */
.projects-list-page { --project-accent:#2563eb; }
.project-page-heading,.project-view-toolbar,.project-pagination { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.project-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px; }
.project-metric { border:1px solid #e4edfa;border-radius:14px;padding:18px 20px;background:#eff6ff;display:grid;gap:4px;color:#2563eb; }
.project-metric { text-align:left;cursor:pointer;font:inherit;transition:transform .15s,box-shadow .15s; }
.project-metric:hover,.project-metric:focus-visible { transform:translateY(-2px);box-shadow:0 8px 20px rgba(37,99,235,.12);outline:2px solid #9fc3fa;outline-offset:2px; }
.project-metric strong { font-size:30px;color:#12213a;line-height:1.2; }
.project-metric small { font-size:11px;color:#60738c; }
.project-metric.green { background:#edf9f4;color:#00835e; }
.project-metric.amber { background:#fff8ec;color:#a86500; }
.project-metric.red { background:#fff0f2;color:#c83950; }
.project-scope-note { margin:0;color:#66758a;font-size:12px; }
.project-card-filters { display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:18px;background:#fff;border:1px solid #e6edf7;border-radius:14px; }
.project-card-filters label { display:grid;gap:6px;min-width:120px;flex:1; }
.project-card-filters label>span { color:#61738c;font-size:12px; }
.project-card-filters .project-search-field { flex:3;min-width:230px; }
.project-card-filters input,.project-card-filters select { width:100%;min-width:0;min-height:38px; }
.project-view-switch { display:flex;gap:4px;padding:3px;border:1px solid #e4ebf5;background:#fff;border-radius:9px; }
.project-view-toolbar select { max-width:200px; }
.project-card-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px; }
.project-card { background:#fff;border:1px solid #e6edf7;border-radius:14px;padding:18px;box-shadow:0 3px 12px rgba(37,76,130,.04);transition:box-shadow .15s,border-color .15s;min-width:0;display:flex;flex-direction:column; }
.project-card:hover,.project-card:focus-within { border-color:#b7d1fb;box-shadow:0 8px 22px rgba(37,76,130,.09); }
.project-card-head,.project-progress>div:first-child { display:flex;justify-content:space-between;align-items:center;gap:8px; }
.project-card-status { border-radius:8px;background:#edf4ff;color:#2563eb;padding:4px 9px;font-size:12px; }
.project-card.green { --project-accent:#0d9e73; }
.project-card.amber { --project-accent:#dc920b; }
.project-card.red { --project-accent:#e75069; }
.project-card.green .project-card-status { background:#e8f8f1;color:#08734f; }
.project-card.red .project-card-status { background:#fff0f2;color:#b52545; }
.project-card.amber .project-card-status { background:#fff5df;color:#956200; }
.project-pending { font-size:12px;color:#986300; }
.project-card h4 { margin:14px 0 10px;min-height:44px; }
.project-card-title { background:none;border:0;padding:0;text-align:left;font-size:16px;font-weight:700;color:#17253e;line-height:1.45;min-height:0;overflow-wrap:anywhere; }
.project-card-tags { display:flex;gap:6px;flex-wrap:wrap; }
.project-card-tags span { padding:3px 8px;border-radius:6px;background:#f1f5fb;color:#526984;font-size:12px; }
.project-card dl { margin:16px 0;display:grid;gap:9px;font-size:13px; }
.project-card dl div { display:flex;gap:8px; }
.project-card dt { width:42px;flex-shrink:0;color:#6b7b93; }
.project-card dd { margin:0;color:#354965;overflow-wrap:anywhere;min-width:0; }
.project-progress { margin-top:auto;font-size:12px;color:#536881; }
.project-progress-track { height:7px;background:#e8eef6;border-radius:8px;margin-top:9px;overflow:hidden; }
.project-progress-track b { display:block;height:100%;background:var(--project-accent);border-radius:8px; }
.project-card-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid #eef2f7; }
.project-card-actions button { min-width:0;font-size:12px;padding:4px; }
.project-card-actions button:disabled { cursor:not-allowed;opacity:.45; }
.project-pagination { color:#647790;font-size:13px; }
.project-pagination>div { display:flex;align-items:center;gap:10px; }
.project-card-title:focus-visible,.project-card-actions button:focus-visible { outline:2px solid #2563eb;outline-offset:3px; }
@media(min-width:901px) and (hover:hover) and (pointer:fine) { .project-card-actions { opacity:0;transition:opacity .15s; } .project-card:hover .project-card-actions,.project-card:focus-within .project-card-actions { opacity:1; } }
@media(max-width:1450px) { .project-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:900px) { .project-card-grid { grid-template-columns:1fr; } .project-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .project-card-actions { opacity:1; } }
@media(max-width:480px) { .project-metrics { gap:8px; } .project-metric { padding:14px; } .project-card-filters { padding:12px; } .project-card-filters .project-search-field { min-width:100%; } }
@media(min-width:901px) and (hover:hover) and (pointer:fine) {
  .project-card { position:relative; }
  .project-card-actions { position:static;grid-template-columns:repeat(4,minmax(0,1fr));margin:10px 0 0;padding:10px 0 0;background:transparent;border:0;border-top:1px solid #eef2f7;box-shadow:none;pointer-events:none; }
  .project-card-actions button { font-size:11px;min-height:30px;padding:2px; }
  .project-card:hover .project-card-actions,.project-card:focus-within .project-card-actions { pointer-events:auto; }
}
.project-card h4 { min-height:0; }

.project-card-title { min-height:32px; }
.project-metric[aria-pressed="true"] { outline:2px solid currentColor;outline-offset:2px; }
.project-filter-summary { display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:#65778e;font-size:12px;min-height:28px; }
.project-filter-summary button { background:#eff5ff;border-color:#dce8fb;color:#2555a2;min-height:28px;padding:3px 9px;font-size:12px;border-radius:20px; }
.project-card-signals { display:grid;gap:6px;margin:0 0 15px; }
.project-signal { display:flex;gap:6px;justify-content:space-between;align-items:center;min-height:32px;padding:7px 9px;border-radius:8px;font-size:12px;text-align:left;line-height:1.5;white-space:normal; }
.project-signal span { overflow-wrap:anywhere;min-width:0; }
.project-signal strong { flex-shrink:0; }
.project-signal.danger { background:#fff3f4;border-color:#ffe0e5;color:#a92d44;flex-wrap:wrap; }
.project-signal.payment { background:#fffaec;border-color:#f8edcf;color:#8c6011;flex-wrap:wrap; }

.project-dashboard{display:grid;gap:14px}.project-dashboard-progress{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:16px 20px;background:#fff;border:1px solid #e3ebf7;border-radius:14px}.dashboard-stage{position:relative;display:grid;gap:5px;text-align:center;color:#8392a7;font-size:12px}.dashboard-stage:not(:last-child)::after{content:"";position:absolute;top:13px;left:58%;width:84%;height:2px;background:#e7edf6}.dashboard-stage i{z-index:1;width:26px;height:26px;margin:auto;border-radius:50%;display:grid;place-items:center;background:#e9eef6;color:#73839b;font-style:normal}.dashboard-stage.done,.dashboard-stage.current{color:#2563eb}.dashboard-stage.done i,.dashboard-stage.current i{background:#2563eb;color:#fff}.dashboard-stage strong{font-size:12px}.dashboard-stage small{font-size:11px}.project-dashboard-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px}.project-dashboard-main,.project-dashboard-side{display:grid;align-content:start;gap:14px}.project-dashboard .detail-section{background:#fff;border:1px solid #e3ebf7;border-radius:14px;padding:16px}.project-dashboard .detail-section-head{margin-bottom:14px}.dashboard-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.dashboard-info-card,.dashboard-demand-card{display:grid;gap:5px;padding:12px;background:#f8faff;border:1px solid #edf2f9;border-radius:9px;min-width:0}.dashboard-info-card span,.dashboard-demand-card span,.dashboard-finance-grid span{font-size:12px;color:#71819a}.dashboard-info-card strong,.dashboard-demand-card strong{overflow-wrap:anywhere;color:#20324e}.dashboard-demand-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.dashboard-task-list{display:grid}.dashboard-task-row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(70px,1fr) 110px 70px;gap:10px;align-items:center;padding:11px 4px;border-bottom:1px solid #edf1f7;font-size:12px}.dashboard-task-row:last-child{border-bottom:0}.dashboard-task-row span,.dashboard-task-row time{color:#687b96}.dashboard-task-row em{font-style:normal;color:#17835f;background:#eaf8f1;border-radius:12px;padding:3px 8px;text-align:center}.dashboard-finance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.dashboard-finance-grid>div{display:grid;gap:5px;padding:12px;border-radius:9px;background:#f5f8ff}.dashboard-finance-grid strong{font-size:17px;color:#1e5fc4}.dashboard-timeline{display:grid;gap:0}.dashboard-timeline>div{position:relative;display:grid;gap:3px;padding:0 0 18px 22px;border-left:2px solid #dbe8fb}.dashboard-timeline>div:last-child{border-left-color:transparent}.dashboard-timeline i{position:absolute;left:-6px;top:2px;width:10px;height:10px;border:2px solid #2563eb;background:#fff;border-radius:50%}.dashboard-timeline time{font-size:11px;color:#7a8ba2}.dashboard-timeline strong{font-size:13px;color:#243650}.dashboard-timeline span{font-size:12px;color:#687b96}.dashboard-alert{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:11px 13px;background:#fff3f4;border:1px solid #ffdce2;border-radius:10px;color:#a52e46;font-size:12px}.dashboard-alert button{color:#a52e46;background:#fff;border-color:#f5c6d0;min-height:28px}.legacy-detail-editor{margin-top:0;background:#fff;border:1px solid #e3ebf7;border-radius:14px}.legacy-detail-editor summary{padding:13px 16px;color:#526b8d;cursor:pointer;font-size:13px}.legacy-detail-editor>form{padding:0 16px 16px}.project-page .detail-pane{min-width:0}@media(max-width:1100px){.project-dashboard-layout{grid-template-columns:1fr}.project-dashboard-side{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.project-dashboard-progress{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dashboard-stage:not(:last-child)::after{display:none}.project-dashboard-side{grid-template-columns:1fr}.dashboard-demand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-task-row{grid-template-columns:1fr 1fr;gap:5px}.dashboard-task-row time,.dashboard-task-row em{justify-self:start}}
 .project-page .page-hero{min-height:148px;padding:26px 30px}.project-page .hero-copy h2{font-size:24px;line-height:1.3;margin:8px 0}.project-page .hero-copy p{font-size:14px}.project-page .detail-meta .tag,.project-page .detail-meta .status-tag{min-height:30px;padding:6px 11px;font-size:13px}.project-page .hero-actions{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:10px}.project-page .hero-actions button{min-height:40px;font-size:14px;padding:0 15px;white-space:nowrap}.project-dashboard{gap:20px}.project-dashboard-progress{min-height:132px;padding:24px 28px;gap:18px}.dashboard-stage{gap:7px;font-size:14px}.dashboard-stage i{width:30px;height:30px;font-size:14px}.dashboard-stage strong{font-size:15px}.dashboard-stage small{font-size:13px;line-height:1.55}.project-dashboard-layout{grid-template-columns:minmax(0,1fr) 360px;gap:20px}.project-dashboard-main,.project-dashboard-side{gap:20px}.project-dashboard .detail-section{padding:22px;border-radius:16px}.project-dashboard .detail-section-head{margin-bottom:18px}.project-dashboard .detail-section-head h3{font-size:18px}.dashboard-info-grid{gap:14px}.dashboard-info-card{min-height:88px;padding:16px 18px;gap:9px}.dashboard-info-card span,.dashboard-demand-card span,.dashboard-finance-grid span{font-size:13px}.dashboard-info-card strong,.dashboard-demand-card strong{font-size:15px;line-height:1.45}.dashboard-demand-grid{gap:14px}.dashboard-demand-card{min-height:82px;padding:16px 18px}.dashboard-task-row{min-height:52px;padding:14px 5px;font-size:14px;gap:14px}.dashboard-task-row em{font-size:13px;padding:5px 10px}.dashboard-finance-grid{gap:12px}.dashboard-finance-grid>div{min-height:86px;padding:16px;gap:8px}.dashboard-finance-grid strong{font-size:20px}.dashboard-timeline>div{padding-bottom:22px;padding-left:26px}.dashboard-timeline time{font-size:13px}.dashboard-timeline strong{font-size:15px}.dashboard-timeline span{font-size:13px;line-height:1.5}.dashboard-alert{padding:14px 16px;font-size:14px}.legacy-detail-editor summary{padding:16px 20px;font-size:14px}@media(max-width:1200px){.project-dashboard-layout{grid-template-columns:minmax(0,1fr)}.project-dashboard-side{grid-column:auto;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.project-page .page-hero{padding:20px}.project-page .hero-actions{flex-wrap:wrap}.project-dashboard-layout{grid-template-columns:1fr}.project-dashboard-side{grid-column:auto;grid-template-columns:1fr}.project-dashboard-progress{padding:18px;min-height:0}.dashboard-info-grid,.dashboard-demand-grid{grid-template-columns:1fr}.dashboard-task-row{grid-template-columns:1fr 1fr}.dashboard-task-row time,.dashboard-task-row em{font-size:13px}}
.project-page-heading h2{margin:0;font-size:28px;line-height:1.25}.project-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.project-card{padding:22px;min-height:480px}.project-card h4{font-size:19px}.project-card dl{gap:12px}.project-card dl div{line-height:1.55}.project-card-actions button{min-height:34px;font-size:13px}.project-card-filters{padding:22px;gap:18px}.project-card-filters label>span{font-size:14px}.project-card-filters input,.project-card-filters select{min-height:44px;font-size:14px}.project-card-filters>button{min-height:44px;font-size:14px}.project-filter-summary{font-size:14px;min-height:34px}.project-view-toolbar{font-size:14px}.project-view-switch button{min-height:38px;font-size:14px}@media(max-width:1100px){.project-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.project-card-grid{grid-template-columns:1fr}.project-page-heading h2{font-size:24px}.project-page-heading{align-items:flex-start}}
.project-card{padding:24px;min-height:520px}.project-card-head{margin-bottom:8px}.project-card-status{padding:7px 12px;font-size:14px;font-weight:600;min-height:32px}.project-pending,.project-card-head .danger-text{font-size:14px;font-weight:600}.project-card h4{margin:18px 0 16px}.project-card-title{font-size:22px;font-weight:700;line-height:1.4}.project-card-tags{gap:8px;margin-bottom:4px}.project-card-tags span{padding:5px 10px;font-size:14px;line-height:1.3}.project-card dl{margin:20px 0;gap:11px;font-size:15px}.project-card dl div{gap:14px;line-height:1.55}.project-card dt{width:52px;font-size:15px;font-weight:500;color:#657791}.project-card dd{font-size:16px;font-weight:550;color:#263a58}.project-card-signals{gap:8px;margin:0 0 18px}.project-signal{min-height:42px;padding:9px 12px;font-size:14px;line-height:1.5}.project-signal strong{font-size:15px}.project-progress{font-size:15px}.project-progress-track{height:9px;margin-top:11px}.project-progress>div:first-child span:last-child{font-size:16px;font-weight:700}.project-card-actions{gap:8px;margin-top:18px;padding-top:16px}.project-card-actions button{min-height:36px;font-size:14px;font-weight:500;padding:5px 3px}.project-filter-summary{font-size:14px} @media(max-width:760px){.project-card{padding:22px;min-height:0}.project-card-title{font-size:20px}}
.project-page{font-size:15px;line-height:1.6}.project-page .page-hero{min-height:180px;padding:30px 34px;gap:24px}.project-page .hero-copy h2{font-size:32px;font-weight:700;line-height:1.3;margin:10px 0}.project-page .hero-copy p{font-size:14px;line-height:1.6}.project-page .detail-meta{gap:10px}.project-page .detail-meta .tag,.project-page .detail-meta .status-tag{font-size:14px;line-height:1.4;min-height:34px;padding:7px 13px}.project-page .hero-actions{gap:12px}.project-page .hero-actions button{height:40px;min-height:40px;padding:0 17px;font-size:15px;font-weight:500}.project-page .auto-status-panel{min-width:190px;padding:14px 16px;font-size:14px;line-height:1.55}.project-page .project-tabs-shell{padding:5px 8px}.project-page .tabs{gap:8px}.project-page .tabs button{min-height:48px;padding:0 18px;font-size:16px;font-weight:600}.project-page .project-dashboard{gap:24px}.project-page .project-dashboard-progress{min-height:156px;padding:28px 34px;gap:28px}.project-page .dashboard-stage{gap:9px;font-size:14px}.project-page .dashboard-stage i{width:34px;height:34px;font-size:15px}.project-page .dashboard-stage strong{font-size:16px;font-weight:600}.project-page .dashboard-stage small{font-size:14px;line-height:1.6}.project-page .project-dashboard-layout{grid-template-columns:minmax(0,1fr) 390px;gap:24px}.project-page .project-dashboard-main,.project-page .project-dashboard-side{gap:24px}.project-page .project-dashboard .detail-section{padding:24px;border-radius:16px}.project-page .project-dashboard .detail-section-head{margin-bottom:20px}.project-page .project-dashboard .detail-section-head h3{font-size:21px;font-weight:600;line-height:1.4}.project-page .dashboard-info-grid{gap:16px}.project-page .dashboard-info-card{min-height:100px;padding:18px 20px;gap:10px}.project-page .dashboard-info-card span,.project-page .dashboard-demand-card span{font-size:15px;font-weight:500}.project-page .dashboard-info-card strong,.project-page .dashboard-demand-card strong{font-size:18px;font-weight:600;line-height:1.5}.project-page .dashboard-demand-grid{gap:16px}.project-page .dashboard-demand-card{min-height:96px;padding:18px 20px}.project-page .dashboard-task-row{min-height:58px;padding:16px 6px;font-size:15px;gap:16px}.project-page .dashboard-task-row em{font-size:14px;padding:6px 11px}.project-page .dashboard-finance-grid{gap:14px}.project-page .dashboard-finance-grid>div{min-height:104px;padding:18px;gap:10px}.project-page .dashboard-finance-grid span{font-size:14px}.project-page .dashboard-finance-grid strong{font-size:25px;font-weight:700;line-height:1.3}.project-page .dashboard-timeline>div{padding-bottom:26px;padding-left:30px}.project-page .dashboard-timeline time{font-size:14px}.project-page .dashboard-timeline strong{font-size:16px;font-weight:600}.project-page .dashboard-timeline span{font-size:14px;line-height:1.6}.project-page .dashboard-alert{padding:16px 18px;font-size:15px}.project-page .dashboard-alert button{min-height:36px;font-size:14px}.project-page .legacy-detail-editor summary{padding:18px 22px;font-size:15px}@media(max-width:1200px){.project-page .project-dashboard-layout{grid-template-columns:minmax(0,1fr)}.project-page .project-dashboard-side{grid-column:auto;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.project-page .page-hero{padding:22px 20px}.project-page .hero-copy h2{font-size:28px}.project-page .hero-actions{flex-wrap:wrap}.project-page .hero-actions button{font-size:14px}.project-page .project-dashboard-layout{grid-template-columns:1fr}.project-page .project-dashboard-side{grid-column:auto;grid-template-columns:1fr}.project-page .project-dashboard-progress{padding:20px;gap:16px}.project-page .dashboard-info-grid,.project-page .dashboard-demand-grid{grid-template-columns:1fr}.project-page .dashboard-info-card,.project-page .dashboard-demand-card{min-height:88px}.project-page .dashboard-task-row{grid-template-columns:1fr 1fr}}
.project-page .page-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:220px;padding:34px 38px;gap:34px}.project-page .hero-copy h2{font-size:32px;letter-spacing:-.02em;margin:12px 0 5px}.project-page .project-address-line{font-size:15px;color:#60738d;margin:0 0 18px}.project-page .detail-meta .status-tag,.project-page .detail-meta .tag{font-size:14px;min-height:34px;padding:7px 13px}.project-lead-cards{display:flex;gap:12px;flex-wrap:wrap}.project-lead-card{display:grid;gap:4px;min-width:122px;padding:12px 16px;border:1px solid #e1eaf6;border-radius:10px;background:#f8faff}.project-lead-card span{font-size:13px;color:#73839a}.project-lead-card strong{font-size:16px;color:#203453}.project-page .hero-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;max-width:460px}.project-page .hero-actions button{height:40px;min-height:40px;padding:0 16px;font-size:14px;white-space:nowrap}.project-page .hero-actions .primary{order:-3}.hero-action-note{width:100%;display:grid;gap:3px;padding:11px 14px;border-radius:10px;background:#f6f9fe;border:1px solid #e2ebf7}.hero-action-note span{font-size:13px;color:#73839a}.hero-action-note strong{font-size:14px;color:#405774}.hero-archive-action{font-size:13px!important;min-height:34px!important;height:34px!important}@media(max-width:760px){.project-page .page-hero{display:flex;align-items:stretch;flex-direction:column;min-height:0;padding:24px 20px;gap:20px}.project-page .hero-actions{max-width:none;justify-content:flex-start}.project-lead-card{flex:1;min-width:100px}.project-page .hero-copy h2{font-size:28px}}
.finance-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.finance-overview-card{min-height:132px;padding:22px;border:1px solid #dfebfb;border-radius:14px;background:#f2f7ff;display:grid;align-content:center;gap:9px}.finance-overview-card span{font-size:15px;color:#5e718d;font-weight:500}.finance-overview-card strong{font-size:28px;line-height:1.2;font-weight:700;color:#1c61cb}.finance-overview-card small{font-size:13px;color:#67809e}.finance-overview-card.green{background:#effaf4;border-color:#d9f0e2}.finance-overview-card.green strong{color:#119363}.finance-overview-card.amber{background:#fff8ed;border-color:#f7e8cc}.finance-overview-card.amber strong{color:#c07a0b}.finance-overview-card.purple{background:#f6f1ff;border-color:#eadfff}.finance-overview-card.purple strong{color:#7440c8}.business-edit-panel{margin-top:20px;border:1px solid #e2eaf5;border-radius:14px;background:#fbfcff}.business-edit-panel summary{padding:16px 20px;cursor:pointer;font-size:15px;font-weight:600;color:#36567d}.business-edit-panel>form{padding:0 20px 20px}.business-edit-panel .detail-section{padding:20px;border-radius:12px}.business-edit-panel .detail-section-head h3{font-size:18px}.business-edit-panel input,.business-edit-panel select{min-height:42px;font-size:15px}.business-edit-panel .table-shell{font-size:15px}.business-edit-panel th{font-size:15px;padding:14px 12px}.business-edit-panel td{font-size:15px;padding:14px 12px}.business-edit-panel td input{font-size:15px}.business-edit-panel .amount-cell{font-size:18px;font-weight:600}@media(max-width:1000px){.finance-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.finance-overview-grid{grid-template-columns:1fr}.finance-overview-card{min-height:108px}}
.activity-plan-page{gap:24px}.activity-plan-head{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 6px}.activity-plan-title{display:flex;align-items:center;gap:16px}.activity-plan-folder{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#edf4ff;color:#2678e8;font-size:27px}.activity-plan-title h3{margin:0;font-size:22px}.activity-plan-title p{margin:3px 0 0;color:#697c98;font-size:15px}.activity-plan-save{height:42px;min-height:42px;font-size:15px;padding:0 22px}.activity-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.activity-file-card{background:#fff;border:1px solid #dfe8f4;border-radius:16px;padding:24px;box-shadow:0 5px 18px rgba(48,79,124,.06)}.activity-file-card>header{display:flex;align-items:center;gap:14px}.activity-file-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#edf4ff;color:#317de7;font-size:27px}.design-files-card .activity-file-icon{background:#f1edff;color:#795be7}.activity-file-card h3{margin:0;font-size:20px}.activity-file-card header p{margin:4px 0 0;color:#6d7f99;font-size:14px;line-height:1.5}.activity-file-meta{display:flex;gap:24px;margin:22px 0 14px;color:#61738d;font-size:14px}.activity-file-card .contract-file-panel{border:0;padding:0}.activity-file-card .contract-file-field>span,.activity-file-card .hint{display:none}.activity-file-card .contract-file-list-box{min-height:230px;border:1.5px dashed #cddcf1;border-radius:12px;background:#fbfdff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;position:relative}.activity-file-card .contract-file-list-content{width:100%;text-align:center}.activity-file-card .contract-file-list-content:has(.empty:only-child)::before,.activity-file-card .contract-file-list-content:has(.empty) .empty::before{content:"⇧";display:block;margin:0 auto 12px;color:#317de7;font-size:38px}.activity-file-card .contract-file-list-content:has(.empty:only-child)::after{content:"拖拽文件到此处或点击上传\\A 支持 PDF / Word / Excel / 图片";white-space:pre;display:block;margin-top:10px;color:#788aa3;font-size:14px;line-height:2}.activity-file-card .contract-file-list-content .empty{font-size:18px;font-weight:600;color:#283b58}.activity-file-card .contract-upload-round{width:auto;height:40px;min-height:40px;padding:0 18px;border:1px solid #317de7;border-radius:20px;color:#317de7;background:#fff;font-size:15px;position:absolute;bottom:24px}.activity-file-card .contract-upload-round svg{display:none}.activity-file-card .contract-file-list-content .file-list{display:grid;gap:10px;text-align:left}.activity-file-card .contract-file-list-content .file-list>*{font-size:14px;padding:10px;border:1px solid #e6edf7;border-radius:8px}.activity-file-card .contract-file-list-box:has(.file-list) .contract-upload-round{bottom:10px}@media(max-width:800px){.activity-plan-grid{grid-template-columns:1fr}.activity-plan-head{align-items:flex-start}.activity-plan-title h3{font-size:20px}}
.activity-file-card .contract-file-list-content:has(.empty)::before{content:"⇧";display:block;margin:0 auto 12px;color:#317de7;font-size:38px;line-height:1}
.activity-file-card .contract-file-list-content:has(.empty)::after{content:"拖拽文件到此处或点击上传\A 支持 PDF / Word / Excel / 图片";white-space:pre;display:block;margin-top:10px;color:#788aa3;font-size:14px;line-height:2}
.design-files-card .contract-file-list-content:has(.empty)::after{content:"拖拽文件到此处或点击上传\A 支持 PDF / PSD / AI / 图片"}
.activity-file-card .contract-upload-round{display:flex;align-items:center;justify-content:center;gap:6px}
.activity-file-card .contract-upload-round::after{content:"上传文件"}
.activity-plan-folder,.activity-file-icon{object-fit:contain;padding:8px}.activity-file-card .contract-file-list-content:has(.empty)::before{content:"";width:96px;height:96px;background:url("src/assets/icons/云端上传空状态插画.png") center/contain no-repeat}.design-files-card .contract-file-list-content:has(.empty)::before{background-image:url("src/assets/icons/紫色云端图片上传插画.png")}.activity-plan-folder{display:block;background:#edf4ff}.activity-file-icon{display:block}
.finance-overview-card{position:relative;padding-left:78px}.finance-overview-card:before{content:"";position:absolute;left:22px;top:24px;width:40px;height:40px;background:center/contain no-repeat}.finance-overview-card.blue:before{background-image:url("src/assets/icons/project_income.svg")}.finance-overview-card.green:before{background-image:url("src/assets/icons/received_payment.svg")}.finance-overview-card.amber:before{background-image:url("src/assets/icons/project_cost.svg")}.finance-overview-card.purple:before{background-image:url("src/assets/icons/profit_analysis.svg")}.finance-overview-card span{font-size:16px}.finance-overview-card strong{font-size:30px}.business-edit-panel summary:before{content:"";display:inline-block;width:24px;height:24px;margin-right:10px;vertical-align:middle;background:url("src/assets/icons/edit_info.svg") center/contain no-repeat}.finance-overview-grid{gap:20px}.finance-overview-card{min-height:148px}
/* Archive & cost dashboard icon and density treatment */
#archiveOverviewForm .detail-section:first-child .detail-section-head h3:before{content:"";display:inline-block;width:28px;height:28px;vertical-align:middle;margin-right:10px;background:url("src/assets/icons/archive-cost/archive_overview.svg") center/contain no-repeat}
#archiveOverviewForm .metric{position:relative;min-height:116px;padding:20px 20px 20px 72px;border-radius:14px}
#archiveOverviewForm .metric:before{content:"";position:absolute;left:20px;top:22px;width:38px;height:38px;background:center/contain no-repeat}
#archiveOverviewForm .metric:nth-child(1):before{background-image:url("src/assets/icons/archive-cost/actual_cost.svg")}
#archiveOverviewForm .metric:nth-child(2):before{background-image:url("src/assets/icons/archive-cost/paid_money.svg")}
#archiveOverviewForm .metric:nth-child(3):before{background-image:url("src/assets/icons/archive-cost/payable.svg")}
#archiveOverviewForm .grid.cols-3:nth-of-type(2) .metric:nth-child(1):before{background-image:url("src/assets/icons/archive-cost/reserve_fund.svg")}
#archiveOverviewForm .grid.cols-3:nth-of-type(2) .metric:nth-child(2):before{background-image:url("src/assets/icons/archive-cost/actual_cost.svg")}
#archiveOverviewForm .grid.cols-3:nth-of-type(2) .metric:nth-child(3):before{background-image:url("src/assets/icons/archive-cost/reserve_fund.svg")}
#archiveOverviewForm .metric strong,#archiveOverviewForm .metric [data-actual-sum],#archiveOverviewForm .metric [data-paid-sum],#archiveOverviewForm .metric [data-payable-sum],#archiveOverviewForm .metric [data-reserve-used],#archiveOverviewForm .metric [data-reserve-left]{font-size:24px;line-height:1.35}
#archiveOverviewForm .metric span:first-child{font-size:15px}
#archiveOverviewForm .upload-dropzone,.archive-file-upload{min-height:150px;border:1.5px dashed #cbd9eb;border-radius:12px}
#archiveCostForm .detail-section-head h3:before{content:"";display:inline-block;width:28px;height:28px;vertical-align:middle;margin-right:10px;background:url("src/assets/icons/archive-cost/cost_table.svg") center/contain no-repeat}
#archiveCostForm .actual-cost-table th{font-size:15px;padding:15px 12px}
#archiveCostForm .actual-cost-table td{font-size:15px;padding:15px 12px;line-height:1.5}
#archiveCostForm .actual-cost-table td input,#archiveCostForm .actual-cost-table td select{font-size:15px;min-height:40px}
#archiveCostForm .actual-cost-table td button{font-size:14px;min-height:36px}
/* Revenue & payment cockpit */
#collectionForm{gap:24px}
#collectionForm>.detail-grid{grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:24px}
#collectionForm .detail-section{padding:24px;border-radius:16px;box-shadow:0 4px 16px rgba(38,74,120,.06)}
#collectionForm .detail-section-head h3{font-size:20px;line-height:1.4}
#collectionForm .detail-section-head h3:before{content:"";display:inline-block;width:28px;height:28px;vertical-align:middle;margin-right:10px;background:center/contain no-repeat}
#collectionForm .detail-grid>.detail-section:first-child .detail-section-head h3:before{background-image:url("src/assets/icons/revenue-payment/revenue_overview.svg")}
#collectionForm .detail-grid>.detail-section:nth-child(2) .detail-section-head h3:before{background-image:url("src/assets/icons/revenue-payment/change_record.svg")}
#collectionForm .detail-section:nth-of-type(3) .detail-section-head h3:before{background-image:url("src/assets/icons/revenue-payment/payment_record.svg")}
#collectionForm .detail-section:nth-of-type(4) .detail-section-head h3:before{background-image:url("src/assets/icons/revenue-payment/payment_log.svg")}
#collectionForm .metric{min-height:118px;padding:20px;border-radius:14px}
#collectionForm .metric span:first-child{font-size:15px}
#collectionForm .metric strong,#collectionForm .metric [data-collection-total]{font-size:28px;line-height:1.3}
#collectionForm table{font-size:15px}
#collectionForm th{font-size:15px;padding:15px 12px}
#collectionForm td{font-size:15px;padding:15px 12px;line-height:1.6}
#collectionForm input,#collectionForm select,#collectionForm textarea{font-size:15px;min-height:40px}
#collectionForm button{font-size:14px;min-height:38px}
#collectionForm .collection-progress{height:10px;border-radius:8px}
@media(max-width:900px){#collectionForm>.detail-grid{grid-template-columns:1fr}}
.calendar-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.calendar-stat{background:#fff;border:1px solid #e3eaf4;border-radius:16px;padding:20px;min-height:118px;box-shadow:0 4px 14px #244b7810;display:grid;grid-template-columns:42px 1fr;align-items:center;column-gap:12px}.calendar-stat img{width:40px;height:40px;grid-row:1/3}.calendar-stat span{font-size:15px;color:#64748b}.calendar-stat strong{font-size:28px;color:#172b4d}.calendar-page .surface-head button img{width:18px;height:18px;vertical-align:middle;margin-right:6px}@media(max-width:1100px){.calendar-stat-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:650px){.calendar-stat-grid{grid-template-columns:1fr 1fr}.calendar-stat{padding:14px}.calendar-stat strong{font-size:22px}}
/* Project library asset center */
.project-library-section{background:#f8fbff}.project-library-head{align-items:flex-start}.library-title-copy{display:flex;gap:14px;align-items:flex-start}.library-title-copy>img{width:42px;height:42px}.library-title-copy h2{margin:0;font-size:28px}.library-title-copy p{margin:6px 0 8px;font-size:15px;color:#64748b}.library-create img{width:18px;height:18px;vertical-align:middle;margin-right:6px}.library-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-bottom:22px}.library-stat{min-height:112px;padding:18px;border:1px solid #e1eaf5;border-radius:16px;background:#fff;box-shadow:0 4px 14px #214b7d0d;display:grid;grid-template-columns:38px 1fr;column-gap:10px}.library-stat img{width:36px;height:36px;grid-row:1/4}.library-stat span{font-size:14px;color:#64748b}.library-stat strong{font-size:28px;line-height:1.2;color:#152845}.library-stat small{font-size:13px;color:#94a3b8}.library-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.library-card{overflow:hidden;border:1px solid #e0e8f2;border-radius:14px;background:#fff;box-shadow:0 4px 14px #2048750d;cursor:pointer}.library-cover{height:132px;position:relative;padding:14px;background:linear-gradient(135deg,#c7e9d6,#78c79e);display:flex;align-items:flex-end}.library-cover-team{background:linear-gradient(135deg,#bde5d1,#58b88c)}.library-cover-annual{background:linear-gradient(135deg,#c6d9ff,#657fe0)}.library-cover-birthday{background:linear-gradient(135deg,#ffd2e2,#ed8fb4)}.library-cover-exhibition{background:linear-gradient(135deg,#ddd0ff,#8f73da)}.library-cover-default{background:linear-gradient(135deg,#e6edf5,#b5c3d2)}.library-cover-label{position:absolute;top:12px;left:12px;padding:5px 10px;border-radius:999px;background:#2563eb;color:white;font-size:13px}.library-cover-type{font-size:16px;color:white;font-weight:600;text-shadow:0 1px 2px #17304c80}.library-card-body{padding:16px}.library-card h3{margin:0;font-size:18px;line-height:1.45}.library-card-meta{margin:6px 0 10px;color:#64748b;font-size:14px}.library-tags{display:flex;gap:6px;flex-wrap:wrap}.library-tags span{padding:4px 8px;border-radius:999px;background:#eff6ff;color:#2563eb;font-size:13px}.library-assets{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;color:#53677f;font-size:13px}.library-assets span{display:inline-flex;align-items:center;gap:4px}.library-assets img{width:16px;height:16px}.library-card-actions{display:grid;grid-template-columns:1.1fr 1fr 36px;gap:8px}.library-card-actions button{min-height:34px;padding:6px 8px;font-size:13px}.library-empty{padding:80px 20px}@media(max-width:1200px){.library-stat-grid{grid-template-columns:repeat(3,1fr)}.library-card-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.library-stat-grid,.library-card-grid{grid-template-columns:1fr}.project-library-head{flex-direction:column}.library-create{align-self:stretch}}
.project-library-head{padding:14px 20px;min-height:0}.project-library-head .library-title-copy{align-items:center}.library-title-copy p{margin:2px 0 4px;font-size:14px}.library-title-copy .muted{font-size:13px}.library-title-copy>img{width:38px;height:38px}
.project-library-head .library-title-copy .muted{display:none}
@media(max-width:700px){.project-library-head{padding:10px 14px}.project-library-head .library-title-copy p{display:none}.library-title-copy h2{font-size:24px}.library-create{min-height:38px}}
@media(max-width:700px){.project-library-head{padding:6px 10px;gap:4px}.project-library-head .library-title-copy>img{width:30px;height:30px}.library-title-copy h2{font-size:21px;line-height:1.2}.library-create{min-height:32px;height:32px;padding:4px 10px}}
/* Archive project center */
.archive-center-page{gap:18px}.archive-center-head .surface-head{align-items:flex-start}.archive-title-copy{display:flex;gap:14px;align-items:center}.archive-title-copy img{width:42px;height:42px}.archive-title-copy h2{margin:0;font-size:28px}.archive-title-copy p{margin:5px 0 0;color:#64748b;font-size:15px}.archive-head-actions{display:flex;gap:10px}.archive-head-actions button{min-height:40px;font-size:14px}.archive-head-actions img,.archive-card-actions img{width:18px;height:18px;vertical-align:middle;margin-right:6px}.archive-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:18px}.archive-stat{min-height:112px;padding:20px;border-radius:16px;background:#fff;border:1px solid #e2eaf4;display:grid;grid-template-columns:42px 1fr;column-gap:12px;box-shadow:0 4px 14px #204b780d}.archive-stat img{width:40px;height:40px;grid-row:1/4}.archive-stat span{font-size:15px;color:#64748b}.archive-stat strong{font-size:28px;color:#172b4d}.archive-stat small{font-size:13px;color:#94a3b8}.archive-filters{display:grid;grid-template-columns:minmax(260px,1.5fr) repeat(2,minmax(130px,.7fr)) auto;gap:12px;align-items:center}.archive-search{display:flex;align-items:center;gap:8px;border:1px solid #dce6f2;border-radius:10px;padding:0 12px}.archive-search img{width:18px;height:18px}.archive-search input,.archive-filters select{height:42px;border:0;min-width:0;font-size:14px;background:transparent}.archive-filters select{border:1px solid #dce6f2;border-radius:10px;padding:0 12px}.archive-filters button{height:42px;font-size:14px}.archive-filters button img{width:18px;vertical-align:middle;margin-right:5px}.archive-card-list{display:grid;gap:12px}.archive-card{display:grid;grid-template-columns:178px minmax(0,1fr);border:1px solid #e1e9f3;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 3px 12px #234b780b}.archive-cover{min-height:170px;padding:14px;background:linear-gradient(135deg,#bfe6d0,#59b98d)}.archive-cover-team{background:linear-gradient(135deg,#bde5d1,#58b88c)}.archive-cover-annual{background:linear-gradient(135deg,#c8d9ff,#5c7ee0)}.archive-cover-birthday{background:linear-gradient(135deg,#ffd0e1,#ed8fb2)}.archive-cover-exhibition{background:linear-gradient(135deg,#ddd0ff,#9273dc)}.archive-cover-default{background:linear-gradient(135deg,#e7edf5,#aab9ca)}.archive-cover span{display:inline-block;padding:5px 10px;border-radius:999px;background:#16a34a;color:#fff;font-size:13px}.archive-card-main{padding:18px 22px;display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:20px;align-items:center}.archive-card-intro h3{margin:0;font-size:18px}.archive-card-intro p{margin:7px 0 0;color:#64748b;font-size:14px}.archive-document-count{min-width:0;font-size:14px;color:#53677f;line-height:1.7}.archive-document-count strong{color:#172b4d;font-size:18px;font-variant-numeric:tabular-nums}.archive-document-count small{display:block;margin-top:4px;font-size:12px;color:#94a3b8}.archive-assets{display:grid;grid-template-columns:repeat(2,auto);gap:8px 14px;font-size:13px;color:#53677f}.archive-assets span{white-space:nowrap}.archive-assets img{width:16px;height:16px;vertical-align:middle;margin-right:4px}.archive-card-actions{display:flex;gap:8px}.archive-card-actions button{min-height:36px;font-size:13px;white-space:nowrap}.archive-empty{padding:70px 20px}@media(max-width:1100px){.archive-card-main{grid-template-columns:1fr 1fr}.archive-card-actions{grid-column:1/-1}.archive-filters{grid-template-columns:1fr 1fr}.archive-search{grid-column:1/-1}}@media(max-width:650px){.archive-stat-grid{grid-template-columns:1fr 1fr}.archive-card{grid-template-columns:1fr}.archive-cover{min-height:110px}.archive-card-main{grid-template-columns:1fr}.archive-assets{grid-template-columns:repeat(2,1fr)}.archive-filters{grid-template-columns:1fr}}
@media(max-width:650px){.archive-center-head .surface-head{padding:8px 10px}.archive-title-copy p{display:none}.archive-title-copy h2{font-size:23px}.archive-title-copy img{width:32px;height:32px}.archive-head-actions{gap:6px}.archive-head-actions button{min-height:34px;padding:5px 8px;font-size:13px}.archive-head-actions img{width:16px;height:16px}}

/* 单一顶部导航：概览内容无需为内部侧栏留位。 */
.project-dashboard-main,.project-dashboard-side{min-width:0}
.project-page,.project-page .project-dashboard,.project-page .project-dashboard-layout{min-width:0;grid-template-columns:minmax(0,1fr)}
/* 各模块曾裁剪标签容器；统一保留问题提示浮层的显示空间。 */
.project-page .project-tabs-shell{min-width:0;max-width:100%;overflow:visible!important;position:sticky;top:calc(var(--oa-topbar-height,96px) + 8px);z-index:9;align-self:start;background:#fff;box-shadow:0 4px 12px #244b7810}
/* 小屏标签换行，避免入口溢出，并保留待处理问题浮层的展示空间。 */
@media(max-width:760px){.project-page .project-tabs-shell .tabs{flex-wrap:wrap;max-width:100%}.project-page .project-tabs-shell .tabs button{flex:1 1 140px;min-width:0}.project-page .project-tabs-shell .tabs .tab-issue-popover{left:0;transform:none;width:100%;max-width:100%}}
@media(min-width:1201px){.project-page .project-dashboard-layout{grid-template-columns:minmax(0,1fr) 390px}}

/* 财务总览：横排核心指标，金额过长时换行而不撑破卡片。 */
.finance-statistics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;min-width:0}
.finance-stat{display:flex;align-items:flex-start;gap:12px;padding:20px 16px;min-width:0;border:1px solid #e0e9f5;border-radius:16px;background:#fff;box-shadow:0 4px 14px #244b7810}
.finance-stat>img{flex:0 0 40px;width:40px;height:40px;margin-top:4px}
.finance-stat>div{min-width:0;display:grid;gap:9px}
.finance-stat span{font-size:14px;color:#64748b}
.finance-stat strong{font-size:26px;line-height:1.25;color:#172b4d;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.finance-stat small{font-size:12px;line-height:1.5;color:#94a3b8}
.finance-stat.is-loss strong{color:#dc2626}
@media(max-width:1500px){.finance-statistics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.finance-statistics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.finance-stat{flex-direction:column;padding:16px;gap:10px}.finance-stat strong{font-size:24px}}
@media(max-width:350px){.finance-statistics{grid-template-columns:minmax(0,1fr)}}
