:root {
  --blue: #2f80c8;
  --green: #2da66f;
  --yellow: #e2a72e;
  --red: #dc5f57;
  --ink: #263241;
  --muted: #6b7785;
  --line: #dfe5eb;
  --bg: #f5f7f9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }

.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 36px;
  background: #f7f8f8;
}
.login-ad {
  width: 430px;
}
.login-ad h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 600;
}
.login-ad h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 24px;
}
.login-ad p {
  color: var(--muted);
  font-size: 17px;
}
.ad-visual {
  height: 245px;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}
.ad-visual span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 14px 28px rgba(40, 55, 72, .08);
}
.ad-visual span:nth-child(1) { grid-row: span 2; background: linear-gradient(160deg, #fff, #eaf4ff); }
.ad-visual span:nth-child(2) { background: linear-gradient(160deg, #fff, #eaf9f1); }
.ad-visual span:nth-child(3) { background: linear-gradient(160deg, #fff, #fff5da); }
.ad-visual span:nth-child(4) { grid-column: span 2; background: linear-gradient(90deg, #fff, #f2f6fa); }

.login-panel {
  width: 360px;
  padding: 34px 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 20px 45px rgba(26, 41, 56, .12);
}
.brand-mark, .side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark { margin-bottom: 26px; justify-content: center; }
.brand-mark strong { display: block; font-size: 24px; letter-spacing: 0; }
.brand-mark small { display: block; color: var(--muted); }
.logo-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 5px;
  color: white;
  background: var(--blue);
  font-weight: 700;
}
.logo-box.small { width: 32px; height: 32px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}
.form-row input {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-bottom-color: #cfd7df;
  outline: 0;
  padding: 0 8px;
}
.form-row input:focus { border-bottom-color: var(--blue); }
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.primary-btn, .outline-btn, .plain-btn, .user-btn, .icon-btn {
  border-radius: 3px;
  border: 1px solid transparent;
  height: 34px;
  padding: 0 14px;
}
.primary-btn {
  width: 100%;
  height: 42px;
  color: white;
  background: var(--blue);
}
.primary-btn.small-btn { width: auto; height: 34px; }
.outline-btn {
  background: white;
  border-color: #cbd5df;
  color: #405062;
}
.plain-btn, .user-btn, .icon-btn {
  background: transparent;
  color: #445363;
}
.scan-entry {
  text-align: center;
  margin: 28px 0 14px;
}
.scan-entry button {
  border: 0;
  background: transparent;
  color: #566574;
}
.register-link {
  display: block;
  text-align: center;
  color: #566574;
}

.app-shell {
  min-height: 100vh;
  display: block;
}
.side-nav {
  width: 220px;
  background: #27384a;
  color: white;
  flex: 0 0 auto;
  display: none;
}
.side-brand {
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-weight: 700;
}
.side-nav nav { padding: 10px 0; }
.nav-group { margin-bottom: 4px; }
.nav-title {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  color: #eaf1f8;
  background: transparent;
  text-align: left;
}
.nav-title.active, .nav-title:hover { background: #34516d; }
.nav-child {
  display: block;
  padding: 9px 16px 9px 43px;
  color: #c9d6e2;
  font-size: 13px;
}
.nav-child:hover, .nav-child.active { color: white; background: #32475d; }

.workspace { min-width: 0; width: 100%; }
.topbar {
  position: relative;
  z-index: 30;
  height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 18px 0 36px;
  color: #f5f8fb;
  background: #353e50;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-actions {
  justify-self: end;
}
.wise-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 244px;
  height: 70px;
  margin-left: -36px;
  padding-left: 34px;
  color: white;
  background: #303849;
  font-size: 29px;
}
.wise-logo {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-block;
}
.wise-logo i {
  position: absolute;
  inset: 8px;
  border: 3px solid #4b8fe3;
  border-radius: 50%;
}
.wise-logo i:nth-child(1) { transform: translate(-8px, -5px); border-color: #e44848; }
.wise-logo i:nth-child(2) { transform: translate(7px, -5px); border-color: #52b86a; }
.wise-logo i:nth-child(3) { transform: translate(-8px, 8px); border-color: #e3ac32; }
.wise-logo i:nth-child(4) { transform: translate(7px, 8px); border-color: #3c8ce0; }
#crumb {
  display: none;
  font-size: 16px;
  font-weight: 700;
}
.topbar .icon-btn {
  display: none;
  font-size: 18px;
}
.topbar .plain-btn,
.topbar .user-btn,
.topbar .icon-btn {
  height: auto;
  padding: 0;
  border: 0;
  color: #f5f8fb;
  font-size: 15px;
  white-space: nowrap;
}
.user-menu-wrap {
  position: relative;
}
.topbar .user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: #5f8fd3;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
}
.user-caret {
  color: #d8dee8;
  font-size: 20px;
}
.user-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 80;
  width: 258px;
  padding: 12px 0;
  color: #2c3747;
  background: white;
  border: 1px solid #ccd4df;
  border-radius: 3px;
  box-shadow: 0 18px 38px rgba(18, 31, 46, .22);
}
.user-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: white;
  border-left: 1px solid #ccd4df;
  border-top: 1px solid #ccd4df;
  transform: rotate(45deg);
}
.user-dropdown button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 26px;
  border: 0;
  color: #2c3747;
  background: white;
  text-align: left;
  font-size: 18px;
}
.user-dropdown button:hover {
  color: var(--blue);
  background: #f4f8fc;
}
.user-dropdown hr {
  margin: 10px 16px;
  border: 0;
  border-top: 1px solid #e5e9ee;
}
#draftBadge {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #cf3e5a;
  background: #fff0f4;
  border-radius: 6px;
  font-size: 14px;
}
.flag-dot {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 4px;
  color: #ffe08a;
  background: #d94336;
  border-radius: 50%;
  font-size: 13px;
}
.view { padding: 16px 18px; }
.module-tabs {
  position: relative;
  z-index: 31;
  display: flex;
  align-items: center;
  min-height: 70px;
  height: 70px;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  flex-wrap: nowrap;
  align-content: center;
  background: transparent;
  border-bottom: 0;
  scrollbar-width: thin;
  min-width: 0;
}
.module-tab {
  position: relative;
  flex: 0 0 auto;
  height: 70px;
}
.module-tab > button {
  height: 70px;
  min-width: auto;
  padding: 0 14px;
  white-space: nowrap;
  color: #f2f5f8;
  background: transparent;
  border: 0;
  border-right: 0;
  border-left: 0;
  font-size: 15px;
}
.module-tab > button b {
  margin-right: 8px;
  font-size: 14px;
}
.chevron {
  margin-left: 6px;
  color: #cbd2dc;
  font-size: 15px;
}
.module-tab:hover > button,
.module-tab.active > button,
.module-tab > button.active {
  color: white;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 -3px 0 #ff7f27;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.module-flyout {
  position: fixed;
  z-index: 120;
  min-width: 240px;
  padding: 10px 0;
  background: #343d50;
  box-shadow: 0 12px 20px rgba(14, 24, 38, .25);
}
.module-flyout a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  color: #d4dae3;
  font-size: 14px;
}
.module-flyout a:hover,
.module-flyout a.active {
  color: white;
  background: #4b566b;
}

.home-toolbar, .grid-header, .report-header {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.home-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 70px;
  margin: 0;
  padding: 0 22px;
  background: white;
  border-bottom: 1px solid #e6e9ed;
}
.home-selects {
  display: flex;
  gap: 14px;
  width: auto;
}
.select-wrap label {
  display: none;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}
.select-wrap select {
  width: 198px;
  height: 38px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  background: white;
  font-size: 15px;
}
.toolbar-spacer { flex: 1; }

#homeView {
  min-height: calc(100vh - 70px);
  padding: 0 0 36px;
  background: #f6f7f9;
}
#homeView .outline-btn,
#homeView .primary-btn.small-btn {
  display: none;
  width: auto;
  height: 34px;
  font-size: 14px;
  border-radius: 4px;
}
#homeView .primary-btn.small-btn {
  color: white;
  background: #4b84c8;
  border-color: #4b84c8;
}
.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 22px 24px;
}
.metric, .chart-card, .list-card, .process-card, .ranking-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
}
.card-expanded {
  grid-column: span 12 !important;
}
.card-collapsed > :not(.wise-card-head) {
  display: none !important;
}
.metric-board {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.metric {
  min-height: 168px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.metric:hover {
  border-color: #9dc6f2;
  box-shadow: 0 8px 18px rgba(57, 114, 180, .16);
  transform: translateY(-1px);
}
.metric-large { grid-column: span 6; }
.metric span {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #202a38;
  font-size: 24px;
  line-height: 1.25;
}
.metric strong {
  display: block;
  margin-top: 26px;
  color: #5b97db;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}
.metric small {
  display: block;
  margin-top: 18px;
  color: var(--green);
  font-size: 23px;
}
.chart-card {
  grid-column: span 7;
  min-height: 260px;
  padding: 16px;
}
.wide-card { grid-column: span 7; }
.list-card {
  grid-column: span 5;
  min-height: 300px;
  padding: 0;
}
.process-card {
  grid-column: span 12;
  min-height: 150px;
  padding: 16px;
}
.ranking-card {
  grid-column: span 12;
  min-height: 190px;
}
.wise-chart-card {
  grid-column: span 8;
}
.wise-list-card,
.wise-reminder-card {
  grid-column: span 4;
  min-height: 260px;
}
.wise-process-card {
  grid-column: span 12;
}
.wise-card-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #e6e9ed;
}
.wise-card-head h3 {
  margin: 0;
  color: #202a38;
  font-size: 20px;
  font-weight: 400;
}
.wise-card-head button,
.wise-card-head span {
  border: 0;
  color: #202a38;
  background: transparent;
  font-size: 13px;
}
.rank-table {
  padding-bottom: 16px;
}
.rank-head,
.rank-row {
  display: grid;
  grid-template-columns: 62px 120px 1fr;
  align-items: center;
}
.rank-head {
  height: 48px;
  color: white;
  background: #4395ec;
  font-size: 17px;
}
.rank-head span,
.rank-row > span {
  padding-left: 14px;
}
.rank-row {
  min-height: 64px;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
}
.rank-row:hover {
  background: #f5f9ff;
}
.rank-row > span:first-child {
  color: #d9a528;
}
.rank-row div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank-row i {
  display: block;
  height: 52px;
  background: #4395ec;
}
.rank-row b {
  color: #202a38;
  font-weight: 400;
}
.section-line {
  grid-column: span 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  color: #55708d;
  background: #eef5fb;
  border: 1px dashed #a9c6df;
  border-radius: 4px;
}
.section-line button {
  width: 28px;
  height: 28px;
  border: 0;
  color: #6c7a89;
  background: transparent;
}
.card-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #263447;
  font-size: 23px;
  font-weight: 600;
}
.bars {
  display: flex;
  align-items: end;
  gap: 18px;
  height: 210px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px 0;
}
.bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.bar-wrap:hover .bar {
  background: #2f7fca;
}
.bar {
  width: 100%;
  min-width: 18px;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
}
.list-card ul { list-style: none; padding: 0 14px 14px; margin: 0; }
.list-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 15px;
  cursor: pointer;
}
.list-card li:hover {
  color: var(--blue);
}
.list-card li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-card li b {
  flex: 0 0 auto;
  color: #5b97db;
  font-size: 14px;
  font-weight: 400;
}
.process-row {
  display: grid;
  grid-template-columns: 150px 1fr 58px;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 20px;
  cursor: pointer;
}
.process-row:hover {
  color: var(--blue);
}
.process-row div {
  height: 10px;
  overflow: hidden;
  background: #edf2f6;
  border-radius: 99px;
}
.process-row i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}
.process-row b {
  color: var(--muted);
  font-size: 12px;
}

