:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --nav: #172838;
  --nav-deep: #10202f;
  --nav-active: #2f73df;
  --page: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --line: #dfe6ee;
  --line-strong: #cfd9e5;
  --text: #17212f;
  --muted: #6d7a8b;
  --blue: #2f73df;
  --green: #1e9d68;
  --amber: #f2a13b;
  --red: #d84b4b;
  --violet: #7a8be8;
  --shadow: 0 10px 28px rgba(31, 48, 66, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1160px;
  background: var(--page);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(16, 136, 147, 0.12), transparent 34%),
    radial-gradient(circle at 86% 82%, rgba(47, 115, 223, 0.09), transparent 30%),
    linear-gradient(145deg, #f4fbfb 0%, #f5f8fb 52%, #eaf0f6 100%);
  padding: 24px;
}

.login-card {
  width: 456px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d7e5e8;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(31, 63, 77, 0.14);
  padding: 32px 34px 30px;
}

.login-card-loading {
  padding-block: 40px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-trademark {
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin-bottom: 17px;
  padding: 5px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 105, 117, 0.14);
}

.login-card h1 {
  margin: 0;
  color: #153d48;
  font-size: 23px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.login-card p {
  margin: 7px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #536172;
}

.login-card input {
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 12px;
  color: #17212f;
  background: #fbfdfd;
  outline: none;
}

.login-card input:focus {
  border-color: #168895;
  box-shadow: 0 0 0 3px rgba(22, 136, 149, 0.12);
}

.login-card .primary-button {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border-radius: 9px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.login-hints {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.login-hints code {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 4px;
  padding: 3px 6px;
  color: #334155;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 184px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-deep) 100%);
  color: #d8e5f4;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  z-index: 10;
}

.sidebar.collapsed {
  width: 74px;
}

.sidebar-menu,
.collapse-action,
.nav-item,
.submenu-item {
  border: 0;
  background: transparent;
  color: inherit;
}

.sidebar-menu {
  height: 54px;
  display: grid;
  place-items: center;
  width: 100%;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 5px;
  margin-top: 6px;
  min-height: 0;
  overflow: visible;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 229, 244, 0.32) transparent;
}

.nav-group {
  display: grid;
  gap: 2px;
  position: relative;
}

.nav-item {
  height: 52px;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  padding: 0 12px;
  border-left: 3px solid transparent;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  color: #d8e5f4;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.nav-item svg {
  justify-self: center;
  color: #a9c5df;
  transition: color 0.16s ease;
}

.nav-item.active {
  color: #ffffff;
  background: rgba(47, 115, 223, 0.92);
  border-left-color: #83c4ff;
  box-shadow: inset 0 0 0 1px rgba(131, 196, 255, 0.16);
}

.nav-item.active svg {
  color: #ffffff;
}

.nav-group:hover > .nav-item,
.nav-item:hover {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(47, 115, 223, 0.82), rgba(32, 168, 122, 0.72));
  border-left-color: #63e6be;
  box-shadow: inset 0 0 0 1px rgba(219, 236, 255, 0.18);
}

.nav-group:hover > .nav-item svg,
.nav-item:hover svg {
  color: #ffffff;
}

.submenu-item:hover,
.collapse-action:hover,
.sidebar-menu:hover {
  background: rgba(255, 255, 255, 0.08);
}

.submenu-list {
  display: none;
  position: fixed;
  left: 184px;
  top: 64px;
  width: 196px;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  gap: 3px;
  margin: 0;
  padding: 7px;
  border: 1px solid #c8d9e9;
  border-left: 3px solid #20a87a;
  border-radius: 7px;
  background: #f6fbff;
  color: #26364a;
  box-shadow: 0 14px 26px rgba(4, 13, 24, 0.18);
  z-index: 45;
}

.nav-group:hover .submenu-list,
.nav-group:focus-within .submenu-list {
  display: grid;
}

.submenu-section {
  margin: 6px 2px 1px;
  color: #1e7b61;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.submenu-section:first-child {
  margin-top: 0;
}

.submenu-item {
  min-height: 30px;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 5px;
  color: #26364a;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  box-shadow: inset 0 0 0 1px transparent;
}

.submenu-item svg {
  justify-self: center;
  color: #2f73df;
}

.submenu-item:hover {
  color: #102033;
  background: #e7f0ff;
  box-shadow: inset 0 0 0 1px #c9dbf6;
}

.submenu-item:active {
  background: #dbeafe;
  color: #0f2e5f;
}

.submenu-item:focus-visible,
.nav-item:focus-visible,
.collapse-action:focus-visible,
.sidebar-menu:focus-visible {
  outline: 2px solid rgba(131, 196, 255, 0.9);
  outline-offset: -2px;
}

.collapse-action {
  margin-top: auto;
  height: 64px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  padding: 0 12px;
  color: #aebfd1;
  text-align: left;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .collapse-action {
  grid-template-columns: 1fr;
  justify-content: center;
}

.sidebar.collapsed .submenu-list {
  left: 74px;
}

.sidebar.collapsed .nav-group:hover .submenu-list,
.sidebar.collapsed .nav-group:focus-within .submenu-list {
  display: grid;
}

.sidebar.collapsed span {
  display: none;
}

.sidebar.collapsed .submenu-list span {
  display: inline;
}

.sidebar.collapsed .submenu-section {
  display: block;
}

.workspace {
  min-width: 0;
  background: var(--page);
}

.topbar {
  height: 56px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 24px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0;
}

.brand svg {
  color: var(--blue);
}

.top-actions,
.filters,
.module-actions,
.panel-tools,
.table-toolbar,
.modal-actions,
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #526070;
  border-radius: 6px;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.with-badge {
  position: relative;
}

.with-badge span {
  position: absolute;
  top: 2px;
  right: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: white;
  font-size: 11px;
  line-height: 18px;
}

.user-menu {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 0 12px;
  color: #293444;
  height: 36px;
}

.user-menu em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 4px;
  padding: 2px 6px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dce5f2;
  color: #53647b;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.filterbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  padding: 8px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-copy {
  flex: 0 0 280px;
  min-width: 260px;
}

.page-copy p,
.drawer-header p,
.modal-header p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.page-copy h1,
.drawer-header h2,
.modal-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  word-break: keep-all;
}

.page-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.filters {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.field {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 9px;
  background: white;
  color: #2d3847;
  min-width: 142px;
}

.field span {
  color: #5c6a7b;
  font-size: 13px;
  white-space: nowrap;
}

.field select,
.field input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  color: #253246;
}

.field select {
  appearance: none;
  width: 188px;
}

.outline-button,
.primary-button,
.link-button {
  height: 34px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  white-space: nowrap;
}

.outline-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: #334155;
}

.outline-button:hover {
  border-color: #9db0c6;
  background: #f7fafc;
}

.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0 4px;
}

.compact {
  height: 30px;
  font-size: 13px;
}

.content-grid {
  padding: 12px 26px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(470px, 0.96fr);
  gap: 10px;
}

.kpi-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.kpi-card {
  min-height: 88px;
  border: 0;
  background: white;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 24px;
  text-align: left;
  border-right: 1px solid var(--line);
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-card:hover {
  background: #fbfdff;
}

.kpi-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
}

