:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eff4f8;
  --sidebar: #eef3f7;
  --ink: #152130;
  --ink-soft: #314154;
  --muted: #6b7a8d;
  --line: #d9e2ec;
  --line-strong: #c5d1dd;
  --accent: #0f766e;
  --accent-strong: #0a5d57;
  --accent-soft: #e3f5f2;
  --blue-soft: #eaf4ff;
  --gold-soft: #fff5df;
  --success-soft: #e8f8ee;
  --warn-soft: #fff1df;
  --danger-soft: #fdecec;
  --good: #1d7b4f;
  --warn: #a86700;
  --bad: #b44545;
  --focus: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

button:hover,
a.button-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

button:active,
a.button-link:active {
  transform: translateY(1px) scale(0.995);
}

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

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

button.ghost {
  background: transparent;
}

button.danger {
  color: var(--bad);
}

a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a.button-link:focus-visible {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

td input,
td textarea,
td select {
  min-height: 34px;
  padding: 6px 8px;
}

td textarea {
  min-height: 54px;
}

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

.sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  padding: 22px 18px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.brand-block {
  padding: 4px 6px 0;
}

.brand-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.brand {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.userbox,
.sidebar-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 13px;
}

.userbox strong,
.sidebar-note strong {
  display: block;
  margin-bottom: 4px;
}

.userbox {
  color: var(--ink-soft);
}

.nav {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.nav button {
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
}

.nav button.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.sidebar-note span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.workspace {
  min-width: 0;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.workspace-breadcrumb,
.workspace-user {
  color: var(--muted);
  font-size: 12px;
}

.main {
  padding: 24px 28px 36px;
}

.page-intro,
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

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

.meta-pill,
.table-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  white-space: nowrap;
}

.status-toggle {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #425266;
}

.status-toggle.good {
  border-color: #bde4ca;
  background: var(--success-soft);
  color: var(--good);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
}

.setting-list {
  display: grid;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row strong {
  display: block;
  margin-bottom: 6px;
}

.setting-row p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.setting-row small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-height: 38px;
  align-items: center;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

.permission-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.permission-form .field:nth-child(3),
.permission-note {
  grid-column: span 2;
}

.settings-permission-table th:nth-child(2),
.settings-permission-table td:nth-child(2) {
  min-width: 320px;
}

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

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.metric-card span,
.metric-card small {
  display: block;
}

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

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 24px;
  line-height: 1.1;
}

.metric-card small {
  color: var(--muted);
}

.metric-card.accent {
  border-color: #b8dfd8;
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf8 100%);
}

.metric-card.warn {
  border-color: #f3d6a5;
  background: linear-gradient(180deg, #ffffff 0%, #fff8ee 100%);
}

.metric-card.good {
  border-color: #c4e7cf;
  background: linear-gradient(180deg, #ffffff 0%, #f3fcf6 100%);
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(120px, 170px));
  gap: 10px;
}

.compact-filters {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.logs-filters {
  grid-template-columns: minmax(0, 1fr) 120px 120px;
}

.owner-filters {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) 140px;
}

.stats-filters {
  grid-template-columns: minmax(0, 1.2fr) repeat(5, minmax(120px, 160px)) 120px 120px;
}

.stats-owner-filters {
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(120px, 160px)) 120px 120px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
}

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

.panel-actions select {
  width: auto;
  min-width: 150px;
}

.panel-body {
  padding: 16px 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.info-grid > div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
}

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

.info-grid strong {
  color: var(--ink);
  font-size: 15px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 440px);
  gap: 24px;
  align-items: stretch;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 14%, rgba(15, 118, 110, 0.16), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(37, 99, 235, 0.1), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
}

.auth-cover,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #d9e5f0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.auth-cover {
  min-height: calc(100vh - 48px);
}

.auth-cover-inner {
  position: relative;
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100%;
  padding: 48px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 249, 253, 0.92)),
    radial-gradient(circle at 110% 110%, rgba(15, 118, 110, 0.12), transparent 26%);
}

.auth-cover-inner::after {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0.04) 48%, transparent 72%);
  pointer-events: none;
}