.home-kpi-board {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: white;
  border: 1px solid #dfe5eb;
}
.home-kpi {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  border: 0;
  border-right: 1px solid #e2e7ed;
  border-bottom: 1px solid #e2e7ed;
  background: white;
  color: #202a38;
  cursor: pointer;
}
.home-kpi:nth-child(6n) {
  border-right: 0;
}
.home-kpi:nth-last-child(-n+6) {
  border-bottom: 0;
}
.home-kpi:hover,
.home-rank-row:hover,
.home-data-table tbody tr:hover {
  background: #f4f9ff;
}
.home-kpi span {
  font-size: 14px;
}
.home-kpi strong {
  color: #3b87e8;
  font-size: 20px;
  font-weight: 400;
}
.home-board-section {
  min-height: 210px;
  background: white;
  border: 1px solid #e2e7ed;
}
.home-board-section.full {
  grid-column: span 12;
}
.home-board-section.half {
  grid-column: span 6;
}
.home-section-head {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #e7ecf2;
}
.home-section-head h3 {
  margin: 0;
  color: #202a38;
  font-size: 14px;
  font-weight: 400;
}
.home-section-head button {
  border: 0;
  background: transparent;
  color: #2f6faf;
  cursor: pointer;
}
.home-rank-head,
.home-rank-row {
  display: grid;
  grid-template-columns: 78px 120px minmax(0, 1fr) 90px;
  align-items: center;
}
.home-rank-head {
  height: 30px;
  color: white;
  background: #3e96f2;
  font-size: 13px;
}
.home-rank-head span {
  padding-left: 10px;
}
.home-rank-head span:last-child {
  grid-column: span 2;
}
.home-rank-row {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: white;
  text-align: left;
  cursor: pointer;
}
.home-rank-row span {
  padding-left: 10px;
}
.home-rank-row span:first-child {
  color: #d49b20;
}
.home-rank-row i {
  display: block;
  height: 28px;
  background: #3e96f2;
}
.home-rank-row b {
  padding-left: 6px;
  font-weight: 400;
}
.home-table-wrap {
  overflow: auto;
}
.home-data-table {
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}
.home-data-table th {
  height: 30px;
  color: white;
  background: #3e96f2;
  font-weight: 400;
}
.home-data-table th,
.home-data-table td {
  min-width: 90px;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid #edf1f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-data-table tbody tr {
  cursor: pointer;
}
.home-total-line {
  min-height: 30px;
  padding: 8px 10px;
  color: #d7891f;
  background: #f7f8fa;
  border-top: 1px solid #e7ecf2;
  font-size: 12px;
}
.home-bar-chart {
  min-height: 275px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 18px;
  padding: 38px 48px 28px;
  position: relative;
}
.home-bar-chart.compact {
  min-height: 300px;
}
.chart-legend {
  position: absolute;
  top: 12px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  color: #536273;
  font-size: 12px;
}
.chart-legend i {
  width: 14px;
  height: 8px;
  background: #5aa5de;
}
.home-chart-bar {
  width: min(34%, 520px);
  height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.home-chart-bar span {
  font-size: 11px;
}
.home-chart-bar i {
  width: 100%;
  min-height: 14px;
  background: #5aa5de;
}
.home-chart-bar b {
  color: #536273;
  font-size: 12px;
  font-weight: 400;
}
.home-feed-list {
  padding: 8px 12px;
}
.home-feed-list article {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
}
.home-feed-list article:hover {
  color: var(--blue);
}
.home-feed-list strong {
  color: #2e6fad;
  font-weight: 600;
}
.home-feed-list span,
.home-feed-list p {
  margin: 0;
  color: #536273;
  font-size: 12px;
}
.home-empty-chart {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #a6adb6;
  cursor: pointer;
}
.home-empty-chart i {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(#eceff3 0 72%, transparent 72% 100%);
}
.home-empty-chart i.doc {
  border-radius: 8px;
  background: linear-gradient(#eceff3, #eceff3);
  clip-path: polygon(0 0, 68% 0, 100% 30%, 100% 100%, 0 100%);
}
.home-empty-row {
  padding: 16px;
  color: var(--muted);
}

.grid-header, .report-header { align-items: center; justify-content: space-between; }
.grid-header h2, .report-header h2 { margin: 0; font-size: 20px; }
.grid-actions { display: flex; gap: 8px; }
.grid-actions input {
  width: 240px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.summary-strip article {
  min-height: 70px;
  padding: 13px 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.summary-strip article:hover {
  border-color: #9dc6f2;
  box-shadow: 0 8px 18px rgba(57, 114, 180, .12);
  transform: translateY(-1px);
}
.summary-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}
.summary-strip strong {
  font-size: 20px;
}
.filter-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.filter-row button {
  height: 28px;
  border: 1px solid #d3dbe4;
  border-radius: 3px;
  background: #f8fafc;
  color: #4d5c6b;
}
.filter-row button.active {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #d8e0e8;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #f6f8fb;
  max-width: 100%;
}
.batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe3eb;
  background: #f9fbfd;
  min-width: max-content;
}
.batch-bar label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
}
.batch-bar button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #ccd5dd;
  border-radius: 3px;
  background: white;
  color: #4b5b6c;
}
table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
th, td {
  min-width: var(--col-width, 118px);
  max-width: var(--col-width, 240px);
  height: 42px;
  padding: 9px 12px;
  border-right: 1px solid #e1e7ee;
  border-bottom: 1px solid #e5ebf0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 44px;
  color: #3f4f5f;
  background: #f3f6f9;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d8e0e8;
}
.sort-header {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sort-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sort-header b {
  flex: 0 0 auto;
  color: #9aa7b4;
  font-size: 11px;
  font-weight: 600;
}
.sort-header.active {
  color: #2f79c7;
}
.sort-header.active b {
  color: #2f79c7;
}
th:hover .sort-header {
  color: #2f79c7;
}
th:first-child,
td:first-child {
  border-left: 0;
}
th:last-child,
td:last-child {
  border-right: 0;
}
.select-col {
  min-width: 44px;
  max-width: 44px;
  width: 44px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.index-col {
  min-width: 52px;
  max-width: 52px;
  width: 52px;
  color: #64748b;
  text-align: center;
}
.action-col {
  min-width: 88px;
  max-width: 88px;
  width: 88px;
  text-align: center;
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f4f9ff; }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  color: white;
  background: var(--green);
}
.tag.orange { background: var(--yellow); }
.tag.red { background: var(--red); }
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-top: 0;
}
.pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5d6c7b;
  font-size: 13px;
}
.page-size-control select {
  height: 30px;
  padding: 0 28px 0 8px;
  border: 1px solid #ccd5dd;
  background: white;
  border-radius: 3px;
  color: #26394c;
  outline: none;
}
.pager button {
  height: 30px;
  border: 1px solid #ccd5dd;
  background: white;
  border-radius: 3px;
}
.row-detail-btn {
  height: 28px;
  padding: 0 12px;
  color: #315b85;
  background: #fff;
  border: 1px solid #c7d3df;
  border-radius: 3px;
  font-weight: 600;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.report-grid article {
  min-height: 140px;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.report-grid article:hover {
  border-color: #9dc6f2;
  box-shadow: 0 8px 18px rgba(57, 114, 180, .12);
  transform: translateY(-1px);
}
.report-grid strong { display: block; margin-bottom: 12px; }
.report-grid span { color: var(--muted); line-height: 1.7; }

.system-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 160px);
  background: white;
  border: 1px solid var(--line);
}
.system-menu {
  padding: 10px;
  background: #f6f8fa;
  border-right: 1px solid var(--line);
}
.system-menu button {
  width: 100%;
  height: 38px;
  margin-bottom: 6px;
  padding: 0 12px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 3px;
}
.system-menu button.active,
.system-menu button:hover {
  color: var(--blue);
  background: #edf6ff;
  border-color: #c7dff5;
}
.system-panel {
  min-width: 0;
  padding: 18px;
}
.system-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.system-panel-head h2 {
  margin: 0;
  font-size: 20px;
}
.system-grid {
  display: grid;
  gap: 14px;
}
.system-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.system-grid article,
.file-list article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfcfd;
}
.system-grid article[data-db-target],
.system-grid article[data-file-target],
.entity-list div,
.employee-list div,
.file-list article {
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.system-grid article[data-db-target]:hover,
.system-grid article[data-file-target]:hover,
.entity-list div:hover,
.employee-list div:hover,
.file-list article:hover {
  border-color: #9dc6f2;
  box-shadow: 0 8px 18px rgba(57, 114, 180, .1);
  transform: translateY(-1px);
}
.system-grid h3 {
  margin: 0 0 12px;
}
.system-grid input,
.system-grid select,
.system-grid textarea {
  width: 100%;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.system-grid textarea {
  min-height: 150px;
  padding-top: 8px;
}
.check-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.check-grid section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1e7ee;
  border-radius: 3px;
  background: white;
}
.check-grid section strong {
  color: #334155;
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.approval-rule-list {
  margin-top: 14px;
}
.approval-rule-list h3 {
  margin: 0 0 10px;
}
.approval-rule-list article {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: min(100%, 360px);
  margin: 0 8px 8px 0;
  padding: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  background: #fbfcfd;
}
.approval-rule-list span {
  color: var(--muted);
  font-size: 13px;
}
.approval-node-list {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}
.approval-node-list label {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 120px auto;
  gap: 8px;
  align-items: center;
}
.approval-node-list input,
.approval-node-list select {
  min-height: 32px;
  margin: 0;
}
.approval-node-list button {
  height: 32px;
  border: 1px solid #ccd5dd;
  border-radius: 3px;
  background: white;
}
.entity-list {
  display: grid;
  gap: 10px;
}
.entity-list div {
  padding: 10px;
  border: 1px solid #e1e7ee;
  border-radius: 3px;
  background: white;
}
.employee-list div {
  padding: 10px;
  border: 1px solid #e1e7ee;
  border-radius: 3px;
  background: white;
}
.entity-list strong,
.entity-list span,
.employee-list strong,
.employee-list span,
.file-list strong,
.file-list span {
  display: block;
}
.entity-list span,
.employee-list span,
.file-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.field-config-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.field-module-list {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}
.field-module-list button {
  height: 38px;
  border: 1px solid #d7e0e8;
  border-radius: 3px;
  background: white;
  text-align: left;
  padding: 0 12px;
}
.field-module-list button.active,
.field-module-list button:hover {
  color: var(--blue);
  border-color: #a8cff8;
  background: #edf6ff;
}
.field-config-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: white;
}
.field-config-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.field-config-head h3 {
  margin: 0 0 4px;
}
.field-config-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.field-config-table {
  overflow: auto;
  border: 1px solid #e2e8f0;
}
.field-config-table table {
  min-width: 900px;
}
.field-config-table th,
.field-config-table td {
  padding: 10px 12px;
}
.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.field-config-preview {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid #e3e8ee;
}
.entity-admin-block {
  margin-top: 14px;
}
.plan-control-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}
.plan-control-head h3 {
  margin: 0 0 4px;
  color: var(--ink);
}
.plan-control-head p {
  margin: 0;
  color: var(--muted);
}
.plan-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.plan-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #dce5ee;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}
.plan-card.active {
  border-color: #6ba7e8;
  box-shadow: 0 8px 20px rgba(61, 127, 196, .14);
  background: #f6fbff;
}
.plan-card strong,
.plan-card span {
  display: block;
}
.plan-card span,
.plan-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.plan-card p {
  margin: 0;
}
.plan-detail-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dfe7ef;
  background: #fbfcfd;
}
.plan-detail-panel h3 {
  margin: 0 0 10px;
}
.plan-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-feature-list span {
  padding: 5px 10px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  color: #245f99;
  background: #f1f7ff;
  font-size: 13px;
}
.plan-matrix table {
  min-width: 1100px;
}
.import-center {
  display: grid;
  gap: 14px;
}
.import-hero,
.import-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfcfd;
}
.import-hero,
.import-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.import-hero h3,
.import-card h4,
.import-section-head h4 {
  margin: 0 0 6px;
}
.import-hero p,
.import-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.import-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.import-steps article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  background: white;
  color: var(--muted);
}
.import-steps article.active {
  color: #245f99;
  border-color: #b8d4f1;
  background: #f2f8ff;
}
.import-steps strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9eef4;
  color: #536273;
}
.import-steps article.active strong {
  color: white;
  background: #2d7dcc;
}
.import-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}
.import-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
}
.import-card input,
.import-card select,
.import-card textarea {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  background: white;
  color: var(--ink);
}
.import-card textarea {
  min-height: 150px;
  padding-top: 10px;
  line-height: 1.55;
}
.import-card small,
.import-target-info span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}
.import-target-info {
  padding: 12px;
  border: 1px solid #e1e8ef;
  border-radius: 4px;
  background: white;
}
.import-target-info strong {
  display: block;
  margin-bottom: 4px;
}
.import-actions,
.import-commit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.import-commit-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.import-commit-actions input {
  width: auto;
  min-height: auto;
}
.import-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 12px;
}
.import-map-grid label {
  margin: 0;
}
.import-map-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.import-map-grid em {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2d6ea8;
  font-style: normal;
  font-size: 12px;
}
.import-preview-table table {
  min-width: 1200px;
}
.import-log-table table {
  min-width: 820px;
}
.tenant-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.tenant-dashboard article {
  padding: 16px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}