.kpi-icon.blue { background: #2f91d9; }
.kpi-icon.green { background: #20a87a; }
.kpi-icon.amber { background: #f5ac4e; }
.kpi-icon.violet { background: #8aa0ff; }

.kpi-text {
  display: grid;
  gap: 4px;
}

.kpi-text > span {
  color: #596777;
  font-size: 14px;
}

.kpi-text strong {
  font-size: 24px;
  letter-spacing: 0;
}

.kpi-text em,
.metric span {
  font-style: normal;
  color: var(--green);
  font-size: 13px;
}

.kpi-text em.risk,
.metric.danger strong {
  color: var(--red);
}

.kpi-text em.down {
  color: var(--green);
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.panel-header {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.trend-panel,
.inventory-panel,
.orders-panel,
.cash-panel,
.hr-panel,
.announcement-panel {
  min-width: 0;
}

.orders-panel,
.hr-panel {
  grid-column: 1;
}

.cash-panel,
.announcement-panel {
  grid-column: 2;
}

.chart-legend {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: #536172;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 13px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.blue-dot { background: var(--blue); }
.green-dot { background: var(--green); }

.chart-canvas {
  width: 100%;
  display: block;
}

.line-canvas {
  height: 186px;
}

.bar-canvas,
.donut-canvas {
  height: 154px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #edf1f5;
  padding: 4px 6px;
  color: #394657;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th {
  background: #f8fafc;
  color: #536172;
  font-weight: 700;
  text-align: left;
}

.data-table th button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 700;
}

.data-table tr:hover td {
  background: #f7fbff;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 20px;
  border-radius: 4px;
  padding: 0 7px;
  border: 1px solid #cfd9e5;
  color: #536172;
  background: #f7fafc;
  font-size: 11px;
}

.status-pill.danger {
  border-color: #ffd49e;
  background: #fff7ed;
  color: #db7b19;
}

.status-pill.done {
  border-color: #a8dfc5;
  background: #edfdf4;
  color: #15875a;
}

.status-pill.wait {
  border-color: #bdd2f8;
  background: #f0f5ff;
  color: #2f73df;
}

.segmented {
  display: inline-flex;
  padding: 0 10px;
  gap: 16px;
  height: 36px;
  align-items: center;
}

.segmented.small {
  padding: 0;
  gap: 6px;
  height: 30px;
}

.segmented button {
  height: 30px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #596777;
  padding: 0 4px;
}

.segmented.small button {
  border-radius: 4px;
  border: 0;
  padding: 0 9px;
}

.segmented button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 700;
}

.segmented.small button.active {
  background: #edf4ff;
}

.order-table th,
.order-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-cell span {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: #e8edf3;
  overflow: hidden;
}

.progress-cell i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.view-more {
  height: 38px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  padding: 0 14px;
}

.cash-summary,
.attendance-summary {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.cash-summary {
  grid-template-columns: repeat(3, 1fr);
}

.attendance-summary {
  grid-template-columns: repeat(6, 1fr);
}

.metric {
  padding: 6px 14px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

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

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

.metric.good strong {
  color: var(--green);
}

.message-list {
  display: grid;
}

.message-row,
.notice-row {
  min-height: 32px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 0 12px;
  text-align: left;
  color: #384557;
}

.message-row:hover,
.notice-row:hover {
  background: #f8fbff;
}

.message-row em {
  font-style: normal;
  color: #6d7a8b;
  text-align: right;
}

.tag {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  border-radius: 4px;
  background: #edf4ff;
  color: var(--blue);
  font-size: 12px;
}

.tag.warning {
  background: #fff2e1;
  color: #d87812;
}

.popover-wrap {
  position: relative;
}

.popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.export-menu {
  width: 190px;
  padding: 6px;
  display: grid;
}

.export-menu button {
  border: 0;
  background: transparent;
  height: 34px;
  border-radius: 4px;
  text-align: left;
  padding: 0 10px;
  color: #334155;
}

.export-menu button:hover {
  background: #f3f7fb;
}

.notice-popover {
  width: 390px;
}

.popover-title {
  height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-weight: 700;
}

.popover-title button {
  border: 0;
  background: transparent;
  color: var(--blue);
}

.notice-row {
  grid-template-columns: 48px 1fr;
}

.module-grid {
  width: min(100%, 1420px);
  margin: 0 auto;
  padding: 10px 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.module-command {
  min-height: 76px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
}

.module-command:not(:has(.module-actions)) {
  grid-template-columns: 54px minmax(0, 1fr);
}

.module-brandmark {
  position: relative;
  width: 52px;
  height: 52px;
}

.module-trademark {
  width: 52px;
  height: 52px;
}

.module-icon {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 6px;
  color: white;
  background: #2469a6;
  box-shadow: 0 2px 6px rgba(30, 64, 103, 0.2);
}

.module-command-copy {
  min-width: 0;
}

.module-command-copy > span {
  display: block;
  margin-bottom: 2px;
  color: #2469a6;
  font-size: 10px;
  font-weight: 700;
}

.module-command h2 {
  margin: 0 0 2px;
  color: #203247;
  font-size: 17px;
}

.module-command p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.module-business-map {
  overflow: hidden;
}

.module-business-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfe;
}

.module-business-heading h2,
.module-business-heading p {
  margin: 0;
}

.module-business-heading h2 {
  color: #24364b;
  font-size: 15px;
}

.module-business-heading p {
  margin-top: 3px;
  color: #6b7c90;
  font-size: 11px;
}

.module-business-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #27628f;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.module-business-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #ffffff;
}

.module-business-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 60px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
}

.module-business-item:last-child {
  border-right: 0;
}

.module-business-item:hover {
  background: #f4f9ff;
}

.module-business-item > i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e8f2fc;
  color: #2469a6;
}

.module-business-item > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.module-business-item strong {
  color: #2a3d52;
  font-size: 12px;
}

.module-business-item small {
  color: #718195;
  font-size: 10px;
}

.module-business-item > b {
  color: #174f91;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.stat-tile {
  min-height: 62px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.stat-tile:hover {
  border-color: #aac0d8;
}

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

.stat-tile strong {
  font-size: 20px;
}

.module-table-panel {
  min-width: 0;
}

.report-query-panel {
  overflow: hidden;
}

.report-query-heading {
  min-height: 42px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #c9d9ee;
  background: #e8f2fc;
}

.report-query-heading h2,
.report-query-heading span {
  margin: 0;
}

.report-query-heading h2 {
  color: #174f91;
  font-size: 15px;
}

.report-query-heading span,
.report-result-count {
  color: var(--muted);
  font-size: 11px;
}

.report-query-form {
  padding: 12px;
  display: grid;
  grid-template-columns: 170px 170px minmax(220px, 1fr) 150px;
  align-items: end;
  gap: 10px;
}

.report-query-form > label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-query-form > label > span {
  color: #52657a;
  font-size: 12px;
  font-weight: 700;
}

.report-query-form select,
.report-keyword-item {
  height: 38px;
  border: 1px solid #b9c9dc;
  border-radius: 5px;
  background: white;
}

.report-query-form select {
  width: 100%;
  padding: 0 10px;
  color: #26384c;
}

.report-keyword-group {
  grid-column: 1 / -1;
  min-width: 0;
}

.report-keyword-group-header {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-keyword-group-header strong {
  color: #52657a;
  font-size: 12px;
}

.report-keyword-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.report-keyword-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  color: #2469a6;
}

.report-keyword-item > span {
  height: 100%;
  display: grid;
  place-items: center;
  color: #2469a6;
  background: #edf4fb;
  border-right: 1px solid #d5e1ef;
  font-size: 12px;
  font-weight: 700;
}

.report-keyword-item input {
  min-width: 0;
  height: 34px;
  border: 0;
  outline: 0;
  padding: 0 9px;
  color: #1f2f43;
  background: transparent;
}

.report-keyword-item:focus-within {
  border-color: #3d7fbd;
  box-shadow: 0 0 0 3px rgba(61, 127, 189, 0.12);
}

.report-query-button {
  height: 38px;
  white-space: nowrap;
}

.report-empty-result {
  height: 90px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1000px) {
  .report-query-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .report-query-button {
    justify-self: start;
  }
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.table-search {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  min-width: 210px;
}

.table-search input {
  border: 0;
  outline: 0;
  min-width: 0;
}

.table-toolbar select,
.panel-tools select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  background: white;
}

.row-action {
  height: 26px;
  border: 1px solid var(--line);
  background: white;
  color: var(--blue);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
}

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

.todo-list button {
  min-height: 50px;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 5px;
  display: grid;
  grid-template-columns: 28px 1fr 32px;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 0 10px;
}

.todo-list span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: var(--blue);
}

.todo-list em {
  font-style: normal;
  color: var(--amber);
  font-weight: 700;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 37, 0.28);
  z-index: 50;
}

.search-modal,
.data-modal {
  position: absolute;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 48px));
  background: white;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-input {
  height: 58px;
  display: grid;
  grid-template-columns: 24px 1fr 40px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.search-input input {
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search-input button {
  border: 0;
  background: transparent;
  color: #5a6878;
}

.search-results {
  padding: 10px;
  min-height: 180px;
}

.search-results p {
  margin: 20px 8px;
  color: var(--muted);
}

.search-results button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  display: grid;
  grid-template-columns: 110px 1fr 190px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #334155;
}

.search-results span {
  color: var(--blue);
}

.search-results em {
  color: var(--muted);
  font-style: normal;
}

.detail-drawer {
  position: absolute;
  right: 0;
  top: 0;
  width: 420px;
  height: 100%;
  background: white;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.drawer-header,
.modal-header {
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.detail-list {
  padding: 14px 18px;
  display: grid;
  gap: 10px;
  overflow: auto;
}

.detail-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list span {
  color: var(--muted);
}

.detail-list strong {
  font-weight: 600;
  color: #253246;
  word-break: break-word;
}

.drawer-approval-section {
  margin: 0 18px 12px;
  border: 1px solid #c9d9ee;
  background: #f7faff;
  max-height: 250px;
  overflow: auto;
}

.drawer-approval-section > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: #123b6d;
  background: #dceafb;
  border-bottom: 1px solid #c9d9ee;
}

.drawer-approval-section > header span,
.drawer-current-approvers,
.drawer-history-empty {
  font-size: 12px;
}

.drawer-current-approvers {
  margin: 0;
  padding: 8px 11px;
  color: #315b86;
  border-bottom: 1px solid #dce6f2;
}

.drawer-history-list {
  padding: 4px 11px 8px;
}

.drawer-history-list article {
  padding: 8px 0;
  border-bottom: 1px solid #dce6f2;
}

.drawer-history-list article:last-child {
  border-bottom: 0;
}

.drawer-history-list article div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.drawer-history-list time,
.drawer-history-list article span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-history-list p {
  margin: 4px 0 2px;
  color: #253246;
  font-size: 12px;
}

.drawer-history-empty {
  padding: 14px 11px;
  color: var(--muted);
}

.drawer-actions {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}

.data-modal {
  top: 92px;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 128px);
  overflow: auto;
}

.data-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.data-modal .modal-header p {
  color: var(--blue);
  font-weight: 700;
}

.data-modal .icon-button {
  flex: 0 0 auto;
}

.wide-modal {
  width: min(1120px, calc(100vw - 48px));
}

.data-modal form {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.data-modal label {
  display: grid;
  gap: 6px;
  color: #536172;
  font-size: 13px;
}

.data-modal label > span {
  color: #405064;
  font-weight: 650;
}

.modal-title-block {
  display: grid;
  gap: 3px;
}

.modal-title-block p,
.modal-title-block h2,
.modal-title-block span {
  margin: 0;
}

.modal-title-block span {
  color: #52677d;
  font-size: 12px;
  font-weight: 700;
}

.shared-data-strip {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cfe2f3;
  border-radius: 6px;
  background: #f2f8ff;
  color: #2f5d91;
  font-size: 12px;
}

.shared-data-strip svg {
  flex: 0 0 auto;
  color: #2f73df;
}

.shared-data-strip span {
  font-weight: 700;
}

.shared-data-strip strong {
  color: #26364a;
  font-weight: 650;
}

.stock-master-control {
  display: grid;
  min-width: 0;
  background: #ffffff;
}

.stock-master-control.is-adding > select {
  border-bottom: 1px solid #b9dfcf !important;
  background: #f8fffb !important;
}

.stock-master-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  background: #f1fbf6;
}

.stock-master-new[hidden] {
  display: none;
}

.business-form .stock-master-new > input {
  min-width: 0;
  border-bottom: 1px solid #b9dfcf !important;
  background: #f8fffb !important;
  color: #164f3d;
  font-weight: 650;
  text-align: left;
}

.stock-master-new small {
  padding: 4px 8px;
  color: #28715b;
  font-size: 10px;
  line-height: 1.25;
}

.data-modal input,
.data-modal select,
.data-modal textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  min-height: 36px;
  padding: 8px 10px;
  color: #263244;
}

.data-modal input:focus,
.data-modal select:focus,
.data-modal textarea:focus {
  outline: 0;
  border-color: rgba(47, 115, 223, 0.78);
  box-shadow: 0 0 0 3px rgba(47, 115, 223, 0.12);
  background: #ffffff;
}

.data-modal input[readonly],
.data-modal textarea[readonly] {
  background: #f2f5f8;
  border-color: #d8e0ea;
  color: #526173;
  cursor: not-allowed;
}

.data-modal textarea {
  min-height: 86px;
  resize: vertical;
}

.payroll-print-sheet {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.business-form {
  background: #f7f9fc;
}

.data-modal form.business-form {
  gap: 16px;
  padding: 16px 18px 0;
}

.form-section {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 15px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 1px 0 rgba(18, 34, 55, 0.03);
}

.business-form .form-section {
  gap: 0;
  padding: 0;
  border-color: #536273;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.form-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
}

.business-form .form-section::before {
  display: none;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.business-form .form-section-title {
  min-height: 40px;
  padding: 9px 12px;
  border-bottom: 1px solid #536273;
  background: #dce8f5;
  color: #213248;
}

.form-section-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #253246;
}

.form-section-title strong::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

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

.business-form .form-section-title span {
  color: #415369;
}

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

.business-form .form-grid-4,
.business-form .line-grid,
.business-form .form-row {
  gap: 0;
  border-left: 0;
  border-top: 0;
}

.line-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.business-form .line-grid {
  padding: 0;
  border: 1px solid #536273;
  border-bottom: 0;
  border-radius: 0;
  background: #ffffff;
}

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

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

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

.finance-modal,
.statement-modal {
  max-height: calc(100vh - 108px);
  overflow: auto;
}

.finance-sheet {
  display: grid;
  gap: 0;
  border: 1px solid #536273;
  background: #ffffff;
}

.finance-sheet > h3 {
  margin: 0;
  padding: 13px 12px;
  border-bottom: 1px solid #536273;
  color: #2d3642;
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}

.finance-sheet > p {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid #cfd7e2;
  color: #526173;
  font-size: 12px;
  text-align: center;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 0;
  border-left: 0;
}

.data-modal label.sheet-field {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 0;
  min-height: 42px;
  border-right: 1px solid #536273;
  border-bottom: 1px solid #536273;
  color: #2d3642;
  font-size: 13px;
}

.data-modal label.sheet-field > span {
  display: grid;
  place-items: center;
  padding: 8px 9px;
  border-right: 1px solid #536273;
  background: #dce8f5;
  color: #213248;
  font-weight: 700;
  text-align: center;
}

.data-modal label.sheet-field input,
.data-modal label.sheet-field select,
.data-modal label.sheet-field textarea {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.data-modal label.sheet-field textarea {
  min-height: 68px;
}

.data-modal label.sheet-field input[readonly],
.data-modal label.sheet-field textarea[readonly] {
  background: #f7fafc;
}

.sheet-band {
  padding: 9px 12px;
  border-bottom: 1px solid #536273;
  background: #dce8f5;
  color: #213248;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.finance-table-block {
  display: grid;
  border-bottom: 1px solid #536273;
}

.business-form > .finance-table-block {
  border: 1px solid #536273;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.finance-entry-table,
.finance-statement-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.statement-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid #536273;
  background: #ffffff;
}

.balance-statement-table {
  min-width: 1060px;
}

.income-statement-table {
  min-width: 820px;
}

.statement-item-col,
.income-item-col {
  width: 19%;
}

.statement-amount-col,
.income-amount-col {
  width: 11%;
}

.statement-source-col {
  width: 20%;
}

.income-source-col {
  width: 40%;
}

.finance-entry-table th,
.finance-entry-table td,
.finance-statement-table th,
.finance-statement-table td {
  border-right: 1px solid #d8dde6;
  border-bottom: 1px solid #d8dde6;
  padding: 7px 8px;
  color: #2f3a4a;
  vertical-align: middle;
}

.finance-entry-table th,
.finance-statement-table th {
  background: #f8fafc;
  color: #253246;
  font-weight: 750;
  text-align: center;
}

.finance-statement-table .statement-section-row th,
.finance-statement-table .statement-total-row td {
  background: #e6f0fb;
  color: #172b46;
  font-weight: 800;
}

.finance-statement-table .statement-item-cell {
  color: #1f2f43;
}

.finance-statement-table .statement-item-cell span {
  display: block;
  margin-bottom: 2px;
  color: #5a6b80;
  font-size: 11px;
  line-height: 1.25;
}

.finance-statement-table .statement-item-cell strong {
  display: block;
  font-weight: 750;
  line-height: 1.35;
}

.finance-statement-table .amount-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.finance-statement-table .source-cell {
  color: #4a5b70;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.statement-form {
  gap: 14px;
}

.standard-statement-sheet {
  border-color: #1f2f43;
}

.standard-statement-sheet > h3 {
  padding: 15px 12px 10px;
  border-bottom: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
}

.standard-report-meta {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr 1fr;
  border-top: 1px solid #536273;
  border-bottom: 1px solid #536273;
  background: #ffffff;
}

.standard-report-meta span {
  min-height: 36px;
  padding: 9px 10px;
  border-right: 1px solid #536273;
  color: #243246;
  font-size: 13px;
  line-height: 1.3;
}

.standard-report-meta span:last-child {
  border-right: 0;
}

.standard-report-table {
  color: #111827;
  font-size: 12px;
}

.standard-report-table th,
.standard-report-table td {
  border-color: #536273;
  padding: 6px 7px;
}

.standard-report-table th {
  background: #dce8f5;
  color: #172b46;
  font-weight: 800;
}

.standard-report-table .report-item-cell {
  color: #111827;
  line-height: 1.35;
  word-break: break-word;
}

.standard-report-table .line-cell {
  color: #405064;
  text-align: center;
  white-space: nowrap;
}

.standard-report-table .amount-cell {
  color: #111827;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.standard-report-table .report-section-row td {
  background: #f7fbff;
  color: #172b46;
  font-weight: 800;
}

.standard-report-table .report-total-row td {
  background: #eef5fc;
  color: #111827;
  font-weight: 800;
}

.standard-report-table .report-grand-row td {
  background: #dce8f5;
  color: #111827;
  font-weight: 900;
}

.balance-statement-table {
  min-width: 1120px;
}

.balance-item-col {
  width: 22%;
}

.balance-line-col {
  width: 5%;
}

.balance-amount-col {
  width: 11.5%;
}

.income-statement-table {
  min-width: 760px;
}

.income-item-col {
  width: 52%;
}

.income-line-col {
  width: 8%;
}

.income-amount-col {
  width: 20%;
}

.report-footer-signatures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #536273;
  color: #243246;
  font-size: 13px;
}

.report-footer-signatures span {
  min-height: 42px;
  padding: 12px 10px;
  border-right: 1px solid #536273;
}

.report-footer-signatures span:last-child {
  border-right: 0;
}

.statement-actions {
  justify-content: flex-end;
}

.finance-entry-table td input {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 0;
  padding: 4px 2px;
  background: transparent;
  text-align: inherit;
}

.finance-statement-table td:nth-child(3),
.finance-statement-table td:nth-child(7),
.finance-statement-table td:nth-child(2) + td,
.finance-statement-table td:nth-child(2) {
  font-variant-numeric: tabular-nums;
}

.statement-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #536273;
}

.statement-meta span {
  min-height: 34px;
  padding: 8px 10px;
  border-right: 1px solid #d8dde6;
  color: #405064;
  font-size: 12px;
}

.approval-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.approval-flow-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 9px 12px;
  border-bottom: 1px solid #c9d5e2;
  background: #f6f9fc;
  color: #40546b;
  font-size: 11px;
}

.approval-flow-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.approval-flow-summary svg {
  color: #2f73b8;
}

.approval-flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
  background: #eef4fa;
  scrollbar-width: thin;
}

.approval-flow-node {
  flex: 1 0 220px;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid #9cb5cc;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(35, 59, 82, 0.08);
}

.approval-flow-node > header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 9px;
  border-bottom: 1px solid #b9cadb;
  background: #dce8f5;
}

.approval-node-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2f73b8;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.approval-flow-node > header strong {
  min-width: 0;
  color: #20364c;
  font-size: 13px;
}

.approval-flow-node > header em {
  padding: 3px 6px;
  border: 1px solid #88acd0;
  border-radius: 4px;
  background: #f1f7fd;
  color: #245d94;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.approval-flow-node[data-state="waiting"] > header em {
  border-color: #c4ccd5;
  background: #f5f6f8;
  color: #697787;
}