.auth-kicker,
.auth-card-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-cover h1 {
  max-width: 12ch;
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-lead {
  max-width: 54ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.72;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.auth-highlights article {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.auth-highlights strong {
  font-size: 14px;
}

.auth-highlights span {
  color: var(--muted);
  line-height: 1.6;
}

.auth-footnote {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(173, 189, 208, 0.5);
  color: var(--ink-soft);
}

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

.auth-card {
  align-self: center;
  background: rgba(255, 255, 255, 0.96);
}

.auth-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 0;
}

.auth-card-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.auth-card-body {
  padding: 22px 24px 24px;
}

.auth-submit {
  min-height: 44px;
  font-size: 15px;
}

.filter-panel {
  margin-bottom: 16px;
}

.table-scroll {
  overflow: auto;
}

.table-scroll:focus-visible,
tr.clickable:focus-visible {
  outline: 3px solid rgba(13, 118, 111, 0.35);
  outline-offset: -3px;
}

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

th,
td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6edf3;
}

th {
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

td.amount,
th.amount {
  text-align: right;
  white-space: nowrap;
}

.list-table tbody tr:hover,
tr.clickable:hover {
  background: #f9fcff;
}

.cell-title {
  display: block;
  font-weight: 700;
  line-height: 1.45;
}

.cell-date {
  color: var(--ink-soft);
}

.sort-header {
  width: 100%;
  min-height: 24px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
}

.sort-header:hover,
.sort-header.active {
  color: var(--accent);
  box-shadow: none;
}

th.amount .sort-header {
  justify-content: flex-end;
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #425266;
  white-space: nowrap;
}

.badge.good {
  background: var(--success-soft);
  color: var(--good);
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.bad {
  background: var(--danger-soft);
  color: var(--bad);
}

.badge.task-assigned {
  background: #eaf4ff;
  color: #245f9f;
}

.badge.task-progress {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.task-completed {
  background: var(--success-soft);
  color: var(--good);
}

.badge.task-cancelled {
  background: var(--danger-soft);
  color: var(--bad);
}

.task-remark {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.hint-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.logs-table th:nth-child(1),
.logs-table td:nth-child(1) {
  min-width: 148px;
  white-space: nowrap;
}

.logs-table th:nth-child(2),
.logs-table td:nth-child(2) {
  min-width: 88px;
  white-space: nowrap;
}

.logs-table th:nth-child(3),
.logs-table td:nth-child(3) {
  min-width: 92px;
}

.logs-table th:nth-child(4),
.logs-table td:nth-child(4) {
  min-width: 420px;
}

.logs-table th:nth-child(5),
.logs-table td:nth-child(5) {
  min-width: 220px;
}

.log-time-cell,
.log-user-cell {
  color: var(--ink-soft);
}

.log-title {
  display: block;
  margin-bottom: 6px;
  line-height: 1.45;
}

.log-lines {
  display: grid;
  gap: 4px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.log-target-cell strong {
  display: block;
  line-height: 1.45;
}

.analysis-summary {
  padding: 12px 14px;
  border: 1px solid #dfe8f2;
  border-radius: 12px;
  background: #f8fbfe;
  line-height: 1.6;
}

.analysis-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  background: #fff;
}

.analysis-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ratings-table td:nth-child(4),
.ratings-table td:nth-child(5),
.ratings-table td:nth-child(6),
.ratings-table td:nth-child(7),
.ratings-table td:nth-child(8),
.ratings-table td:nth-child(9) {
  white-space: nowrap;
}

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

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

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

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

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

.attendance-operation-form {
  align-items: start;
}

.attendance-request-forms > form + form {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.attendance-timeoff-rule {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 12px;
}

.attendance-timeoff-balance {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 700;
}

.attendance-trip-active {
  display: grid;
  gap: 6px;
  color: var(--good);
  background: #effaf5;
}

.attendance-companion-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcfe;
}

.attendance-companion-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 14px;
}

.attendance-balance-credit { color: var(--good); }
.attendance-balance-debit { color: var(--bad); }

.form-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--bad);
  line-height: 1.45;
}

.field-full {
  grid-column: 1 / -1;
}

.wechat-history .compact-filters {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.manual-push-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.inline-control {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-control input {
  min-width: 0;
  flex: 1;
}

.inline-control button {
  flex: 0 0 auto;
}

.attachment-block {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.attachment-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.attachment-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.attachment-actions,
.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-actions select,
.comment-head select {
  min-height: 32px;
  max-width: 150px;
  padding: 4px 26px 4px 8px;
  font-size: 12px;
}

.visibility-all { background: #edf7f4; color: #116149; }
.visibility-upstream { background: #eff6ff; color: #215d9d; }
.visibility-downstream { background: #fff7e8; color: #9a5a08; }
.visibility-internal { background: #f2f4f7; color: #4b5563; }

.comment-attachments,
.project-discussion-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.comment-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.comment-attachment-item a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-field {
  max-width: 230px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.attachment-item strong,
.attachment-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-icon {
  flex: 0 0 auto;
  min-width: 42px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.notice-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  background: #f8fbff;
}

.notice-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6edf3;
}

.notice-card div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.notice-card span {
  color: var(--muted);
}

.password-result {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.notice {
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  background: #fbfeff;
  padding: 12px 14px;
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.detail-main-panel .panel-head {
  align-items: flex-end;
}

.panel-total {
  text-align: right;
}

.panel-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.panel-total strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.detail-side {
  align-content: start;
}

.detail-side .panel {
  overflow: visible;
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.section-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}

button.section-card {
  width: 100%;
  min-height: auto;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

button.section-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

button.section-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.section-card span,
.section-card small {
  display: block;
  color: var(--muted);
}

.section-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 22px;
  line-height: 1.1;
}

.section-card.section-视频板块 {
  border-color: #cfe0f2;
  background: #f4f8ff;
}

.section-card.section-图片板块 {
  border-color: #d7e3bc;
  background: #f8fce9;
}

.section-card.section-直播板块 {
  border-color: #bfe2da;
  background: #effaf7;
}

.section-card.section-差旅板块 {
  border-color: #e8d0a2;
  background: #fff8ec;
}

.section-card.section-子项目 {
  border-color: #c9d3df;
  background: #f7f9fc;
}

.section-card.section-子项目 strong {
  color: #173042;
}

.child-section-card small::after {
  content: " →";
}

.child-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-panel-actions strong {
  color: var(--ink);
  font-size: 18px;
  white-space: nowrap;
}

.quote-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1320px;
}

.package-table {
  min-width: 1080px;
}

.quote-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4f9;
  border-bottom: 1px solid var(--line-strong);
}

.quote-table tbody tr {
  background: var(--surface);
}

.quote-table tbody tr:hover {
  background: #f8fbfe;
}

.quote-table td:first-child:not([colspan]) {
  background: #f3f8fb;
  border-left: 4px solid #8fbeb8;
  font-weight: 700;
  min-width: 94px;
}

.quote-table td:nth-child(2) {
  min-width: 104px;
}

.quote-table td:nth-child(3) {
  min-width: 186px;
}

.quote-table td:nth-child(4) {
  min-width: 170px;
}

.quote-table td:nth-child(5),
.quote-table th:nth-child(5) {
  min-width: 74px;
}

.quote-table td:nth-child(6),
.quote-table th:nth-child(6),
.quote-table td:nth-child(7),
.quote-table th:nth-child(7) {
  min-width: 74px;
}

.quote-table td:nth-child(8),
.quote-table th:nth-child(8),
.quote-table td:nth-child(9),
.quote-table th:nth-child(9) {
  min-width: 96px;
}

.quote-table td:nth-child(10),
.quote-table th:nth-child(10) {
  min-width: 92px;
}

.quote-table td:nth-child(11),
.quote-table th:nth-child(11) {
  min-width: 96px;
}

.quote-table td:nth-child(6),
.quote-table td:nth-child(7),
.quote-table td:nth-child(8),
.quote-table td:nth-child(9),
.quote-table td:nth-child(10),
.quote-table th.amount,
.quote-table td.amount {
  background: #fffdf7;
}

.quote-grid input,
.quote-grid textarea,
.quote-grid select {
  border-color: #d5dfeb;
  background: #fff;
}

.quote-grid input[type="number"] {
  min-width: 72px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: right;
}

.quote-grid [data-field="unitPrice"],
.quote-grid [data-field="discount"] {
  min-width: 86px;
}

.quote-grid .row-total {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.section-row td {
  padding: 10px 14px;
  background: #213244 !important;
  color: #fff;
  border-bottom-color: #213244;
}

.section-row span {
  font-weight: 700;
}

.section-row strong {
  float: right;
}

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

.row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.project-row-actions {
  justify-content: flex-end;
}

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

.quote-table .row-actions button {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
}

.quote-table button.danger {
  background: #fff7f7;
  border-color: #efc3c3;
}

.price-summary {
  position: sticky;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 251, 254, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
  backdrop-filter: blur(10px);
}

.summary-card,
.summary-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 11px 12px;
}

.summary-card span,
.summary-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.summary-card strong {
  display: block;
  font-size: 20px;
}

.summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.summary-card.discount {
  border-color: #c7e3cf;
  background: #f3fbf6;
}

.summary-card.discount strong {
  color: var(--good);
}

.summary-card.increase {
  border-color: #f2d29d;
  background: #fff7ea;
}

.summary-card.increase strong {
  color: var(--warn);
}

.summary-card.final {
  background: #173042;
  border-color: #173042;
  color: #fff;
}

.summary-card.final span {
  color: rgba(255, 255, 255, 0.72);
}

.summary-card.final input {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.24);
  background: #fff;
  font-size: 20px;
  font-weight: 700;
}

.summary-card.total-rollup {
  border-color: #d8c078;
  background: var(--gold-soft);
}

.summary-card.total-rollup strong {
  color: #173042;
}

.summary-note textarea {
  min-height: 60px;
}

.summary-note {
  min-width: min(260px, 100%);
}

.price-summary > button {
  align-self: stretch;
}

.bill-panel {
  border-width: 2px;
}

.bill-panel .panel-head {
  color: #fff;
}

.bill-panel.bill-pending_confirmation,
.bill-panel.bill-sent,
.bill-panel.bill-draft {
  border-color: #ebb562;
}

.bill-panel.bill-pending_confirmation .panel-head,
.bill-panel.bill-sent .panel-head,
.bill-panel.bill-draft .panel-head {
  background: #b36b05;
}

.bill-panel.bill-confirmed,
.bill-panel.bill-rated {
  border-color: #38a169;
}

.bill-panel.bill-confirmed .panel-head,
.bill-panel.bill-rated .panel-head {
  background: #157651;
}

.bill-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.bill-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.bill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf4;
}

.bill-row:last-child {
  border-bottom: 0;
}

.bill-row span {
  color: var(--muted);
}

.bill-row strong {
  white-space: nowrap;
  font-size: 16px;
}

.bill-row.discount {
  background: #f3fbf6;
}

.bill-row.discount strong {
  color: var(--good);
}

.bill-row.increase {
  background: #fff7ea;
}

.bill-row.increase strong {
  color: var(--warn);
}

.bill-row.final {
  background: var(--gold-soft);
}

.bill-row.final strong {
  font-size: 20px;
}

.bill-state-note {
  border-radius: 10px;
  background: #f8fbfe;
  color: var(--ink-soft);
  padding: 11px 12px;
  line-height: 1.55;
}

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

.star-rating {
  display: grid;
  gap: 6px;
}

.rating-label {
  color: var(--muted);
  font-size: 12px;
}

.rating-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.rating-readonly {
  display: grid;
  gap: 12px;
}

.rating-readonly-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rating-readonly-head strong {
  font-size: 18px;
}

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

.rating-readonly-grid div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
  padding: 9px 10px;
}

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

.rating-readonly-grid strong {
  font-size: 16px;
}

.stars {
  display: flex;
  gap: 4px;
  align-items: center;
}

.star {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
}

.star:hover,
.star.active {
  color: #f5b301;
}

.comment {
  padding: 12px 0;
  border-bottom: 1px solid #e9eef4;
}

.comment:last-child {
  border-bottom: 0;
}

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

.message {
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
}

.settlement-stack {
  gap: 12px;
}

.proof-upload {
  display: grid;
  gap: 8px;
}

.proof-upload input[type="file"] {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #f8fbfe;
}

.message.system {
  background: #f6fbf9;
  border-color: #cfe3dc;
}

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

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

.child-project-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.child-project {
  display: grid;
  justify-items: start;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  text-align: left;
}

.child-project strong {
  line-height: 1.35;
}

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

.child-project-delete {
  flex: 0 0 auto;
  align-self: center;
}

.product-suggest {
  position: absolute;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-width: 520px;
  max-height: 300px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.product-suggest button {
  display: grid;
  gap: 4px;
  min-height: 48px;
  justify-content: flex-start;
  padding: 8px 10px;
  border: 0;
  text-align: left;
}

.product-suggest button:hover,
.product-suggest button.active {
  background: var(--blue-soft);
}

.product-suggest strong {
  font-size: 13px;
}

.product-suggest span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.modal-content {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

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

.export-choice-list {
  display: grid;
  gap: 12px;
}

a.button-link.export-choice {
  display: grid;
  min-height: 82px;
  justify-content: stretch;
  align-content: center;
  gap: 6px;
  padding: 16px;
  text-align: left;
}

.export-choice strong,
.export-choice span {
  display: block;
}

.export-choice span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: min(720px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #182737;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
}

.undo-toast button {
  border-color: rgba(255, 255, 255, 0.22);
  background: #fff;
  color: #182737;
}

.center-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(420px, calc(100vw - 32px));
  min-width: 180px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(24, 39, 55, 0.94);
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  transform: translate3d(-50%, -10px, 0);
  opacity: 0;
  animation: center-toast-in 160ms ease-out forwards;
}

.center-toast.success {
  background: rgba(14, 97, 77, 0.96);
}

.center-toast.error {
  background: rgba(143, 36, 36, 0.96);
}

.center-toast.info {
  background: rgba(24, 39, 55, 0.94);
}

.center-toast.is-leaving {
  animation: center-toast-out 140ms ease-in forwards;
}

@keyframes center-toast-in {
  from {
    opacity: 0;
    transform: translate3d(-50%, -14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes center-toast-out {
  from {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(-50%, -10px, 0);
  }
}

.cost-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.supplier-cost-panel {
  border-color: #bfded8;
}

.supplier-filters {
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, 1fr) repeat(8, minmax(104px, 140px)) 110px 110px;
}

.readonly-money {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.supplier-pick-table th:nth-child(1),
.supplier-pick-table td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.supplier-pick-table input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.supplier-pick-table th:nth-child(9),
.supplier-pick-table td:nth-child(9),
.supplier-detail-table th:nth-child(8),
.supplier-detail-table td:nth-child(8) {
  min-width: 112px;
}

.supplier-detail-table {
  table-layout: fixed;
  min-width: 1120px;
}

.supplier-col-section {
  width: 86px;
}

.supplier-col-category {
  width: 110px;
}

.supplier-col-product {
  width: 210px;
}

.supplier-col-spec {
  width: 210px;
}

.supplier-col-unit {
  width: 70px;
}

.supplier-col-number {
  width: 72px;
}

.supplier-col-money {
  width: 116px;
}

.supplier-col-money-sm {
  width: 86px;
}

.supplier-col-total {
  width: 128px;
}

.supplier-col-action {
  width: 78px;
}

.supplier-detail-table th.amount,
.supplier-detail-table td.amount,
.supplier-detail-table .numeric-cell {
  text-align: right;
  white-space: nowrap;
}

.supplier-detail-table .numeric-cell input {
  text-align: right;
  min-width: 0;
  width: 100%;
}

.supplier-detail-table .total-cell {
  font-variant-numeric: tabular-nums;
}

.supplier-detail-table .supplier-staff-row > td {
  padding: 0;
  background: #fbfcfe;
}

.staff-block {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-left: 0;
  border-top: 1px dashed var(--line);
}

.staff-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.staff-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
  gap: 8px;
  align-items: start;
}

.staff-new {
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.staff-new {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.supplier-detail-table .supplier-item-row td {
  background: #fffdf8;
}

.supplier-detail-table .supplier-item-row:nth-of-type(4n + 1) td {
  background: #ffffff;
}

@media (max-width: 1280px) {
  .metrics-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .supplier-filters,
  .staff-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auth-cover {
    min-height: auto;
  }

  .auth-cover-inner {
    padding: 28px 22px;
  }

  .auth-cover h1 {
    max-width: none;
    font-size: 34px;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-rows: auto auto auto auto;
    padding: 16px;
  }

  .workspace-header {
    padding: 0 16px;
  }

  .main {
    padding: 16px;
  }

  .page-intro,
  .topbar,
  .toolbar,
  .filters,
  .compact-filters,
  .metrics-strip,
  .grid-2,
  .grid-3,
  .balanced-grid,
  .form-grid,
  .detail-layout,
  .section-cards,
  .price-summary,
  .rating-grid,
  .cost-cards,
  .supplier-filters,
  .settings-grid,
  .staff-line {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .permission-form .field:nth-child(3),
  .permission-note {
    grid-column: auto;
  }

  .attendance-request-forms > form + form {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .staff-block {
    padding-left: 14px;
  }

  .page-intro,
  .topbar {
    align-items: stretch;
  }
}

/* Product design refresh */
:root {
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #edf3f8;
  --sidebar: #142233;
  --ink: #102033;
  --ink-soft: #33455a;
  --muted: #6b7b8f;
  --line: #d8e3ec;
  --line-strong: #bfccd9;
  --accent: #0d766f;
  --accent-strong: #095f59;
  --accent-soft: #e5f5f2;
  --blue-soft: #edf6ff;
  --gold-soft: #fff4d8;
  --success-soft: #e7f7ed;
  --warn-soft: #fff0d6;
  --danger-soft: #fdecec;
  --good: #13754b;
  --warn: #a15c00;
  --bad: #b83d3d;
  --focus: #1d64d8;
  --shadow-sm: 0 1px 2px rgba(15, 32, 51, 0.06);
  --shadow-md: 0 14px 38px rgba(15, 32, 51, 0.1);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
a.button-link {
  border-radius: 7px;
  font-weight: 700;
}

button:hover,
a.button-link:hover {
  background: #f9fcff;
}

button.primary {
  background: linear-gradient(180deg, #12867d 0%, var(--accent) 100%);
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(13, 118, 111, 0.16);
}

button.primary:hover {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 20px rgba(13, 118, 111, 0.18);
}

input,
select,
textarea {
  border-color: #cfdce8;
  background: #fff;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b8c8d8;
}

.shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #172638 0%, #101b2a 100%);
  border-right: 0;
  color: #edf4fa;
  box-shadow: 10px 0 28px rgba(15, 32, 51, 0.08);
}

.brand-kicker {
  color: #5eead4;
  letter-spacing: 0.04em;
}

.brand {
  color: #fff;
  font-weight: 800;
}

.brand-copy {
  color: #b9c6d5;
}

.userbox,
.sidebar-note {
  border-color: rgba(185, 198, 213, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #edf4fa;
}

.userbox div,
.sidebar-note span {
  color: #aab8c8;
}

.nav button {
  position: relative;
  color: #c9d5e2;
  border-radius: 8px;
  padding: 0 13px;
}

.nav button:hover {
  border-color: rgba(94, 234, 212, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.nav button.active {
  border-color: rgba(94, 234, 212, 0.24);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.18), rgba(255, 255, 255, 0.07));
  color: #fff;
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.workspace {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 16;
  min-height: 58px;
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: #dbe6ef;
  box-shadow: 0 1px 0 rgba(15, 32, 51, 0.03);
}

.workspace-breadcrumb {
  color: #5b6d82;
  font-weight: 700;
}

.workspace-user {
  color: #33455a;
  font-weight: 700;
}

.main {
  padding: 28px 32px 42px;
}

.page-intro,
.topbar {
  align-items: center;
  margin-bottom: 18px;
}

.title h1 {
  color: #0e1c2c;
  font-size: 30px;
  font-weight: 850;
}

.title p {
  max-width: 760px;
  color: #627489;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.04em;
}

.toolbar {
  justify-content: flex-end;
}

.metrics-strip {
  gap: 14px;
}

.metric-card {
  position: relative;
  min-height: 108px;
  overflow: hidden;
  border-color: #d6e2ec;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 24px rgba(15, 32, 51, 0.05);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #9aaabb;
}

.metric-card.accent::before {
  background: var(--accent);
}

.metric-card.warn::before {
  background: #d48610;
}

.metric-card.good::before {
  background: var(--good);
}

.metric-card span {
  color: #65778b;
  font-weight: 700;
}

.metric-card strong {
  color: #102033;
  font-size: 26px;
  font-weight: 850;
}

.panel {
  border-color: #d7e2ec;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 32, 51, 0.04);
}

.panel-head {
  min-height: 58px;
  background: #f8fafc;
  border-bottom-color: #dce6ef;
}

.panel-head h2 {
  color: #102033;
  font-weight: 850;
}

.panel-head .muted {
  text-align: right;
}

.filter-panel .panel-head,
.filter-panel .panel-body {
  background: #fff;
}

.filters {
  align-items: center;
}

.table-scroll {
  background: #fff;
}

th,
td {
  padding: 13px 12px;
  border-bottom-color: #e2eaf2;
}

th {
  background: #edf3f8;
  color: #405166;
  font-weight: 850;
}

.list-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.list-table tbody tr:hover,
tr.clickable:hover {
  background: #eef8f6;
}

.stats-filter-row {
  cursor: pointer;
}

.stats-filter-row .stats-filter-label {
  color: var(--accent-strong);
  font-weight: 850;
}

.stats-filter-row:hover .stats-filter-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cell-title {
  color: #102033;
  font-weight: 850;
}

.view-projects .list-table th:nth-child(2),
.view-projects .list-table td:nth-child(2) {
  min-width: 118px;
  white-space: nowrap;
}

.view-projects .list-table th:nth-child(3),
.view-projects .list-table td:nth-child(3),
.view-projects .list-table th:nth-child(4),
.view-projects .list-table td:nth-child(4) {
  min-width: 86px;
}

.view-projects .list-table th:nth-child(6),
.view-projects .list-table td:nth-child(6) {
  min-width: 126px;
}

td.amount,
th.amount,
.amount strong,
.row-total,
.bill-row strong,
.summary-card strong,
.panel-total strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.badge,
.meta-pill,
.table-tag {
  border-color: #d6e2ec;
  font-weight: 750;
}

.badge.good,
.status-toggle.good {
  border: 1px solid #b7dfc5;
}

.badge.accent {
  border: 1px solid #b9dfd8;
}

.badge.warn {
  border: 1px solid #efc983;
}

.badge.bad {
  border: 1px solid #eab6b6;
}

.badge.task-assigned {
  border: 1px solid #b7d4f4;
}

.badge.task-progress {
  border: 1px solid #efc983;
}

.badge.task-completed {
  border: 1px solid #b7dfc5;
}

.badge.task-cancelled {
  border: 1px solid #eab6b6;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: start;
}

.detail-side {
  position: sticky;
  top: 76px;
}

.detail-main-panel .panel-head {
  background: #fff;
}

.panel-total strong {
  color: #102033;
  font-size: 28px;
}

.section-cards {
  background: #fff;
  gap: 12px;
}

.section-card {
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

button.section-card,
.child-section-card {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 4px;
}

.section-card span {
  font-weight: 750;
}

.section-card strong {
  font-size: 24px;
  font-weight: 850;
}

.section-card.section-视频板块 {
  border-color: #bfd3ee;
  background: #f2f7ff;
}

.section-card.section-图片板块 {
  border-color: #d5e3b8;
  background: #f8fce9;
}

.section-card.section-直播板块 {
  border-color: #b8ded5;
  background: #effaf7;
}

.section-card.section-差旅板块 {
  border-color: #e5c995;
  background: #fff8ec;
}

.section-card.section-子项目 {
  border-color: #c7d2df;
  background: #f7f9fc;
}

.quote-table thead th {
  background: #e8f0f6;
  color: #304258;
}

.quote-table tbody tr:hover {
  background: #f4fbfa;
}

.quote-table td:first-child:not([colspan]) {
  background: #edf7f7;
  border-left-color: var(--accent);
  color: #163042;
}

.quote-table td:nth-child(6),
.quote-table td:nth-child(7),
.quote-table td:nth-child(8),
.quote-table td:nth-child(9),
.quote-table td:nth-child(10),
.quote-table th.amount,
.quote-table td.amount {
  background: #fffaf0;
}

.quote-grid input[type="number"] {
  min-width: 84px;
}

.quote-grid [data-field="unitPrice"],
.quote-grid [data-field="discount"] {
  min-width: 98px;
}

.quote-grid .row-total {
  font-size: 16px;
  color: #0f1e2e;
}

.section-row td {
  background: #172638 !important;
  border-bottom-color: #172638;
}

.price-summary {
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0 16px 16px;
  border: 1px solid #cad7e3;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 32, 51, 0.12);
}

.summary-card,
.summary-note {
  border-radius: 8px;
}

.summary-card.final {
  background: #111f2f;
  border-color: #111f2f;
}

.summary-card.total-rollup {
  border-color: #e6c66d;
}

.bill-panel {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 32, 51, 0.08);
}

.bill-panel.bill-pending_confirmation .panel-head,
.bill-panel.bill-sent .panel-head,
.bill-panel.bill-draft .panel-head {
  background: #a85f00;
}

.bill-panel.bill-confirmed .panel-head,
.bill-panel.bill-rated .panel-head {
  background: #0f7a53;
}

.bill-row.final strong {
  font-size: 22px;
  font-weight: 850;
}

.message {
  border-color: #dbe6ef;
  background: #fff;
}

.message.system {
  background: #f1faf7;
  border-color: #b9ded5;
}

.star {
  color: #b9c5d2;
}

.star:hover,
.star.active {
  color: #e69f00;
}

.supplier-cost-panel {
  border-left: 4px solid #0e7490;
}

.supplier-detail-table .supplier-item-row td {
  background: #fffaf0;
}

.staff-block {
  background: #fbfdff;
}

.readonly-money {
  border-color: #b9dfd8;
  background: #ecf8f5;
}

.analysis-summary,
.analysis-item,
.notice {
  border-color: #dbe6ef;
}

.modal-content {
  border-radius: 12px;
}

.center-toast {
  border-radius: 12px;
}

.auth-page {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 430px);
  background: #eef3f7;
}

.auth-cover,
.auth-card {
  border-radius: 18px;
  border-color: #d3dfeb;
}

.auth-cover {
  background: #111f2f;
  color: #fff;
}

.auth-cover-inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.auth-cover-inner::after {
  display: none;
}

.auth-kicker,
.auth-card-kicker {
  color: #2dd4bf;
}

.auth-cover h1 {
  max-width: 19ch;
  color: #fff;
  font-weight: 850;
}

.auth-lead,
.auth-footnote {
  color: #cbd7e5;
}

.auth-highlights article {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.auth-highlights strong {
  color: #fff;
}

.auth-highlights span {
  color: #b9c6d5;
}

.auth-footnote {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.auth-footnote span {
  color: #94a6ba;
}

.auth-card {
  background: #fff;
}

.auth-video-page {
  position: relative;
  display: block;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #091622;
}

.auth-image,
.auth-media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.auth-image {
  background-image: url("/assets/login-cover-static.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.auth-media-video {
  object-fit: cover;
  object-position: center;
}

.auth-image-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 14, 24, 0.08) 0%, rgba(4, 14, 24, 0.03) 48%, rgba(4, 14, 24, 0.18) 100%),
    linear-gradient(180deg, rgba(4, 14, 24, 0.01) 0%, rgba(4, 14, 24, 0.18) 100%);
  pointer-events: none;
}

.auth-video-card {
  position: absolute;
  z-index: 2;
  top: 74%;
  left: 50%;
  width: min(430px, calc(100vw - 44px));
  min-height: 0;
  transform: translate3d(-50%, -50%, 0);
  border: 1px solid rgba(214, 226, 236, 0.96);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 52px rgba(4, 14, 24, 0.24);
  -webkit-font-smoothing: antialiased;
}

.auth-video-card .auth-card-head {
  padding: 24px 30px 0;
}

.auth-video-card .auth-card-head h2 {
  font-size: 24px;
}

.auth-video-card .auth-card-body {
  padding: 18px 30px 30px;
}

.auth-video-card .auth-card-body.stack {
  gap: 14px;
}

.auth-video-card .field {
  display: grid;
  gap: 7px;
}

.auth-video-card input {
  min-height: 46px;
  border-color: #c7d6e3;
  background: #fbfdff;
  font-size: 15px;
}

.auth-video-card input::placeholder {
  color: #5d6d80;
}

.auth-video-card .auth-submit {
  min-height: 46px;
  margin-top: 4px;
  border-radius: 10px;
  font-weight: 800;
}

.auth-video-card .auth-footnote {
  margin-top: 4px;
  padding-top: 12px;
  border-top-color: #dbe6ef;
  color: var(--ink-soft);
}

.auth-video-card .auth-footnote span {
  color: #5d6d80;
}

@media (max-width: 1280px) {
  .detail-side {
    position: static;
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
  }

  .main {
    padding: 18px;
  }

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

  .title h1 {
    font-size: 26px;
  }
}

/* Core platform restructure */

:root {
  --z-dropdown: 30;
  --z-sticky: 40;
  --z-backdrop: 70;
  --z-drawer: 80;
  --z-toast: 90;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  min-height: 64px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: none;
}

.command-bar,
.global-search,
.list-command-row,
.list-view-controls,
.segmented-control,
.settings-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-bar {
  min-width: 0;
  justify-content: flex-end;
}

.global-search {
  width: min(420px, 34vw);
}

.global-search input {
  min-width: 180px;
}

.notification-button,
.account-button {
  position: relative;
  white-space: nowrap;
}

.notification-button b,
.nav-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
}

.nav button {
  justify-content: space-between;
}

.global-layer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 30, 46, 0.18);
}

.global-layer-backdrop:hover,
.global-layer-backdrop:active,
.global-layer-backdrop:focus {
  border: 0;
  background: rgba(15, 30, 46, 0.18);
  box-shadow: none;
  outline: none;
  transform: none;
}

.floating-menu,
.global-drawer {
  position: fixed;
  z-index: var(--z-drawer);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 20px 54px rgba(15, 30, 46, 0.18);
}

.floating-menu {
  width: 290px;
  padding: 8px;
  border-radius: 10px;
}

.floating-menu button {
  width: 100%;
  min-height: 62px;
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 10px 12px;
  border-color: transparent;
}

.floating-menu button:hover {
  background: var(--surface-strong);
}

.floating-menu span,
.drawer-head span,
.search-result span,
.notification-row small,
.notification-row time {
  color: var(--muted);
  font-size: 12px;
}

.global-drawer {
  top: 0;
  right: 0;
  width: min(480px, 92vw);
  height: 100vh;
  overflow: auto;
  border-width: 0 0 0 1px;
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.drawer-head > div {
  min-width: 0;
  margin-right: auto;
}

.drawer-head strong,
.drawer-head span {
  display: block;
}

.drawer-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.search-result,
.notification-row,
.workbench-row,
.workbench-notice {
  width: 100%;
  min-height: 58px;
  display: grid;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.search-result {
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 3px;
  padding: 10px 4px;
}

.notification-row {
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 16px;
}

.notification-row span > strong,
.notification-row span > small,
.notification-row span > time {
  display: block;
}

.notification-row .notification-action,
.workbench-notice .notification-action {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.notification-row.unread {
  background: #f0faf8;
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.unread .notification-dot {
  background: var(--accent);
}

.quote-confirmation-panel {
  overflow: hidden;
  border-color: #e8c57e;
  background: linear-gradient(135deg, #fffdf7 0%, #ffffff 48%, #f6fbfa 100%);
}

.quote-confirmation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #f1e7cf;
}

.quote-confirmation-head h2 {
  margin: 0;
  color: #173042;
  font-size: 22px;
}

.quote-confirmation-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.quote-confirmation-meta,
.quote-confirmation-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #edf0f2;
  border-bottom: 1px solid #edf0f2;
}

.quote-confirmation-meta > span,
.quote-confirmation-sections > div {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, .9);
}

.quote-confirmation-meta span,
.quote-confirmation-sections span,
.quote-confirmation-sections small {
  color: var(--muted);
  font-size: 13px;
}

.quote-confirmation-meta strong,
.quote-confirmation-sections strong {
  color: #173042;
  font-size: 15px;
}

.quote-confirmation-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 22px;
}

.quote-confirmation-total span { font-weight: 750; }

.quote-confirmation-total strong {
  color: #087c77;
  font-size: 28px;
}

.quote-confirmation-panel > .primary {
  width: calc(100% - 44px);
  margin: 0 22px 22px;
}

.quote-confirmation-panel > .bill-state-note { margin: 0 22px 22px; }

.drawer-empty {
  display: grid;
  gap: 5px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.workbench-intro {
  margin-bottom: 16px;
}

.workbench-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.workbench-metric {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.workbench-metric:last-child {
  border-right: 0;
}

.workbench-metric span,
.workbench-metric small {
  display: block;
  color: var(--muted);
}

.workbench-metric strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 23px;
  color: var(--ink);
}

.workbench-metric.metric-pending strong,
.workbench-metric.metric-unpaid strong,
.workbench-metric.metric-unsettled strong {
  color: var(--warn);
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.workbench-primary {
  grid-row: span 2;
}

.workbench-list,
.workbench-notice-list {
  padding: 0 16px 8px;
}

.workbench-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(100px, auto);
  gap: 12px;
  padding: 12px 0;
}

.workbench-row span:first-child strong,
.workbench-row span:first-child small {
  display: block;
}

.workbench-row b {
  text-align: right;
}

.workbench-notice {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
}

.workbench-notice span strong,
.workbench-notice span small {
  display: block;
}

.workbench-notice time {
  color: var(--muted);
  font-size: 11px;
}

.status-progress {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.status-progress-row {
  display: grid;
  grid-template-columns: 80px minmax(80px, 1fr) 32px minmax(70px, auto);
  align-items: center;
  gap: 8px;
}

.status-progress-row div {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.status-progress-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.status-progress-row b {
  text-align: right;
  font-size: 12px;
}

.status-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.status-count-row span {
  color: var(--text);
  font-weight: 700;
}

.status-count-row strong {
  color: var(--accent);
  font-size: 14px;
}

.list-command-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

.segmented-control {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-strong);
}

.segmented-control button {
  min-height: 32px;
  border: 0;
  background: transparent;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.list-view-controls select {
  width: 150px;
}

.table-group-row td {
  padding: 9px 12px !important;
  background: var(--surface-strong) !important;
  color: var(--ink-soft);
  font-weight: 800;
}

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

.column-choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.column-choice-list input {
  width: auto;
  min-height: 0;
}

.compact-modal {
  max-width: 520px;
}

.settings-tabs {
  position: sticky;
  top: 64px;
  z-index: calc(var(--z-sticky) - 1);
  margin: -4px 0 14px;
  padding: 0 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.settings-tabs button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  color: var(--muted);
}

.settings-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 800;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 16px;
}

.overview-grid .metric-card {
  box-shadow: none;
}

.asset-tabs {
  margin: 0 0 16px;
}

.asset-content {
  display: grid;
  gap: 16px;
}

.asset-overview-grid {
  align-items: start;
}

.asset-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.asset-chart-panel .panel-body {
  padding-top: 8px;
}

.asset-chart-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 182px;
}

.asset-status-ring {
  display: grid;
  width: 148px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
}

.asset-status-ring > div {
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-content: center;
  border-radius: 50%;
  background: var(--surface);
  text-align: center;
}

.asset-status-ring strong,
.asset-status-ring span {
  display: block;
}

.asset-status-ring strong {
  font-size: 27px;
  line-height: 1;
}

.asset-status-ring span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.asset-chart-legend {
  display: grid;
  gap: 4px;
}

.asset-chart-legend button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.asset-chart-legend button:hover {
  border-color: transparent;
  background: var(--surface-soft);
  box-shadow: none;
}

.asset-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.asset-chart-legend strong {
  font-variant-numeric: tabular-nums;
}

.asset-usage-bars {
  display: grid;
  gap: 12px;
  min-height: 182px;
  align-content: center;
}

.asset-usage-bars button {
  display: grid;
  grid-template-columns: minmax(98px, 0.9fr) minmax(100px, 1.4fr) auto;
  width: 100%;
  min-height: 26px;
  padding: 0;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.asset-usage-bars button:hover {
  border-color: transparent;
  background: var(--surface-soft);
  box-shadow: none;
}

.asset-usage-label {
  overflow: hidden;
  padding-right: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-usage-track {
  display: flex;
  align-items: center;
  height: 100%;
}

.asset-usage-track {
  position: relative;
}

.asset-usage-track::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-strong);
}

.asset-usage-track i {
  position: relative;
  z-index: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  transition: width 180ms ease;
}

.asset-usage-bars strong {
  padding-left: 10px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-chart-empty {
  display: grid;
  min-height: 182px;
  place-items: center;
  color: var(--muted);
}

.asset-device-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.asset-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-photo-button {
  display: block;
  width: 42px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}

.asset-photo-button:hover,
.asset-photo-button:focus-visible {
  border-color: transparent;
  box-shadow: none;
}

.asset-photo-button:focus-visible .asset-thumb {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.asset-photo-button:hover .asset-thumb {
  border-color: var(--accent);
  transform: scale(1.04);
}

.asset-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.asset-item-list {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: var(--ink-soft);
}

.asset-item-list span::before {
  content: "·";
  margin-right: 6px;
  color: var(--accent);
}

.asset-batch-panel {
  overflow: hidden;
}

.asset-batch-panel > .panel-head {
  align-items: flex-start;
}

.asset-batch-panel > .panel-head h2 {
  margin-bottom: 4px;
}

.asset-project-list {
  border-top: 1px solid var(--line);
}

.asset-project-group {
  border-bottom: 1px solid var(--line);
}

.asset-project-group:last-child {
  border-bottom: 0;
}

.asset-project-toggle {
  width: 100%;
  min-height: 76px;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  justify-content: space-between;
  text-align: left;
}

.asset-project-toggle:hover {
  border-color: transparent;
  background: var(--surface-soft);
  box-shadow: none;
}

.asset-project-toggle:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.asset-project-main,
.asset-project-summary,
.asset-project-meta {
  display: flex;
}

.asset-project-main {
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.asset-project-meta {
  color: var(--muted);
  font-size: 12px;
}

.asset-project-summary {
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.asset-project-disclosure {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.asset-project-group.is-expanded .asset-project-disclosure {
  transform: rotate(180deg);
}

.asset-project-detail {
  padding: 0 18px 16px;
  background: var(--surface-soft);
  animation: asset-project-reveal 180ms ease-out;
}

.asset-loan-list {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.asset-loan {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-loan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.asset-loan-head > div {
  display: grid;
  gap: 3px;
}

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

.asset-loan-progress {
  color: var(--ink-soft) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-loan-section {
  border-bottom: 1px solid var(--line);
}

.asset-loan-section:last-child {
  border-bottom: 0;
}

.asset-loan-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 700;
}

.asset-loan-section summary::marker {
  color: var(--accent);
}

.asset-loan-section.is-warning summary {
  color: var(--bad);
}

.asset-loan-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.asset-loan-section.is-warning .asset-loan-count {
  color: var(--bad);
}

.asset-operation-device-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.asset-operation-device {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.9fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.asset-operation-device:last-child {
  border-bottom: 0;
}

.asset-operation-device-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.asset-operation-device-meta {
  color: var(--muted);
  font-size: 12px;
}

.asset-operation-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.asset-project-detail .table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-operation-table {
  min-width: 960px;
}

.asset-operation-table .asset-device-cell {
  min-width: 250px;
}

.asset-time-cell {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-empty-records {
  padding: 32px 18px;
  text-align: center;
}

@keyframes asset-project-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.asset-photo-viewer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  animation: asset-photo-fade 180ms ease-out;
}

.asset-photo-viewer-content {
  display: grid;
  width: min(860px, 100%);
  max-height: calc(100dvh - 48px);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.asset-photo-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.asset-photo-close {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
}

.asset-photo-viewer-content > img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  background: #111827;
}

@keyframes asset-photo-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .asset-visual-grid {
    grid-template-columns: 1fr;
  }

  .asset-chart-layout {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    min-height: 150px;
  }

  .asset-status-ring {
    width: 120px;
  }

  .asset-status-ring > div {
    width: 78px;
  }

  .asset-operation-device {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .asset-operation-device-meta {
    grid-column: 1 / -1;
  }

  .asset-loan-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .asset-batch-panel > .panel-head {
    gap: 8px;
  }

  .asset-project-toggle {
    min-height: 88px;
    align-items: flex-start;
    padding: 14px;
  }

  .asset-project-summary {
    flex-wrap: wrap;
    max-width: 116px;
    gap: 4px 8px;
    margin-left: 10px;
    white-space: normal;
  }

  .asset-project-disclosure {
    position: absolute;
    right: 12px;
    bottom: 9px;
  }

  .asset-project-toggle {
    position: relative;
  }

  .asset-project-detail {
    padding: 0 10px 10px;
  }

  .asset-photo-viewer {
    padding: 12px;
  }

  .asset-photo-viewer-content {
    max-height: calc(100dvh - 24px);
  }
}

.asset-create-panel {
  margin-bottom: 16px;
}

.asset-create-panel.hidden {
  display: none;
}

.asset-import-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.asset-import-row input[type="file"] {
  max-width: 360px;
  background: var(--surface-soft);
}

.asset-pairing-code {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  padding: 7px 12px;
  border: 1px solid #b8dfd8;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 22px;
  letter-spacing: 3px;
}

#asset-pairing-result span {
  color: var(--muted);
}

.overview-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.overview-details div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.overview-details div:last-child {
  border-right: 0;
}

.overview-details span,
.overview-details strong {
  display: block;
}

.overview-details span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-layout .detail-section {
  display: block;
}

.autosave-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.autosave-status.pending,
.autosave-status.saving {
  color: var(--warn);
}

.autosave-status.saved {
  color: var(--good);
}

.settings-editor {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 520px;
}

.settings-user-list {
  padding: 10px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.settings-user-list button {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 2px;
  margin-bottom: 4px;
  border-color: transparent;
  background: transparent;
}

.settings-user-list button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-strong);
}

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

.settings-editor-main {
  padding: 18px;
}

.effective-preview {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.effective-preview span {
  color: var(--muted);
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.permission-group {
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-group legend {
  padding: 0 6px;
  color: var(--ink-soft);
  font-weight: 800;
}

.permission-group label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}

.permission-group input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.permission-group strong,
.permission-group small {
  display: block;
}

.permission-group small {
  color: var(--muted);
}

.role-template-list {
  display: grid;
}

.role-template-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.role-template-card:last-child {
  border-bottom: 0;
}

.role-template-card div strong,
.role-template-card div span {
  display: block;
}

.role-template-card span,
.role-template-card p,
.scope-explanation span {
  color: var(--muted);
}

.role-template-card p {
  margin: 0;
  line-height: 1.65;
}

.scope-explanation {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.login-cover-settings {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding: 18px;
}

.company-seal-settings {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
  gap: 18px;
  padding: 18px;
}

.company-seal-preview {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(45deg, rgba(209, 223, 235, 0.45) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(209, 223, 235, 0.45) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(209, 223, 235, 0.45) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(209, 223, 235, 0.45) 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.company-seal-preview img {
  width: min(240px, 70%);
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(148, 36, 36, 0.12));
}

.login-cover-preview {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #091622;
}

.login-cover-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 14, 24, 0.05), rgba(4, 14, 24, 0.16)),
    linear-gradient(180deg, rgba(4, 14, 24, 0), rgba(4, 14, 24, 0.18));
  pointer-events: none;
}

.login-cover-preview-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-cover-preview-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-cover-preview-card {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(260px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid rgba(214, 226, 236, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(4, 14, 24, 0.18);
}

.login-cover-preview-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.login-cover-preview-card strong {
  font-size: 20px;
}

.login-cover-preview-card small,
.setting-current-file span,
.setting-current-file small {
  color: var(--muted);
}

.login-cover-form {
  display: grid;
  align-content: start;
  gap: 16px;
}

.setting-current-file {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.void-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #e8b6b6;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--bad);
}

.supplier-detail-section {
  display: none;
}

.supplier-tab-requirements .supplier-requirements-section,
.supplier-tab-staff .supplier-requirements-section,
.supplier-tab-issues .supplier-issues-section,
.supplier-tab-communication .supplier-communication-section {
  display: block;
}

.supplier-tab-requirements .supplier-staff-row {
  display: none;
}

.supplier-tab-staff .supplier-item-row,
.supplier-tab-staff .supplier-detail-table thead,
.supplier-tab-staff .supplier-detail-table colgroup {
  display: none;
}

.supplier-tab-staff .supplier-staff-row {
  display: table-row;
}

.supplier-tab-staff .supplier-detail-table {
  min-width: 0;
}

.supplier-tab-staff .staff-block {
  padding: 14px 10px;
}

.supplier-tab-issues,
.supplier-tab-communication {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-tab-issues .detail-side,
.supplier-tab-communication > .stack:first-child {
  display: none;
}

.supplier-tab-communication .detail-side {
  position: static;
}

.issue-create-form {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) 140px auto;
  gap: 8px;
}

.supplier-issue-list {
  display: grid;
  gap: 10px;
}

.supplier-issue {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.supplier-issue-head,
.supplier-issue-meta,
.issue-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.supplier-issue p {
  margin: 10px 0;
  line-height: 1.55;
}

.supplier-issue-meta {
  color: var(--muted);
  font-size: 12px;
}

.issue-response {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 7px;
  background: var(--accent-soft);
}

.issue-response-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.reimbursement-items {
  display: grid;
  gap: 8px;
}

.reimbursement-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 100px minmax(180px, 0.8fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.reimbursement-invoice-cell {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed #dbe6ef;
}

.reimbursement-invoice-help {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px dashed var(--line);
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.35;
}

.detail-profitability .panel-head {
  align-items: end;
}

.profitability-total {
  color: var(--accent);
  font-size: 20px;
}

.profitability-table th {
  width: 20%;
  color: var(--muted);
  font-weight: 600;
}

.profitability-final th,
.profitability-final td {
  background: var(--accent-soft);
}

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

.reimbursement-item-invoices {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.reimbursement-invoice-file-list {
  display: grid;
  gap: 5px;
}

.reimbursement-invoice-file {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reimbursement-invoice-file .button-link {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.reimbursement-invoice-file .muted {
  font-size: 12px;
}

.reimbursement-item-invoice-upload {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.reimbursement-item-supplement {
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.reimbursement-item-supplement textarea {
  min-height: 72px;
}

.reimbursement-supplement-history {
  display: grid;
  gap: 6px;
}

.reimbursement-supplement-note {
  padding: 8px 9px;
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
}

.reimbursement-supplement-note small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.reimbursement-invoice-file .badge {
  margin-left: 6px;
}

.reimbursement-detail-modal .modal-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  justify-content: flex-end;
  margin: 0 -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

.visibility-audit-row,
.visibility-scope-block {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.visibility-audit-row {
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}

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

.visibility-scope-block + .visibility-scope-block {
  border-left: 1px solid var(--line);
}

.visibility-scope-head,
.visibility-content-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.visibility-account-list {
  display: grid;
  gap: 6px;
}

.visibility-account {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.visibility-account small,
.visibility-content-counts span {
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.reimbursement-unlinked-invoices td {
  background: var(--surface-soft);
}

.reimbursement-unlinked-invoices td:first-child strong,
.reimbursement-unlinked-invoices td:first-child .muted {
  display: block;
}

.reimbursement-unlinked-invoices td:first-child .muted {
  margin-top: 4px;
}

.schedule-table td {
  vertical-align: top;
}

.schedule-date {
  white-space: nowrap;
}

.schedule-date strong,
.schedule-date span {
  display: block;
}

.schedule-date span {
  color: var(--muted);
  margin-top: 4px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 8px;
}

.schedule-project,
.schedule-empty {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 84px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.schedule-project {
  cursor: pointer;
}

.schedule-project.readonly {
  cursor: default;
}

.schedule-project strong {
  font-size: 13px;
  line-height: 1.35;
}

.schedule-project span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-project:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.1);
}

.schedule-empty {
  align-items: center;
  color: var(--muted);
  justify-content: center;
}

@media (max-width: 1100px) {
  .command-bar .global-search {
    width: min(320px, 31vw);
  }

  .workbench-grid,
  .settings-editor,
  .login-cover-settings,
  .company-seal-settings {
    grid-template-columns: 1fr;
  }

  .workbench-primary {
    grid-row: auto;
  }

  .settings-user-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-user-list button {
    min-width: 170px;
  }

  .schedule-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: var(--bg);
    font-size: 13px;
  }

  .shell {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: block;
    width: 100%;
    height: auto;
    max-height: 42vh;
    overflow: auto;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(185, 198, 213, 0.18);
    box-shadow: 0 10px 24px rgba(15, 32, 51, 0.12);
  }

  .brand-block {
    padding: 0;
  }

  .brand {
    margin-top: 2px;
    font-size: 18px;
  }

  .brand-copy,
  .sidebar-note {
    display: none;
  }

  .userbox {
    margin: 10px 0;
    padding: 9px 10px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .nav-count {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .workspace,
  .main,
  .panel,
  .modal-content {
    min-width: 0;
  }

  .auth-video-card {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 28px;
    width: auto;
    transform: none;
  }

  .workspace-header {
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
    padding: 10px 12px;
    gap: 8px;
  }

  .workspace-breadcrumb {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .command-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  .global-search {
    width: 100%;
    order: -1;
  }

  .global-search input {
    flex: 1;
    min-width: 0;
  }

  .command-bar > button,
  .command-bar > .account-button,
  .command-bar > .notification-button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 0 10px;
  }

  .main {
    padding: 14px 12px 24px;
  }

  .page-intro,
  .topbar {
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }

  .title h1 {
    font-size: 24px;
    line-height: 1.25;
    word-break: break-word;
  }

  .title p {
    margin-top: 6px;
    line-height: 1.55;
  }

  .toolbar,
  .quote-actions {
    justify-content: stretch;
    width: 100%;
  }

  .toolbar > *,
  .quote-actions > button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .metrics-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 94px;
    padding: 12px;
  }

  .metric-card strong {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  .panel {
    border-radius: 10px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 12px 14px;
  }

  .panel-head .muted {
    text-align: left;
  }

  .panel-body {
    padding: 14px;
  }

  .filters,
  .stats-filters,
  .stats-owner-filters,
  .owner-filters,
  .logs-filters,
  .compact-filters,
  .supplier-filters,
  .form-grid,
  .permission-form,
  .issue-create-form,
  .staff-line,
  .staff-new,
  .grid-2,
  .grid-3,
  .balanced-grid,
  .settings-grid,
  .cost-cards {
    grid-template-columns: 1fr;
  }

  .filter-panel .panel-body {
    padding: 12px;
  }

  .table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 0 0 10px 10px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: max-content;
    min-width: 100%;
  }

  th,
  td {
    padding: 10px 9px;
  }

  .list-table {
    min-width: 760px;
  }

  .quote-table {
    min-width: 1180px;
  }

  .supplier-detail-table {
    min-width: 1040px;
  }

  .package-table {
    min-width: 980px;
  }

  .settings-permission-table th:nth-child(2),
  .settings-permission-table td:nth-child(2),
  .logs-table th:nth-child(4),
  .logs-table td:nth-child(4) {
    min-width: 260px;
  }

  .detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-side {
    position: static;
  }

  .overview-grid,
  .section-cards,
  .price-summary {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 10px;
  }

  .overview-details {
    grid-template-columns: 1fr 1fr;
  }

  .overview-details div {
    border-bottom: 1px solid var(--line);
  }

  .overview-details div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .section-card {
    padding: 12px;
  }

  .section-card strong {
    font-size: 20px;
  }

  .panel-total {
    width: 100%;
    text-align: left;
  }

  .panel-total strong {
    font-size: 24px;
  }

  .price-summary {
    position: static;
    margin: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: none;
  }

  .summary-card strong,
  .bill-row.final strong,
  .bill-row strong {
    overflow-wrap: anywhere;
  }

  .workbench-metrics,
  .overview-details {
    grid-template-columns: 1fr 1fr;
  }

  .workbench-metric:nth-child(even),
  .overview-details div:nth-child(even) {
    border-right: 0;
  }

  .workbench-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .workbench-row b {
    grid-column: 1 / -1;
    text-align: left;
  }

  .workbench-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-progress-row {
    grid-template-columns: 68px minmax(72px, 1fr) 28px;
  }

  .status-progress-row b {
    grid-column: 1 / -1;
    text-align: left;
  }

  .list-command-row,
  .list-view-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
  }

  .role-template-card,
  .issue-create-form,
  .reimbursement-item-row {
    grid-template-columns: 1fr;
  }

  .role-template-card {
    gap: 10px;
    padding: 14px;
  }

  .settings-tabs {
    top: 0;
    margin-top: 0;
  }

  .settings-editor {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .settings-user-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-user-list button {
    min-width: 150px;
  }

  .settings-editor-main {
    padding: 14px;
  }

  .login-cover-settings,
  .company-seal-settings {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .login-cover-preview,
  .company-seal-preview {
    min-height: 220px;
  }

  .login-cover-preview-card {
    right: 14px;
    bottom: 14px;
    width: min(240px, calc(100% - 28px));
  }

  .modal {
    align-items: end;
    padding: 10px;
  }

  .modal-content {
    width: 100%;
    max-height: 92vh;
    border-radius: 12px;
  }

  .modal-content[style] {
    max-width: 100% !important;
    width: 100% !important;
  }

  .product-suggest {
    position: fixed;
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
    max-width: none;
    max-height: 48vh;
  }

  .reimbursement-invoice-cell {
    grid-template-columns: 1fr;
  }

  .reimbursement-invoice-cell button,
  .reimbursement-invoice-cell input[type="file"] {
    width: 100%;
  }

  .reimbursement-item-invoice-upload {
    grid-template-columns: 1fr;
  }

  .visibility-scope-grid {
    grid-template-columns: 1fr;
  }

  .visibility-scope-block + .visibility-scope-block {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .attachment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-actions,
  .attachment-actions select {
    width: 100%;
    max-width: none;
  }

  .staff-block {
    padding: 12px;
  }

  .staff-line button,
  .staff-new button {
    width: 100%;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .schedule-date {
    white-space: normal;
  }

  .schedule-table {
    min-width: 560px;
  }

  .global-drawer {
    width: 100vw;
  }

  .floating-menu {
    left: 12px !important;
    right: 12px;
    width: auto;
  }

  .center-toast,
  .undo-toast {
    width: calc(100vw - 24px);
    max-width: none;
  }
}

@media (max-width: 430px) {
  .command-bar > button,
  .command-bar > .account-button,
  .command-bar > .notification-button,
  .toolbar > *,
  .quote-actions > button {
    flex-basis: 100%;
  }

  .metrics-strip,
  .workbench-metrics,
  .overview-grid,
  .overview-details,
  .section-cards,
  .price-summary {
    grid-template-columns: 1fr;
  }

  .workbench-metric,
  .overview-details div {
    border-right: 0;
  }

  .auth-video-card {
    left: 12px;
    right: 12px;
    bottom: 16px;
  }

  .auth-video-card .auth-card-head,
  .auth-video-card .auth-card-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.creative-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
  overflow: hidden;
  color: #0b1220;
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

.creative-left-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 46px 48px;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #154173 48%, #0f766e 100%);
}

.creative-brand {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.creative-brand-mark,
.creative-mobile-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.creative-character-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: min(58vh, 590px);
}

.creative-characters {
  position: relative;
  width: min(650px, 78vw);
  height: 470px;
  max-width: 88vw;
  transform: translateY(8px);
}

.creative-character {
  position: absolute;
  bottom: 0;
  transform-origin: bottom center;
  transform: translateX(var(--body-x, 0px)) skewX(var(--body-skew, 0deg));
  transition: transform 240ms ease, height 240ms ease, filter 240ms ease;
  will-change: transform;
}

.character-purple {
  left: 84px;
  width: 216px;
  height: 470px;
  z-index: 1;
  border-radius: 10px 10px 0 0;
  background: #6c3ff5;
  box-shadow: inset -18px 0 0 rgba(32, 19, 93, 0.18);
}

.character-black {
  left: 288px;
  width: 144px;
  height: 365px;
  z-index: 2;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  background: #2d2d2d;
  box-shadow: inset 16px 0 0 rgba(255, 255, 255, 0.04);
}

.character-orange {
  left: 0;
  width: 288px;
  height: 235px;
  z-index: 3;
  overflow: hidden;
  border-radius: 120px 120px 0 0;
  background: #ff9b6b;
  box-shadow: inset -20px 0 0 rgba(127, 55, 28, 0.12);
}

.character-yellow {
  left: 372px;
  width: 168px;
  height: 270px;
  z-index: 4;
  overflow: hidden;
  border-radius: 70px 70px 0 0;
  background: #e8d754;
  box-shadow: inset -14px 0 0 rgba(96, 86, 20, 0.12);
}

.creative-face {
  position: absolute;
  display: flex;
  transition: transform 220ms ease, left 220ms ease, top 220ms ease;
}

.face-purple {
  left: 54px;
  top: 48px;
  gap: 38px;
}

.face-black {
  left: 31px;
  top: 38px;
  gap: 29px;
}

.face-orange {
  left: 98px;
  top: 106px;
  gap: 38px;
}

.face-yellow {
  left: 62px;
  top: 48px;
  gap: 29px;
}

.creative-eyeball {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  transition: height 120ms ease, transform 180ms ease;
}

.character-black .creative-eyeball {
  width: 16px;
  height: 16px;
}

.creative-pupil,
.creative-dot-eye {
  transform: translate(var(--eye-x, 0px), var(--eye-y, 0px));
  transition: transform 100ms ease-out;
}

.creative-pupil {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2d2d2d;
}

.character-black .creative-pupil {
  width: 6px;
  height: 6px;
}

.creative-dot-eye {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #2d2d2d;
}

.creative-mouth {
  position: absolute;
  left: 48px;
  top: 104px;
  width: 96px;
  height: 4px;
  border-radius: 999px;
  background: #2d2d2d;
  transition: transform 220ms ease;
}

.creative-login.typing-name .character-purple {
  --body-x: 38px;
  height: 500px;
}

.creative-login.typing-name .character-black {
  --body-x: 18px;
}

.creative-login.typing-name .face-purple {
  left: 66px;
  top: 78px;
}

.creative-login.typing-name .face-black {
  left: 38px;
  top: 17px;
}

.creative-login.password-guard .creative-character {
  --body-skew: 0deg !important;
}

.creative-login.password-guard .face-purple {
  left: 24px;
  top: 22px;
}

.creative-login.password-guard .face-black {
  left: 14px;
  top: 20px;
}

.creative-login.password-guard .face-orange {
  transform: translate(-60px, -18px);
}

.creative-login.password-guard .face-yellow {
  transform: translate(-32px, -18px);
}

.creative-login.password-guard .creative-mouth {
  transform: translate(-8px, -8px);
}

.creative-login.showing-password .face-purple,
.creative-login.showing-password .face-black,
.creative-login.showing-password .face-orange,
.creative-login.showing-password .face-yellow {
  transform: translate(-20px, -10px);
}

.creative-left-copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.76);
}

.creative-left-copy strong {
  color: #fff;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.creative-left-copy span {
  font-size: 15px;
  line-height: 1.7;
}

.creative-blur {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  filter: blur(82px);
}

.blur-one {
  top: 14%;
  right: 8%;
  width: 280px;
  height: 280px;
  background: rgba(45, 212, 191, 0.22);
}

.blur-two {
  bottom: 7%;
  left: 4%;
  width: 380px;
  height: 380px;
  background: rgba(37, 99, 235, 0.2);
}

.creative-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

.creative-right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background:
    radial-gradient(circle at 20% 0%, rgba(241, 245, 255, 0.95), transparent 35%),
    radial-gradient(circle at 90% 82%, rgba(221, 255, 246, 0.9), transparent 40%),
    linear-gradient(160deg, #f8fafc 0%, #eef2ff 52%, #ecfeff 100%);
}

.creative-login-card {
  width: min(400px, 100%);
  padding: 34px 28px 28px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 50px rgba(30, 41, 59, 0.12);
  backdrop-filter: blur(14px);
}

.creative-panel-tag {
  margin: 0 0 16px;
  text-align: center;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.creative-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.creative-mobile-mark {
  width: 32px;
  height: 32px;
  border: 0;
  background: linear-gradient(135deg, #dbeafe 0%, #ccfbf1 100%);
}

.creative-form-header {
  margin-bottom: 28px;
  text-align: center;
}

.creative-form-header h1 {
  margin: 0 0 8px;
  color: #0b1220;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.creative-form-header p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.creative-input-group {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.creative-input-group label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.creative-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color 180ms ease, outline-color 180ms ease, background 180ms ease;
}

.creative-input-shell:hover {
  border-color: #14b8a6;
  background: #fff;
}

.creative-input-shell:focus-within {
  border-color: #0f766e;
  outline-color: rgba(20, 184, 166, 0.22);
  background: #fff;
}

.creative-input-icon {
  display: inline-flex;
  align-items: center;
  padding-left: 14px;
  color: #64748b;
}

.creative-input-shell input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  color: #111827;
  background: transparent;
  font: inherit;
  font-size: 14px;
  box-shadow: none;
  transition: none;
}

.creative-input-shell input:focus {
  border-color: transparent;
  box-shadow: none;
  outline: 0;
}

.creative-input-shell input::placeholder {
  color: #66758a;
}

.creative-eye-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.creative-eye-toggle:hover {
  color: #0f766e;
  background: #ecfdf5;
}

.creative-field-error {
  min-height: 16px;
  color: #b91c1c;
  font-size: 12px;
}

.form-field-error,
.form-submit-error {
  display: block;
  min-height: 18px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.4;
}

.field.has-error input,
.field.has-error select {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.creative-error-box {
  display: none;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 13px;
}

.creative-error-box.show {
  display: block;
}

.creative-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #22d3ee 100%);
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.24);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.creative-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.32);
}

.creative-submit:active {
  transform: translateY(1px);
}

.creative-submit:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.archive-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.archive-settings-help {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.archive-settings-help p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.archive-ai-settings {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.section-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 700;
}

.switch-row.compact {
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.archive-table .path-code {
  display: block;
  max-width: 380px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-table th:nth-child(5),
.archive-table td:nth-child(5) {
  min-width: 150px;
  white-space: nowrap;
}

.archive-time-cell {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.archive-drawer {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(980px, calc(100vw - 56px));
  height: auto;
  max-height: calc(100dvh - 72px);
  border-width: 1px;
  border-radius: 14px;
  overflow: auto;
  transform: translate(-50%, -50%);
}

.archive-drawer .drawer-head {
  min-height: 72px;
  padding: 14px 18px;
}

.archive-drawer .drawer-section {
  padding: 18px;
}

.archive-drawer .drawer-section h3 {
  margin-bottom: 12px;
}

.archive-progress {
  width: 150px;
  height: 8px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.archive-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.archive-required-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.archive-required-folders span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.archive-required-folders small {
  color: var(--muted);
  font-weight: 600;
}

.archive-folder-builder {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.archive-folder-builder table {
  min-width: 900px;
}

.archive-folder-builder th,
.archive-folder-builder td {
  vertical-align: middle;
}

.archive-folder-builder input {
  min-width: 0;
}

.archive-folder-builder input[readonly],
.archive-folder-builder input:disabled {
  background: var(--surface-strong);
  color: var(--ink-soft);
  opacity: 1;
}

.archive-folder-preview {
  display: block;
  max-width: 280px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .archive-drawer {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
}

.archive-folder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-folder-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: min(100%, 460px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
}

.archive-folder-pill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.archive-folder-pill-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-folder-pill small {
  color: var(--muted);
  font-weight: 600;
}

.archive-folder-pill .archive-check-message {
  flex: 1 0 100%;
  line-height: 1.45;
}

.archive-folder-pill .archive-file-summary {
  flex: 1 0 100%;
  max-width: 100%;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.archive-folder-pill.filled {
  border-color: #a8dec4;
  background: var(--success-soft);
  color: var(--good);
}

.archive-folder-pill.empty {
  border-color: #efb1b1;
  background: var(--danger-soft);
  color: var(--bad);
}

.archive-folder-pill.error {
  border-color: #f1c17d;
  background: var(--warn-soft);
  color: var(--warn);
}

.archive-folder-pill.check-fail {
  border-color: #efb1b1;
  background: var(--danger-soft);
  color: var(--bad);
}

.archive-folder-pill.check-warn {
  border-color: #f1c17d;
  background: var(--warn-soft);
  color: var(--warn);
}

.archive-folder-pill.check-pass {
  border-color: #a8dec4;
  background: var(--success-soft);
  color: var(--good);
}

.archive-check-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.archive-check-badge.pass {
  border-color: #a8dec4;
  background: #ecfdf3;
  color: var(--good);
}

.archive-check-badge.warn {
  border-color: #f1c17d;
  background: #fff7e6;
  color: var(--warn);
}

.archive-check-badge.fail {
  border-color: #efb1b1;
  background: #fff1f1;
  color: var(--bad);
}

.attendance-site-map-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.attendance-site-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.attendance-site-map-head strong {
  display: block;
  margin-bottom: 3px;
}

.attendance-site-map-head p {
  margin: 0;
}

.attendance-site-map {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
}

.attendance-site-map.unavailable {
  display: grid;
  place-items: center;
  padding: 18px;
}

.attendance-site-map .leaflet-control-attribution {
  color: var(--muted);
  font-size: 11px;
}

.attendance-site-map-status,
.attendance-site-map-error {
  margin: 0;
  font-size: 13px;
}

.attendance-site-map-status {
  color: var(--ink-soft);
}

.attendance-site-map-error {
  color: var(--bad);
  font-weight: 700;
}

.attendance-site-manual-details {
  grid-column: 1 / -1;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.attendance-site-manual-details summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
}

.attendance-site-manual-details .form-grid {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .attendance-site-map-head {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-site-map-head button {
    width: 100%;
  }

  .attendance-site-map {
    min-height: 300px;
  }
}

.archive-smart-line {
  display: block;
  margin-top: 2px;
  font-weight: 700;
}

.archive-smart-line.good {
  color: var(--good);
}

.archive-smart-line.warn {
  color: var(--warn);
}

.archive-smart-line.bad {
  color: var(--bad);
}

.ai-quote-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.ai-quote-source {
  position: sticky;
  top: 78px;
}

.ai-quote-source textarea {
  min-height: 420px;
  line-height: 1.7;
  resize: vertical;
}

.ai-quote-result {
  min-width: 0;
}

.ai-quote-draft .panel-head {
  align-items: flex-end;
}

.ai-quote-total {
  color: var(--ink);
  font-size: 30px;
  letter-spacing: 0;
}

.ai-section-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.ai-project-form {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.ai-project-form .wide {
  grid-column: 1 / -1;
}

.ai-quote-table-wrap {
  border-bottom: 1px solid var(--line);
}

.ai-quote-table th,
.ai-quote-table td {
  vertical-align: top;
}

.ai-quote-table input,
.ai-quote-table select,
.ai-quote-table textarea {
  width: 100%;
  min-width: 82px;
}

.ai-quote-table textarea {
  min-height: 54px;
  margin-top: 6px;
  resize: vertical;
}

.ai-quote-row td:nth-child(3) {
  min-width: 210px;
}

.ai-quote-row td:nth-child(4) {
  min-width: 180px;
}

.ai-quote-draft > .row-actions {
  padding: 14px;
}

.project-ai-assistant {
  margin: 0 14px 14px;
  border: 1px solid #cfe2ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcff, #ffffff);
}

.project-ai-assistant summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.project-ai-assistant summary::-webkit-details-marker {
  display: none;
}

.project-ai-assistant summary strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.project-ai-assistant summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ai-assistant-pill {
  flex: 0 0 auto;
  border: 1px solid #b9d6e8;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef8ff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.project-ai-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.project-ai-source-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 12px;
  padding-top: 14px;
  align-items: stretch;
}

.project-ai-source-row textarea {
  min-height: 112px;
  line-height: 1.65;
  resize: vertical;
}

.project-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-ai-preview {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.project-ai-preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.project-ai-preview-head strong:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.ai-section-cards.compact {
  padding: 10px 14px;
}

.project-ai-preview .notice {
  margin: 10px 14px;
}

@media (max-width: 900px) {
  .project-ai-source-row {
    grid-template-columns: 1fr;
  }
}

.archive-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.archive-drawer .notice {
  margin-top: 10px;
}

.employee-task-modal-shell {
  padding: 26px;
  align-items: center;
  justify-content: center;
}

.employee-task-modal {
  width: min(1380px, calc(100vw - 72px));
  max-width: calc(100vw - 72px);
  max-height: calc(100dvh - 52px);
  box-sizing: border-box;
  border-radius: 14px;
}

.employee-task-modal > .panel-head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #fff;
  border-radius: 14px 14px 0 0;
}

.employee-task-modal .panel-body {
  max-height: calc(100dvh - 128px);
  overflow: auto;
  padding: 16px;
}

.employee-task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.employee-source-panel,
.employee-task-side {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.employee-task-side {
  display: grid;
  gap: 8px;
  padding: 12px;
}

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

.employee-source-scroll {
  max-height: min(58dvh, 620px);
  overflow-x: hidden !important;
  overflow-y: auto;
}

.employee-source-table.list-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  font-size: 13px;
  line-height: 1.35;
}

.employee-source-table th,
.employee-source-table td {
  vertical-align: top;
  padding-left: 4px;
  padding-right: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.employee-source-table th:nth-child(1),
.employee-source-table td:nth-child(1) {
  width: 30px;
}

.employee-source-table th:nth-child(2),
.employee-source-table td:nth-child(2) {
  width: 78px;
}

.employee-source-table th:nth-child(3),
.employee-source-table td:nth-child(3),
.employee-source-table th:nth-child(4),
.employee-source-table td:nth-child(4) {
  width: 102px;
}

.employee-source-table th:nth-child(5),
.employee-source-table td:nth-child(5) {
  width: 42px;
}

.employee-source-table th:nth-child(6),
.employee-source-table td:nth-child(6),
.employee-source-table th:nth-child(7),
.employee-source-table td:nth-child(7) {
  width: 48px;
}

.employee-source-table th:nth-child(8),
.employee-source-table td:nth-child(8),
.employee-source-table th:nth-child(9),
.employee-source-table td:nth-child(9) {
  width: 66px;
}

.employee-source-row {
  cursor: pointer;
}

.employee-source-row:hover {
  background: #f4f9fb;
}

.employee-source-row.selected {
  background: #eefaf7;
  box-shadow: inset 3px 0 0 var(--accent);
}

.employee-source-row input[type="radio"],
.employee-source-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.employee-source-table .inline-input {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.employee-source-table .inline-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.employee-source-table .employee-row-unit {
  min-width: 0;
}

.employee-source-table .employee-row-number,
.employee-source-table .employee-row-bonus-unit {
  min-width: 0;
  text-align: right;
}

.employee-source-table .amount {
  white-space: nowrap;
}

.employee-source-table th.amount {
  text-align: right;
}

.employee-task-selection-hint {
  margin-top: 2px;
}

.salary-picker-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.salary-employee-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.salary-employee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.salary-employee-option input {
  width: 16px;
  min-height: 16px;
}

.salary-copy-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.employee-source-manual {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.employee-source-manual.selected {
  background: #eefaf7;
}

.employee-source-manual span {
  display: grid;
  gap: 3px;
}

.employee-source-manual small {
  color: var(--muted);
}

.full-width {
  width: 100%;
}

.task-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfd;
}

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

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

.task-detail-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.employee-my-task-panel {
  border-left: 3px solid var(--accent);
}

@media (max-width: 1500px) {
  .employee-task-modal-shell {
    padding: 20px;
  }

  .employee-task-modal {
    width: min(1280px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px);
  }

  .employee-task-modal .panel-body {
    max-height: calc(100dvh - 112px);
  }

  .employee-task-layout {
    grid-template-columns: 1fr;
  }

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

  .employee-source-scroll {
    max-height: min(52dvh, 560px);
    overflow-x: hidden !important;
  }

  .employee-source-table.list-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
}

@media (max-width: 960px) {
  .employee-task-side .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .employee-task-modal-shell {
    padding: 10px;
    align-items: stretch;
  }

  .employee-task-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .employee-task-modal .panel-body {
    max-height: calc(100dvh - 90px);
    padding: 10px;
  }

  .employee-source-scroll {
    overflow-x: hidden !important;
  }

  .employee-source-table.list-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .employee-task-side .form-grid {
    grid-template-columns: 1fr;
  }
}

.creative-login.login-shake .creative-login-card,
.creative-login.login-shake .creative-character {
  animation: creative-login-shake 600ms ease;
}

@keyframes creative-login-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  36% { transform: translateX(6px); }
  54% { transform: translateX(-4px); }
  72% { transform: translateX(3px); }
}

@media (max-width: 1024px) {
  .ai-quote-layout {
    grid-template-columns: 1fr;
  }

  .ai-quote-source {
    position: static;
  }

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

  .archive-settings-grid {
    grid-template-columns: 1fr;
  }

  .archive-table .path-code {
    max-width: 240px;
  }

  .employee-task-layout {
    grid-template-columns: 1fr;
  }

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

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

  .creative-left-panel {
    display: none;
  }

  .creative-right-panel {
    min-height: 100vh;
    padding: 28px;
  }

  .creative-mobile-brand {
    display: flex;
  }
}

@media (max-width: 520px) {
  .ai-section-cards {
    grid-template-columns: 1fr;
  }

  .ai-quote-total {
    font-size: 24px;
  }

  .creative-right-panel {
    padding: 18px;
  }

  .creative-login-card {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }

  .creative-form-header h1 {
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  .quote-confirmation-meta,
  .quote-confirmation-sections {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 460px) {
  .quote-confirmation-head,
  .quote-confirmation-total {
    padding-right: 16px;
    padding-left: 16px;
  }

  .quote-confirmation-meta,
  .quote-confirmation-sections {
    grid-template-columns: 1fr;
  }

.quote-confirmation-panel > .primary {
  width: calc(100% - 32px);
  margin-right: 16px;
  margin-left: 16px;
}
}

.detail-project-flow .panel-body {
  padding: 14px 18px 18px;
}

.detail-project-flow {
  --flow-accent: #475569;
  --flow-ink: #1e293b;
  --flow-tint: #f1f5f9;
  --flow-ring: rgba(71, 85, 105, .18);
}

.detail-project-flow[data-flow-tone="draft"] { --flow-accent: #475569; --flow-ink: #1e293b; --flow-tint: #f1f5f9; --flow-ring: rgba(71, 85, 105, .18); }
.detail-project-flow[data-flow-tone="confirm"] { --flow-accent: #b45309; --flow-ink: #78350f; --flow-tint: #fff7e6; --flow-ring: rgba(180, 83, 9, .18); }
.detail-project-flow[data-flow-tone="ready"] { --flow-accent: #4f46e5; --flow-ink: #312e81; --flow-tint: #eef2ff; --flow-ring: rgba(79, 70, 229, .18); }
.detail-project-flow[data-flow-tone="progress"] { --flow-accent: #0e7490; --flow-ink: #164e63; --flow-tint: #ecfeff; --flow-ring: rgba(14, 116, 144, .18); }
.detail-project-flow[data-flow-tone="rating"] { --flow-accent: #a21caf; --flow-ink: #701a75; --flow-tint: #fdf4ff; --flow-ring: rgba(162, 28, 175, .18); }
.detail-project-flow[data-flow-tone="complete"] { --flow-accent: #047857; --flow-ink: #064e3b; --flow-tint: #ecfdf5; --flow-ring: rgba(4, 120, 87, .18); }

.project-flow-current {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px;
  color: var(--flow-ink);
  background: var(--flow-tint);
  border: 1px solid color-mix(in srgb, var(--flow-accent) 25%, white);
  border-radius: 12px;
}

.project-flow-current-icon,
.project-flow-marker {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.project-flow-current-icon {
  width: 38px;
  height: 38px;
  color: white;
  background: var(--flow-accent);
  border-radius: 11px;
  box-shadow: 0 0 0 5px var(--flow-ring);
}

.project-flow-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.project-flow-current > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-flow-current span:not(.project-flow-current-icon),
.project-flow-current small {
  color: color-mix(in srgb, var(--flow-ink) 72%, white);
  font-size: 12px;
  line-height: 1.35;
}

.project-flow-current strong {
  font-size: 16px;
  line-height: 1.35;
}

.project-flow-steps {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.project-flow-step {
  position: relative;
  display: flex;
  min-height: 56px;
  padding: 0 0 8px;
  color: #94a3b8;
}

.project-flow-step:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 2px;
  content: "";
  background: #e2e8f0;
}

.project-flow-step > button,
.project-flow-step > span {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  gap: 11px;
  align-items: flex-start;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.project-flow-step > button {
  min-height: 48px;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 10px;
}

.project-flow-step > button:focus-visible {
  outline: 3px solid var(--flow-ring);
  outline-offset: 3px;
}

.project-flow-marker {
  width: 30px;
  height: 30px;
  margin-top: 3px;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.project-flow-marker .project-flow-icon { width: 15px; height: 15px; }

.project-flow-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 4px 0 0;
}

.project-flow-copy b {
  font-size: 14px;
  line-height: 1.35;
}

.project-flow-step-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-flow-step-top i {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  line-height: 1.2;
}

.project-flow-copy small,
.project-flow-copy em {
  width: fit-content;
  padding: 2px 6px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.project-flow-step.is-current {
  color: var(--flow-ink);
}

.project-flow-step.is-current .project-flow-marker {
  color: white;
  background: var(--flow-accent);
  border-color: var(--flow-accent);
  box-shadow: 0 0 0 4px var(--flow-ring);
}

.project-flow-step.is-current .project-flow-step-top i,
.project-flow-step.is-current .project-flow-copy small {
  color: var(--flow-ink);
}

.project-flow-step.is-current .project-flow-copy small {
  background: var(--flow-tint);
}

.project-flow-step.is-actionable:not(.is-current) > button {
  background: #f8fafc;
  border: 1px solid #d9e2ec;
}

.project-flow-step.is-actionable:not(.is-current) > button:hover {
  color: #334155;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.project-flow-hint {
  padding: 11px 12px;
  color: #526478;
  background: #f8fafc;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.inline-error {
  margin: 0;
  padding: 10px 12px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