.tenant-dashboard span,
.tenant-dashboard small {
  display: block;
  color: var(--muted);
}
.tenant-dashboard strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
  color: var(--ink);
}
.tenant-admin-grid {
  margin-bottom: 14px;
}
.employee-dashboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tenant-setting-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.tenant-setting-line span {
  color: var(--muted);
}
.tenant-table small {
  color: var(--muted);
}
.tenant-table table {
  min-width: 1240px;
}
.delivery-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.delivery-flow article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  background: #fbfcfd;
}
.delivery-flow b {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: #2f6fb0;
  font-size: 13px;
}
.delivery-flow strong {
  color: #263648;
}
.delivery-flow span,
.delivery-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.database-actions {
  flex-wrap: wrap;
  margin-top: 14px;
}
.delivery-note {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dce7f3;
  background: #f7fbff;
}
.muted-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.db-preview {
  max-height: 420px;
  overflow: auto;
  margin-top: 14px;
  padding: 14px;
  background: #202b36;
  color: #dbe8f5;
  border-radius: 4px;
}
.system-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.system-table {
  overflow: auto;
  border: 1px solid var(--line);
}
.system-table table {
  min-width: 980px;
}
.system-table button {
  height: 28px;
  margin-right: 6px;
  border: 1px solid #ccd5dd;
  border-radius: 3px;
  background: white;
}
.approval-steps {
  display: grid;
  gap: 6px;
  min-width: 220px;
}
.approval-steps span {
  display: block;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #f8fafc;
}
.approval-steps span.active {
  border-color: #8ebcf0;
  background: #edf6ff;
}
.approval-steps span.done {
  color: #216e3a;
  border-color: #b7dfc1;
  background: #effaf2;
}
.approval-steps span.rejected {
  color: #9a2c2c;
  border-color: #f1b8b8;
  background: #fff1f1;
}
.approval-steps small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.file-list {
  display: grid;
  gap: 10px;
}
.file-shortcuts {
  margin-top: 14px;
}
.layout-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.layout-field-list label {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #e1e7ee;
  border-radius: 3px;
  background: #f8fafc;
}
.compact-layout label:nth-child(n+9) {
  display: none;
}
.quick-action-list {
  display: grid;
  gap: 10px;
}
.quick-action-list button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid #dce5ee;
  border-radius: 4px;
  background: #f8fafc;
}
.quick-action-list button:hover {
  border-color: #9dc6f2;
  background: #f4f9ff;
}
.quick-action-list strong,
.quick-action-list span {
  display: block;
}
.quick-action-list span {
  color: var(--muted);
  font-size: 13px;
}
.mobile-preview-panel {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  background: #f8fafc;
}
.mobile-preview-panel.in-modal {
  margin-top: 0;
}
.mobile-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mobile-preview-head span {
  color: var(--muted);
  font-size: 13px;
}
.mobile-card-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mobile-card-preview button,
.mobile-action-preview button {
  border: 1px solid #dce5ee;
  border-radius: 5px;
  background: white;
}
.mobile-card-preview button {
  min-height: 78px;
  padding: 12px;
  text-align: left;
}
.mobile-card-preview span,
.mobile-card-preview strong {
  display: block;
}
.mobile-card-preview span {
  color: var(--muted);
  font-size: 13px;
}
.mobile-card-preview strong {
  margin-top: 10px;
  color: var(--blue);
  font-size: 22px;
}
.mobile-action-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mobile-action-preview button {
  min-height: 34px;
  padding: 0 12px;
  color: #35516d;
}
.mobile-card-preview button:hover,
.mobile-action-preview button:hover {
  border-color: #9dc6f2;
  background: #f4f9ff;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  color: white;
  background: rgba(38, 50, 65, .92);
  border-radius: 3px;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  justify-content: flex-end;
  background: rgba(25, 36, 48, .28);
}
.drawer-card {
  width: 560px;
  max-width: 92vw;
  height: 100%;
  padding: 0 18px 18px;
  background: white;
  box-shadow: -12px 0 28px rgba(24, 38, 54, .18);
  overflow: auto;
}
.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin-bottom: 16px;
  padding: 14px 0;
  background: white;
  border-bottom: 1px solid #e5ebf1;
}
.drawer-head strong {
  font-size: 18px;
}
.drawer-head .icon-btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid #c8d5e2;
  border-radius: 4px;
  color: #344255;
  background: #f3f7fb;
  font-size: 24px;
  line-height: 1;
}
.drawer-head .icon-btn:hover {
  color: white;
  background: var(--blue);
}
.field-checklist {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.field-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  background: #f7f9fb;
  border: 1px solid #e3e9ef;
  border-radius: 3px;
}
.add-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.add-field-row input,
.add-field-row select {
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.add-field-row select {
  flex: 0 0 138px;
}
#newFieldSection {
  flex-basis: 180px;
}
.field-designer-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  color: #526273;
  background: #f6f9fc;
  border: 1px solid #e0e8f1;
  border-radius: 4px;
  font-size: 13px;
}
.field-designer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.field-designer-stats span {
  padding: 6px 10px;
  color: #405166;
  border: 1px solid #dce6ef;
  border-radius: 4px;
  background: #fbfcfe;
  font-size: 12px;
}
.field-designer-list {
  display: grid;
  gap: 10px;
}
.field-designer-item {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) repeat(3, auto) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce6ef;
  border-radius: 5px;
  background: #fff;
}
.field-designer-item.muted {
  background: #f7f8fa;
  opacity: .72;
}
.field-designer-item strong,
.field-designer-item span {
  display: block;
}
.field-designer-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.field-designer-main {
  min-width: 0;
}
.custom-field-editor {
  display: grid;
  grid-template-columns: 1fr 118px 140px;
  gap: 6px;
  margin-top: 8px;
}
.custom-field-editor input,
.custom-field-editor select {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  font-size: 12px;
}
.custom-field-editor .custom-field-options {
  grid-column: 1 / -1;
}
.field-designer-item label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #405166;
  font-size: 12px;
}
.field-designer-item button {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cad6e3;
  background: #f8fafc;
  border-radius: 3px;
}
.field-designer-item button:not(:disabled):hover {
  border-color: #91bde8;
  background: #f0f7ff;
}
.field-designer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.drawer-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px -18px -18px;
  padding: 14px 18px;
  background: white;
  border-top: 1px solid #e5ebf1;
}
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(18, 26, 36, .18);
}
.order-dialog {
  width: min(100vw - 8px, 1920px);
  height: min(100vh - 16px, 1080px);
  margin: 4px auto;
  display: grid;
  grid-template-rows: 86px 1fr 86px;
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid #aeb6c0;
  box-shadow: 0 18px 38px rgba(12, 23, 36, .24);
}
.order-dialog > * {
  min-width: 0;
}
.order-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  color: white;
  background: #343d50;
}
.order-dialog-head strong {
  margin-right: 28px;
  font-size: 28px;
  font-weight: 600;
}
.order-dialog-head button {
  border: 0;
  color: #cfd6df;
  background: transparent;
  font-size: 22px;
}
.dialog-tools {
  display: flex;
  align-items: center;
  gap: 20px;
}
.order-dialog-body {
  overflow: auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 52px 50px 120px;
}
.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 38px;
  padding: 0 8px 24px 20px;
  color: #4d83df;
  border-bottom: 2px dotted #5d91ef;
  font-size: 20px;
}
.form-section-title button {
  border: 0;
  color: #89919b;
  background: transparent;
  font-size: 24px;
}
.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 72px;
  row-gap: 40px;
  width: 100%;
  max-width: 100%;
}
.order-form.collapsed-form {
  display: none;
}
.registration-dialog .order-dialog-body {
  padding-bottom: 150px;
}
.registration-dialog .secondary-section,
.bookkeeping-dialog .secondary-section,
.service-dialog .secondary-section {
  margin-top: 54px;
}
.bookkeeping-dialog .order-dialog-body,
.service-dialog .order-dialog-body {
  padding-bottom: 150px;
}
.bookkeeping-dialog .order-form,
.service-dialog .order-form {
  row-gap: 32px;
}
.bookkeeping-dialog .order-form label > span,
.service-dialog .order-form label > span {
  font-size: 19px;
}
.bookkeeping-detail-sections {
  margin-bottom: 18px;
}
.order-form label {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  min-width: 0;
}
.order-form label > span {
  color: #8b929c;
  font-size: 20px;
}
.order-form label.required > span::before,
.order-form label[data-required] > span::before {
  content: "*";
  color: #ee6a5a;
  font-weight: 700;
  margin-right: 4px;
}
.order-form input,
.order-form select,
.order-form textarea,
.lookup-field,
.date-field,
.token-field,
.select-add-field {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: white;
  color: #4a5562;
  font-size: 20px;
}
.order-form input,
.order-form select,
.order-form textarea {
  padding: 0 16px;
}
.order-form input[readonly] {
  background: #ededed;
}
.order-form textarea {
  min-height: 96px;
  padding-top: 14px;
  resize: vertical;
}
.lookup-field,
.date-field,
.token-field,
.select-add-field {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}
.lookup-field input,
.date-field input,
.select-add-field select {
  flex: 1;
  border: 0;
  min-height: 56px;
}
.lookup-field button,
.date-field button,
.select-add-field button,
.lookup-field b,
.date-field b,
.token-field b {
  width: 54px;
  height: 56px;
  border: 0;
  color: #b4b6ba;
  background: transparent;
  text-align: center;
  font-size: 30px;
}
.select-add-field button {
  color: var(--blue);
  font-size: 24px;
}
.token-field {
  padding: 0 8px;
  background: #ededed;
}
.token-field em {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  margin-right: auto;
  font-style: normal;
  background: #f1f4fa;
  border: 1px solid #cad4e4;
  border-radius: 3px;
}
.voucher-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}
.voucher-upload input {
  display: none;
}
.voucher-upload button {
  width: 78px;
  height: 78px;
  color: var(--blue);
  background: white;
  border: 2px dashed #d3dce6;
  border-radius: 3px;
  font-size: 34px;
}
.voucher-upload small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-form .voucher-upload {
  align-items: flex-start;
}
.material-form .voucher-upload button {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.material-form .voucher-upload small {
  align-self: center;
  max-width: min(320px, 100%);
}
.full-row {
  grid-column: 1 / -1;
}
.order-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 0 38px;
  background: white;
  border-top: 1px solid #ddd;
  box-shadow: 0 -4px 12px rgba(26, 38, 52, .06);
}
.save-order-btn,
.save-more-btn,
.cancel-order-btn {
  height: 56px;
  border-radius: 4px;
  font-size: 22px;
}
.save-order-btn,
.save-more-btn {
  color: white;
  background: #3f94ea;
  border: 1px solid #2f7fca;
}
.save-order-btn {
  min-width: 174px;
}
.save-more-btn {
  width: 64px;
  margin-right: 30px;
}
.cancel-order-btn {
  min-width: 174px;
  color: #2f3338;
  background: white;
  border: 1px solid #cfcfcf;
}
.cost-detail-panel {
  margin-top: 54px;
}
.cost-detail-title {
  align-items: center;
}
.cost-detail-actions {
  display: flex;
  gap: 10px;
}
.cost-detail-actions button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  color: #2e5d9f;
  background: #f7fbff;
  font-size: 14px;
}
.cost-detail-table-wrap {
  overflow: auto;
  border: 1px solid #d7dee7;
  background: white;
}
.cost-detail-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.cost-detail-table th,
.cost-detail-table td {
  height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5ebf2;
  color: #4a5562;
  text-align: left;
}
.cost-detail-table th {
  background: #f5f8fc;
  color: #6c7683;
  font-weight: 600;
}
.cost-detail-table input,
.cost-detail-table select,
.cost-detail-table .select-add-field {
  min-height: 38px;
  height: 38px;
  font-size: 15px;
}
.cost-detail-table input,
.cost-detail-table select {
  width: 100%;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.cost-detail-select button {
  width: 40px;
  height: 38px;
  font-size: 18px;
}
.cost-detail-table tfoot td {
  font-weight: 700;
  background: #fbfcfe;
}
.service-detail-panel {
  margin-top: 54px;
}
.service-detail-title {
  align-items: center;
}
.service-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.service-detail-actions button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  color: #2e5d9f;
  background: #f7fbff;
  font-size: 14px;
}
.service-detail-summary {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  color: #536071;
  background: #f4f7fb;
  border: 1px solid #d7dee7;
  border-radius: 3px;
  font-weight: 700;
}
.service-detail-table-wrap {
  overflow: auto;
  border: 1px solid #d7dee7;
  background: white;
}
.service-detail-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}
.service-detail-table th,
.service-detail-table td {
  height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5ebf2;
  color: #4a5562;
  text-align: left;
}
.service-detail-table th {
  background: #f5f8fc;
  color: #6c7683;
  font-weight: 600;
}
.service-detail-table input,
.service-detail-table select,
.service-detail-table .select-add-field {
  min-height: 38px;
  height: 38px;
  font-size: 15px;
}
.service-detail-table input,
.service-detail-table select {
  width: 100%;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.service-detail-table tfoot td {
  font-weight: 700;
  background: #fbfcfe;
}
.service-dialog .voucher-upload {
  min-height: 58px;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  padding: 8px 12px;
}
.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  background: rgba(24, 34, 46, .26);
}
#lookupPicker,
#customerPicker {
  z-index: 70;
}
.mini-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: hidden;
  display: grid;
  grid-template-rows: 56px auto minmax(0, 1fr) auto;
  background: white;
  border: 1px solid #b8c0ca;
  border-radius: 4px;
  box-shadow: 0 18px 38px rgba(16, 28, 42, .26);
}
.mini-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: white;
  background: #343d50;
}
.mini-dialog header button {
  border: 0;
  color: white;
  background: transparent;
  font-size: 26px;
}
.mini-search {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e1e6ec;
}
.mini-search input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.mini-search button,
.quick-form button {
  height: 36px;
}
.pick-list {
  min-height: 0;
  overflow: auto;
  padding: 8px 14px 14px;
}
#customerPicker.is-creating .pick-list {
  max-height: 220px;
}
.pick-list button {
  width: 100%;
  display: block;
  padding: 12px;
  margin: 6px 0;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e0e6ed;
  border-radius: 3px;
}
.pick-list button:hover {
  background: #edf6ff;
  border-color: #b9d8f2;
}
.pick-list strong,
.pick-list span {
  display: block;
}
.pick-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.pick-list p {
  color: var(--muted);
}
.quick-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #e1e6ec;
  background: #fbfcfe;
}
.quick-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.quick-form input {
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.quick-form div {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.generic-dialog {
  width: min(820px, calc(100vw - 28px));
  grid-template-rows: 56px 1fr auto 68px;
}
.generic-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  overflow: auto;
  padding: 18px;
}
.generic-form.customer-module-form {
  gap: 14px 16px;
}
.customer-generic-section {
  grid-column: 1 / -1;
  margin: 0;
}
.generic-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.generic-form .full-row,
.customer-editor-form .full-row,
.customer-editor-form .form-section-title {
  grid-column: 1 / -1;
}
.generic-form label.required > span::before,
.generic-form label[data-required] > span::before,
.settings-form label.required > span::before,
.settings-form label[data-required] > span::before {
  content: "*";
  color: #ee6a5a;
  font-weight: 700;
  margin-right: 4px;
}
.generic-form input,
.generic-form select,
.generic-form textarea {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.generic-form .compact-field {
  min-height: 38px;
  font-size: 14px;
}
.generic-form .compact-field input {
  min-height: 36px;
  padding: 0 10px;
}
.generic-form .compact-field button {
  width: 42px;
  height: 36px;
  font-size: 18px;
}
.generic-form .select-add-field.compact-field select,
.customer-editor-form .select-add-field.compact-field select {
  min-height: 36px;
}
.generic-form textarea {
  min-height: 82px;
  padding-top: 9px;
}
.generic-attachment-block {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(180px, 260px);
  gap: 12px;
  align-items: center;
  margin: 0 18px 16px;
  padding: 14px;
  border: 1px dashed #cbd8e6;
  background: #f8fafc;
}
.generic-attachment-block:not(.hidden) {
  display: grid;
}
.generic-attachment-block input {
  display: none;
}
.generic-attachment-block strong,
.generic-attachment-block span {
  display: block;
}
.generic-attachment-block span,
.generic-attachment-block small {
  color: var(--muted);
  font-size: 13px;
}
.generic-attachment-block small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-chip-list span {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #d9e3ee;
  background: white;
}
.attachment-chip-list a {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #c7d7eb;
  background: #f8fbff;
  color: var(--text);
  text-decoration: none;
}
.attachment-chip-list small {
  color: var(--muted);
}
.generic-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px;
  border-top: 1px solid #e1e6ec;
}
.component-dialog .generic-foot {
  gap: 8px;
}
.new-layout-enabled .dashboard {
  grid-auto-flow: dense;
}
.new-layout-enabled .metric {
  border-left: 4px solid var(--blue);
}
.component-dialog {
  width: min(780px, calc(100vw - 28px));
  grid-template-rows: 56px 1fr 68px;
}
.advanced-dialog {
  width: min(860px, calc(100vw - 28px));
  grid-template-rows: 56px 1fr 68px;
}
.advanced-body {
  overflow: auto;
  padding: 18px;
}
.condition-mode {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  color: var(--muted);
}
.condition-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.condition-row {
  display: grid;
  grid-template-columns: 1fr 120px 1fr 36px;
  gap: 8px;
}
.condition-row select,
.condition-row input {
  height: 34px;
  padding: 0 8px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
}
.condition-row button {
  border: 1px solid #d2dbe3;
  background: white;
  border-radius: 3px;
}
.component-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  overflow: auto;
  padding: 18px;
}
.component-choices button {
  min-height: 86px;
  padding: 12px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dfe6ee;
  border-radius: 4px;
}
.component-choices button:hover,
.component-choices button.active {
  background: #edf6ff;
  border-color: #70aee4;
}
.component-choices strong,
.component-choices span {
  display: block;
}
.component-choices span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.info-dialog {
  width: min(640px, calc(100vw - 28px));
  grid-template-rows: 56px 1fr 68px;
}
.wide-info .info-dialog {
  width: min(900px, calc(100vw - 32px));
}
.info-body {
  overflow: auto;
  padding: 20px;
  line-height: 1.8;
}
.info-body p {
  margin: 0;
}
.detail-page-view {
  padding: 0;
  background: #fff;
}
.record-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #e5e8ec;
  background: white;
}
.record-title-area {
  min-width: 0;
}
.detail-back-btn {
  height: 28px;
  margin-bottom: 8px;
  border: 0;
  background: transparent;
  color: #5d8edb;
  font-size: 14px;
}
.record-title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.record-title-icon {
  color: #2f3c4d;
  font-size: 24px;
}
.record-title-line h2 {
  margin: 0;
  max-width: 520px;
  overflow: hidden;
  color: #253244;
  font-size: 26px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-owner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5b6f86;
}
.record-owner-badge b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #75a9df;
}
.record-owner-badge span,
.record-owner-badge small {
  display: block;
}
.record-owner-badge small {
  margin-top: 2px;
  color: #7f8c9a;
}
.record-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.detail-close-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #9aa5af;
  background: #f0f2f4;
  font-size: 24px;
}
.detail-more-wrap {
  position: relative;
}
.detail-more-menu {
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 4;
  width: 210px;
  padding: 8px;
  background: white;
  border: 1px solid #d8dfe7;
  box-shadow: 0 16px 34px rgba(21, 33, 45, .18);
}
.detail-more-menu button {
  width: 100%;
  height: 36px;
  border: 0;
  color: #32465a;
  background: transparent;
  text-align: left;
}
.detail-more-menu button:hover {
  background: #f1f6fd;
}
.record-detail-tabs {
  display: flex;
  gap: 18px;
  height: 88px;
  padding: 10px 24px 0;
  border-bottom: 1px solid #e5e8ec;
  background: white;
}
.record-detail-tabs button {
  min-width: 74px;
  padding: 8px 4px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #778391;
  background: transparent;
}
.record-detail-tabs button.active {
  color: #4d8fe7;
  border-bottom-color: #4d8fe7;
}
.record-detail-tabs strong,
.record-detail-tabs span {
  display: block;
}
.record-detail-tabs strong {
  margin-bottom: 8px;
  color: inherit;
  font-size: 20px;
}
.record-detail-body {
  min-height: calc(100vh - 230px);
  padding: 26px 24px 80px;
  background: white;
}
.record-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  color: #5d8edb;
  border-bottom: 1px dotted #8db9f0;
}
.record-section-title button {
  border: 0;
  background: transparent;
  color: #9aa5af;
  font-size: 20px;
}
.record-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 90px;
  row-gap: 30px;
  padding: 28px 14px 34px;
}
.record-field {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.record-field span {
  color: #9aa5af;
}
.record-field strong {
  min-width: 0;
  color: #2f3b4b;
  font-weight: 500;
  word-break: break-word;
}
.record-pill {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 14px;
  color: #51616f;
  background: #f0f2f5;
  font-style: normal;
}
.record-link-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 14px 0;
}
.detail-related-table {
  border: 1px solid #dfe5eb;
}
.related-table-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #dfe5eb;
  background: #f8fafc;
}
.detail-related-table table {
  min-width: 900px;
}
.empty-related {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: #8b98a5;
  border: 1px dashed #d8e1ea;
  background: #fbfcfe;
}
.empty-related strong {
  color: #4b5b6c;
}
.detail-file-list {
  padding: 18px;
  border: 1px solid #dfe5eb;
}
.detail-log-list {
  display: grid;
  gap: 12px;
}
.detail-log-list article {
  padding: 14px 16px;
  border: 1px solid #e1e7ee;
  background: #fbfcfd;
}
.detail-log-list span {
  color: #8b98a5;
  font-size: 12px;
}
.detail-log-list strong {
  display: block;
  margin-top: 4px;
  color: #304154;
}
.detail-log-list p {
  margin: 6px 0 0;
  color: #526273;
}
.editor-panel {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  justify-content: flex-end;
  background: rgba(26, 35, 48, .18);
  opacity: 0;
  transition: opacity .18s ease;
}
.editor-panel.open {
  opacity: 1;
}
.editor-panel-body {
  width: min(920px, calc(100vw - 40px));
  height: 100%;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) 72px;
  background: white;
  border-left: 1px solid #b9c4d0;
  box-shadow: -18px 0 34px rgba(18, 29, 42, .22);
  transform: translateX(22px);
  transition: transform .18s ease;
}
.editor-panel.open .editor-panel-body {
  transform: translateX(0);
}
.editor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: white;
  background: #343d50;
}
.editor-panel-head div {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  align-items: center;
}
.editor-panel-head span {
  grid-row: 1 / span 2;
  font-size: 24px;
}
.editor-panel-head strong {
  font-size: 20px;
}
.editor-panel-head small {
  color: #c5d0dc;
}
.editor-panel-head button {
  border: 0;
  color: white;
  background: transparent;
  font-size: 28px;
}
.editor-panel-form {
  min-height: 0;
  overflow: auto;
  padding: 26px 34px 90px;
}
.editor-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 50px;
  padding-top: 28px;
}
.editor-field-grid label {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.editor-field-grid label.full-row {
  grid-column: 1 / -1;
}
.editor-field-grid span {
  color: #8995a2;
}
.editor-field-grid input,
.editor-field-grid select,
.editor-field-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #c9d2dc;
  border-radius: 3px;
  color: #334153;
  background: white;
}
.editor-field-grid textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}
.editor-panel-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px;
  border-top: 1px solid #dfe5eb;
  background: white;
}
.assign-share-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.assign-share-layout section {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe5eb;
  background: #fbfcfe;
}
.assign-share-layout h3 {
  margin: 0 0 8px;
  color: #2f3c4d;
  font-size: 17px;
}
.assign-share-layout label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #6d7a88;
}
.assign-share-layout select,
.assign-share-layout textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  background: white;
}
.assign-share-layout select[multiple] {
  min-height: 128px;
  padding: 8px 10px;
}
.assign-share-layout textarea {
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}
.assign-main-field {
  margin-top: 18px;
}
.share-check-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.share-check-list strong {
  margin-top: 8px;
  color: #35475a;
}
.share-check-list label,
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #e1e7ee;
  background: white;
}
.share-check-list small {
  margin-left: auto;
  color: #9aa5af;
}
.share-view-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.share-view-list article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e0e6ed;
  background: white;
}
.share-view-list span {
  display: block;
  margin-top: 4px;
  color: #8b98a5;
  font-size: 13px;
}
.share-view-list button {
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid #cbd5df;
  color: #2f6fb2;
  background: white;
}
.approval-submit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.approval-submit-layout section {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe5eb;
  background: #fbfcfe;
}
.approval-submit-layout h3 {
  margin: 0 0 12px;
  color: #2f3c4d;
  font-size: 17px;
}
.approval-submit-layout label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #6d7a88;
}
.approval-submit-layout select,
.approval-submit-layout textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  background: white;
}
.approval-submit-layout textarea {
  min-height: 108px;
  padding-top: 10px;
  resize: vertical;
}
.approval-submit-summary {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0 0 14px;
}
.approval-submit-summary dt {
  color: #8b98a5;
}
.approval-submit-summary dd {
  min-width: 0;
  margin: 0;
  color: #334153;
  word-break: break-word;
}
.detail-action-grid,
.org-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-action-grid button,
.org-map article {
  padding: 14px;
  border: 1px solid #dce4ed;
  background: #f8fafc;
  text-align: left;
}
.org-map strong,
.org-map span {
  display: block;
}
.org-map span {
  margin-top: 6px;
  color: #8b98a5;
}
.detail-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
  margin: 0;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  color: var(--ink);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e3e8ee;
}
.detail-section-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.detail-section {
  padding: 14px;
  border: 1px solid #e3e8ee;
  background: #f8fafc;
}
.detail-section h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}
.compact-detail-list {
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
}
.compact-detail-list dd {
  word-break: break-word;
}
.drill-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
}
.drill-table-wrap {
  overflow: auto;
  border: 1px solid #dfe5eb;
}
.drill-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.drill-table th {
  height: 42px;
  color: white;
  background: #4395ec;
  text-align: left;
  font-weight: 400;
}
.drill-table th,
.drill-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
}
.drill-table tbody tr:hover {
  background: #f5f9ff;
}
.drill-table button {
  height: 30px;
  border: 1px solid #cbd5df;
  color: #2f6fb2;
  background: white;
  border-radius: 3px;
}
.empty-tip {
  color: var(--muted);
}
.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  color: var(--ink);
  background: white;
}
.settings-form textarea {
  min-height: 104px;
  padding: 10px;
  resize: vertical;
}
.customer-editor-form .lookup-field,
.customer-editor-form .date-field,
.customer-editor-form .select-add-field {
  min-height: 38px;
}
.customer-editor-form .lookup-field input,
.customer-editor-form .date-field input {
  min-height: 36px;
}
.customer-editor-form .lookup-field button,
.customer-editor-form .date-field button,
.customer-editor-form .select-add-field button {
  width: 42px;
  height: 36px;
  flex: 0 0 42px;
}
.approval-create-form {
  margin-bottom: 10px;
}
.approval-create-form .full-row {
  grid-column: 1 / -1;
}
.approval-create-tip {
  margin: 8px 0 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.draft-list,
.download-grid,
.timeline-list {
  display: grid;
  gap: 12px;
}
.draft-list article,
.download-grid article,
.timeline-list article,
.referral-box,
.permission-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e6ed;
  border-radius: 4px;
  background: #f8fafc;
}
.draft-list strong,
.download-grid strong,
.timeline-list strong,
.referral-box strong,
.permission-request strong {
  display: block;
}
.draft-list span,
.download-grid span,
.timeline-list span,
.referral-box p,
.permission-request p {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.permission-request {
  display: block;
}
.permission-request p {
  margin: 6px 0 14px;
}
.draft-list button,
.download-grid button {
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  color: #405062;
  background: white;
}
.theme-green {
  --blue: #2da66f;
  --green: #23865b;
}
.theme-orange {
  --blue: #d9822b;
  --yellow: #e5aa3d;
}
.theme-dark {
  --bg: #eef1f4;
  --ink: #222c38;
}
.theme-dark .topbar,
.theme-dark .module-tabs,
.theme-dark .mini-dialog header {
  background: #222a36;
}
.density-compact .topbar {
  height: 70px;
}
.density-compact .module-tabs {
  min-height: 70px;
  height: 70px;
}
.density-compact .module-tab,
.density-compact .module-tab > button {
  height: 70px;
}
.density-compact .module-tab > button {
  font-size: 17px;
}
.date-popover {
  position: fixed;
  z-index: 50;
  width: 300px;
  padding: 12px;
  background: white;
  border: 1px solid #c3ccd6;
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(18, 31, 46, .2);
}
.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.date-head button {
  width: 34px;
  height: 30px;
  border: 1px solid #d5dde5;
  background: #f8fafc;
  border-radius: 3px;
  font-size: 20px;
}
.week-row,
.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.week-row span {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.date-grid i,
.date-grid button {
  height: 34px;
}
.date-grid button {
  border: 1px solid transparent;
  background: #f7f9fb;
  border-radius: 3px;
}
.date-grid button:hover,
.date-grid button.active {
  color: white;
  background: var(--blue);
}

.collapsed .side-nav { width: 58px; }
.collapsed .side-brand span, .collapsed .nav-title span, .collapsed .nav-child { display: none; }
.collapsed .workspace { width: 100%; }

@media (max-width: 1180px) {
  .login-shell { flex-direction: column; gap: 24px; }
  .login-ad, .login-panel { width: min(100%, 420px); }
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .wise-brand {
    min-width: 220px;
    height: 70px;
    margin-left: -18px;
    padding-left: 22px;
    font-size: 24px;
  }
  .module-tabs {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    min-height: 70px;
    height: 70px;
    padding: 0;
    overflow: visible;
    flex-wrap: nowrap;
  }
  .module-tab,
  .module-tab > button { height: 70px; }
  .module-tab > button {
    min-width: auto;
    padding: 0 14px;
    font-size: 15px;
  }
  .module-flyout { min-width: 190px; }
  .metric-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-card,
  .list-card,
  .wise-list-card,
  .wise-reminder-card,
  .wise-chart-card,
  .process-card {
    grid-column: span 12;
  }
  .home-toolbar, .grid-header, .report-header { align-items: stretch; flex-direction: column; }
  .grid-actions { flex-wrap: wrap; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .order-dialog {
    height: 100vh;
    margin: 0;
    grid-template-rows: 70px 1fr 76px;
  }
  .order-dialog-head {
    padding: 0 16px;
  }
  .order-dialog-head strong {
    font-size: 20px;
  }
  .order-dialog-body {
    padding: 24px 16px 100px;
  }
  .order-form {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
  .order-form label {
    grid-template-columns: 110px 1fr;
    gap: 12px;
  }
  .order-form label > span,
  .order-form input,
  .order-form select,
  .order-form textarea,
  .lookup-field,
  .date-field,
  .token-field {
    font-size: 15px;
  }
  .quick-form {
    grid-template-columns: 1fr;
  }
  .generic-form {
    grid-template-columns: 1fr;
  }
  .generic-attachment-block {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .generic-attachment-block small {
    white-space: normal;
  }
  .component-choices {
    grid-template-columns: 1fr;
  }
  .system-layout {
    grid-template-columns: 1fr;
  }
  .system-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .system-grid.two,
  .system-grid.three {
    grid-template-columns: 1fr;
  }
  .import-layout,
  .import-steps,
  .import-map-grid {
    grid-template-columns: 1fr;
  }
  .import-hero,
  .import-section-head,
  .import-commit-actions {
    display: grid;
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    overflow-x: auto;
  }
  .topbar-actions {
    gap: 14px;
  }
  .module-tabs {
    display: flex;
    min-width: 220px;
    overflow-x: auto;
    overflow-y: visible;
  }
  .module-tab > button {
    padding: 0 10px;
    font-size: 14px;
  }
  .module-tab > button b {
    display: none;
  }
  .wise-brand {
    min-width: 170px;
    font-size: 22px;
  }
  .metric-board {
    grid-template-columns: 1fr;
  }
  .metric {
    min-height: 148px;
  }
}