.approval-node-body {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 9px;
}

.approval-node-label {
  color: #65768a;
  font-size: 10px;
  font-weight: 700;
}

.approval-node-users {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

.approval-node-users span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid #d2dee9;
  border-radius: 4px;
  background: #f8fbfe;
  color: #344a61;
  font-size: 10px;
  line-height: 1.35;
}

.approval-flow-node > footer {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 7px;
  padding: 8px 9px;
  border-top: 1px solid #d7e0e9;
  background: #fbfcfe;
  font-size: 10px;
}

.approval-flow-node > footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #68798b;
}

.approval-flow-node > footer strong {
  color: #2e4358;
  font-weight: 700;
}

.approval-flow-connector {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  color: #2f73b8;
}

.approval-inbox-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  border-left: 3px solid #2f73b8;
}

.approval-inbox-header {
  min-height: 58px;
  background: #f7fbff;
}

.approval-inbox-header > div {
  display: grid;
  gap: 3px;
}

.approval-inbox-header h2,
.approval-inbox-header p {
  margin: 0;
}

.approval-inbox-header p {
  color: #66788b;
  font-size: 11px;
}

.approval-inbox-header > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #9ebbd7;
  border-radius: 5px;
  background: #eaf3fc;
  color: #225b91;
  font-size: 11px;
  font-weight: 800;
}

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

.approval-inbox-table {
  min-width: 960px;
}

.approval-inbox-table td:nth-child(2),
.approval-inbox-table td:nth-child(5),
.approval-inbox-table td:nth-child(6),
.approval-inbox-table td:nth-child(7),
.approval-inbox-table td:nth-child(8) {
  white-space: nowrap;
}

.approval-review-button {
  color: #185f49;
}

.approval-inbox-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 74px;
  color: #517064;
  background: #fbfdfc;
  font-size: 12px;
}

.approval-inbox-empty svg {
  color: #20a87a;
}

.approval-empty {
  min-height: 44px;
  padding: 12px 14px;
  border-bottom: 1px solid #536273;
  color: #6a3e06;
  background: #fff8e7;
  font-size: 13px;
  line-height: 1.45;
}

.approval-grid .sheet-field {
  grid-column: 1 / -1;
}

.finance-source-table td {
  white-space: normal;
  line-height: 1.45;
}

.permission-scope-table td {
  white-space: normal;
  line-height: 1.45;
}

.permission-section {
  overflow-x: auto !important;
}

.permission-table {
  min-width: 760px;
}

.approval-permission-table {
  min-width: 980px;
}

.workflow-list-table td {
  vertical-align: top;
}

.workflow-steps-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: normal;
}

.workflow-steps-cell span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #c9d8e8;
  border-radius: 5px;
  background: #f6fbff;
  color: #26364a;
  font-size: 12px;
}

.workflow-step-table {
  min-width: 760px;
}

.workflow-step-table input[data-workflow-field="approvalStep"] {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 5px 8px;
}

.permission-table th,
.permission-table td {
  text-align: center;
}

.permission-table th:first-child,
.permission-table td:first-child,
.approval-permission-table th:nth-child(-n+4),
.approval-permission-table td:nth-child(-n+4) {
  text-align: left;
}

.permission-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: center;
  gap: 5px !important;
  min-height: 24px !important;
  border: 0 !important;
  background: transparent !important;
  color: #405064 !important;
  font-size: 12px !important;
}

.permission-check > span {
  display: inline !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #405064 !important;
  font-weight: 600 !important;
}

.permission-check input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  min-height: 16px !important;
  padding: 0 !important;
  border: 1px solid #9fb1c5 !important;
  accent-color: #2f73df;
}

.permission-amount {
  min-height: 30px !important;
  padding: 4px 6px !important;
  text-align: right;
}

.finance-print-sheet {
  display: none;
}

.business-form .form-grid-4 > label:not(.sheet-field),
.business-form .line-grid > label:not(.sheet-field),
.business-form .form-section > label:not(.sheet-field),
.business-form .form-row > label:not(.sheet-field),
.business-form > label:not(.sheet-field) {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 0;
  min-height: 42px;
  border-right: 1px solid #536273;
  border-bottom: 1px solid #536273;
  background: #ffffff;
  color: #2d3642;
  font-size: 13px;
}

.business-form > label:not(.sheet-field) {
  border-left: 1px solid #536273;
  border-top: 1px solid #536273;
}

.business-form .form-grid-4 > label.contract-title-compact:not(.sheet-field) {
  grid-template-columns: 100px minmax(0, 1fr);
}

.business-form .form-grid-4 > label.sales-partner-wide:not(.sheet-field) {
  grid-template-columns: 168px minmax(0, 1fr);
}

.business-form .form-grid-4 > label:not(.sheet-field) > span,
.business-form .line-grid > label:not(.sheet-field) > span,
.business-form .form-section > label:not(.sheet-field) > span,
.business-form .form-row > label:not(.sheet-field) > span,
.business-form > label:not(.sheet-field) > span {
  display: grid;
  place-items: center;
  padding: 8px 9px;
  border-right: 1px solid #536273;
  background: #dce8f5;
  color: #213248;
  font-weight: 700;
  text-align: center;
}

.business-form .form-grid-4 > label:not(.sheet-field) input,
.business-form .form-grid-4 > label:not(.sheet-field) select,
.business-form .form-grid-4 > label:not(.sheet-field) textarea,
.business-form .line-grid > label:not(.sheet-field) input,
.business-form .line-grid > label:not(.sheet-field) select,
.business-form .line-grid > label:not(.sheet-field) textarea,
.business-form .form-section > label:not(.sheet-field) input,
.business-form .form-section > label:not(.sheet-field) select,
.business-form .form-section > label:not(.sheet-field) textarea,
.business-form .form-row > label:not(.sheet-field) input,
.business-form .form-row > label:not(.sheet-field) select,
.business-form .form-row > label:not(.sheet-field) textarea,
.business-form > label:not(.sheet-field) input,
.business-form > label:not(.sheet-field) select,
.business-form > label:not(.sheet-field) textarea {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.business-form .form-grid-4 > label.payroll-evidence-field {
  grid-template-columns: 126px minmax(0, 1fr);
}

.evidence-control {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(150px, 1.2fr);
  min-width: 0;
  background: #fff;
}

.payroll-import-document {
  grid-template-columns: minmax(0, 1fr);
}

.payroll-import-file-field .evidence-upload {
  min-height: 46px;
  padding: 7px 10px;
}

.payroll-import-file-field .evidence-file-name {
  font-size: 12px;
}

.payroll-batch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #c9d9ea;
  background: #f7fbff;
}

.payroll-batch-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  min-height: 54px;
  padding: 9px 12px;
  border-right: 1px solid #d9e5f1;
}

.payroll-batch-summary > div:last-child {
  border-right: 0;
}

.payroll-batch-summary span {
  color: #476078;
  font-size: 12px;
  font-weight: 700;
}

.payroll-batch-summary strong {
  color: #174f91;
  font-size: 20px;
  line-height: 1;
}

.payroll-batch-summary small {
  margin-left: 3px;
  color: #718096;
  font-size: 11px;
}

.payroll-batch-summary .batch-readiness {
  grid-column: 2 / 4;
  font-size: 14px;
  white-space: nowrap;
}

.empty-table-cell {
  height: 58px;
  color: var(--muted);
  text-align: center !important;
}

.business-form .form-grid-4 > label.payroll-evidence-field .evidence-control > input {
  width: 100%;
  border-right: 1px solid #d9e1ea;
  text-align: right;
}

.evidence-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 7px;
  background: #f7fbff;
}

.evidence-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #7aa6d8;
  border-radius: 4px;
  background: #eaf3ff;
  color: #174f91;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.evidence-upload-button:hover {
  border-color: #2f73b8;
  background: #dcecff;
}

.evidence-file-name {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-document-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  min-width: 0;
  border-bottom: 1px solid #536273;
  background: #ffffff;
}

.purchase-request-table-wrap {
  height: 198px;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #8fa9c3 #edf3f8;
  scrollbar-width: thin;
  border-bottom: 1px solid #536273;
  background: #ffffff;
}

.purchase-request-table-wrap::-webkit-scrollbar,
.contract-document-preview::-webkit-scrollbar,
.contract-preview-text pre::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.purchase-request-table-wrap::-webkit-scrollbar-track,
.contract-document-preview::-webkit-scrollbar-track,
.contract-preview-text pre::-webkit-scrollbar-track {
  background: #edf3f8;
}

.purchase-request-table-wrap::-webkit-scrollbar-thumb,
.contract-document-preview::-webkit-scrollbar-thumb,
.contract-preview-text pre::-webkit-scrollbar-thumb {
  border: 2px solid #edf3f8;
  border-radius: 6px;
  background: #8fa9c3;
}

.purchase-request-pick-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #2f3e4f;
  font-size: 11px;
}

.purchase-request-pick-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 34px;
  padding: 7px 8px;
  border-right: 1px solid #91a5ba;
  border-bottom: 1px solid #536273;
  background: #cbddef;
  color: #20354d;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.purchase-request-pick-table td {
  height: 42px;
  padding: 6px 8px;
  border-right: 1px solid #cbd5df;
  border-bottom: 1px solid #d7dfe8;
  background: #ffffff;
  text-align: center;
  vertical-align: middle;
}

.purchase-request-pick-table tbody tr {
  cursor: pointer;
}

.purchase-request-pick-table tbody tr:hover td {
  background: #f0f7ff;
}

.purchase-request-pick-table tbody tr.selected td {
  background: #e2f2ec;
  box-shadow: inset 0 1px #61a98d, inset 0 -1px #61a98d;
}

.purchase-request-pick-table td strong,
.purchase-request-pick-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-request-pick-table td strong {
  color: #203b59;
  font-size: 11px;
}

.purchase-request-pick-table td small {
  margin-top: 2px;
  color: #718195;
  font-size: 10px;
}

.purchase-request-pick-table .numeric-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.request-pick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #6f9dcc;
  border-radius: 4px;
  background: #e9f3fd;
  color: #18578f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-selection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  background: #eef5fc;
  color: #365b82;
  font-size: 11px;
  font-weight: 700;
}

.request-window-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.business-form .form-section-title .request-window-meta b {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #79a2c9;
  border-radius: 4px;
  background: #edf6ff;
  color: #18588f;
  font-size: 11px;
}

.business-form .form-section-title .request-window-meta i {
  overflow: hidden;
  color: #4b6077;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-request-pick-table tbody tr.selected + tr td {
  border-top-color: #61a98d;
}

.contract-document-upload {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #536273;
  background: #f7fbff;
}

.contract-document-label {
  display: grid;
  gap: 3px;
}

.contract-document-label span {
  color: #213248;
  font-size: 13px;
  font-weight: 800;
}

.contract-document-label strong {
  color: #61758a;
  font-size: 11px;
  font-weight: 600;
}

.contract-document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #2f73b8;
  border-radius: 5px;
  background: #e4f0fd;
  color: #174f91;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.contract-document-button:hover {
  border-color: #174f91;
  background: #d5e8fb;
}

.contract-document-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contract-document-meta strong,
.contract-document-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-document-meta strong {
  color: #2f4055;
  font-size: 12px;
}

.contract-document-meta span {
  color: #6f8092;
  font-size: 11px;
}

.contract-document-input {
  display: none !important;
}

.contract-document-preview {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 320px;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #8fa9c3 #edf3f8;
  scrollbar-width: thin;
  background: #eef3f8;
}

.contract-document-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #ffffff;
}

.contract-preview-text {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  background: #ffffff;
}

.contract-preview-text header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid #c8d5e3;
  background: #e7f0fa;
  color: #284967;
}

.contract-preview-text header strong {
  font-size: 12px;
}

