:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d7e2f0;
  --line-strong: #b9c9dc;
  --text: #102033;
  --muted: #5d7088;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #059669;
  --red: #b91c1c;
  --amber: #b45309;
  --nav: #eaf4ff;
  --nav-soft: #cce4ff;
  --nav-text: #173a5e;
  --nav-muted: #3b5f82;
  --nav-line: #b8d3ee;
  --nav-card: #f5faff;
  --nav-scroll: #9bbfe4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft JhengHei UI", "Microsoft YaHei", "Microsoft JhengHei", "Segoe UI", sans-serif;
  font-size: 14px;
}

.desktop-titlebar {
  height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 16px;
  background: #f8fafd;
  border-bottom: 1px solid #afc0d4;
}

.desktop-window-title {
  color: #122033;
  font-size: 15px;
  font-weight: 800;
}

.desktop-window-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.desktop-window-status {
  border: 1px solid #afc0d4;
  border-radius: 5px;
  background: #ffffff;
  color: #122033;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.desktop-window-controls {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  height: 28px;
  border-left: 1px solid #d4deea;
}

.desktop-window-controls span {
  position: relative;
  display: block;
}

.desktop-window-controls span::before {
  content: "";
  position: absolute;
  inset: 9px 11px;
  border-top: 2px solid #64748b;
}

.desktop-window-controls span:nth-child(2)::before {
  inset: 8px 10px;
  border: 1px solid #64748b;
}

.desktop-window-controls span:nth-child(3)::before,
.desktop-window-controls span:nth-child(3)::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 13px;
  border-top: 2px solid #64748b;
  transform: rotate(45deg);
}

.desktop-window-controls span:nth-child(3)::after {
  transform: rotate(-45deg);
}

.candidate-test-banner {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: calc(100vh - 40px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 40px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: var(--nav-text);
  border-right: 1px solid var(--nav-line);
  padding: 16px 0 14px;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-name {
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}

.brand-subtitle {
  color: var(--nav-muted);
  margin-top: 6px;
  font-size: 13px;
}

.module-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 8px;
}

.module-nav::-webkit-scrollbar {
  width: 8px;
}

.module-nav::-webkit-scrollbar-thumb {
  background: var(--nav-scroll);
  border-radius: 0;
}

.sidebar-hidden-actions {
  display: none;
}

.nav-button {
  width: calc(100% - 24px);
  border: 0;
  background: transparent;
  color: var(--nav-text);
  text-align: left;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin: 0 12px 4px;
}

.nav-button:hover,
.nav-button.active {
  background: var(--nav-soft);
  color: var(--nav-text);
}

.side-card {
  flex: 0 0 auto;
  border: 1px solid var(--nav-line);
  background: var(--nav-card);
  border-radius: 5px;
  padding: 8px;
  margin: 0 14px 8px;
}

.side-title {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
}

.side-input {
  width: 100%;
  height: 30px;
  min-height: 30px;
  border: 1px solid #cdd8e6;
  border-radius: 4px;
  padding: 5px 10px;
  margin-bottom: 5px;
  background: #fff;
  color: #0f172a;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 6px 0;
}

.side-note {
  color: var(--nav-muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.side-note.strong {
  color: var(--nav-text);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.password-change-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--nav-line);
}

.password-change-panel .button {
  margin: 2px 0 6px;
}

.sidebar-details-toggle {
  display: none;
  margin: 7px 0 0;
  height: 28px;
  min-height: 28px;
  font-size: 12px;
}

body.logged-in .sidebar-details-toggle {
  display: block;
}

body.logged-in:not(.sidebar-details-open) .sidebar-detail-card {
  display: none;
}

body.logged-in .login-card {
  margin-bottom: 8px;
}

body.logged-in .login-card .side-input,
body.logged-in .login-card #forgotPasswordButton {
  display: none;
}

body.logged-in .login-card .side-actions {
  grid-template-columns: 1fr;
  gap: 0;
  margin: 6px 0 0;
}

body.logged-in .login-card #loginButton {
  display: none;
}

body.logged-in .login-card .password-change-panel .side-input,
body.logged-in .login-card .password-change-panel .button {
  display: block;
}

.database-note {
  flex: 0 0 auto;
  margin: 0 18px;
  color: var(--nav-muted);
  font-size: 12px;
  line-height: 1.45;
}

.database-note span {
  display: block;
  color: var(--nav-text);
  margin-top: 5px;
}

.main-area {
  min-width: 0;
  padding: 14px;
}

body.synvexa-active .main-area {
  height: calc(100vh - 40px);
  overflow: hidden;
  padding: 0;
}

body.synvexa-active .page-root {
  height: 100%;
  min-height: 0;
}

.synvexa-employee-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fbfcfb;
}

.page-root {
  min-height: calc(100vh - 28px);
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--muted);
  margin-top: 6px;
}

.header-actions,
.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  margin-bottom: 12px;
}

.panel.tight {
  padding: 10px;
}

.panel-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.hint {
  color: var(--muted);
  line-height: 1.55;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
  padding: 10px;
  min-height: 70px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
}

.status-list {
  display: grid;
  gap: 8px;
}

.status-item {
  border-left: 3px solid var(--blue);
  background: #f8fbff;
  padding: 8px 10px;
  line-height: 1.5;
}

.desktop-search-box {
  min-width: 420px;
  border: 1px solid #d1dcea;
  background: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  color: #5b6f89;
  font-weight: 700;
}

.desktop-search-box span {
  float: right;
  color: #6f7f95;
}

.desktop-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.desktop-metric-card {
  min-height: 150px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  overflow: hidden;
}

.desktop-metric-card span,
.desktop-finance-grid span {
  display: block;
  color: #50647c;
  font-weight: 700;
}

.desktop-metric-card strong {
  display: block;
  margin-top: 22px;
  font-size: 30px;
  color: #102033;
}

.desktop-metric-card em,
.desktop-finance-grid em {
  display: block;
  margin-top: 6px;
  color: #059669;
  font-style: normal;
  font-size: 13px;
}

.desktop-metric-card b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9f1ff;
  color: #2563eb;
}

.desktop-metric-card.green b { background: #dcfce7; color: #059669; }
.desktop-metric-card.purple b { background: #ede9fe; color: #7c3aed; }
.desktop-metric-card.amber b { background: #ffedd5; color: #d97706; }
.desktop-metric-card.cyan b { background: #cffafe; color: #0891b2; }

.desktop-metric-card i {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 38px;
  background:
    linear-gradient(145deg, transparent 8%, #2f6df6 9%, #2f6df6 13%, transparent 14%),
    linear-gradient(35deg, transparent 17%, #2f6df6 18%, #2f6df6 22%, transparent 23%),
    linear-gradient(150deg, transparent 34%, #2f6df6 35%, #2f6df6 39%, transparent 40%),
    linear-gradient(30deg, transparent 51%, #2f6df6 52%, #2f6df6 56%, transparent 57%);
  opacity: .85;
}

.desktop-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(280px, .85fr) minmax(330px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.desktop-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.desktop-trend-panel {
  min-height: 430px;
  position: relative;
}

.desktop-chart-bars {
  height: 210px;
  margin: 72px 22px 0;
  border-bottom: 1px solid #dbe5f2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 20px;
}

.desktop-chart-bars span {
  display: block;
  background: linear-gradient(180deg, #2f6df6, #69a7ff);
  width: 22px;
}

.desktop-chart-line {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 205px;
  height: 2px;
  background: repeating-linear-gradient(105deg, #2563eb 0 26px, transparent 26px 36px);
}

.desktop-chart-legend {
  display: flex;
  gap: 18px;
  margin: 58px 22px 0;
  color: #45617e;
}

.desktop-chart-legend em {
  margin-left: auto;
  font-style: normal;
}

.desktop-work-panel {
  min-height: 430px;
}

.desktop-donut {
  width: 138px;
  height: 138px;
  margin: 28px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#34d399 0 41%, #93c5fd 41% 72%, #f97316 72% 91%, #cbd5e1 91% 100%);
}

.desktop-donut span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fff;
  color: #53677e;
  line-height: 1.35;
}

.desktop-work-list,
/* 總台待審批卡（T-0825-12/22 inbox UI） */
.approval-inbox-panel .panel-title span { color: #dc2626; font-weight: 600; margin-left: 6px; }
.approval-inbox-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; margin: 8px 0; }
.approval-inbox-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.approval-inbox-row.cqp-tone-submitted { background: #fef2f2; border-color: #fca5a5; border-left: 3px solid #dc2626; }
.approval-inbox-row.cmc-tone-waiting { background: #eff6ff; border-color: #93c5fd; border-left: 3px solid #2563eb; }
.approval-inbox-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.approval-inbox-info strong { font-size: 13px; }
.approval-inbox-info span { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approval-inbox-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: #dc2626; color: #fff; width: fit-content; }
.approval-inbox-tag.tag-claim { background: #2563eb; }
.approval-inbox-tag.tag-deletion { background: #b45309; }
.approval-inbox-actions { display: flex; gap: 6px; flex-shrink: 0; }
.approval-inbox-error { padding: 6px 10px; border-radius: 6px; background: #fef2f2; color: #dc2626; font-size: 12px; margin-bottom: 6px; }

.desktop-side-stack {
  display: grid;
  gap: 12px;
}

.desktop-work-list div,
.desktop-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.desktop-work-list span:nth-child(1) { color: #059669; }
.desktop-status-row em {
  color: #059669;
  font-style: normal;
}
.desktop-status-row.warn em {
  color: #ea580c;
}

.panel-title span {
  margin-left: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.desktop-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.desktop-finance-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.desktop-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.button {
  border: 1px solid #d4deea;
  background: #eaf0f8;
  color: #122033;
  min-height: 34px;
  border-radius: 6px;
  border-radius: 6px;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  border-color: #9bb2d0;
}

.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.button.ghost {
  background: #eaf0f8;
  color: #102033;
}

.button.full {
  width: 100%;
}

.button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.tab-button {
  border: 1px solid #c9d8eb;
  background: #fff;
  color: #18324f;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 800;
  min-height: 38px;
  min-width: 108px;
  text-align: center;
  cursor: pointer;
}

.tab-button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.hidden {
  display: none !important;
}

.finance-desktop-shell {
  min-width: 1180px;
}

.finance-topbar,
.finance-filterbar,
.finance-batchbar {
  display: grid;
  gap: 8px;
  align-items: start;
  background: var(--panel);
  border: 1px solid #afc0d4;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 10px;
}

.finance-topbar {
  grid-template-columns: minmax(420px, 1fr) 120px 120px 120px 110px;
}

.finance-filterbar {
  grid-template-columns: auto 180px 180px minmax(260px, 1fr) auto auto;
  align-items: center;
}

.finance-batchbar {
  grid-template-columns: auto auto auto auto minmax(0, 1fr);
  align-items: center;
}

.finance-title-block h2 {
  margin: 0;
  font-size: 20px;
}

.finance-title-block p {
  margin: 4px 0 0;
  color: var(--muted);
}

.finance-ledger-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 700;
}

.finance-ledger-select {
  width: 360px;
}

.finance-filterbar label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.finance-filterbar .finance-keyword {
  min-width: 260px;
}

.finance-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border: 1px solid #b8cce4;
  border-radius: 6px 6px 0 0;
  background: #f4f8fd;
  padding: 8px 8px 0;
  margin-bottom: 0;
}

.finance-tabs .tab-button {
  min-height: 38px;
  border-radius: 6px 6px 0 0;
  border-color: #b8cce4;
  background: linear-gradient(#ffffff, #e8f0fa);
  color: #001b38;
}

.finance-tabs .tab-button.active {
  background: #fff;
  color: #001b38;
  border-bottom-color: #fff;
}

.finance-tab-page {
  border: 1px solid #b8cce4;
  border-top: 0;
  background: #fff;
  padding: 10px;
  min-height: 620px;
}

.finance-metrics,
.finance-reminder-grid,
.finance-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.finance-candidate-panel {
  margin-bottom: 12px;
}

.finance-candidate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.finance-candidate-grid .finance-mini-table {
  min-width: 0;
}

.finance-simulation-log {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.finance-simulation-log h4 {
  margin: 0 0 8px;
}

.finance-reminder-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finance-reminder {
  min-height: 122px;
  display: grid;
  align-content: start;
  gap: 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.finance-reminder span {
  font-size: 24px;
  font-weight: 800;
}

.finance-reminder em,
.finance-reminder small {
  color: var(--muted);
  font-style: normal;
}

.finance-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.finance-review-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr;
  gap: 12px;
}

.finance-mini-table h4 {
  margin: 0 0 6px;
}

.finance-mini-table .table-wrap {
  max-height: 190px;
}

.finance-mini-table .data-table {
  min-width: 0;
  table-layout: fixed;
}

.finance-mini-table .data-table th,
.finance-mini-table .data-table td {
  padding: 8px 7px;
  white-space: normal;
}

.finance-quick-panel,
.finance-entry-grid,
.finance-ocr-layout {
  display: grid;
  gap: 12px;
}

.finance-quick-panel {
  grid-template-columns: 1.4fr 1fr;
}

.finance-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.finance-draft-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-bottom: 10px;
}

.finance-draft-fields .form-field span,
.finance-review-fields .form-field span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 5px;
}

.finance-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.finance-entry-grid {
  grid-template-columns: 420px minmax(0, 1fr);
  margin-top: 10px;
}

.finance-ocr-layout {
  grid-template-columns: minmax(360px, .9fr) minmax(0, 1.25fr) minmax(320px, .85fr);
  align-items: stretch;
}

.finance-preview-pane {
  min-height: 500px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #9fb2c8;
  border-radius: 6px;
  background: #f8fbff;
  color: #334155;
  font-weight: 800;
}

.finance-preview-pane span {
  display: block;
  max-width: 360px;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 500;
}

.finance-review-fields {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.finance-review-fields .form-field {
  display: block;
  margin-bottom: 8px;
}

.finance-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.warehouse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 360px;
  gap: 12px;
  align-items: start;
}

.warehouse-desktop-pane {
  min-width: 1180px;
}

.warehouse-basic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(430px, .72fr);
  gap: 10px;
  align-items: stretch;
}

.warehouse-material-list .table-wrap {
  min-height: 350px;
}

.warehouse-material-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 12px 0;
}

.warehouse-material-detail-grid .form-field:nth-last-child(1) {
  grid-column: span 4;
}

.warehouse-save-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0 8px;
}

.warehouse-material-search-strip {
  margin-bottom: 10px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-line.inline {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
}

.warehouse-desktop-tabs {
  border: 1px solid #b8cce4;
  border-radius: 6px 6px 0 0;
  background: #f4f8fd;
  padding: 8px 8px 0;
  gap: 4px;
  margin-bottom: 0;
}

.warehouse-desktop-tabs .tab-button {
  min-height: 38px;
  border-radius: 6px 6px 0 0;
  border-color: #b8cce4;
  background: linear-gradient(#ffffff, #e8f0fa);
  color: #001b38;
}

.warehouse-desktop-tabs .tab-button.active {
  background: #fff;
  color: #001b38;
  border-bottom-color: #fff;
}

.warehouse-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.warehouse-metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 12px 14px;
  min-height: 76px;
}

.warehouse-summary-grid .warehouse-metric {
  border-color: #b8cce4;
  background: #fff;
  border-radius: 6px;
}

.warehouse-metric.risk .metric-value {
  color: var(--red);
}

.warehouse-a001-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 12px;
}

.warehouse-a001-column {
  border: 1px solid #b8cce4;
  background: #fff;
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
}

.warehouse-a001-column h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #001b38;
}

.warehouse-a001-column table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.warehouse-a001-column th,
.warehouse-a001-column td {
  border: 1px solid #d6e1ef;
  padding: 6px 7px;
  text-align: left;
  vertical-align: top;
}

.warehouse-a001-column th {
  background: #eef4fb;
  color: #001b38;
  font-weight: 800;
}

.warehouse-a001-status {
  display: inline-block;
  min-width: 76px;
  font-weight: 800;
  color: #0f4c81;
}

.warehouse-a001-wide {
  grid-column: 1 / -1;
}

.warehouse-physical-layout {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-title.small {
  font-size: 15px;
  margin-top: 0;
}

.warehouse-label-preview {
  display: grid;
  gap: 6px;
  border: 1px solid #334155;
  background: #fff;
  color: #111827;
  padding: 18px;
  margin-bottom: 12px;
  min-height: 138px;
  font-family: Consolas, "Courier New", monospace;
}

.warehouse-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}

.warehouse-step-strip span {
  border: 1px solid #afc0d4;
  border-radius: 4px;
  background: #f1f5f9;
  padding: 8px;
  font-weight: 800;
  text-align: center;
}

.form-field label {
  display: block;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cdd8e6;
  border-radius: 5px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #e7eef7;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: #f0f5fb;
  font-weight: 800;
}

.data-table tr:hover td {
  background: #f8fbff;
}

.data-table tr.selected td {
  background: #eaf2ff;
}

.pager {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 48px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #047857;
  font-weight: 800;
}

.image-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
}

.target-image-box {
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.target-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.match-list {
  display: grid;
  gap: 8px;
  max-height: 610px;
  overflow-y: auto;
}

.match-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.match-card:hover,
.match-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.match-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef4fb;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.match-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.match-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.45;
}

.cart-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: grid;
  place-items: center;
  z-index: 50;
}

.cart-modal {
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  background: #fff;
  border-radius: 9px;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
}

.cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 82px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #e6eef8;
  padding: 10px 0;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 14px;
  right: 18px;
  min-width: 260px;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #102033;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .2);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.status-line {
  border: 1px solid #cfe0f5;
  background: #f5f9ff;
  border-radius: 7px;
  padding: 10px 12px;
  color: #214263;
}

.admin-hr-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.admin-hr-sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.admin-hr-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 10px 0;
}

.admin-hr-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.admin-hr-employee-card {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  color: var(--text);
}

.admin-hr-employee-card:hover,
.admin-hr-employee-card.active {
  border-color: var(--blue);
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}

.admin-hr-employee-card span {
  color: var(--muted);
  font-size: 12px;
}

.admin-hr-main {
  min-width: 0;
}

.admin-hr-review-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
  gap: 12px;
}

.admin-hr-preview-box {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.compact-input {
  width: min(100%, 340px);
}

.admin-hr-desktop-shell {
  display: grid;
  gap: 8px;
  min-width: 1180px;
  color: #001b38;
}

.admin-hr-desktop-header {
  display: grid;
  grid-template-columns: 230px auto minmax(330px, .85fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #f9fbff;
  padding: 10px 14px 8px;
}

.admin-hr-title-block {
  min-width: 0;
}

.admin-hr-product {
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.admin-hr-current-user {
  margin-top: 4px;
  color: #385170;
  font-size: 12px;
}

.admin-hr-tabs {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.admin-hr-tab {
  min-width: 126px;
  min-height: 36px;
  border: 1px solid #c5d5e8;
  border-radius: 6px;
  background: linear-gradient(#f3f8ff, #e4edf8);
  color: #001b38;
  font-weight: 900;
  cursor: pointer;
  position: relative;
}

.admin-hr-tab.active {
  background: #f3f8ff;
}

.admin-hr-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .45);
}

.admin-hr-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
}

.admin-hr-ocr-strip {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.admin-hr-ocr-input {
  width: 44px;
  height: 28px;
  border: 1px solid #aac0d8;
  background: #fff;
  text-align: center;
}

.mini-button {
  min-height: 28px;
  border: 1px solid #c7d5e8;
  border-radius: 5px;
  background: #eef4fb;
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
}

.mini-button.success {
  background: #4fae9d;
  border-color: #4fae9d;
  color: #fff;
}

.admin-hr-ocr-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #42617f;
}

.admin-hr-employee-form {
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 9px 14px 8px;
  min-width: 0;
}

.admin-hr-employee-form h2 {
  margin: 0 0 5px;
  font-size: 22px;
  color: #001b38;
}

.admin-hr-existing-workspace {
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.admin-hr-flow-line {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 30px;
  margin-bottom: 8px;
  border: 1px solid #b8cce4;
  border-radius: 5px;
  background: #fff;
  padding: 5px 12px;
  color: #001b38;
  font-size: 13px;
}

.admin-hr-flow-line em {
  color: #c45c10;
  font-style: normal;
}

.admin-hr-employee-docs-workbench {
  display: grid;
  grid-template-columns: 410px minmax(620px, 1fr) 480px;
  gap: 12px;
  min-width: 0;
}

.admin-hr-docs-left,
.admin-hr-docs-main,
.admin-hr-docs-right {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.admin-hr-docs-card {
  min-width: 0;
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.admin-hr-docs-center-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 8px;
  min-height: 190px;
}

.admin-hr-docs-center-title h2,
.admin-hr-status-card h2,
.admin-hr-review-workbench h2 {
  margin: 0 0 4px;
  color: #001b38;
  font-size: 24px;
  font-weight: 900;
}

.admin-hr-docs-center-title p,
.admin-hr-status-card p,
.admin-hr-review-workbench p,
.admin-hr-docs-list-card p {
  margin: 3px 0;
  color: #385170;
  font-size: 12px;
}

.admin-hr-docs-left-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-hr-docs-note {
  grid-column: 1 / -1;
  align-self: end;
}

.admin-hr-employee-flow-card {
  min-height: 494px;
}

.admin-hr-employee-flow-table-wrap {
  height: 390px;
  overflow: auto;
  border: 1px solid #b8cce4;
}

.admin-hr-employee-flow-table {
  min-width: 360px;
}

.admin-hr-employee-flow-table tr {
  cursor: pointer;
}

.admin-hr-list-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 82px 82px;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
}

.admin-hr-status-card {
  min-height: 230px;
}

.admin-hr-docs-list-card .admin-hr-document-table-wrap {
  height: 126px;
}

.admin-hr-preview-card {
  min-height: 690px;
}

.admin-hr-docs-preview-surface {
  height: 610px;
  overflow: auto;
  border: 1px solid #d7e2ef;
  background: #eef3fa;
  padding: 14px;
}

.admin-hr-docs-preview-surface .admin-hr-original-frame {
  min-height: 560px;
}

.admin-hr-docs-preview-surface .admin-hr-original-paper {
  min-height: 560px;
}

.admin-hr-docs-preview-surface .admin-hr-original-image {
  max-height: 560px;
}

.admin-hr-docs-right {
  min-height: 936px;
}

.admin-hr-review-workbench {
  height: 936px;
  overflow: auto;
}

.admin-hr-warning {
  color: #c45c10 !important;
}

.admin-hr-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.admin-hr-review-actions > button {
  flex: 1 1 118px;
}

.admin-hr-ocr-result {
  min-height: 220px;
  margin-top: 12px;
  border: 1px solid #b8cce4;
  background: #f7fbff;
  padding: 10px;
  font-size: 16px;
}

.admin-hr-type-filter {
  width: 120px;
}

.admin-hr-existing-workspace .admin-hr-page-titlebar {
  border: 0;
  padding: 0 0 8px;
}

.admin-hr-existing-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) auto minmax(320px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-hr-existing-toolbar label {
  display: grid;
  gap: 2px;
}

.admin-hr-existing-toolbar label > span,
.admin-hr-selected-employee-summary span {
  color: #26486e;
  font-size: 11px;
}

.admin-hr-selected-employee-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #d7e2ef;
}

.admin-hr-selected-employee-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-hr-selected-employee-summary strong {
  overflow: hidden;
  color: #001b38;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-hr-selected-employee-empty {
  margin-top: 8px;
  padding: 14px;
  background: #f5f9ff;
  color: #42617f;
  text-align: center;
}

.admin-hr-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 3px 10px;
  align-items: end;
  min-width: 0;
}

.admin-hr-form-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-hr-form-field.wide {
  grid-column: span 4;
}

.admin-hr-form-field.note {
  grid-column: span 3;
}

.admin-hr-form-field span,
.admin-hr-contract-confirm label,
.admin-hr-review-grid-desktop span {
  color: #26486e;
  font-size: 11px;
}

.desktop-input,
.desktop-textarea {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  border: 1px solid #a9bdd6;
  border-radius: 0;
  background: #fff;
  color: #001b38;
  padding: 3px 7px;
}

select.desktop-input:disabled {
  color: #001b38;
  opacity: 1;
  background: linear-gradient(#f4f4f4, #dddddd);
}

.desktop-textarea {
  min-height: 80px;
  resize: vertical;
  margin-top: 8px;
}

.admin-hr-contract-confirm {
  grid-column: 4 / 7;
  display: grid;
  gap: 2px;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
}

.admin-hr-contract-confirm > div {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.admin-hr-form-footer {
  display: none;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
  margin-top: 12px;
}

.admin-hr-search-inline {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
}

.admin-hr-desktop-body {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(360px, .98fr);
  gap: 12px;
  min-width: 0;
}

.admin-hr-contract-panel,
.admin-hr-document-panel,
.admin-hr-review-dock {
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  min-width: 0;
}

.admin-hr-folded-section {
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
}

.admin-hr-folded-section > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #be1111;
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.admin-hr-folded-section .admin-hr-review-dock {
  border: 0;
  border-top: 1px solid #b8cce4;
  border-radius: 0;
}

.admin-hr-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.admin-hr-section-head h2,
.admin-hr-review-dock h2 {
  margin: 0;
  color: #be1111;
  font-size: 20px;
}

.admin-hr-contract-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.desktop-blue,
.desktop-success,
.desktop-danger,
.desktop-plain {
  min-height: 31px;
  border: 1px solid #c5d5e8;
  border-radius: 5px;
  padding: 6px 10px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.desktop-blue {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.desktop-success {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.desktop-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.desktop-plain {
  background: #edf4ff;
  color: #102033;
}

.admin-hr-preview-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
  color: #496780;
}

.admin-hr-preview-toolbar input[type="range"] {
  width: 160px;
}

.admin-hr-contract-preview {
  height: 590px;
  border: 1px solid #b8cce4;
  overflow: auto;
  background: #dfe7f0;
  padding: 12px 14px;
}

.admin-hr-original-frame {
  width: 100%;
  height: 100%;
  min-height: 580px;
  border: 0;
  background: #fff;
}

.admin-hr-original-image {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.admin-hr-original-placeholder {
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: 0;
  color: #102033;
  background: transparent;
}

.admin-hr-original-paper {
  width: min(690px, 100%);
  min-height: 860px;
  padding: 30px 42px;
  background: #fff;
  border: 1px solid #c7d1df;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .18);
  color: #111827;
}

.admin-hr-original-filebar {
  margin: -12px 0 10px;
  color: #385170;
  font-size: 11px;
  text-align: right;
  color: #385170;
  word-break: break-all;
}

.admin-hr-original-paper h3 {
  margin: 0 0 4px;
  text-align: center;
  font-size: 17px;
  letter-spacing: 0;
}

.admin-hr-pdf-subhead {
  margin-bottom: 14px;
  text-align: center;
  color: #48647f;
  font-size: 11px;
  letter-spacing: 0;
}

.admin-hr-contract-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  border: 1px solid #cfdbea;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 12px;
}

.admin-hr-contract-lines p,
.admin-hr-contract-body p {
  margin: 0;
}

.admin-hr-contract-body {
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: justify;
}

.admin-hr-signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid #d7e2ef;
  font-size: 12px;
}

.admin-hr-original-note {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #d7e2ef;
  color: #42617f;
  font-size: 11px;
}

.contract-page {
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  max-width: 850px;
}

.contract-page p {
  margin: 0 0 7px;
}

.admin-hr-document-table-wrap {
  height: 642px;
  overflow: auto;
  border: 1px solid #b8cce4;
  background: #fff;
}

.admin-hr-document-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
}

.admin-hr-document-table th,
.admin-hr-document-table td {
  border-bottom: 1px solid #e1e8f1;
  padding: 4px 5px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-hr-document-table th {
  background: #eef3fa;
  font-weight: 900;
}

.admin-hr-doc-select {
  width: 26px;
}

.admin-hr-doc-name {
  width: 23%;
}

.admin-hr-doc-number {
  width: 18%;
}

.admin-hr-doc-expiry {
  width: 16%;
}

.admin-hr-doc-file {
  width: 43%;
}

.admin-hr-document-table tr.selected td,
.admin-hr-document-table tr:hover td {
  background: #eaf2ff;
}

.admin-hr-tab-page {
  border: 1px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 10px;
}

.admin-hr-page-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d7e2ef;
  padding-bottom: 8px;
}

.admin-hr-page-titlebar h2 {
  margin: 0 0 2px;
  color: #be1111;
  font-size: 21px;
}

.admin-hr-page-titlebar span {
  color: #385170;
  font-size: 12px;
}

.admin-hr-page-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.admin-hr-filterbar {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.2fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-hr-filterbar.tight {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 8px;
}

.admin-hr-filterbar label {
  display: grid;
  gap: 2px;
}

.admin-hr-filterbar span {
  color: #26486e;
  font-size: 11px;
}

.admin-hr-tab-grid {
  display: grid;
  gap: 12px;
}

.admin-hr-tab-grid.two {
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);
}

.admin-hr-tab-panel {
  border: 1px solid #b8cce4;
  background: #f9fbff;
  padding: 10px;
  min-height: 520px;
}

.admin-hr-tab-panel h3 {
  margin: 0 0 8px;
  color: #be1111;
  font-size: 17px;
}

.admin-hr-create-page .admin-hr-employee-form {
  border-radius: 0;
}

.admin-hr-original-placeholder.small {
  min-height: 360px;
  align-items: stretch;
}

.admin-hr-original-paper.compact {
  width: 100%;
  min-height: 320px;
  padding: 24px 32px;
}

.admin-hr-tab-panel .table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid #d7e2ef;
  background: #fff;
}

.admin-hr-tab-panel .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-hr-tab-panel .data-table th,
.admin-hr-tab-panel .data-table td {
  border-bottom: 1px solid #e1e8f1;
  padding: 5px 6px;
  text-align: left;
  white-space: nowrap;
}

.admin-hr-tab-panel .data-table th {
  background: #eef3fa;
  font-weight: 900;
}

.desktop-textarea.tall {
  min-height: 300px;
}

.admin-hr-review-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, .9fr);
  gap: 12px;
  margin-top: 2px;
}

.admin-hr-review-grid-desktop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-hr-cor-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-hr-status {
  border: 1px solid #cfe0f5;
  background: #f5f9ff;
  color: #214263;
  padding: 8px 10px;
}

@media (max-width: 1180px) {
  .admin-hr-layout,
  .admin-hr-review-grid,
  .admin-hr-existing-toolbar,
  .admin-hr-selected-employee-summary,
  .admin-hr-desktop-body,
  .admin-hr-tab-grid.two,
  .admin-hr-review-dock {
    grid-template-columns: 1fr;
  }

  .admin-hr-sidebar {
    position: static;
    max-height: none;
  }
}

.status-line.compact {
  margin-top: 10px;
  padding: 8px 10px;
  line-height: 1.45;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.control-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.module-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.check-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 12px;
}

.check-card strong {
  display: block;
  margin-bottom: 6px;
}

.hk-workbench-shell {
  display: grid;
  gap: 12px;
}

.hk-ledger-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.hk-ledger-select span,
.hk-section-title {
  display: block;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

.hk-tabs {
  margin-bottom: 0;
}

.hk-block-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hk-desktop-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.hk-desktop-card {
  min-height: 145px;
  border: 1px solid #c8d8ea;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.hk-desktop-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.hk-desktop-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hk-ocr-layout {
  display: grid;
  grid-template-columns: minmax(280px, 28%) minmax(320px, 42%) minmax(280px, 30%);
  gap: 12px;
  align-items: start;
}

.hk-preview-box {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
  padding: 14px;
  overflow: auto;
  line-height: 1.6;
  white-space: pre-wrap;
}

.hk-file-input {
  max-width: 360px;
}

.desktop-module {
  display: grid;
  gap: 10px;
  background: #edf2f6;
}

.desktop-module-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #afc0d4;
  border-radius: 6px;
  background: #fff;
  padding: 14px;
}

.desktop-module-header h2 {
  margin: 0;
  color: #18324f;
  font-size: 24px;
  font-weight: 800;
}

.desktop-module-header p {
  margin: 6px 0 0;
  color: #5f7083;
}

.desktop-header-actions,
.mini-button-row,
.desktop-subtabs,
.option-list,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.desktop-header-actions {
  justify-content: flex-end;
}

.civil-module > .desktop-module-header {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.civil-module > .desktop-module-header > :first-child {
  width: 100%;
  min-width: 0;
}

.civil-module > .desktop-module-header > .desktop-header-actions {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}

.civil-module .desktop-search-input {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 360px;
  min-height: 34px;
  border: 1px solid #a9bdd6;
  border-radius: 4px;
  padding: 5px 9px;
  color: #001b38;
  background: #fff;
}

.desktop-status-pill {
  border: 1px solid #a7c3e1;
  border-radius: 999px;
  background: #eaf4ff;
  color: #184f80;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.design-stat-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr)) minmax(210px, 1.05fr) minmax(340px, 1.45fr);
  gap: 8px;
}

.civil-stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.desktop-stat,
.desktop-mini-panel,
.desktop-panel {
  border: 1px solid #afc0d4;
  border-radius: 6px;
  background: #fff;
}

.desktop-stat {
  min-height: 64px;
  padding: 10px;
}

.desktop-stat span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.desktop-stat strong {
  display: block;
  margin-top: 6px;
  color: #172033;
  font-size: 23px;
  line-height: 1;
}

.desktop-stat.warn {
  background: #fff8e7;
}

.desktop-stat.good {
  background: #ecfdf3;
}

.desktop-stat.danger {
  background: #fff1f2;
}

.desktop-stat.blue {
  background: #eff6ff;
}

.desktop-stat.purple {
  background: #f5f3ff;
}

.desktop-mini-panel {
  min-height: 64px;
  padding: 9px;
}

.desktop-mini-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #20364f;
  font-size: 13px;
}

.desktop-mini-panel p {
  margin: 0 0 7px;
  color: #5f7083;
  font-size: 12px;
}

.mini-button-row .button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.design-work-grid {
  display: grid;
  grid-template-columns: 410px minmax(420px, 1fr) 430px;
  gap: 8px;
  align-items: start;
}

.civil-overview-grid,
.civil-two-col {
  display: grid;
  gap: 10px;
  align-items: start;
}

.civil-overview-grid {
  grid-template-columns: minmax(460px, 1.1fr) minmax(360px, .9fr);
}

.civil-two-col {
  grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
}

.civil-ai-grid {
  display: grid;
  grid-template-columns: minmax(250px, 28%) minmax(360px, 42%) minmax(260px, 30%);
  gap: 10px;
  align-items: start;
}

.civil-ai-image-grid {
  grid-column: 1 / -1;
}

.civil-ai-preview-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.civil-ai-preview-col h4 {
  margin: 0 0 4px;
  font-size: 13px;
  color: #1e3653;
}

.civil-ai-preview-col .file-preview-box {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop-panel {
  min-width: 0;
  padding: 10px;
}

.desktop-panel h3 {
  margin: 0 0 8px;
  color: #1e3653;
  font-size: 16px;
  font-weight: 800;
}

.desktop-filter-grid,
.desktop-form-grid,
.desktop-form-stack {
  display: grid;
  gap: 7px;
}

.desktop-filter-grid,
.desktop-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desktop-form-grid label,
.desktop-form-stack label {
  display: grid;
  gap: 4px;
  color: #5d6e82;
  font-size: 12px;
  font-weight: 800;
}

.desktop-filter-grid input,
.desktop-filter-grid select,
.desktop-form-grid input,
.desktop-form-grid select,
.desktop-form-stack input,
.desktop-form-stack select,
.desktop-form-stack textarea,
.desktop-keyword {
  width: 100%;
  min-height: 30px;
  border: 1px solid #afc0d4;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  padding: 5px 8px;
  font-size: 13px;
}

.desktop-form-stack textarea,
.desktop-textarea {
  min-height: 76px;
  resize: vertical;
}

.desktop-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d9e4f0;
  background: #fff;
}

.desktop-table-wrap.short {
  max-height: 190px;
}

.desktop-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.desktop-table th,
.desktop-table td {
  border-bottom: 1px solid #e3ecf5;
  padding: 6px 7px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.desktop-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f6fc;
  color: #2c4360;
  font-weight: 800;
}

.table-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.table-actions button,
.option-list button {
  min-height: 25px;
  border: 1px solid #a7bed7;
  border-radius: 4px;
  background: #f7fbff;
  color: #1f3c5b;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.table-actions button:hover,
.option-list button:hover {
  border-color: #5d95ce;
  background: #eaf4ff;
}

.drawing-preview-box,
.file-preview-box {
  min-height: 280px;
  border: 1px solid #b9cce1;
  border-radius: 5px;
  background: #f8fbff;
  color: #33465d;
  padding: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.candidate-preview-frame {
  width: 100%;
  min-height: 360px;
  margin-top: 10px;
  border: 1px solid #c7d6e8;
  border-radius: 4px;
  background: #fff;
}

.candidate-preview-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin-top: 10px;
  border: 1px solid #c7d6e8;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}

.file-preview-box.large {
  min-height: 360px;
}

.tag-row {
  margin: 8px 0;
}

.tag-row span {
  border: 1px solid #c5d6e9;
  border-radius: 999px;
  background: #f2f7fd;
  color: #2b4b6c;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.design-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.civil-tab-panels .civil-panel {
  display: none;
}

.civil-tab-panels .civil-panel.active {
  display: block;
}

.desktop-subtabs {
  margin-bottom: 8px;
}

.civil-engineer-tab-panels .civil-engineer-panel {
  display: none;
}

.civil-engineer-tab-panels .civil-engineer-panel.active {
  display: block;
}

.civil-overview-shortcuts {
  margin-bottom: 8px;
}

.civil-overview-xaml-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.civil-xaml-table-panel {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr);
  min-height: 290px;
}

.civil-xaml-table-wrap {
  width: 100%;
  max-height: none;
  min-height: 220px;
}

.civil-xaml-table-wrap .desktop-table {
  min-width: max-content;
}

.civil-xaml-table-wrap.civil-xaml-table-wide .desktop-table {
  min-width: 1565px;
}

.civil-xaml-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.civil-xaml-heading p {
  margin: 0;
}

.civil-method-xaml-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}

.civil-compliance-xaml-grid {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr) minmax(280px, 340px);
  gap: 10px;
  align-items: stretch;
  min-height: 540px;
}

.civil-compliance-xaml-grid > .desktop-panel,
.civil-compliance-xaml-grid > .civil-xaml-table-panel {
  min-width: 0;
}

.civil-compliance-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.civil-compliance-preview .file-preview-box {
  height: 100%;
}

.parity-modal {
  max-width: 620px;
}

@media (max-width: 1180px) {
  .warehouse-layout,
  .warehouse-summary-grid,
  .warehouse-a001-panel,
  .warehouse-physical-layout,
  .image-workbench,
  .grid-two,
  .grid-three,
  .module-check-grid,
  .hk-ledger-panel,
  .hk-desktop-card-grid,
  .hk-block-grid,
  .hk-ocr-layout,
  .design-stat-row,
  .civil-stat-row,
  .design-work-grid,
  .civil-overview-grid,
  .civil-overview-xaml-grid,
  .civil-two-col,
  .civil-ai-grid,
  .civil-method-xaml-grid,
  .civil-compliance-xaml-grid,
  .design-history-grid {
    grid-template-columns: 1fr;
  }

  .desktop-module-header {
    grid-template-columns: 1fr;
  }

  .desktop-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    min-height: 0;
  }

  .module-nav {
    max-height: 260px;
  }

  .desktop-filter-grid,
  .desktop-form-grid {
    grid-template-columns: 1fr;
  }
}


.psp-desktop-page {
  background: #f4f7fb;
  border: 1px solid #b8c6d9;
  padding: 12px;
  min-height: calc(100vh - 160px);
}

.psp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.psp-metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.psp-metric {
  background: #ffffff;
  border: 1px solid #afc0d4;
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 68px;
}

.psp-metric span,
.psp-metric em {
  display: block;
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.psp-metric strong {
  display: block;
  margin: 2px 0;
  color: #1d2939;
  font-size: 22px;
  line-height: 1.1;
}

.psp-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #9fb2cc;
  margin-bottom: 10px;
}

.psp-workflow-panel {
  background: #ffffff;
  border: 1px solid #9fb2cc;
  border-radius: 4px;
  margin-bottom: 10px;
  padding: 10px;
}

.psp-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid #d7e0ec;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.psp-flow-head strong,
.psp-flow-head span,
.psp-flow-head em {
  display: block;
}

.psp-flow-head strong {
  color: #172033;
  font-size: 15px;
}

.psp-flow-head span,
.psp-flow-head em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.psp-flow-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
}

.psp-flow-grid label span {
  display: block;
  margin-bottom: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.psp-stage-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.psp-stage-rail span {
  border: 1px solid #c6d3e2;
  background: #f7f9fc;
  color: #667085;
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.psp-stage-rail span.done {
  border-color: #2e90fa;
  background: #eaf4ff;
  color: #175cd3;
}

.psp-sync-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.psp-sync-preview strong {
  color: #344054;
  font-size: 12px;
}

.psp-sync-preview span {
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #f9fafb;
  color: #344054;
  padding: 5px 8px;
  font-size: 12px;
}

.psp-tab {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #9fb2cc;
  border-bottom: 0;
  background: #e8eef7;
  color: #1d2939;
  cursor: pointer;
}

.psp-tab.active {
  background: #ffffff;
  color: #1f5eff;
  font-weight: 700;
}

.psp-tab-body {
  display: grid;
  gap: 10px;
  align-items: start;
}

.psp-tab-body.three {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.psp-tab-body.two,
.psp-tab-body.production {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.psp-block {
  background: #ffffff;
  border: 1px solid #afc0d4;
  border-radius: 4px;
  overflow: hidden;
}

.psp-block-title {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #edf2f8;
  border-bottom: 1px solid #c6d3e2;
  color: #1d2939;
  font-size: 14px;
  font-weight: 700;
}

.psp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.psp-table th,
.psp-table td {
  height: 32px;
  border-bottom: 1px solid #e3e9f2;
  padding: 5px 8px;
  text-align: left;
  vertical-align: middle;
}

.psp-table th {
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}

.psp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px;
}

.psp-form-grid label span {
  display: block;
  margin-bottom: 4px;
  color: #475467;
  font-size: 12px;
}

.psp-candidate-log {
  grid-column: 1 / -1;
}

.production-line.psp-desktop-page {
  background: #eef6f6;
  border-color: #7aa9a4;
}

.production-line .psp-metric strong,
.production-line .psp-tab.active {
  color: #0f766e;
}

.cost-parity .psp-metric strong {
  color: #7a4d00;
}

.purchase-parity .psp-metric strong {
  color: #175cd3;
}

.sales-parity .psp-metric strong {
  color: #155eef;
}

@media (max-width: 1100px) {
  .psp-metric-row,
  .psp-tab-body.three,
  .psp-tab-body.two,
  .psp-tab-body.production {
    grid-template-columns: 1fr;
  }

  .psp-actions {
    justify-content: flex-start;
  }
}

/* === 桌面版DataGrid对齐 === */
thead tr { background: #f3f7fc; }
th { color: #435166; font-weight: 600; text-align: left; padding: 0 8px; height: 34px; border-bottom: 1px solid #afc0d4; }
td { padding: 0 8px; height: 25px; border-bottom: 1px solid #e8eef5; }
tbody tr:nth-child(even) { background: #fafcff; }
tbody tr:hover { background: #f4f8ff; }