.contract-preview-text header span {
  overflow: hidden;
  color: #63778d;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-preview-text pre {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  color: #26384a;
  font: 12px/1.75 "Microsoft YaHei", sans-serif;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.contract-preview-empty,
.contract-preview-file {
  display: grid;
  justify-items: center;
  gap: 7px;
  max-width: 360px;
  padding: 20px;
  color: #5e7185;
  text-align: center;
}

.contract-preview-empty strong,
.contract-preview-file strong {
  max-width: 100%;
  overflow: hidden;
  color: #2a4059;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-preview-empty span,
.contract-preview-file span,
.contract-preview-file small {
  color: #718398;
  font-size: 11px;
  line-height: 1.55;
}

.contract-preview-empty.is-error,
.contract-preview-empty.is-error strong {
  color: #b42318;
}

.contract-document-flow {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  padding: 7px 12px;
  border-top: 1px solid #c8d5e3;
  background: #edf5fd;
  color: #294b70;
  font-size: 11px;
  font-weight: 700;
}

.contract-document-flow span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.contract-document-flow i {
  display: inline-flex;
  color: #7a91aa;
}

.business-form .form-grid-4 > label.payroll-evidence-field .evidence-upload input[type="file"] {
  display: none !important;
}

.business-form .form-grid-4 > label.payroll-evidence-field > .evidence-status {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: flex-start;
  min-height: 26px;
  padding: 4px 9px;
  border-top: 1px solid #d9e1ea;
  border-right: 0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.evidence-status::before {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #94a3b8;
  content: '';
}

.evidence-status[data-state="reading"] {
  color: #245c9f;
}

.evidence-status[data-state="reading"]::before {
  background: #3b82f6;
  box-shadow: 0 0 0 3px #dbeafe;
}

.evidence-status[data-state="success"] {
  color: #16784b;
  background: #f1fbf6;
}

.evidence-status[data-state="success"]::before {
  background: #22a06b;
}

.evidence-status[data-state="warning"] {
  color: #9a5b08;
  background: #fffbeb;
}

.evidence-status[data-state="warning"]::before {
  background: #e69b18;
}

.evidence-status[data-state="error"] {
  color: #b42318;
  background: #fff5f5;
}

.evidence-status[data-state="error"]::before {
  background: #d92d20;
}

.business-form .form-grid-4 > label:not(.sheet-field) textarea,
.business-form .line-grid > label:not(.sheet-field) textarea,
.business-form .form-section > label:not(.sheet-field) textarea,
.business-form .form-row > label:not(.sheet-field) textarea,
.business-form > label:not(.sheet-field) textarea {
  min-height: 70px;
}

.business-form > .shared-data-strip + label:not(.sheet-field),
.business-form > label:not(.sheet-field) + label:not(.sheet-field) {
  border-top: 0;
}

.subsection-header {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.subsection-header h3 {
  margin: 0;
  font-size: 14px;
}

.subsection-header span,
.print-help {
  color: var(--muted);
  font-size: 12px;
}

.compact-subsection {
  min-height: 34px;
  background: #f5f9fb;
}

.mini-attendance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(190px, 1.35fr);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.mini-attendance-summary > div {
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.mini-attendance-summary > div:last-child { border-right: 0; }
.mini-attendance-summary span,
.mini-attendance-summary small { display: block; color: var(--muted); font-size: 12px; }
.mini-attendance-summary strong { display: block; margin-top: 5px; color: #174f69; font-size: 23px; }
.mini-attendance-summary .has-risk strong { color: #b54708; }
.mini-attendance-summary .mini-service-state strong { font-size: 15px; }
.mini-attendance-summary .mini-service-state small { margin-top: 6px; }

.mini-account-window {
  max-height: 286px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}

.mini-account-window thead { position: sticky; top: 0; z-index: 1; }
.danger-action { color: #b42318 !important; }
.mini-geofence-form { border-top: 8px solid #edf2f5; }

.mini-bind-modal { width: min(520px, calc(100vw - 32px)); }
.mini-bind-content { display: flex; flex-direction: column; align-items: center; padding: 26px; text-align: center; }
.mini-bind-trademark { width: 76px; height: 76px; object-fit: contain; }
.mini-bind-content p { margin: 14px 0 4px; color: var(--muted); }
.mini-bind-number { margin: 14px 0; padding: 10px 22px; border: 1px solid #8aa4b2; border-radius: 6px; background: #eef6f8; color: #075985; font-size: 34px; letter-spacing: 6px; }
.mini-bind-content > span { max-width: 400px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.mini-bind-content button { margin-top: 22px; }

@media (max-width: 900px) {
  .mini-attendance-summary { grid-template-columns: repeat(2, 1fr); }
  .mini-attendance-summary .mini-service-state { grid-column: 1 / -1; }
}

.document-table {
  border-bottom: 1px solid var(--line);
}

.print-title {
  display: none;
  padding: 12px;
  text-align: center;
}

.print-title h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.print-help {
  padding: 12px;
  line-height: 1.7;
}

.modal-actions {
  justify-content: flex-end;
}

.business-form .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 18px rgba(18, 34, 55, 0.05);
}

.modal-header {
  border-top: 4px solid #2f73df;
  background: #ffffff;
}

.modal-title-block {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.haohai-trademark {
  display: block;
  object-fit: contain;
}

.form-trademark {
  width: 58px;
  height: 58px;
  padding: 2px;
  border: 1px solid #dbe5ef;
  border-radius: 5px;
  background: #ffffff;
}

.modal-title-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.modal-title-block .modal-company {
  color: #355372;
  font-size: 12px;
  font-weight: 700;
}

.modal-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.modal-title-row p {
  min-width: max-content;
  padding-right: 10px;
  border-right: 1px solid #cbd8e6;
  font-size: 12px;
}

.modal-title-row h2 {
  color: #192a3d;
  font-size: 20px;
  line-height: 1.25;
}

.print-trademark-header {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 2px solid #245f91;
}

.print-trademark {
  width: 70px;
  height: 70px;
}

.print-trademark-header h1,
.print-trademark-header h2,
.print-trademark-header p {
  margin: 0 !important;
  text-align: left !important;
}

.print-trademark-header h1 {
  color: #111827;
  font-size: 19px !important;
}

.print-trademark-header h2 {
  margin-top: 4px !important;
  font-size: 16px;
}

.print-trademark-header p {
  margin-top: 5px !important;
  color: #4b5563;
  font-size: 10px;
}

.business-form label:has(input[required], select[required], textarea[required]) > span::after,
.data-modal label.sheet-field:has(input[required], select[required], textarea[required]) > span::after {
  margin-left: 4px;
  color: #cf3030;
  content: '*';
}

.business-form label:has(input:focus, select:focus, textarea:focus) {
  box-shadow: inset 0 0 0 2px rgba(47, 115, 223, 0.22);
}

.business-form input[readonly],
.business-form textarea[readonly],
.business-form select:disabled {
  background: #f1f4f7 !important;
  color: #59697a !important;
}

.form-submit-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: #5d6b7c;
  font-size: 12px;
}

.form-submit-note svg {
  color: #2f73df;
}

.settings-tabs {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.settings-grid > .module-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.settings-grid > .settings-panel {
  grid-column: 1 / -1;
}

.settings-tabs button,
.permission-tabs button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #526173;
  font-weight: 700;
  cursor: pointer;
}

.settings-tabs button:hover,
.permission-tabs button:hover {
  background: #f1f6fc;
  color: #215fae;
}

.settings-tabs button.active,
.permission-tabs button.active {
  background: #e7f1ff;
  color: #174f91;
  box-shadow: inset 0 0 0 1px #b8d3f2;
}

.settings-panel .panel-header > div {
  display: grid;
  gap: 3px;
}

.settings-panel .panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.logic-badge,
.protected-account,
.final-node-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  padding: 4px 8px;
  border: 1px solid #b8d3f2;
  border-radius: 4px;
  background: #eef6ff;
  color: #245c9f;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.permission-logic-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
  color: #526173;
  font-size: 12px;
}

.permission-logic-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.permission-logic-strip svg {
  color: #2f73df;
}

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

.user-permission-list {
  min-width: 960px;
}

.row-actions-cell {
  white-space: nowrap;
}

.password-policy {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #2f73df;
  background: #f4f8fd;
  color: #536172;
  font-size: 12px;
  line-height: 1.6;
}

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

.attendance-ledger-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.attendance-ledger-summary > div {
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid #d8e3ef;
  border-radius: 5px;
  background: #fff;
}

.attendance-ledger-summary span,
.attendance-ledger-summary strong {
  display: block;
}

.attendance-ledger-summary span {
  color: var(--muted);
  font-size: 11px;
}

.attendance-ledger-summary strong {
  margin-top: 3px;
  color: #203247;
  font-size: 20px;
}

.attendance-ledger-summary .has-risk strong {
  color: #d97706;
}

.punch-ledger-section {
  margin: 12px 14px;
}

.punch-ledger-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.punch-filter-result {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.punch-filter-result strong {
  margin: 0 4px;
  color: #215fae;
}

.attendance-detail-window {
  max-height: 360px;
  overflow: auto;
}

.attendance-detail-table {
  min-width: 1760px;
}

.attendance-detail-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 720px) {
  .attendance-ledger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .punch-ledger-filter {
    grid-template-columns: 1fr;
  }

  .punch-filter-result {
    justify-content: flex-start;
  }
}

.number-rule-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.number-rule-example strong {
  color: #174f91;
  font-family: Consolas, monospace;
  font-size: 17px;
}

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

.workflow-steps-cell span {
  gap: 6px;
}

.workflow-steps-cell b {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #2f73df;
  color: #ffffff;
  font-size: 10px;
}

.workflow-steps-cell em {
  padding-left: 5px;
  border-left: 1px solid #b8cbe0;
  color: #16784b;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.workflow-final-state {
  color: #8491a0;
  font-size: 11px;
}

.workflow-final-state.active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #16784b;
  font-weight: 700;
}

.permission-modal {
  max-height: calc(100vh - 80px);
}

.permission-user-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #cfdcea;
  border-radius: 6px;
  background: #f7faff;
}

.permission-user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #2f73df;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.permission-user-summary > div {
  display: grid;
  gap: 4px;
}

.permission-user-summary > div span,
.permission-user-summary em {
  color: #657386;
  font-size: 12px;
  font-style: normal;
}

.permission-user-summary em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.permission-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.permission-pane {
  display: none;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.permission-pane.active {
  display: block;
}

.permission-pane-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.permission-pane-header > div:first-child {
  display: grid;
  gap: 3px;
}

.permission-pane-header span {
  color: var(--muted);
  font-size: 11px;
}

.permission-presets {
  display: flex;
  gap: 6px;
}

.permission-presets button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #b9c9da;
  border-radius: 4px;
  background: #ffffff;
  color: #405064;
  font-size: 12px;
  cursor: pointer;
}

.permission-presets button:hover {
  border-color: #75a3d7;
  background: #eef6ff;
  color: #174f91;
}

.permission-pane .permission-section {
  max-height: 390px;
  overflow: auto !important;
}

.permission-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e5eef8;
}

.permission-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: #8a97a5;
  font-size: 10px;
  font-weight: 500;
}

.permission-disabled {
  background: #f5f7f9;
}

.permission-disabled .permission-check,
.permission-disabled .permission-check > span {
  color: #a0a9b3 !important;
}

.approval-permission-table td:nth-child(4) strong {
  margin-right: 6px;
}

.final-node-tag {
  padding: 2px 5px;
  border-color: #b9dec9;
  background: #f0faf4;
  color: #16784b;
}

.not-applicable {
  color: #98a3af;
  font-size: 12px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-permission-note {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #d8e0e9;
  border-radius: 5px;
  background: #f6f8fa;
  color: #657386;
  font-size: 12px;
}

.drawer-permission-note.allowed {
  border-color: #b9dec9;
  background: #f0faf4;
  color: #16784b;
}

.danger-action {
  border-color: #e6b8b8 !important;
  color: #b42318 !important;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
  z-index: 80;
}

.toast {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 14px;
  background: #172838;
  color: white;
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

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

  .sidebar span {
    display: none;
  }

  .nav-item,
  .collapse-action {
    grid-template-columns: 1fr;
  }

  .submenu-list {
    left: 74px;
    display: none;
  }

  .nav-group:hover .submenu-list {
    display: grid;
  }

  .submenu-list span {
    display: inline;
  }

  .submenu-section {
    display: block;
  }

  .filterbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filterbar .page-copy {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .content-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip,
  .module-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .module-business-item:nth-child(2) {
    border-right: 0;
  }

  .module-business-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .orders-panel,
  .hr-panel,
  .cash-panel,
  .announcement-panel,
  .module-side {
    grid-column: 1;
  }

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

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

@media (max-width: 900px) {
  .topbar {
    padding: 0 12px 0 18px;
  }

  .brand {
    max-width: 290px;
    font-size: 16px;
    line-height: 1.3;
  }

  .top-actions {
    gap: 5px;
  }

  .user-menu > span:not(.avatar),
  .user-menu em,
  .top-actions > [data-action="help"] {
    display: none;
  }

  .settings-grid > .module-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .permission-user-summary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .permission-user-summary em {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .module-grid {
    padding: 8px 10px 16px;
  }

  .module-command,
  .module-command:not(:has(.module-actions)) {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
  }

  .module-brandmark,
  .module-trademark {
    width: 44px;
    height: 44px;
  }

  .module-icon {
    width: 20px;
    height: 20px;
  }

  .module-command-copy > span {
    font-size: 9px;
  }

  .module-command h2 {
    font-size: 16px;
  }

  .module-command p {
    white-space: normal;
  }

  .module-command .module-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .module-stats {
    gap: 6px;
  }

  .report-query-form {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .report-keyword-group {
    grid-column: 1;
  }

  .report-keyword-list {
    grid-template-columns: 1fr;
  }

  .report-query-button {
    width: 100%;
    justify-content: center;
  }

  .stat-tile {
    min-height: 58px;
    padding: 8px 10px;
  }

  .stat-tile strong {
    font-size: 18px;
  }

  .data-modal,
  .wide-modal {
    top: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .data-modal .modal-header {
    padding: 10px 12px;
  }

  .data-modal form.business-form {
    padding-right: 10px;
    padding-left: 10px;
  }

  .business-form .modal-actions {
    margin-right: -10px;
    margin-left: -10px;
    padding: 10px;
  }

  .modal-title-block {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 9px;
  }

  .form-trademark {
    width: 48px;
    height: 48px;
  }

  .modal-title-row {
    display: grid;
    gap: 2px;
  }

  .modal-title-row p {
    min-width: 0;
    padding-right: 0;
    border-right: 0;
  }

  .modal-title-row h2 {
    font-size: 17px;
  }

  .modal-title-block .modal-company {
    font-size: 10px;
  }

  .form-grid-4,
  .line-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }

  .form-section-title {
    display: grid;
  }

  .request-window-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .contract-document-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-document-upload {
    border-right: 0;
    border-bottom: 1px solid #536273;
  }

  .contract-document-preview {
    height: 260px;
  }

  .contract-document-flow {
    grid-column: 1;
    flex-wrap: wrap;
    gap: 6px 9px;
  }

  .evidence-control {
    grid-template-columns: 1fr;
  }

  .business-form .form-grid-4 > label.payroll-evidence-field .evidence-control > input {
    border-right: 0;
    border-bottom: 1px solid #d9e1ea;
  }

  .evidence-upload {
    min-height: 42px;
  }

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

  .payroll-batch-summary > div:nth-child(2) {
    border-right: 0;
  }

  .payroll-batch-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #d9e5f1;
  }

  .module-business-heading {
    align-items: flex-start;
  }

  .module-business-groups {
    grid-template-columns: 1fr;
  }

  .module-business-item,
  .module-business-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .module-business-item:last-child {
    border-bottom: 0;
  }
}

@media print {
  body {
    min-width: 0;
    background: white;
  }

  body.printing-payroll .app-shell {
    display: none !important;
  }

  body.printing-finance .app-shell {
    display: none !important;
  }

  body.printing-finance .finance-print-sheet {
    display: block !important;
    padding: 16px;
    color: #111827;
    font-size: 12px;
  }

  body.printing-finance .finance-print-sheet h1 {
    margin: 0 0 6px;
    text-align: center;
    font-size: 22px;
  }

  body.printing-finance .finance-print-sheet > p {
    margin: 0 0 12px;
    text-align: right;
  }

  body.printing-finance .finance-sheet {
    border-color: #111827;
  }

  body.printing-finance .statement-table-wrap {
    overflow: visible;
    border-color: #111827;
  }

  body.printing-finance .balance-statement-table,
  body.printing-finance .income-statement-table {
    min-width: 0;
    width: 100%;
    font-size: 10px;
  }

  body.printing-finance .finance-statement-table th,
  body.printing-finance .finance-statement-table td {
    padding: 5px 6px;
    line-height: 1.3;
  }

  body.printing-finance .finance-statement-table .statement-item-cell span {
    font-size: 9px;
  }

  body.printing-finance .finance-statement-table .amount-cell {
    text-align: right;
    white-space: nowrap;
  }

  body.printing-finance .standard-statement-sheet > h3 {
    padding: 8px 8px 6px;
    font-size: 20px;
  }

  body.printing-finance .standard-report-meta {
    grid-template-columns: 1.25fr 1fr 0.7fr 1fr;
    border-color: #111827;
  }

  body.printing-finance .standard-report-meta span,
  body.printing-finance .report-footer-signatures span {
    border-color: #111827;
    padding: 6px 8px;
    min-height: 30px;
    font-size: 10px;
  }

  body.printing-finance .report-footer-signatures {
    border-color: #111827;
    font-size: 10px;
  }

  body.printing-finance .standard-report-table {
    font-size: 9.5px;
  }

  body.printing-finance .sheet-field,
  body.printing-finance .finance-entry-table th,
  body.printing-finance .finance-entry-table td,
  body.printing-finance .finance-statement-table th,
  body.printing-finance .finance-statement-table td,
  body.printing-finance .sheet-band {
    border-color: #111827 !important;
  }

  body.printing-finance .sheet-field > span,
  body.printing-finance .sheet-band,
  body.printing-finance .finance-entry-table th,
  body.printing-finance .finance-statement-table th {
    background: #e8eef5 !important;
  }

  body.printing-finance .print-value {
    display: block;
    padding: 8px 10px;
    min-height: 36px;
  }

  body.printing-payroll .payroll-print-sheet {
    display: block !important;
    padding: 18px;
    color: #111827;
    font-size: 12px;
  }

  body.printing-payroll .payroll-print-sheet h1 {
    margin: 0 0 6px;
    text-align: center;
    font-size: 22px;
  }

  body.printing-payroll .payroll-print-sheet p {
    margin: 0 0 12px;
    text-align: right;
  }

  body.printing-payroll .payroll-print-sheet section {
    break-inside: avoid;
    margin: 0 0 12px;
  }

  body.printing-payroll .payroll-print-sheet h3 {
    margin: 0;
    padding: 7px 8px;
    border: 1px solid #111827;
    border-bottom: 0;
    font-size: 14px;
  }

  body.printing-payroll .payroll-print-sheet table {
    width: 100%;
    border-collapse: collapse;
  }

  body.printing-payroll .payroll-print-sheet th,
  body.printing-payroll .payroll-print-sheet td {
    border: 1px solid #111827;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
  }

  body.printing-payroll .payroll-print-sheet th {
    width: 24%;
    background: #f1f5f9;
  }

  body.printing-payroll .payroll-print-sheet footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
  }

  .sidebar,
  .topbar,
  .filterbar,
  .module-command,
  .module-stats,
  .module-side,
  .panel-header,
  .no-print,
  .toast-stack,
  .drawer-actions,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .module-grid,
  .content-grid {
    display: block;
    padding: 0;
    margin: 0;
  }

  .panel,
  .module-table-panel {
    border: 0;
    box-shadow: none;
  }

  .print-title {
    display: block;
  }

  .data-table {
    font-size: 11px;
  }
}

/* Cost accounting models */
.cost-accounting-modal {
  width: min(1480px, 96vw);
  max-height: 95vh;
}

.cost-accounting-modal .business-form {
  gap: 14px;
}

.cost-accounting-modal [hidden] {
  display: none !important;
}

.cost-center-hero {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(250px, auto);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid #bdd1e4;
  border-radius: 9px;
  background:
    radial-gradient(circle at 92% 18%, rgb(81 142 199 / 14%), transparent 25%),
    linear-gradient(135deg, #f7fbff 0%, #edf5fc 100%);
}

.cost-accounting-modal[data-cost-view="procurement"] .cost-center-hero {
  border-color: #b7d7cc;
  background: linear-gradient(135deg, #f7fcfa 0%, #edf8f4 100%);
}

.cost-accounting-modal[data-cost-view="sensitivity"] .cost-center-hero {
  border-color: #c9c0e6;
  background:
    radial-gradient(circle at 92% 18%, rgb(110 83 184 / 14%), transparent 25%),
    linear-gradient(135deg, #fbfaff 0%, #f2effb 100%);
}

.cost-center-hero-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #236da8, #164d7b);
  box-shadow: 0 7px 15px rgb(28 88 137 / 22%);
}

[data-cost-view="procurement"] .cost-center-hero-icon {
  background: linear-gradient(145deg, #29866d, #17614f);
}

[data-cost-view="sensitivity"] .cost-center-hero-icon {
  background: linear-gradient(145deg, #7561b8, #56409a);
}

.cost-center-hero > div:nth-child(2) > span {
  color: #4b718f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.cost-center-hero h3 {
  margin: 3px 0 4px;
  color: #173f62;
  font-size: 18px;
}

.cost-center-hero p {
  margin: 0;
  color: #60798e;
  font-size: 12px;
  line-height: 1.6;
}

.cost-center-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cost-center-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgb(116 153 185 / 35%);
  border-radius: 999px;
  color: #40627d;
  background: rgb(255 255 255 / 72%);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.cost-accounting-modal[data-cost-view="production"] .cost-smm-sensitivity {
  display: none;
}

.cost-accounting-modal[data-cost-view="sensitivity"] [data-cost-section="workshop"],
.cost-accounting-modal[data-cost-view="sensitivity"] .cost-model-logic-strip[data-cost-panel="production"],
.cost-accounting-modal[data-cost-view="sensitivity"] .cost-history-section,
.cost-accounting-modal[data-cost-view="sensitivity"] .cost-results-section > .cost-ore-balance,
.cost-accounting-modal[data-cost-view="sensitivity"] .cost-results-section > .cost-steam-balance,
.cost-accounting-modal[data-cost-view="sensitivity"] .cost-results-section > .cost-dynamic-metrics {
  display: none;
}

.cost-accounting-modal[data-cost-view="sensitivity"] .cost-results-section {
  border-color: #c9c0e6;
  background: linear-gradient(180deg, #fbfaff 0, #fff 90px);
}

.cost-accounting-modal[data-cost-view="sensitivity"] .cost-results-section::before {
  background: #6e56b2;
}

.cost-model-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid #cbd8e8;
  background: #eef3f8;
  border-radius: 8px;
}

.cost-model-tabs button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  text-align: left;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cost-model-tabs button svg {
  grid-row: 1 / span 2;
}

.cost-model-tabs button small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.cost-model-tabs button.active {
  border-color: #8fb5dd;
  color: #0d4f8b;
  background: #fff;
  box-shadow: 0 2px 6px rgb(15 56 92 / 10%);
}

.cost-model-tabs button[data-mode="procurement"].active {
  border-color: #75b5a2;
  color: #176b57;
}

.cost-model-logic-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cost-model-logic-strip span {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #c7d8eb;
  border-radius: 6px;
  color: #225b8d;
  background: #f3f8fd;
  font-size: 12px;
  font-weight: 700;
}

.procurement-logic-strip span {
  border-color: #b9d9cf;
  color: #176b57;
  background: #f0f8f5;
}

.cost-basis-grid,
.cost-price-grid,
.cost-fixed-grid,
.cost-procurement-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cost-accounting-modal .form-grid label > span small {
  display: block;
  margin-top: 2px;
  color: #52718d;
  font-size: 10px;
  font-weight: 500;
}

.cost-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.cost-input-unit input {
  min-width: 0;
  border-radius: 5px 0 0 5px !important;
}

.cost-input-unit em {
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #b9cce0;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  color: #48647d;
  background: #edf4fa;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.production-cost-readonly [data-cost-panel="production"] input[readonly],
.production-cost-readonly [data-cost-panel="production"] select {
  color: #38566f;
  border-color: #c7d6e3;
  background: #f1f5f8;
  cursor: default;
}

.production-cost-readonly [data-cost-panel="production"] select {
  pointer-events: none;
}

.cost-date-section {
  border-color: #9fc5e3 !important;
  background: linear-gradient(180deg, #f5fbff 0, #fff 110px) !important;
}

.cost-date-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

.cost-range-mode {
  display: inline-flex;
  align-self: stretch;
  padding: 4px;
  border: 1px solid #b8cbdb;
  border-radius: 7px;
  background: #eaf2f8;
}

.cost-range-mode button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 108px;
  border: 0;
  border-radius: 5px;
  color: #4c667c;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.cost-range-mode button.active {
  color: #0d5b93;
  background: #fff;
  box-shadow: 0 2px 7px rgb(26 78 118 / 14%);
}

.cost-date-status {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  align-content: center;
  padding: 8px 12px;
  border: 1px solid #b7d3e8;
  border-radius: 7px;
  color: #285b82;
  background: #edf7fd;
}

.cost-date-status span,
.cost-date-status small {
  font-size: 10px;
}

.cost-date-status strong {
  font-size: 12px;
}

.cost-date-status small {
  grid-column: 2;
  color: #668299;
}

.cost-exclusion-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #efc786;
  border-left: 3px solid #db8a24;
  border-radius: 6px;
  color: #805315;
  background: #fff8eb;
}

.cost-exclusion-note strong,
.cost-exclusion-note span {
  display: block;
}

.cost-exclusion-note strong { font-size: 12px; }
.cost-exclusion-note span { margin-top: 2px; font-size: 11px; }

.cost-period-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.cost-period-summary article {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #b9d8cd;
  border-radius: 7px;
  color: #22604f;
  background: #f1faf7;
}

.cost-period-summary span,
.cost-period-summary strong { display: block; }
.cost-period-summary span { color: #658078; font-size: 10px; }
.cost-period-summary strong { margin-top: 3px; font-size: 14px; }

.cost-mix-section {
  border-color: #a9d3c3 !important;
  background: linear-gradient(180deg, #f2fbf7 0, #fff 130px) !important;
}

.cost-mix-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.cost-mix-summary article {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid #b8dbce;
  border-radius: 7px;
  color: #1c6650;
  background: #fff;
}

.cost-mix-summary span,
.cost-mix-summary strong { display: block; }
.cost-mix-summary span { color: #6a827a; font-size: 10px; }
.cost-mix-summary strong { margin-top: 3px; font-size: 13px; }

.cost-mix-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  padding: 9px 11px;
  border: 1px solid #b8cee1;
  border-left: 3px solid #2b78b3;
  border-radius: 6px;
  color: #245a83;
  background: #f1f7fc;
  font-size: 11px;
  font-weight: 650;
}

.cost-mix-status[data-state="ready"] {
  border-color: #a7d5c4;
  border-left-color: #21866b;
  color: #17664f;
  background: #eff9f5;
}

.cost-mix-status[data-state="warning"],
.cost-mix-status[data-state="error"] {
  border-color: #efc786;
  border-left-color: #d9851d;
  color: #805315;
  background: #fff8eb;
}

.cost-mix-table {
  min-width: 1480px;
}

.cost-mix-table td:nth-child(3),
.cost-mix-table td:nth-child(4) {
  white-space: nowrap;
}

.cost-workshop-ledger-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 12px 0 7px;
  color: #315f52;
  font-size: 11px;
}

.cost-workshop-ledger-title span {
  color: #6a827a;
  font-size: 10px;
}

.cost-workshop-ledger-table {
  min-width: 1240px;
}

.cost-workshop-ledger-table td:first-child,
.cost-workshop-ledger-table td:nth-child(2) {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .cost-date-toolbar { grid-template-columns: 1fr 1fr; }
  .cost-period-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-mix-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .cost-date-toolbar,
  .cost-period-summary,
  .cost-mix-summary { grid-template-columns: 1fr; }
  .cost-range-mode button { flex: 1; }
}

.independent-model-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border-left: 3px solid #22866c;
  color: #245c4f;
  background: #edf8f4;
  font-size: 12px;
  font-weight: 650;
}

.futures-quote-status {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #b8cee1;
  border-left: 3px solid #2b78b3;
  border-radius: 6px;
  color: #245a83;
  background: #f1f7fc;
}

.futures-quote-status > div {
  min-width: 0;
}

.futures-quote-status strong,
.futures-quote-status span {
  display: block;
}

.futures-quote-status strong {
  font-size: 12px;
}

.futures-quote-status span {
  margin-top: 2px;
  overflow: hidden;
  color: #58758d;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.futures-quote-status[data-state="ready"] {
  border-color: #9bc9b9;
  border-left-color: #21866b;
  color: #17664f;
  background: #eff9f5;
}

.futures-quote-status[data-state="warning"] {
  border-color: #e0c27c;
  border-left-color: #c58b16;
  color: #7a5510;
  background: #fff9eb;
}

.futures-quote-status[data-state="error"] {
  border-color: #e1a6a6;
  border-left-color: #bd4545;
  color: #8d2929;
  background: #fff3f3;
}

.cost-result-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cost-result-cards article {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #c7d7e8;
  border-radius: 6px;
  background: #f8fbfe;
}

.cost-result-cards article:nth-child(2),
.cost-result-cards article:nth-child(6) {
  border-color: #b8d7cc;
  background: #f3faf7;
}

.cost-result-cards span {
  display: block;
  margin-bottom: 5px;
  color: #5b7085;
  font-size: 11px;
}

.cost-result-cards strong {
  display: block;
  overflow: hidden;
  color: #123f67;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procurement-result-cards strong {
  color: #155e4d;
}

.cost-dynamic-metrics {
  margin-bottom: 10px;
  border: 1px solid #c8d9e9;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.cost-market-pricing,
.cost-ore-balance,
.cost-steam-balance {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #b9d4c9;
  border-radius: 6px;
  background: #fff;
}

.cost-market-pricing .cost-dynamic-heading {
  color: #245c4f;
  background: #edf8f4;
}

.cost-ore-balance {
  border-color: #b9d2e7;
}

.cost-ore-balance .cost-dynamic-heading {
  color: #275b83;
  background: #eef5fb;
}

.cost-steam-balance {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #c8d9e9;
  border-radius: 6px;
  background: #fff;
}

.cost-steam-balance .cost-dynamic-heading {
  color: #315f6d;
  background: #eef7f8;
}

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

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

.cost-market-cards article,
.cost-ore-cards article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 10px 11px;
  border-right: 1px solid #dce6ef;
}

.cost-steam-cards article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 10px 11px;
  border-right: 1px solid #dce6ef;
}

.cost-steam-cards article:last-child {
  border-right: 0;
}

.cost-steam-cards .cost-metric-icon {
  color: #2d7188;
  background: #e7f3f6;
}

.cost-market-cards article:last-child,
.cost-ore-cards article:last-child {
  border-right: 0;
}

.cost-market-cards .cost-metric-icon {
  color: #1e755f;
  background: #e7f4ef;
}

.cost-ore-cards .cost-metric-icon {
  color: #2469a6;
  background: #e7f1fa;
}

.cost-market-cards span,
.cost-ore-cards span,
.cost-steam-cards span {
  display: block;
  color: #557469;
  font-size: 11px;
}

.cost-market-cards strong,
.cost-ore-cards strong,
.cost-steam-cards strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #145542;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-ore-cards strong {
  color: #174f7c;
}

.cost-dynamic-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 7px 11px;
  color: #315f7c;
  background: #eef5fa;
}

.cost-dynamic-heading strong {
  font-size: 13px;
}

.cost-dynamic-heading span {
  color: #647f93;
  font-size: 11px;
}

.cost-utility-cards,
.cost-fixed-cards {
  display: grid;
  gap: 0;
}

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

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

.cost-utility-cards article,
.cost-fixed-cards article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 92px;
  padding: 10px 11px;
  border-right: 1px solid #dce6ef;
}

.cost-utility-cards article:last-child,
.cost-fixed-cards article:last-child {
  border-right: 0;
}

.cost-metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: #17659c;
  background: #e7f2fa;
}

.cost-fixed-metrics .cost-dynamic-heading {
  color: #3f6274;
  background: #eff4f6;
}

.cost-fixed-metrics .cost-metric-icon {
  color: #345f75;
  background: #e9f0f4;
}

.cost-utility-cards span,
.cost-fixed-cards span {
  display: block;
  color: #556d82;
  font-size: 11px;
}

.cost-utility-cards strong,
.cost-fixed-cards strong {
  display: block;
  margin: 3px 0;
  overflow: hidden;
  color: #123f67;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-utility-cards small,
.cost-fixed-cards small,
.cost-utility-cards em {
  display: block;
  color: #687f91;
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.cost-utility-cards em {
  color: #8a9baa;
}

.cost-workshop-utility-scroll {
  max-height: 255px;
  border-width: 1px 0 0;
}

.cost-workshop-utility-table {
  min-width: 980px;
}

.cost-workshop-utility-table th,
.cost-workshop-utility-table td {
  padding: 8px 9px;
  text-align: right;
  white-space: nowrap;
}

.cost-workshop-utility-table th:first-child,
.cost-workshop-utility-table td:first-child {
  text-align: left;
}

.cost-workshop-utility-table tbody td:last-child,
.cost-workshop-utility-table tfoot th:last-child {
  color: #145f4b;
  background: #edf8f4;
}

.cost-risk-banner {
  display: grid;
  grid-template-columns: 20px auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #a8d3c2;
  border-radius: 6px;
  color: #205b4b;
  background: #eff9f5;
  font-size: 12px;
}

.cost-risk-banner[data-level="warning"] {
  border-color: #e3c277;
  color: #7a5510;
  background: #fff9eb;
}

.cost-risk-banner[data-level="danger"] {
  border-color: #e7a0a0;
  color: #8d2929;
  background: #fff3f3;
}

.cost-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 10px;
  align-items: start;
}

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

.cost-table-scroll,
.cost-history-scroll {
  max-height: 315px;
  overflow: auto;
  border: 1px solid #d8e1ea;
}

.cost-table-scroll .finance-entry-table,
.cost-history-scroll .data-table {
  border: 0;
}

.cost-table-scroll thead th,
.cost-history-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.procurement-mix-input-table,
.procurement-mix-result-table,
.cost-full-table,
.actual-sensitivity-table {
  min-width: 980px;
}

.procurement-mix-input-table input {
  width: 100%;
  min-width: 120px;
  padding: 8px 9px;
  border: 1px solid #c8d6e4;
  border-radius: 6px;
  color: #17334d;
  background: #fff;
  font: inherit;
  text-align: right;
}

.procurement-mix-input-table td:nth-child(2) input {
  text-align: left;
}

.procurement-mix-input-table th:first-child,
.procurement-mix-input-table td:first-child,
.procurement-mix-input-table th:last-child,
.procurement-mix-input-table td:last-child {
  width: 64px;
  text-align: center;
}

.purchase-combination-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.purchase-combination-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.purchase-combination-head strong {
  color: #183e61;
  font-size: 14px;
}

.purchase-combination-head span,
.purchase-input-help {
  color: #62788b;
  font-size: 12px;
}

.purchase-row-index {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2876b7;
  font-size: 12px;
  font-weight: 800;
}

.purchase-remove-button {
  width: 30px;
  height: 30px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  color: #a13b3b;
  background: #fff;
}

.purchase-remove-button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.purchase-input-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
}

.purchase-input-help span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cost-full-table .cost-fixed-row td {
  background: #f8fbfd;
}

.cost-category-tag {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #155b7a;
  background: #e7f4fa;
  font-size: 11px;
  font-weight: 700;
}

.cost-category-tag.fixed {
  color: #725016;
  background: #fff1cf;
}

.cost-sales-summary-row th {
  color: #183e61;
  background: #eaf3fb;
  line-height: 1.6;
}

.actual-sensitivity-table .active-scenario td {
  background: #eaf7f2;
  box-shadow: inset 0 1px #9ccdbb, inset 0 -1px #9ccdbb;
}

.cost-scenario-table {
  min-width: 1900px;
  table-layout: fixed;
}

.cost-scenario-table .cost-col-grade { width: 82px; }
.cost-scenario-table .cost-col-spec { width: 240px; }
.cost-scenario-table .cost-col-quote { width: 120px; }
.cost-scenario-table .cost-col-method { width: 220px; }
.cost-scenario-table .cost-col-price { width: 118px; }
.cost-scenario-table .cost-col-rate { width: 86px; }
.cost-scenario-table .cost-col-consumption { width: 105px; }
.cost-scenario-table .cost-col-output { width: 105px; }
.cost-scenario-table .cost-col-money { width: 125px; }
.cost-scenario-table .cost-col-annual-profit { width: 138px; }
.cost-scenario-table .cost-col-status { width: 150px; }

.cost-scenario-table th,
.cost-scenario-table td {
  padding: 9px 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.cost-scenario-table td:not(:nth-child(2)):not(:nth-child(4)) {
  text-align: right;
}

.cost-scenario-table th:last-child,
.cost-scenario-table td:last-child {
  text-align: center;
}

.cost-scenario-scroll {
  max-height: 420px;
}

.cost-production-table {
  min-width: 1280px;
}

.cost-production-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid #d9e6ef;
  color: #557186;
  background: #f8fbfd;
  font-size: 11px;
}

.cost-production-note strong {
  color: #315f7c;
  white-space: nowrap;
}

.cost-production-table td:nth-child(3),
.cost-production-table td:nth-child(5),
.cost-production-table td:nth-child(6),
.cost-production-table td:nth-child(7),
.cost-production-table th:nth-child(3),
.cost-production-table th:nth-child(5),
.cost-production-table th:nth-child(6),
.cost-production-table th:nth-child(7) {
  text-align: right;
  white-space: nowrap;
}

.cost-production-table tfoot th {
  color: #174f40;
  background: #eaf7f1;
}

.cost-balance-positive {
  color: #17664f !important;
}

.cost-balance-negative {
  color: #b33a3a !important;
}

.cost-smm-sensitivity .sheet-band {
  border-bottom-color: #cbdde9;
  color: #315f7c;
  background: #eef5fa;
}

.cost-smm-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #d9e6ef;
  color: #557186;
  background: #f8fbfd;
  font-size: 11px;
}

.cost-smm-note strong {
  color: #315f7c;
  white-space: nowrap;
}

.cost-smm-note span {
  min-width: 260px;
  flex: 1 1 620px;
  line-height: 1.55;
}

.cost-smm-note a {
  color: #2469a6;
  font-weight: 700;
  white-space: nowrap;
}

.cost-sensitivity-chart {
  min-width: 0;
  padding: 12px 14px 8px;
  overflow: hidden;
  border-bottom: 1px solid #d9e6ef;
  background: #ffffff;
}

.cost-sensitivity-chart-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 6px;
  color: #315f7c;
}

.cost-sensitivity-chart-head span {
  color: #718699;
  font-size: 11px;
}

[data-cost-sensitivity-chart],
[data-smm-profit-chart],
[data-purchase-sensitivity-chart] {
  min-width: 0;
  width: 100%;
}

.cost-sensitivity-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 330px;
  overflow: visible;
}

.cost-chart-grid line {
  stroke: #dce6ee;
  stroke-width: 1;
}

.cost-chart-grid text,
.cost-chart-grade,
.cost-chart-axis-label,
.cost-chart-zero-label {
  fill: #667d90;
  font-size: 11px;
}

.cost-chart-line {
  fill: none;
  stroke: #2d77ad;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cost-chart-zero {
  stroke: #8ba0b2;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.cost-chart-point circle {
  stroke: #ffffff;
  stroke-width: 2;
}

.cost-chart-point.is-positive circle {
  fill: #1f8a63;
}

.cost-chart-point.is-negative circle {
  fill: #c14b4b;
}

.cost-chart-point.is-base circle {
  fill: #1f8a63;
  stroke: #d7f3e8;
  stroke-width: 4;
}

.procurement-sensitivity-svg .cost-chart-point circle {
  fill: #2d77ad;
}

.procurement-sensitivity-svg .cost-chart-point.is-base circle {
  fill: #1f8a63;
  stroke: #d7f3e8;
  stroke-width: 4;
}

.purchase-joint-sensitivity-table {
  min-width: 1550px;
}

.purchase-joint-sensitivity-table td:not(:nth-child(2)),
.purchase-joint-sensitivity-table th:not(:nth-child(2)) {
  white-space: nowrap;
}

.purchase-grade-combination {
  min-width: 300px;
  color: #4d687d;
  line-height: 1.55;
}

.cost-chart-value {
  fill: #31475a;
  font-size: 11px;
  font-weight: 700;
}

.cost-smm-method {
  text-align: left !important;
  color: #4d687d;
}

.cost-smm-spec,
.cost-smm-invoice {
  text-align: left !important;
}

.cost-smm-spec strong,
.cost-smm-spec small,
.cost-smm-invoice strong,
.cost-smm-invoice small {
  display: block;
}

.cost-smm-spec small,
.cost-smm-invoice small {
  margin-top: 3px;
  color: #718699;
  font-size: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cost-smm-invoice {
  color: #17664f;
  background: #f1faf6 !important;
}

.active-scenario td {
  background: #eaf4fd !important;
  box-shadow: inset 0 1px #8eb9df, inset 0 -1px #8eb9df;
}

.smm-decision-modal .smm-parameter-grid {
  border-bottom: 1px solid #d8e0e9;
}

.smm-decision-modal .futures-quote-status,
.smm-decision-modal .cost-result-cards,
.smm-decision-modal .cost-risk-banner,
.smm-decision-modal .purchase-combination-head {
  margin-right: 12px;
  margin-left: 12px;
}

.smm-decision-modal .futures-quote-status,
.smm-decision-modal .purchase-combination-head {
  margin-bottom: 10px;
}

.smm-profit-cards {
  grid-template-columns: repeat(7,minmax(0,1fr));
}

.smm-profit-cards article:nth-child(5),
.smm-profit-cards article:nth-child(7) {
  border-color: #b8d7cc;
  background: #f3faf7;
}

.smm-profit-table {
  min-width: 1320px;
}

.smm-cost-table {
  min-width: 1540px;
}

.smm-availability-table {
  min-width: 850px;
}

.smm-plan-table {
  min-width: 1240px;
}

.smm-priority-table {
  min-width: 1880px;
}

.smm-plan-cards {
  grid-template-columns: repeat(5,minmax(0,1fr));
}

.smm-math-proof {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 9px;
  align-items: start;
  margin: 0 12px 10px;
  padding: 10px 12px;
  border: 1px solid #b9cfe3;
  border-left: 3px solid #316f9f;
  border-radius: 6px;
  color: #285d83;
  background: #f1f7fc;
}

.smm-math-proof strong,
.smm-math-proof span {
  display: block;
}

.smm-math-proof strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.smm-math-proof span {
  color: #58758d;
  font-size: 11px;
  line-height: 1.65;
}

.smm-priority-heading,
.smm-best-detail-heading {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #d9e6ef;
}

.smm-combination-cell {
  min-width: 300px;
  text-align: left !important;
  white-space: normal !important;
}

.smm-combination-cell strong,
.smm-combination-cell small {
  display: block;
}

.smm-combination-cell small {
  margin-top: 4px;
  color: #718699;
  font-size: 10px;
}

.smm-second-priority td {
  background: #f2f8fd;
  box-shadow: inset 0 1px #bfd7ea,inset 0 -1px #bfd7ea;
}

.smm-profit-table td:not(:nth-child(2)),
.smm-cost-table td:not(:nth-child(2)):not(:nth-child(4)),
.smm-plan-table td:not(:nth-child(2)) {
  text-align: right;
  white-space: nowrap;
}

.smm-priority-table td:not(:nth-child(2)) {
  text-align: right;
  white-space: nowrap;
}

.smm-priority-table th:first-child,
.smm-priority-table td:first-child,
.smm-priority-table th:last-child,
.smm-priority-table td:last-child {
  text-align: center;
}

.smm-profit-table th:last-child,
.smm-profit-table td:last-child,
.smm-cost-table th:last-child,
.smm-cost-table td:last-child,
.smm-plan-table th:first-child,
.smm-plan-table td:first-child,
.smm-plan-table th:last-child,
.smm-plan-table td:last-child {
  text-align: center;
}

.smm-availability-table .cost-input-unit {
  min-width: 190px;
}

.table-cell-note {
  margin-left: 4px;
  color: #718699;
  font-size: 10px;
}

.cost-history-scroll {
  max-height: 230px;
}

@media (max-width: 1100px) {
  .cost-center-hero {
    grid-template-columns: 46px minmax(0, 1fr);
  }

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

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

  .cost-center-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .cost-basis-grid,
  .cost-price-grid,
  .cost-fixed-grid,
  .cost-procurement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .cost-market-cards article:nth-child(2),
  .cost-ore-cards article:nth-child(2),
  .cost-steam-cards article:nth-child(2) {
    border-right: 0;
  }

  .cost-market-cards article:nth-child(n + 3),
  .cost-ore-cards article:nth-child(n + 3),
  .cost-steam-cards article:nth-child(n + 3) {
    border-top: 1px solid #dce6ef;
  }

  .cost-fixed-cards article:nth-child(3) {
    border-right: 0;
  }

  .cost-fixed-cards article:nth-child(n + 4) {
    border-top: 1px solid #dce6ef;
  }

  .cost-output-grid,
  .procurement-output-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .cost-center-hero {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 13px;
  }

  .cost-center-hero-icon {
    width: 38px;
    height: 38px;
  }

  .cost-center-hero h3 {
    font-size: 16px;
  }

  .cost-accounting-modal .business-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .cost-accounting-modal .business-form > *,
  .cost-accounting-modal .form-section,
  .cost-accounting-modal .form-grid,
  .cost-accounting-modal .finance-table-block {
    min-width: 0;
    max-width: 100%;
  }

  .cost-accounting-modal .shared-data-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cost-accounting-modal .shared-data-strip strong {
    min-width: 0;
    flex: 1 1 100%;
    line-height: 1.5;
  }

  .cost-accounting-modal .modal-actions {
    width: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-accounting-modal .modal-actions .form-submit-note,
  .cost-accounting-modal .modal-actions .primary-button {
    grid-column: 1 / -1;
  }

  .cost-accounting-modal .modal-actions button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .cost-model-tabs,
  .cost-model-logic-strip,
  .cost-basis-grid,
  .cost-price-grid,
  .cost-fixed-grid,
  .cost-procurement-grid,
  .cost-result-cards,
  .cost-market-cards,
  .cost-ore-cards,
  .cost-steam-cards,
  .cost-utility-cards,
  .cost-fixed-cards {
    grid-template-columns: 1fr;
  }

  .futures-quote-status {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .futures-quote-status button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .futures-quote-status span {
    overflow: visible;
    white-space: normal;
  }

  .cost-market-cards article,
  .cost-ore-cards article,
  .cost-steam-cards article {
    min-height: 72px;
    border-top: 1px solid #dce6ef;
    border-right: 0;
  }

  .cost-market-cards article:first-child,
  .cost-ore-cards article:first-child,
  .cost-steam-cards article:first-child {
    border-top: 0;
  }

  .cost-utility-cards article,
  .cost-fixed-cards article {
    min-height: 76px;
    border-right: 0;
    border-top: 1px solid #dce6ef;
  }

  .cost-utility-cards article:first-child,
  .cost-fixed-cards article:first-child {
    border-top: 0;
  }

  .cost-dynamic-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .cost-risk-banner {
    grid-template-columns: 20px 1fr;
  }

  .cost-risk-banner span {
    grid-column: 1 / -1;
  }

  .cost-smm-note {
    align-items: flex-start;
  }

  .cost-smm-note strong,
  .cost-smm-note span,
  .cost-smm-note a {
    min-width: 0;
    white-space: normal;
  }

  .cost-smm-note span {
    flex-basis: 100%;
  }
}

@media print {
  body.printing-cost > *:not(.cost-print-sheet) {
    display: none !important;
  }

  .cost-print-sheet {
    display: block !important;
    color: #111827;
    background: #fff;
    font-size: 10px;
  }

  .cost-print-sheet .form-section {
    margin: 0 0 10px;
    break-inside: avoid;
  }

  .cost-print-sheet .cost-result-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cost-print-sheet .cost-utility-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cost-print-sheet .cost-fixed-cards {
    grid-template-columns: repeat(5, 1fr);
  }

  .cost-print-sheet .cost-utility-cards article,
  .cost-print-sheet .cost-fixed-cards article {
    min-height: 68px;
    padding: 6px;
  }

  .cost-print-sheet .cost-output-grid {
    grid-template-columns: 1fr;
  }

  .cost-print-sheet .cost-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .cost-print-sheet footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #94a3b8;
  }
}
/* 采购追踪：快递式查询与全链路时间轴 */
.purchase-tracking-modal{width:min(1480px,96vw);height:min(940px,94vh);max-width:none;overflow:hidden}.purchase-tracking-shell{height:calc(100% - 66px);overflow:auto;padding:20px;background:#f5f7fb}.tracking-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 26px;border-radius:18px;background:linear-gradient(135deg,#092f5f,#0f5c9c 62%,#1379b7);color:#fff;box-shadow:0 14px 30px rgba(9,47,95,.18)}.tracking-dashboard-head>div>span{font-size:12px;letter-spacing:.18em;opacity:.72}.tracking-dashboard-head h2{margin:5px 0 4px;font-size:25px}.tracking-dashboard-head p{margin:0;color:rgba(255,255,255,.76);font-size:13px}.tracking-dashboard-head .primary-button{background:#fff;color:#0b4e89;border-color:#fff;box-shadow:none}.tracking-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}.tracking-stat-grid article{padding:15px 18px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;display:grid;grid-template-columns:1fr auto;align-items:center;box-shadow:0 5px 14px rgba(15,23,42,.04)}.tracking-stat-grid article span,.tracking-stat-grid article small{color:#64748b;font-size:12px}.tracking-stat-grid article strong{grid-row:1/3;grid-column:2;font-size:27px;color:#0f3157}.tracking-stat-grid article[data-tone="danger"] strong{color:#dc2626}.tracking-create-form{margin-bottom:14px;padding:18px;border:1px solid #b8d7f1;border-radius:16px;background:#f8fcff;box-shadow:0 8px 22px rgba(15,92,156,.08)}.tracking-create-form .form-grid-4{margin-top:14px}.tracking-create-actions{display:flex;justify-content:flex-end;margin-top:14px}.tracking-quantity{display:grid;grid-template-columns:1fr 74px;gap:6px}.tracking-workspace{display:grid;grid-template-columns:350px minmax(0,1fr);gap:14px;min-height:575px}.tracking-list-panel,.tracking-detail-panel{border:1px solid #e1e7ef;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.05)}.tracking-list-panel{padding:14px;display:flex;flex-direction:column;min-height:0}.tracking-search-box{height:42px;border:1px solid #d7e0ea;border-radius:11px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#64748b;background:#f8fafc}.tracking-search-box:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1);background:#fff}.tracking-search-box input{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;min-width:0;flex:1;font-size:13px}.tracking-search-box button{border:0;background:transparent;color:#94a3b8;padding:4px;cursor:pointer}.tracking-status-filter{height:38px;margin-top:9px;border:1px solid #d7e0ea;border-radius:10px;background:#fff;padding:0 10px}.tracking-list-count{display:flex;justify-content:space-between;margin:14px 3px 8px;font-size:12px;color:#64748b}.tracking-list-count strong{color:#17385c}.purchase-tracking-list{display:flex;flex-direction:column;gap:7px;overflow:auto;padding-right:2px}.purchase-tracking-item{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:start;width:100%;padding:12px;border:1px solid transparent;border-radius:12px;background:#f8fafc;text-align:left;cursor:pointer;color:#0f172a}.purchase-tracking-item:hover{background:#f1f7fd}.purchase-tracking-item.active{border-color:#78b5e8;background:#edf7ff;box-shadow:inset 3px 0 #1475bd}.tracking-item-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#dbeafe;color:#1d6eb5}.tracking-item-icon[data-tone="complete"]{background:#dcfce7;color:#15803d}.tracking-item-icon[data-tone="warning"]{background:#fef3c7;color:#b45309}.tracking-item-icon[data-tone="danger"]{background:#fee2e2;color:#dc2626}.tracking-item-main{min-width:0;display:flex;flex-direction:column;gap:3px}.tracking-item-main strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tracking-item-main small,.tracking-item-main em{font-style:normal;font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tracking-item-main em{color:#3b82f6}.tracking-item-side{text-align:right;display:flex;flex-direction:column;gap:5px}.tracking-item-side b{font-size:11px;color:#0f5c9c;white-space:nowrap}.tracking-item-side small{font-size:11px;color:#64748b}.tracking-detail-panel{padding:16px;overflow:auto;min-width:0}.tracking-detail-hero{border-radius:16px;padding:20px 22px;color:#fff;background:linear-gradient(135deg,#0d3e72,#126ead);box-shadow:0 10px 24px rgba(13,62,114,.18)}.tracking-detail-hero[data-tone="complete"]{background:linear-gradient(135deg,#14532d,#16a34a)}.tracking-detail-hero[data-tone="warning"]{background:linear-gradient(135deg,#78350f,#d97706)}.tracking-detail-hero[data-tone="danger"]{background:linear-gradient(135deg,#7f1d1d,#dc2626)}.tracking-detail-heading{display:flex;justify-content:space-between;gap:20px}.tracking-detail-heading span,.tracking-detail-heading p,.tracking-live-status small{font-size:12px;color:rgba(255,255,255,.75)}.tracking-detail-heading h3{margin:4px 0;font-size:22px}.tracking-detail-heading p{margin:0}.tracking-live-status{text-align:right;display:flex;flex-direction:column;align-items:flex-end}.tracking-live-status>span{display:flex;align-items:center;gap:5px}.tracking-live-status strong{font-size:21px;margin:4px 0}.tracking-route{display:grid;grid-template-columns:minmax(120px,1fr) minmax(180px,2fr) minmax(120px,1fr);align-items:center;gap:16px;margin-top:24px}.tracking-route>div:first-child,.tracking-route>div:last-child{display:flex;flex-direction:column}.tracking-route>div:last-child{text-align:right}.tracking-route span{font-size:11px;opacity:.7}.tracking-route strong{font-size:13px;margin-top:3px}.tracking-route-line{height:4px;background:rgba(255,255,255,.24);border-radius:999px;position:relative}.tracking-route-line i{position:absolute;left:0;top:0;height:100%;border-radius:999px;background:#fff}.tracking-route-line svg{position:absolute;left:calc(var(--progress,50%) - 10px);top:-8px;color:#fff;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}.tracking-progress-meta{display:flex;gap:22px;margin-top:17px;padding-top:13px;border-top:1px solid rgba(255,255,255,.18);font-size:11px;color:rgba(255,255,255,.72)}.tracking-progress-meta b{color:#fff}.tracking-info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}.tracking-info-grid article{padding:13px;border:1px solid #e4eaf1;border-radius:12px;background:#fbfcfe;display:flex;flex-direction:column;gap:4px;min-width:0}.tracking-info-grid span,.tracking-info-grid small{font-size:11px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tracking-info-grid strong{font-size:13px;color:#17385c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tracking-detail-columns{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.8fr);gap:12px}.tracking-timeline-panel,.tracking-update-panel{border:1px solid #e1e7ef;border-radius:14px;background:#fff;padding:16px}.tracking-panel-title{display:flex;align-items:center;justify-content:space-between;gap:14px}.tracking-panel-title>div{display:flex;flex-direction:column;gap:3px}.tracking-panel-title strong{font-size:15px;color:#17385c}.tracking-panel-title span{font-size:11px;color:#64748b}.tracking-panel-title>b{font-size:11px;color:#0f6faf;background:#eaf6ff;padding:5px 9px;border-radius:999px}.tracking-timeline{position:relative;margin-top:15px}.tracking-timeline:before{content:"";position:absolute;left:12px;top:11px;bottom:18px;width:2px;background:#dfe7ef}.tracking-event{position:relative;display:grid;grid-template-columns:26px 90px minmax(0,1fr);gap:9px;padding:0 0 18px}.tracking-event>i{position:relative;z-index:1;width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#e8eef5;color:#64748b}.tracking-event.latest>i{background:#1475bd;color:#fff;box-shadow:0 0 0 5px #e3f2ff}.tracking-event-time{display:flex;flex-direction:column;gap:3px}.tracking-event-time strong{font-size:12px;color:#334155}.tracking-event-time span{font-size:10px;color:#94a3b8}.tracking-event-content{padding:0 0 10px;border-bottom:1px dashed #e2e8f0}.tracking-event-content>div{display:flex;align-items:center;gap:8px}.tracking-event-content strong{font-size:13px;color:#0f3157}.tracking-event-content span{font-size:11px;color:#2582c4}.tracking-event-content p{margin:5px 0 0;font-size:12px;line-height:1.55;color:#64748b}.tracking-update-panel{display:flex;flex-direction:column;gap:10px;background:#f8fafc}.tracking-update-panel label{display:flex;flex-direction:column;gap:5px}.tracking-update-panel label>span{font-size:11px;color:#475569}.tracking-update-panel input,.tracking-update-panel select,.tracking-update-panel textarea{border:1px solid #d7e0ea;border-radius:9px;background:#fff;padding:9px 10px;font:inherit}.tracking-update-panel textarea{min-height:74px;resize:vertical}.tracking-update-panel .primary-button{justify-content:center;margin-top:2px}.purchase-tracking-empty,.purchase-tracking-detail-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#94a3b8;gap:6px;padding:34px 12px}.purchase-tracking-empty strong,.purchase-tracking-detail-empty strong{color:#475569}.purchase-tracking-empty span,.purchase-tracking-detail-empty span{font-size:12px}.purchase-tracking-detail-empty{min-height:470px}
@media(max-width:1050px){.purchase-tracking-modal{width:98vw}.tracking-workspace{grid-template-columns:300px minmax(0,1fr)}.tracking-info-grid{grid-template-columns:repeat(2,1fr)}.tracking-detail-columns{grid-template-columns:1fr}.tracking-update-panel{order:-1}.tracking-stat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.purchase-tracking-shell{padding:10px}.tracking-dashboard-head{padding:16px;align-items:flex-start}.tracking-dashboard-head h2{font-size:19px}.tracking-dashboard-head p{display:none}.tracking-stat-grid{gap:7px}.tracking-stat-grid article{padding:10px}.tracking-workspace{grid-template-columns:1fr}.tracking-list-panel{max-height:360px}.tracking-route{grid-template-columns:1fr}.tracking-route-line{display:none}.tracking-progress-meta{flex-direction:column;gap:5px}.tracking-info-grid{grid-template-columns:1fr}.tracking-detail-heading{flex-direction:column}.tracking-live-status{align-items:flex-start;text-align:left}.tracking-event{grid-template-columns:26px 72px minmax(0,1fr)}}

/* 采购合同共享、到货差额与全流程节点 */
.tracking-contract-picker{display:grid;grid-template-columns:190px minmax(280px,1fr);align-items:center;gap:8px 14px;margin-top:14px;padding:13px 15px;border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff}.tracking-contract-picker>span{font-size:12px;font-weight:700;color:#174d7d}.tracking-contract-picker select{height:40px;border:1px solid #93c5fd;border-radius:9px;background:#fff;padding:0 10px;color:#17385c}.tracking-contract-picker small{grid-column:2;font-size:11px;color:#2563a7}.tracking-contract-empty{display:flex;align-items:center;gap:8px;margin-top:14px;padding:13px 15px;border:1px solid #bbf7d0;border-radius:12px;background:#f0fdf4;color:#15803d;font-size:12px}.tracking-create-form input[readonly]{background:#f1f5f9;color:#475569;border-style:dashed;cursor:not-allowed}.tracking-create-actions{align-items:center;gap:14px}.tracking-create-actions>span{margin-right:auto;display:flex;align-items:center;gap:5px;color:#64748b;font-size:11px}.tracking-create-actions button:disabled{opacity:.5;cursor:not-allowed}.tracking-quantity-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 12px}.tracking-quantity-summary article{position:relative;overflow:hidden;padding:14px 16px;border:1px solid #dbe7f2;border-radius:13px;background:linear-gradient(135deg,#f8fbff,#eef6ff);display:flex;flex-direction:column;gap:4px}.tracking-quantity-summary article:after{content:"";position:absolute;right:-20px;top:-28px;width:76px;height:76px;border-radius:50%;background:rgba(37,99,235,.07)}.tracking-quantity-summary article[data-tone="success"]{background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border-color:#bbf7d0}.tracking-quantity-summary article[data-tone="warning"]{background:linear-gradient(135deg,#fffbeb,#fff7ed);border-color:#fed7aa}.tracking-quantity-summary span{font-size:11px;color:#64748b}.tracking-quantity-summary strong{font-size:22px;color:#123b66}.tracking-quantity-summary strong small{font-size:11px;font-weight:500}.tracking-quantity-summary em{font-style:normal;font-size:10px;color:#64748b}.purchase-node-flow{display:grid;grid-template-columns:repeat(5,1fr);gap:0;margin:0 0 12px;padding:14px;border:1px solid #dfe8f1;border-radius:14px;background:#fbfdff}.purchase-node-flow article{position:relative;display:flex;gap:9px;align-items:flex-start;min-width:0;padding-right:14px}.purchase-node-flow article:not(:last-child):after{content:"";position:absolute;top:18px;left:43px;right:4px;height:2px;background:#dbe3ec}.purchase-node-flow article[data-state="complete"]:after{background:#22c55e}.purchase-node-flow article[data-state="active"]:after,.purchase-node-flow article[data-state="partial"]:after{background:linear-gradient(90deg,#f59e0b 50%,#dbe3ec 50%)}.purchase-node-flow i{position:relative;z-index:1;flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#e9eef4;color:#94a3b8;border:3px solid #fff;box-shadow:0 0 0 1px #dce4ed}.purchase-node-flow article[data-state="complete"] i{background:#16a34a;color:#fff;box-shadow:0 0 0 1px #16a34a}.purchase-node-flow article[data-state="active"] i,.purchase-node-flow article[data-state="partial"] i{background:#f59e0b;color:#fff;box-shadow:0 0 0 1px #f59e0b}.purchase-node-flow div{position:relative;z-index:2;min-width:0;display:flex;flex-direction:column;gap:2px;background:#fbfdff;padding-right:3px}.purchase-node-flow div>span{font-size:9px;color:#94a3b8}.purchase-node-flow strong{font-size:12px;color:#17385c;white-space:nowrap}.purchase-node-flow small{font-size:10px;color:#64748b;line-height:1.35}.purchase-tracking-item{align-items:center}.tracking-item-side{max-width:105px}.tracking-item-side small{white-space:normal;line-height:1.25}
@media(max-width:1050px){.purchase-node-flow{grid-template-columns:repeat(3,1fr);gap:14px}.purchase-node-flow article:after{display:none}.tracking-quantity-summary{grid-template-columns:1fr}}
@media(max-width:760px){.tracking-contract-picker{grid-template-columns:1fr}.tracking-contract-picker small{grid-column:1}.purchase-node-flow{grid-template-columns:1fr}.tracking-create-actions{align-items:stretch;flex-direction:column}.tracking-create-actions>span{margin-right:0}}

/* 结构化合同、质检、付款、主数据与成本校验 */
.governance-modal{width:min(1460px,96vw);height:min(940px,94vh);max-width:none;overflow:auto;background:#f7f9fc}.governance-modal>.modal-header{position:sticky;top:0;z-index:5;background:#fff}.governance-modal>.business-form,.governance-modal>.form-section{margin:16px 20px}.governance-modal .business-form+.business-form{border-top:1px dashed #cbd5e1;padding-top:4px}.governance-ledger{background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.05)}.governance-ledger .data-table small{display:block;margin-top:3px;color:#64748b}.tracking-finance-quality-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 12px}.tracking-finance-quality-summary article{padding:13px 15px;border:1px solid #dbe7f2;border-radius:13px;background:#f8fafc;display:flex;flex-direction:column;gap:4px}.tracking-finance-quality-summary article[data-tone="success"]{border-color:#bbf7d0;background:#f0fdf4}.tracking-finance-quality-summary article[data-tone="quality"]{border-color:#c4b5fd;background:#f5f3ff}.tracking-finance-quality-summary span,.tracking-finance-quality-summary small{font-size:11px;color:#64748b}.tracking-finance-quality-summary strong{font-size:18px;color:#17385c}.master-data-form{padding:16px 18px;border:1px solid #dce6ef;border-radius:14px;background:#f8fbff;margin:14px 0}.master-data-form label{display:flex;flex-direction:column;gap:5px}.master-data-form label>span{font-size:11px;color:#475569}.master-data-form input,.master-data-form select{height:39px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:0 9px}.master-data-actions{display:flex;align-items:flex-end;justify-content:flex-end;gap:9px}.master-import-button{cursor:pointer}.database-readiness-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.database-readiness-grid article{padding:18px;border:1px solid #dbe4ee;border-radius:14px;background:linear-gradient(145deg,#f8fbff,#eef5fb);display:flex;flex-direction:column;gap:5px}.database-readiness-grid span,.database-readiness-grid small{font-size:11px;color:#64748b}.database-readiness-grid strong{font-size:20px;color:#123b66}.database-migration-roadmap{padding:20px 22px;border:1px solid #cbd5e1;border-radius:14px;background:#fff}.database-migration-roadmap h3{margin:0 0 10px;color:#17385c}.database-migration-roadmap ol{margin:0;padding-left:23px;display:grid;gap:8px;color:#475569;line-height:1.55}.database-migration-roadmap p{margin:14px 0 0;padding:10px 12px;border-radius:9px;background:#eff6ff;color:#1d4f7a;font-size:12px}.notice-row .tag{flex:0 0 auto}.notice-row span:last-child{line-height:1.45}

@media(max-width:1050px){.tracking-finance-quality-summary,.database-readiness-grid{grid-template-columns:repeat(2,1fr)}.governance-modal .form-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.governance-modal .form-grid-4 .span-3,.governance-modal .form-grid-4 .span-4{grid-column:1/-1}}
@media(max-width:760px){.governance-modal{width:100vw;height:100vh;max-height:none;border-radius:0}.governance-modal>.business-form,.governance-modal>.form-section{margin:10px}.governance-modal .form-grid-4,.tracking-finance-quality-summary,.database-readiness-grid{grid-template-columns:1fr}.governance-modal .form-grid-4 [class*="span-"]{grid-column:1}.master-data-actions{align-items:stretch;flex-direction:column}.master-data-actions>*{width:100%;justify-content:center}.settings-tabs{overflow-x:auto;white-space:nowrap}.settings-tabs button{flex:0 0 auto}.topbar .brand span{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filters{overflow-x:auto;max-width:100%;padding-bottom:4px}.filters>.field,.filters>.popover-wrap{flex:0 0 auto}.notice-popover{position:fixed;left:10px;right:10px;top:58px;width:auto}.module-command{align-items:flex-start}.module-actions{width:100%;flex-wrap:wrap}.module-actions button{flex:1 1 160px}.data-modal .modal-header{padding:12px}.modal-title-copy .modal-company{display:none}.tracking-finance-quality-summary article{min-width:0}}

/* 合同、入库单、出库单唯一二维码与系统来源关联 */
.qr-scan-trigger{color:#0f6faf!important;background:#eef8ff!important}.system-source-field>small{display:block;margin-top:5px;color:#47708e;font-size:11px;line-height:1.45}.system-source-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.system-source-control select{min-width:0}.system-source-control .compact{white-space:nowrap}.document-qr-card{display:flex;align-items:center;gap:14px;margin:14px 0;padding:14px;border:1px solid #bed8ec;border-radius:14px;background:linear-gradient(135deg,#f7fbff,#edf7ff);break-inside:avoid}.document-qr-card.compact{gap:10px;margin:8px 0;padding:9px}.document-qr-image{flex:0 0 auto;padding:7px;border:1px solid #d9e6ef;border-radius:10px;background:#fff;line-height:0;box-shadow:0 4px 12px rgba(15,49,87,.08)}.document-qr-image img,.document-qr-image canvas{display:block;max-width:100%;height:auto!important}.document-qr-card>div:last-child{min-width:0;display:flex;flex-direction:column;gap:4px}.document-qr-card span{font-size:11px;font-weight:700;letter-spacing:.08em;color:#1475bd}.document-qr-card strong{font-size:15px;color:#123b66;overflow-wrap:anywhere}.document-qr-card small{font-family:Consolas,monospace;font-size:9px;color:#718096;overflow-wrap:anywhere}.document-qr-card em{display:flex;align-items:center;gap:4px;font-style:normal;font-size:10px;color:#277459}.document-qr-card.compact strong{font-size:12px}.document-qr-card.compact small,.document-qr-card.compact em{display:none}.qr-scanner-modal{width:min(980px,94vw);max-height:90vh;overflow:auto}.qr-scan-workspace{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;margin-top:14px}.qr-scan-entry,.qr-resolve-result{min-height:330px;border:1px solid #dbe5ee;border-radius:16px;padding:20px;background:#f8fafc}.qr-scan-entry{display:flex;flex-direction:column;gap:14px}.qr-scan-entry>div:nth-child(2){display:flex;flex-direction:column;gap:5px}.qr-scan-entry strong{color:#123b66;font-size:17px}.qr-scan-entry span{font-size:12px;color:#64748b;line-height:1.55}.qr-scan-entry label{display:flex;flex-direction:column;gap:6px}.qr-scan-entry input{height:44px;border:1px solid #9fc7e5;border-radius:10px;background:#fff;padding:0 12px;font-family:Consolas,monospace}.qr-scan-icon{width:64px;height:64px;border-radius:18px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#0f5c9c,#18a1bb);box-shadow:0 10px 20px rgba(15,92,156,.2)}.qr-resolve-result{display:flex;align-items:center;justify-content:center}.qr-resolve-result.resolved{align-items:stretch;justify-content:flex-start;flex-direction:column;background:#fff}.qr-result-summary{display:flex;flex-direction:column;gap:7px}.qr-result-summary>span{font-size:11px;color:#1475bd}.qr-result-summary h3{margin:0;color:#123b66;font-size:20px}.qr-result-summary p{margin:0;color:#64748b}.qr-result-summary>div{display:flex;align-items:center;justify-content:space-between}.qr-result-summary em{font-style:normal;color:#64748b;font-size:11px}.qr-result-summary button{justify-content:center}.qr-empty-result{display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;color:#94a3b8}.qr-empty-result strong{color:#475569}.qr-empty-result span{font-size:11px}.qr-source-mismatch{padding:8px 10px;border-radius:8px;background:#fff7ed;color:#b45309}.qr-security-note{display:flex;align-items:flex-start;gap:7px;margin-top:13px;padding:10px 12px;border-radius:10px;background:#f0fdf4;color:#277459;font-size:11px;line-height:1.5}.qr-registry-panel>.panel-header>div{display:flex;flex-direction:column;gap:3px}.qr-registry-panel>.panel-header span{font-size:11px;color:#64748b}.qr-registry-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 18px 18px}.qr-registry-item{min-width:0;border:1px solid #dce7ef;border-radius:13px;padding:8px;background:#fbfdff;cursor:pointer;transition:.18s ease}.qr-registry-item:hover,.qr-registry-item:focus{border-color:#75b5e3;box-shadow:0 6px 16px rgba(15,92,156,.1);outline:0}.qr-registry-item>.document-qr-card{margin:0;border:0;background:transparent;padding:3px}.qr-registry-item>span{display:block;padding:4px 7px 3px;color:#64748b;font-size:10px}.qr-registry-empty{grid-column:1/-1;padding:24px;text-align:center;color:#94a3b8}.tracking-detail-panel>.document-qr-card{max-width:520px}

@media(max-width:980px){.qr-registry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.system-source-control{grid-template-columns:1fr}.qr-scan-workspace{grid-template-columns:1fr}.qr-scan-entry,.qr-resolve-result{min-height:0}.qr-registry-grid{grid-template-columns:1fr}.document-qr-card{align-items:flex-start}.qr-scanner-modal{width:100vw;max-height:100vh;height:100vh;border-radius:0}}
@media print{.document-qr-card{border-color:#9ca3af;background:#fff;box-shadow:none}.qr-scan-trigger,.system-source-control button,.qr-security-note{display:none!important}.document-qr-image{box-shadow:none}}
