:root {
  --bg: #08111f;
  --panel: rgba(9, 17, 30, 0.94);
  --panel-soft: rgba(14, 25, 42, 0.96);
  --line: rgba(151, 176, 207, 0.18);
  --line-strong: rgba(151, 176, 207, 0.34);
  --text: #eef6ff;
  --muted: #98a7bb;
  --blue: #51a8e9;
  --blue-dark: #1a6fae;
  --green: #25d695;
  --green-bg: rgba(37, 214, 149, 0.14);
  --red: #ff6b73;
  --yellow: #ffd166;
  --control: #1b2737;
  --shadow: rgba(0, 0, 0, 0.36);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.employee-page {
  background:
    linear-gradient(145deg, rgba(7, 20, 37, 0.68), rgba(10, 43, 85, 0.42)),
    repeating-linear-gradient(75deg, rgba(91, 203, 255, 0.08) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(165deg, rgba(91, 203, 255, 0.06) 0 1px, transparent 1px 92px),
    radial-gradient(circle at 20% 5%, rgba(19, 153, 191, 0.3), transparent 32%),
    #071323;
}

.employee-shell {
  width: min(516px, calc(100vw - 28px));
  margin: 8px auto 24px;
}

.queue-panel,
.account-card,
.pager,
.admin-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 30px var(--shadow);
}

.queue-panel {
  padding: 14px;
  border-radius: 10px;
}

.panel-head,
.selection-row,
.account-head,
.card-actions,
.pager,
.admin-header,
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

h1,
h2,
p {
  margin: 0;
}

.panel-head h1,
.admin-header h1 {
  font-size: 21px;
  line-height: 1.3;
}

.panel-head p,
.admin-header p,
.account-meta,
.form-message {
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.employee-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.employee-login-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

body:not(.employee-authed) .authed-only {
  display: none !important;
}

body.employee-authed #loginPanel {
  display: none;
}

body.employee-authed #orderLoginPanel {
  display: none !important;
}

body.employee-authed .queue-panel.authed-only,
body.employee-authed .pager.authed-only {
  display: block;
}

body.employee-authed .account-list.authed-only {
  display: grid;
}

.text-input,
.text-area {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  background: rgba(16, 27, 43, 0.92);
  color: var(--text);
}

.text-input {
  height: 40px;
  padding: 0 12px;
}

.text-input.compact {
  height: 34px;
  font-size: 13px;
}

.text-area,
textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.primary-button,
.primary-small,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
}

.primary-button {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  background: var(--blue);
  color: #06111f;
  font-weight: 700;
}

.primary-button:hover,
.primary-small:hover {
  background: #65b7f3;
}

.primary-small {
  min-width: 78px;
  min-height: 34px;
  padding: 0 14px;
  background: var(--blue);
  color: #06111f;
  font-weight: 700;
}

.play-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
  transform: translateY(1px);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  background: var(--control);
  border-color: var(--line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.download-client-button {
  min-width: 112px;
}

.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.selection-row {
  margin-top: 12px;
}

.check-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

input[type="checkbox"] {
  appearance: none;
  width: 34px;
  height: 21px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(22, 33, 50, 0.95);
}

input[type="checkbox"]:checked {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.notice {
  margin: 12px 0 14px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(54, 197, 255, 0.48);
  border-radius: 999px;
  background: rgba(31, 164, 222, 0.16);
  color: #d6f6ff;
  font-size: 14px;
  display: flex;
  align-items: center;
}

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

.account-card {
  padding: 12px;
  border-radius: 10px;
}

.account-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 700;
}

.account-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  flex: 0 0 auto;
  min-width: 42px;
  height: 27px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(37, 214, 149, 0.46);
  background: var(--green-bg);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.status-badge.issue {
  border-color: rgba(255, 107, 115, 0.5);
  background: rgba(255, 107, 115, 0.12);
  color: var(--red);
}

.status-badge.assigned {
  border-color: rgba(81, 168, 233, 0.5);
  background: rgba(81, 168, 233, 0.13);
  color: #9bd3ff;
}

.account-body {
  margin-left: 49px;
  margin-top: 9px;
}

.account-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

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

.card-actions button {
  flex: 1;
}

.pager {
  min-height: 54px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.dialog h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #111c2b;
  color: var(--text);
}

.mark-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mark-options button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(81, 168, 233, 0.1);
  color: var(--text);
}

.mark-options button:hover {
  border-color: rgba(81, 168, 233, 0.55);
  background: rgba(81, 168, 233, 0.2);
}

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

.admin-page {
  background: #0b111d;
}

.admin-shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 28px auto;
}

.admin-header {
  margin-bottom: 18px;
}

.ghost-link {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
}

.admin-panel {
  border-radius: 8px;
  padding: 16px;
}

.admin-panel h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.admin-panel form,
.admin-panel {
  min-width: 0;
}

.admin-panel .text-input,
.admin-panel .text-area {
  margin-bottom: 10px;
}

.wide {
  overflow: hidden;
}

.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.summary-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

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

.danger-button {
  min-height: 30px;
  border: 1px solid rgba(255, 107, 115, 0.38);
  border-radius: 6px;
  background: rgba(255, 107, 115, 0.12);
  color: var(--red);
  font-weight: 700;
}

.console-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(160deg, #07101b 0%, #0b1828 48%, #0d2035 100%);
}

.console-sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 16px 12px 14px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 18, 32, 0.96), rgba(7, 13, 24, 0.94));
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 6px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(86, 207, 239, 0.25);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(46, 178, 226, 0.16), rgba(105, 76, 196, 0.12)),
    #0a1526;
  color: #aee8ff;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(68, 177, 220, 0.12);
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.console-nav {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  min-width: 0;
}

.nav-group {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.nav-group-title {
  padding: 0 10px 5px;
  color: #5f7189;
  font-size: 11px;
  font-weight: 700;
}

.nav-item,
.employee-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #6d829d;
  font-size: 15px;
}

.nav-item:hover,
.employee-link:hover {
  border-color: rgba(86, 207, 239, 0.14);
  background: rgba(86, 207, 239, 0.06);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(86, 207, 239, 0.18);
  background: linear-gradient(90deg, rgba(86, 207, 239, 0.12), rgba(105, 76, 196, 0.08));
  color: #d9f4ff;
}

.nav-item.active .nav-icon {
  color: #8fd9f5;
}

.employee-link {
  margin-top: 18px;
}

.console-sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
}

.console-sidebar-footer .download-client-button {
  width: 100%;
  min-width: 0;
}

.console-main {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 22px;
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.console-topbar h1 {
  font-size: 24px;
}

.console-topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 420px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-key {
  width: 220px;
  max-width: 100%;
}

.console-view {
  display: none;
}

.console-view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 14px;
}

.metric-grid.home-key-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.metric-card,
.console-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 24, 40, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  margin-top: 14px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.dashboard-side {
  display: grid;
  gap: 14px;
}

.account-table.type-summary-table {
  min-width: 0;
  table-layout: auto;
}

.account-table.type-summary-table th,
.account-table.type-summary-table td {
  padding: 8px 8px;
}

.account-table.type-summary-table th:first-child,
.account-table.type-summary-table td:first-child {
  width: auto;
  padding-left: 8px;
  text-align: left;
}

.account-table.type-summary-table th,
.account-table.type-summary-table td {
  white-space: nowrap;
}

.type-summary-table .col-type-name {
  width: 140px;
}

.type-summary-table .col-type-number {
  width: 86px;
}

.type-low-remaining td {
  background: rgba(255, 184, 108, 0.07);
}

.usage-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.usage-compare-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.usage-compare-card.today {
  border-color: rgba(86, 207, 239, 0.22);
  background: rgba(58, 160, 193, 0.07);
}

.usage-compare-card.yesterday {
  border-color: rgba(151, 176, 207, 0.16);
}

.usage-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.usage-compare-head strong {
  color: #d9f6ff;
}

.usage-compare-head b {
  color: #7bdab6;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.usage-compare-actual {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.usage-compare-actual span {
  color: var(--muted);
  font-size: 11px;
}

.usage-compare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.usage-compare-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.console-panel {
  padding: 16px;
  overflow: hidden;
}

.panel-count,
.module-head p {
  color: var(--muted);
  font-size: 13px;
}

.overview-row,
.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.overview-row strong,
.rank-item strong {
  color: var(--text);
}

.rank-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.rank-item {
  min-height: 46px;
  padding: 0 10px;
  border-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.rank-list .rank-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rank-position {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(79, 195, 247, 0.12);
  color: #9bd3ff;
  font-size: 12px;
  font-weight: 800;
}

.rank-person {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rank-person strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-person span {
  color: var(--muted);
  font-size: 11px;
}

.rank-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.rank-stats span,
.rank-stats b {
  white-space: nowrap;
}

.rank-stats b {
  color: #7bdab6;
  font-size: 13px;
}

.rank-empty {
  min-height: 90px;
  margin-top: 8px;
  color: var(--muted);
}

.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.module-head h2 {
  margin-bottom: 5px;
}

.module-head > :first-child {
  min-width: 0;
  flex: 1 1 280px;
}

.module-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.compact-date {
  width: 150px;
  height: 34px;
}

.filter-row {
  margin-bottom: 12px;
}

.filter-row .text-input {
  width: 190px;
}

.select-input {
  height: 40px;
  min-width: 128px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.92);
  color: var(--text);
  padding: 0 10px;
}

.compact-select {
  width: 86px;
  min-width: 86px;
  height: 32px;
}

.order-status-filter {
  width: 112px;
  min-width: 112px;
}

.account-table {
  table-layout: fixed;
  min-width: 1180px;
}

.account-table .col-check {
  width: 38px;
}

.account-table .col-username {
  width: 210px;
}

.account-table .col-type {
  width: 82px;
}

.account-table .col-status {
  width: 86px;
}

.account-table .col-user {
  width: 108px;
}

.account-table .col-time {
  width: 144px;
}

.account-table .col-reason {
  width: 160px;
}

.account-table .col-actions {
  width: 270px;
}

.employee-table {
  min-width: 1340px;
}

.employee-table .col-employee-username {
  width: 230px;
}

.employee-table .col-employee-display {
  width: 180px;
}

.employee-table .col-employee-status {
  width: 90px;
}

.employee-table .col-employee-types {
  width: 220px;
}

.employee-table .col-employee-time {
  width: 155px;
}

.employee-table .col-employee-actions {
  width: 310px;
}

.account-type-table {
  min-width: 920px;
}

.account-type-table .col-account-type-name {
  width: 220px;
}

.account-type-table .col-account-type-code {
  width: 160px;
}

.account-type-table .col-account-type-count {
  width: 120px;
}

.account-type-table .col-account-type-time {
  width: 160px;
}

.account-type-table .col-account-type-actions {
  width: 220px;
}

.performance-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 12px;
}

.performance-panel {
  margin-top: 14px;
}

.performance-type-table {
  min-width: 760px;
}

.performance-table {
  min-width: 1360px;
}

.performance-type-table .col-performance-type,
.performance-table .col-performance-employee {
  width: 180px;
}

.performance-table .col-performance-type {
  width: 120px;
}

.performance-type-table .col-performance-number,
.performance-table .col-performance-number {
  width: 108px;
}

.performance-table .col-performance-ratio {
  width: 96px;
}

.performance-table .col-performance-status {
  width: 100px;
}

.compact-number {
  width: 92px;
  height: 32px;
  padding: 0 8px;
}

.performance-row.high td,
.performance-row.low td {
  background: rgba(255, 184, 108, 0.05);
}

.performance-row.unset td {
  background: rgba(255, 255, 255, 0.02);
}

.status-dot.performance-normal {
  border-color: rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
}

.status-dot.performance-high,
.status-dot.performance-low {
  border-color: rgba(255, 184, 108, 0.45);
  color: #ffc47c;
  background: rgba(255, 184, 108, 0.12);
}

.status-dot.performance-unset {
  border-color: rgba(148, 163, 184, 0.38);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
}

.account-table th,
.account-table td {
  padding: 9px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-table th:first-child,
.account-table td:first-child {
  width: 38px;
  padding-left: 6px;
  padding-right: 4px;
  text-align: center;
}

.employee-table th:first-child,
.employee-table td:first-child {
  width: auto;
  padding-left: 10px;
  padding-right: 10px;
  text-align: left;
}

.account-table th:nth-child(2),
.account-table td:nth-child(2) {
  padding-right: 6px;
}

.account-table th:nth-child(3),
.account-table td:nth-child(3) {
  padding-left: 4px;
}

.account-table td:last-child {
  overflow: visible;
}

.cell-sub {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
}

.account-table td.empty-cell {
  width: auto;
  height: 88px;
  color: var(--muted);
  text-align: center;
  overflow: visible;
}

.table-actions button {
  padding: 0 10px;
}

.account-table .table-actions {
  overflow: visible;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pager-summary,
.pager-controls,
.pager-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-summary {
  color: var(--muted);
  font-size: 13px;
}

.pager-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager-controls label {
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.status-dot.assigned {
  border-color: rgba(79, 195, 247, 0.42);
  color: #9bd3ff;
  background: rgba(79, 195, 247, 0.12);
}

.status-dot.issue {
  border-color: rgba(255, 107, 115, 0.42);
  color: var(--red);
  background: rgba(255, 107, 115, 0.12);
}

.status-dot.recycled {
  border-color: rgba(151, 176, 207, 0.34);
  color: var(--muted);
  background: rgba(151, 176, 207, 0.10);
}

.profile-panel {
  max-width: 820px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-grid div {
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.profile-grid span,
.profile-grid strong {
  display: block;
}

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

.profile-grid strong {
  margin-top: 8px;
}

.wide-dialog {
  width: min(620px, calc(100vw - 36px));
}

.wide-dialog .text-input,
.wide-dialog .text-area,
.wide-dialog .select-input {
  margin-bottom: 10px;
}

.field-label,
.dialog-muted {
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  margin: 6px 0 8px;
}

.dialog-muted {
  margin: 0 0 10px;
}

.import-status {
  min-height: 18px;
}

.type-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.type-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.82);
  color: var(--text);
  font-size: 13px;
}

.type-check-grid input[type="checkbox"] {
  flex: 0 0 auto;
}

.import-grid {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 8px;
}

.text-area.tall {
  min-height: 170px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(10, 20, 34, 0.96);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.order-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.order-performance-groups {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.order-profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.order-profit-grid .metric-card {
  padding: 12px 14px;
}

.order-profit-grid .metric-card span {
  font-size: 12px;
}

.order-profit-grid .metric-card strong {
  margin-top: 8px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.order-search-profit {
  color: #a9c7df;
  font-size: 12px;
}

.profit-negative {
  color: #ff9aa2;
}

.profit-positive {
  color: #7bdab6;
}

.profit-summary {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin: 12px 0 0;
}

.profit-price-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profit-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.profit-price-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profit-price-item strong {
  color: #e9f4ff;
}

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

.profit-price-field {
  display: grid;
  gap: 4px;
  min-width: 148px;
}

.profit-price-field span {
  font-size: 11px;
}

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

.profit-table .col-profit-employee {
  width: 210px;
}

.profit-table .col-profit-usage {
  width: 260px;
}

.profit-table .col-profit-money {
  width: 120px;
}

.status-dot.profit-ok {
  border-color: rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
}

.status-dot.profit-bad {
  border-color: rgba(255, 107, 115, 0.42);
  color: var(--red);
  background: rgba(255, 107, 115, 0.12);
}

.order-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.order-search-input {
  flex: 1 1 260px;
  max-width: 520px;
  height: 34px;
}

.order-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-search-result-head {
  color: var(--muted);
  font-size: 12px;
}

.order-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(12, 22, 36, 0.58);
}

.order-search-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-search-item-main > strong {
  overflow: hidden;
  color: #e9f4ff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-search-meta,
.order-search-rule {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-search-side {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.order-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-deduction-state {
  color: #7bdab6;
  font-size: 12px;
}

.order-deduction-state.has-deduction {
  color: #ffc47c;
}

.order-search-empty {
  margin-top: 0;
}

.order-deduction-summary {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.82);
  line-height: 1.55;
}

.order-deduction-summary strong {
  color: #d9f6ff;
}

.order-performance-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(12, 22, 36, 0.58);
}

.order-group-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 0.75fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
}

.order-group-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-group-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-group-name-line > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-group-name-line .status-dot {
  flex: 0 0 auto;
}

.order-group-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 8px;
  min-width: 0;
}

.order-group-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.order-group-stat span {
  color: var(--muted);
  font-size: 11px;
}

.order-group-stat strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.order-group-details {
  display: none;
  border-top: 1px solid var(--line);
}

.order-performance-group.is-expanded .order-group-details {
  display: block;
}

.order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}

.order-rejection-text {
  color: #ffb7bb;
  font-size: 12px;
}

.order-edit-input {
  width: 100%;
  min-width: 100px;
  padding: 7px 8px;
}

.order-admin-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}

.order-admin-table th:first-child,
.order-admin-table td:first-child {
  width: 17%;
  padding-left: 9px;
  padding-right: 9px;
  text-align: left;
}

.order-admin-table th:nth-child(2),
.order-admin-table td:nth-child(2) {
  width: 10%;
  padding-right: 9px;
}

.order-admin-table th:nth-child(3),
.order-admin-table td:nth-child(3) {
  width: 12%;
  padding-left: 9px;
}

.order-admin-table th:nth-child(4),
.order-admin-table td:nth-child(4) {
  width: 12%;
}

.order-admin-table th:nth-child(5),
.order-admin-table td:nth-child(5) {
  width: 16%;
}

.order-admin-table th:nth-child(6),
.order-admin-table td:nth-child(6) {
  width: 9%;
}

.order-admin-table th:nth-child(7),
.order-admin-table td:nth-child(7) {
  width: 9%;
}

.order-admin-table th:nth-child(8),
.order-admin-table td:nth-child(8) {
  width: 15%;
}

.order-admin-table th:nth-child(9),
.order-admin-table td:nth-child(9) {
  width: 10%;
}

.order-admin-table td:last-child {
  white-space: nowrap;
}

.order-pending {
  color: #f5c87a;
  border-color: rgba(245, 200, 122, 0.35);
  background: rgba(245, 200, 122, 0.1);
}

.order-approved {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.1);
}

.order-rejected {
  color: #ffb7bb;
  border-color: rgba(255, 183, 187, 0.35);
  background: rgba(255, 183, 187, 0.1);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

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

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

  .console-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .console-nav {
    display: block;
  }

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

  .nav-group-title {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .metric-grid.home-key-metrics,
  .dashboard-grid,
  .dashboard-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .console-topbar,
  .module-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-group-summary {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .order-group-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .employee-row {
    grid-template-columns: 1fr;
  }

  .account-body {
    margin-left: 0;
  }

  .card-actions {
    flex-direction: column;
  }

  .topbar-controls,
  .import-grid {
    grid-template-columns: 1fr;
    display: grid;
    width: 100%;
  }

  .admin-key,
  .filter-row .text-input,
  .select-input {
    width: 100%;
  }

  .metric-grid.home-key-metrics,
  .usage-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Employee order workspace */
.order-page {
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(8, 14, 25, 0.96), rgba(17, 16, 37, 0.9)),
    radial-gradient(circle at 12% 0%, rgba(44, 167, 214, 0.16), transparent 32%),
    #090d16;
}

.order-shell {
  width: min(1080px, calc(100vw - 36px));
  margin: 22px auto 42px;
}

.order-login-panel {
  width: min(520px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
  border-radius: 8px;
  background: rgba(13, 18, 31, 0.94);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.order-login-brand,
.order-title-block,
.order-section-head,
.order-records-head,
.order-record-group-head,
.order-record-number,
.order-record-details,
.order-topbar,
.order-top-actions,
.order-form-actions,
.order-group-title,
.order-process-item,
.order-date-control {
  display: flex;
  align-items: center;
}

.order-login-brand {
  gap: 14px;
  margin-bottom: 22px;
}

.order-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(86, 207, 239, 0.42);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(35, 93, 126, 0.84), rgba(51, 38, 94, 0.82));
  color: #c9f5ff;
  font-size: 20px;
  font-weight: 800;
}

.order-kicker {
  display: block;
  margin-bottom: 5px;
  color: #73cde7;
  font-size: 11px;
  letter-spacing: 0;
}

.order-login-panel h1,
.order-title-block h1 {
  font-size: 23px;
  line-height: 1.25;
}

.order-login-panel p,
.order-title-block p,
.order-records-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-field > span {
  color: #b8c5d5;
  font-size: 12px;
}

.order-field em {
  color: #718197;
  font-size: 11px;
  font-style: normal;
}

.order-login-button {
  margin-top: 18px;
}

.order-notice {
  width: min(1080px, 100%);
  margin: 14px auto;
  border-radius: 6px;
  background: rgba(28, 111, 150, 0.14);
  color: #cdeffc;
}

.order-notice.is-error {
  color: #ffd8dc;
}

.order-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(520px, calc(100vw - 32px));
  max-height: 46vh;
  padding: 12px 14px;
  border: 1px solid rgba(54, 197, 255, 0.4);
  border-radius: 8px;
  background: rgba(10, 20, 34, 0.96);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.order-toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.order-toast.is-error {
  border-color: rgba(255, 107, 115, 0.5);
}

.order-toast-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(37, 214, 149, 0.16);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.order-toast.is-error .order-toast-icon {
  background: rgba(255, 107, 115, 0.14);
  color: var(--red);
}

.order-toast-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.order-toast-message {
  font-size: 14px;
  line-height: 1.5;
}

.order-toast-detail {
  margin: 0;
  max-height: 30vh;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(8, 17, 31, 0.6);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.order-toast-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.order-toast-close:hover {
  border-color: rgba(54, 197, 255, 0.5);
  color: var(--text);
}

.order-workspace {
  display: grid;
  gap: 14px;
}

.order-topbar {
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.order-title-block {
  display: block;
  min-width: 0;
}

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

.order-date-control {
  gap: 8px;
}

.order-date-control span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.order-date-control .select-input {
  min-width: 156px;
  height: 36px;
}

.order-refresh-button {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 22px;
}

.order-logout-button {
  min-height: 36px;
  padding: 0 12px;
  color: #aab8cb;
}

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

.order-stat-card {
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(14, 20, 34, 0.86);
  box-shadow: inset 0 1px 18px rgba(65, 170, 207, 0.035);
}

.order-stat-card span,
.order-stat-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.order-stat-card strong {
  display: block;
  margin: 10px 0 4px;
  color: #edf8ff;
  font-size: 27px;
  line-height: 1;
}

.order-stat-card small {
  color: #718197;
  font-size: 11px;
}

.order-stat-pending {
  border-color: rgba(245, 200, 122, 0.24);
}

.order-stat-pending strong {
  color: #f2cd8d;
}

.order-stat-approved {
  border-color: rgba(125, 211, 252, 0.24);
}

.order-stat-approved strong {
  color: #8cdcf3;
}

.order-stat-rejected {
  border-color: rgba(255, 183, 187, 0.24);
}

.order-stat-rejected strong {
  color: #f1aeb5;
}

.order-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 14px;
}

.order-entry-panel,
.order-process-panel,
.order-records-panel {
  padding: 18px;
  border-radius: 6px;
  background: rgba(13, 19, 32, 0.9);
}

.order-section-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.order-section-head h2,
.order-records-head h2 {
  font-size: 18px;
  line-height: 1.25;
}

.order-date-chip,
.order-live-dot {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(86, 207, 239, 0.26);
  border-radius: 999px;
  background: rgba(58, 160, 193, 0.1);
  color: #91d9eb;
  font-size: 12px;
  white-space: nowrap;
}

.order-live-dot {
  border-color: rgba(37, 214, 149, 0.24);
  background: rgba(37, 214, 149, 0.08);
  color: #7bdab6;
}

.order-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.65fr) minmax(130px, 0.55fr);
  gap: 12px;
}

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

.dialog-form-grid .order-field:last-child {
  grid-column: 1 / -1;
}

.order-field-wide {
  grid-column: span 1;
}

.order-form-grid .order-field:last-child {
  grid-column: 1 / -1;
}

.order-form-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.order-form-actions .primary-button {
  width: auto;
  min-width: 150px;
  margin-top: 0;
}

.order-form-actions .secondary-button {
  min-height: 40px;
}

.order-process-list {
  display: grid;
  gap: 2px;
}

.order-process-item {
  align-items: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.order-process-item:last-child {
  border-bottom: 0;
}

.order-process-item > b {
  color: #638da5;
  font-size: 11px;
  font-weight: 700;
}

.order-process-item strong,
.order-process-item span {
  display: block;
}

.order-process-item strong {
  color: #dae9f5;
  font-size: 13px;
}

.order-process-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.order-records-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.order-filter-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.order-filter-tab {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.order-filter-tab:hover,
.order-filter-tab.active {
  border-color: rgba(86, 207, 239, 0.24);
  background: rgba(73, 170, 202, 0.1);
  color: #d7f4ff;
}

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

.order-record-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.38);
}

.order-record-group-head {
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.order-record-group-head > div:first-child > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.order-group-title {
  gap: 8px;
}

.order-group-title > strong {
  color: #dbe7f2;
  font-size: 13px;
}

.order-group-resubmit {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.order-record-items {
  display: grid;
}

.order-record-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid rgba(151, 176, 207, 0.11);
}

.order-record-item:last-child {
  border-bottom: 0;
}

.order-record-main {
  min-width: 0;
  flex: 1;
}

.order-record-number {
  gap: 8px;
  min-width: 0;
}

.order-record-number strong {
  overflow: hidden;
  color: #eef7ff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-record-number span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(126, 111, 209, 0.25);
  border-radius: 4px;
  background: rgba(97, 82, 165, 0.1);
  color: #bdb5ed;
  font-size: 11px;
}

.order-record-details {
  align-items: stretch;
  gap: 24px;
  margin-top: 10px;
}

.order-record-details > div {
  min-width: 92px;
}

.order-record-details small,
.order-record-details b {
  display: block;
}

.order-record-details small {
  margin-bottom: 4px;
  color: #738398;
  font-size: 11px;
}

.order-record-details b {
  overflow: hidden;
  color: #d7e5f0;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-record-details .order-record-note {
  max-width: min(360px, 40vw);
}

.order-record-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.order-record-actions .secondary-button,
.order-record-actions .danger-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.order-record-actions .danger-button {
  padding: 0 10px;
}

.order-record-item .order-rejection-text {
  margin-top: 10px;
  line-height: 1.5;
}

.order-empty-state {
  display: grid;
  gap: 6px;
  min-height: 130px;
  place-content: center;
  border-color: rgba(151, 176, 207, 0.2);
  background: rgba(255, 255, 255, 0.015);
}

.order-empty-state strong {
  color: #dbe9f5;
  font-size: 14px;
}

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

@media (max-width: 860px) {
  .order-topbar,
  .order-records-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .order-entry-grid {
    grid-template-columns: 1fr;
  }

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

  .order-filter-tabs {
    width: 100%;
  }

  .order-filter-tab {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .order-shell {
    width: min(100% - 22px, 540px);
    margin-top: 11px;
  }

  .order-login-panel,
  .order-entry-panel,
  .order-process-panel,
  .order-records-panel {
    padding: 14px;
  }

  .order-stats-grid {
    gap: 7px;
  }

  .order-stat-card {
    min-height: 90px;
    padding: 12px;
  }

  .order-stat-card strong {
    font-size: 23px;
  }

  .order-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .order-form-grid .order-field-wide,
  .order-form-grid .order-field:last-child {
    grid-column: 1 / -1;
  }

  .order-record-group-head,
  .order-record-item {
    align-items: stretch;
    flex-direction: column;
  }

  .order-record-actions {
    justify-content: flex-end;
  }

  .order-record-details {
    gap: 12px;
  }

  .order-record-details .order-record-note {
    max-width: 42vw;
  }

  .order-date-control {
    width: 100%;
  }

  .order-date-control .select-input {
    flex: 1;
  }

  .order-logout-button {
    flex: 1;
  }
}

/* Order performance and payroll workspace */
.admin-login-status,
.employee-session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(37, 214, 149, 0.34);
  border-radius: 999px;
  background: rgba(37, 214, 149, 0.1);
  color: #8ee6c4;
  font-size: 12px;
  font-weight: 700;
}

.admin-key[hidden],
.admin-login-status[hidden],
#adminLogout[hidden] {
  display: none !important;
}

.performance-shell {
  width: min(1180px, calc(100vw - 36px));
}

.employee-mobile-tabs {
  display: none;
}

.employee-section {
  display: grid;
  gap: 12px;
}

.section-heading,
.payroll-total-row,
.employee-order-row,
.employee-order-title,
.employee-order-meta,
.report-filter-bar,
.report-summary-strip,
.daily-payroll-row,
.deduction-row,
.admin-deduction-row,
.payroll-global-rule {
  display: flex;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  font-size: 18px;
  line-height: 1.25;
}

.dashboard-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.section-caption,
.field-helper {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.performance-order-form {
  grid-template-columns: minmax(220px, 1fr) 150px 150px 130px;
}

.performance-order-form .order-field-wide {
  grid-column: 1 / -1;
}

.field-helper {
  margin-top: 10px;
  line-height: 1.5;
}

.salary-rule-highlight {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(86, 207, 239, 0.2);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(45, 113, 150, 0.15), rgba(78, 63, 148, 0.12));
}

.salary-rule-highlight span,
.salary-rule-highlight small {
  color: var(--muted);
  font-size: 12px;
}

.salary-rule-highlight strong {
  color: #bdefff;
  font-size: 28px;
}

.report-filter-tabs {
  flex: 0 0 auto;
}

.report-filter-bar {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.report-filter-field {
  width: 170px;
}

.report-custom-fields {
  display: contents;
}

.report-summary-strip {
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(86, 207, 239, 0.18);
  border-radius: 6px;
  background: rgba(27, 53, 72, 0.24);
  color: var(--muted);
  font-size: 12px;
}

.report-summary-strip strong {
  color: #d8f5ff;
  font-size: 18px;
}

.employee-order-row {
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.38);
}

.employee-order-main {
  min-width: 0;
}

.employee-order-title {
  gap: 8px;
  min-width: 0;
}

.employee-order-title strong {
  overflow: hidden;
  color: #edf8ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-category-tag {
  padding: 4px 7px;
  border: 1px solid rgba(126, 111, 209, 0.28);
  border-radius: 4px;
  background: rgba(126, 111, 209, 0.1);
  color: #bbb5ef;
  font-size: 11px;
}

.employee-order-meta {
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.employee-order-actions {
  flex: 0 0 auto;
}

.employee-payroll-grid,
.payroll-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.payroll-management-grid > .console-panel:only-child {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 880px;
}

.payroll-total-row {
  gap: 10px;
  margin: 12px 0;
}

.payroll-total-row > div {
  flex: 1;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.payroll-total-row span,
.daily-payroll-row span,
.deduction-row span,
.admin-deduction-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.payroll-total-row strong {
  display: block;
  margin-top: 8px;
  color: #d9f6ff;
  font-size: 22px;
}

.payroll-total-row .payroll-net {
  border-color: rgba(86, 207, 239, 0.25);
  background: rgba(60, 155, 190, 0.08);
}

.daily-payroll-list,
.deduction-list,
.admin-deduction-list {
  display: grid;
  gap: 8px;
}

.daily-payroll-row {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.daily-payroll-row > div {
  min-width: 92px;
}

.daily-payroll-row > div:first-child {
  min-width: 128px;
}

.daily-payroll-row b,
.deduction-row b,
.admin-deduction-row b,
.net-text {
  color: #d9f6ff;
}

.deduction-text {
  color: #f6bf86;
}

.deduction-row,
.admin-deduction-row {
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.deduction-row strong,
.admin-deduction-row strong {
  display: block;
  margin-bottom: 4px;
}

.payroll-summary {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin: 12px 0;
}

.payroll-toolbar .compact-select {
  width: 128px;
  min-width: 128px;
}

.range-separator {
  color: var(--muted);
  font-size: 12px;
}

.payroll-table {
  min-width: 980px;
}

.payroll-table .col-payroll-employee {
  width: 190px;
}

.payroll-table .col-payroll-number {
  width: 110px;
}

.payroll-table .col-payroll-money {
  width: 130px;
}

.payroll-global-rule {
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.payroll-global-rule .order-field {
  width: 220px;
}

.payroll-rules-table {
  min-width: 520px;
}

.payroll-deduction-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 140px minmax(190px, 1.25fr) 150px;
  gap: 8px;
  margin: 12px 0;
}

.salary-preset-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 0.9fr) auto;
  align-items: end;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.salary-preset-form .order-field {
  margin: 0;
}

.salary-preset-form button {
  min-height: 40px;
}

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

.salary-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.salary-preset-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.salary-preset-row strong {
  overflow: hidden;
  color: #e7f7ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.salary-preset-row.is-disabled {
  opacity: 0.62;
}

.payroll-deduction-form .deduction-reason-field {
  grid-column: span 2;
}

.payroll-deduction-form .deduction-note-field {
  grid-column: 1 / span 3;
}

.payroll-deduction-form button {
  min-height: 40px;
}

.admin-deduction-row > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .employee-payroll-grid,
  .payroll-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.employee-authed.order-page {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .performance-shell {
    width: min(100% - 18px, 540px);
    margin-top: 10px;
  }

  .order-workspace {
    gap: 10px;
  }

  .order-topbar {
    gap: 10px;
    padding-top: 0;
  }

  .order-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .order-top-actions .employee-session-badge {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 28px;
  }

  .order-top-actions .secondary-button {
    min-height: 40px;
  }

  .employee-mobile-tabs {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border: 1px solid rgba(151, 176, 207, 0.22);
    border-radius: 8px;
    background: rgba(8, 13, 24, 0.96);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
  }

  .employee-mobile-tabs button {
    min-width: 0;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #9dadc2;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
  }

  .employee-mobile-tabs button:hover,
  .employee-mobile-tabs button.active {
    border-color: rgba(86, 207, 239, 0.32);
    background: linear-gradient(135deg, rgba(58, 160, 193, 0.18), rgba(91, 71, 168, 0.15));
    color: #d9f7ff;
  }

  body.employee-authed [data-mobile-panel] {
    display: none;
  }

  body.employee-authed [data-mobile-panel].mobile-active {
    display: grid;
    animation: employeePanelIn 180ms ease-out;
  }

  .report-custom-fields[hidden] {
    display: none !important;
  }

  .report-custom-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .order-entry-grid.mobile-active,
  .employee-payroll-grid.mobile-active {
    grid-template-columns: 1fr;
  }

  .order-process-panel {
    padding: 12px;
  }

  .order-process-list {
    display: none;
  }

  .salary-rule-highlight {
    margin-bottom: 0;
  }

  .performance-order-form,
  .report-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .performance-order-form .order-field-wide,
  .performance-order-form .order-field:last-child {
    grid-column: auto;
  }

  .section-heading,
  .employee-order-row,
  .report-summary-strip,
  .payroll-total-row,
  .daily-payroll-row,
  .deduction-row,
  .payroll-global-rule,
  .admin-deduction-row {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter-field,
  .payroll-global-rule .order-field {
    width: 100%;
  }

  .order-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-form-actions .primary-button,
  .order-form-actions .secondary-button,
  .employee-order-actions,
  .employee-order-actions .secondary-button {
    width: 100%;
  }

  .employee-order-title {
    flex-wrap: wrap;
  }

  .payroll-total-row > div {
    min-height: 66px;
  }

  .daily-payroll-row > div,
  .daily-payroll-row > div:first-child {
    min-width: 0;
  }

  .payroll-deduction-form {
    grid-template-columns: 1fr;
  }

  .salary-preset-form {
    grid-template-columns: 1fr;
  }

  .salary-preset-row {
    align-items: stretch;
    flex-direction: column;
  }

  .salary-preset-row .table-actions {
    width: 100%;
  }

  .salary-preset-row .table-actions button {
    flex: 1;
  }

  .payroll-deduction-form .deduction-reason-field,
  .payroll-deduction-form .deduction-note-field {
    grid-column: auto;
  }

  .order-search-item,
  .order-search-side {
    align-items: stretch;
    flex-direction: column;
  }

  .order-search-side {
    width: 100%;
  }

  .order-search-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .order-search-actions button {
    flex: 1 1 130px;
  }

  .order-search-input {
    max-width: none;
  }

  .order-profit-grid {
    grid-template-columns: 1fr;
  }

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

  .profit-price-item {
    align-items: stretch;
    flex-direction: column;
  }

  .profit-price-field {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1300px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@keyframes employeePanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.employee-authed [data-mobile-panel].mobile-active {
    animation: none;
  }

  .employee-mobile-tabs button {
    transition: none;
  }
}

/* Boss login screen. Glass panel style inspired by GitHub MIT template
   Himel-Sarder/Glassmorphism-Login-Page, restyled for this console. */
.admin-login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 18px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(18, 63, 99, 0.38), rgba(9, 15, 27, 0.92) 46%, rgba(36, 24, 66, 0.34)),
    #07101d;
}

.admin-login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(115, 190, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 190, 235, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.admin-login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 36px 34px 30px;
  border: 1px solid rgba(131, 177, 219, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(17, 31, 52, 0.9), rgba(10, 18, 33, 0.88)),
    rgba(8, 16, 29, 0.72);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(168, 219, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: adminLoginIn 360ms ease both;
}

.admin-login-emblem {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 1px solid rgba(103, 209, 247, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(72, 185, 232, 0.2), rgba(120, 79, 218, 0.16)),
    rgba(11, 23, 39, 0.92);
  color: #bdefff;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(72, 185, 232, 0.14);
}

.admin-login-card h2 {
  color: #f0f8ff;
  font-size: 24px;
  text-align: center;
}

.admin-login-subtitle {
  margin-top: 8px;
  color: #8197ae;
  font-size: 13px;
  text-align: center;
}

.admin-login-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-login-field > span {
  color: #b9c8d8;
  font-size: 13px;
  font-weight: 700;
}

.admin-login-input {
  height: 46px;
  padding: 0 14px;
  border-color: rgba(133, 175, 214, 0.26);
  background: rgba(7, 15, 28, 0.78);
  color: #eef6ff;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.admin-login-input:focus {
  border-color: rgba(96, 202, 242, 0.82);
  background: rgba(9, 19, 34, 0.94);
  box-shadow: 0 0 0 3px rgba(86, 207, 239, 0.12);
}

.admin-login-error {
  margin: 14px 2px 0;
  color: #ff8790;
  font-size: 13px;
  line-height: 1.5;
}

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

.admin-login-submit {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  border: 1px solid rgba(120, 202, 240, 0.35);
  border-radius: 6px;
  background: linear-gradient(90deg, #257fb5, #5140a8);
  color: #f6fbff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  box-shadow: 0 8px 22px rgba(12, 62, 98, 0.24);
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.admin-login-submit:hover:not(:disabled) {
  filter: brightness(1.12);
  box-shadow: 0 10px 26px rgba(18, 102, 151, 0.32);
  transform: translateY(-1px);
}

.admin-login-submit:active:not(:disabled) {
  transform: translateY(0);
}

.admin-login-submit:disabled {
  cursor: default;
  opacity: 0.62;
}

.admin-login-hint {
  margin-top: 16px;
  color: #5f7289;
  font-size: 12px;
  text-align: center;
}

body:not(.admin-authed) .console-shell {
  display: none;
}

body.admin-authed .admin-login-screen,
.admin-login-screen[hidden] {
  display: none;
}

.console-view.active {
  animation: adminViewIn 240ms ease-out both;
}

@keyframes adminViewIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes adminLoginIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .admin-login-screen {
    align-items: flex-start;
    padding: 24px 12px;
  }

  .admin-login-card {
    margin-top: 5vh;
    padding: 30px 20px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-login-card {
    animation: none;
  }

  .admin-login-input,
  .admin-login-submit {
    transition: none;
  }

  .console-view.active {
    animation: none;
  }
}


/* 接单渠道与自动查金额 */
.order-channel-box {
  margin: 12px 0 4px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.28));
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.05);
}

.order-channel-box > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.order-channel-summary {
  font-size: 12px;
  opacity: 0.75;
}

.order-channel-summary.ok {
  color: #4ade80;
  opacity: 1;
}

.order-channel-summary.warn {
  color: #fbbf24;
  opacity: 1;
}

.order-channel-body {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.order-channel-tip {
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.7;
}

.order-channel-form {
  display: grid;
  grid-template-columns: 140px minmax(200px, 1fr) minmax(200px, 1fr) 150px auto auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 1100px) {
  .order-channel-form {
    grid-template-columns: 1fr 1fr;
  }
}

.order-channel-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  font-size: 13px;
}

.order-channel-item .channel-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-channel-item .channel-url {
  font-size: 12px;
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-state {
  font-size: 12px;
  flex: 1;
  text-align: right;
  padding-right: 8px;
}

.channel-state.ok {
  color: #4ade80;
}

.channel-state.warn {
  color: #fbbf24;
}

.channel-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.order-channel-empty {
  font-size: 12px;
  opacity: 0.6;
  margin: 8px 0 0;
}


/* 订单明细：渠道列与行内操作按钮 */
.compact-channel {
  width: 88px;
  height: 32px;
  padding: 0 8px;
}

.order-admin-table .nowrap-cell {
  white-space: nowrap;
  font-size: 12px;
}

.order-admin-table td,
.order-admin-table th {
  padding: 6px 8px;
}

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

.tiny-button {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}

/* 渠道 Cookie 多行输入：支持整段粘贴 JSON */
.channel-cookie-input {
  grid-column: 1 / -1;
  min-height: 68px;
  padding: 8px 10px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

/* 订单明细紧凑化：缩短业绩/实收/渠道输入框，收紧工资/利润/备注间距 */
.order-admin-table .compact-number {
  width: 72px;
}

.order-admin-table .compact-channel {
  width: 72px;
}

.order-admin-table td:nth-child(7),
.order-admin-table th:nth-child(7),
.order-admin-table td:nth-child(8),
.order-admin-table th:nth-child(8),
.order-admin-table td:nth-child(9),
.order-admin-table th:nth-child(9) {
  padding: 6px 4px;
}

.order-admin-table td .text-input[data-order-field="note"] {
  width: 110px;
}

.order-recognize-all {
  margin-left: auto;
  white-space: nowrap;
}

/* 顺运端品牌 logo */
.brand-mark.brand-logo-mark {
  overflow: hidden;
  padding: 0;
  background: #0a1526;
}

.brand-mark.brand-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.console-nav {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  min-width: 0;
}

.nav-group {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.nav-group-title {
  padding: 0 10px 5px;
  color: #5f7189;
  font-size: 11px;
  font-weight: 700;
}

.nav-item,
.employee-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #6d829d;
  font-size: 15px;
}

.nav-item:hover,
.employee-link:hover {
  border-color: rgba(86, 207, 239, 0.14);
  background: rgba(86, 207, 239, 0.06);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(86, 207, 239, 0.18);
  background: linear-gradient(90deg, rgba(86, 207, 239, 0.12), rgba(105, 76, 196, 0.08));
  color: #d9f4ff;
}

.nav-item.active .nav-icon {
  color: #8fd9f5;
}

.employee-link {
  margin-top: 18px;
}

.console-sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
}

.console-sidebar-footer .download-client-button {
  width: 100%;
  min-width: 0;
}

.console-main {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 22px;
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.console-topbar h1 {
  font-size: 24px;
}

.console-topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 420px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-key {
  width: 220px;
  max-width: 100%;
}

.console-view {
  display: none;
}

.console-view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 14px;
}

.metric-grid.home-key-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.metric-card,
.console-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 24, 40, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  margin-top: 14px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.dashboard-side {
  display: grid;
  gap: 14px;
}

.account-table.type-summary-table {
  min-width: 0;
  table-layout: auto;
}

.account-table.type-summary-table th,
.account-table.type-summary-table td {
  padding: 8px 8px;
}

.account-table.type-summary-table th:first-child,
.account-table.type-summary-table td:first-child {
  width: auto;
  padding-left: 8px;
  text-align: left;
}

.account-table.type-summary-table th,
.account-table.type-summary-table td {
  white-space: nowrap;
}

.type-summary-table .col-type-name {
  width: 140px;
}

.type-summary-table .col-type-number {
  width: 86px;
}

.type-low-remaining td {
  background: rgba(255, 184, 108, 0.07);
}

.usage-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.usage-compare-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.usage-compare-card.today {
  border-color: rgba(86, 207, 239, 0.22);
  background: rgba(58, 160, 193, 0.07);
}

.usage-compare-card.yesterday {
  border-color: rgba(151, 176, 207, 0.16);
}

.usage-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.usage-compare-head strong {
  color: #d9f6ff;
}

.usage-compare-head b {
  color: #7bdab6;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.usage-compare-actual {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.usage-compare-actual span {
  color: var(--muted);
  font-size: 11px;
}

.usage-compare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.usage-compare-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.console-panel {
  padding: 16px;
  overflow: hidden;
}

.panel-count,
.module-head p {
  color: var(--muted);
  font-size: 13px;
}

.overview-row,
.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.overview-row strong,
.rank-item strong {
  color: var(--text);
}

.rank-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.rank-item {
  min-height: 46px;
  padding: 0 10px;
  border-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.rank-list .rank-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rank-position {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(79, 195, 247, 0.12);
  color: #9bd3ff;
  font-size: 12px;
  font-weight: 800;
}

.rank-person {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rank-person strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-person span {
  color: var(--muted);
  font-size: 11px;
}

.rank-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.rank-stats span,
.rank-stats b {
  white-space: nowrap;
}

.rank-stats b {
  color: #7bdab6;
  font-size: 13px;
}

.rank-empty {
  min-height: 90px;
  margin-top: 8px;
  color: var(--muted);
}

.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.module-head h2 {
  margin-bottom: 5px;
}

.module-head > :first-child {
  min-width: 0;
  flex: 1 1 280px;
}

.module-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.compact-date {
  width: 150px;
  height: 34px;
}

.filter-row {
  margin-bottom: 12px;
}

.filter-row .text-input {
  width: 190px;
}

.select-input {
  height: 40px;
  min-width: 128px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.92);
  color: var(--text);
  padding: 0 10px;
}

.compact-select {
  width: 86px;
  min-width: 86px;
  height: 32px;
}

.order-status-filter {
  width: 112px;
  min-width: 112px;
}

.account-table {
  table-layout: fixed;
  min-width: 1180px;
}

.account-table .col-check {
  width: 38px;
}

.account-table .col-username {
  width: 210px;
}

.account-table .col-type {
  width: 82px;
}

.account-table .col-status {
  width: 86px;
}

.account-table .col-user {
  width: 108px;
}

.account-table .col-time {
  width: 144px;
}

.account-table .col-reason {
  width: 160px;
}

.account-table .col-actions {
  width: 270px;
}

.employee-table {
  min-width: 1340px;
}

.employee-table .col-employee-username {
  width: 230px;
}

.employee-table .col-employee-display {
  width: 180px;
}

.employee-table .col-employee-status {
  width: 90px;
}

.employee-table .col-employee-types {
  width: 220px;
}

.employee-table .col-employee-time {
  width: 155px;
}

.employee-table .col-employee-actions {
  width: 310px;
}

.account-type-table {
  min-width: 920px;
}

.account-type-table .col-account-type-name {
  width: 220px;
}

.account-type-table .col-account-type-code {
  width: 160px;
}

.account-type-table .col-account-type-count {
  width: 120px;
}

.account-type-table .col-account-type-time {
  width: 160px;
}

.account-type-table .col-account-type-actions {
  width: 220px;
}

.performance-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 12px;
}

.performance-panel {
  margin-top: 14px;
}

.performance-type-table {
  min-width: 760px;
}

.performance-table {
  min-width: 1360px;
}

.performance-type-table .col-performance-type,
.performance-table .col-performance-employee {
  width: 180px;
}

.performance-table .col-performance-type {
  width: 120px;
}

.performance-type-table .col-performance-number,
.performance-table .col-performance-number {
  width: 108px;
}

.performance-table .col-performance-ratio {
  width: 96px;
}

.performance-table .col-performance-status {
  width: 100px;
}

.compact-number {
  width: 92px;
  height: 32px;
  padding: 0 8px;
}

.performance-row.high td,
.performance-row.low td {
  background: rgba(255, 184, 108, 0.05);
}

.performance-row.unset td {
  background: rgba(255, 255, 255, 0.02);
}

.status-dot.performance-normal {
  border-color: rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
}

.status-dot.performance-high,
.status-dot.performance-low {
  border-color: rgba(255, 184, 108, 0.45);
  color: #ffc47c;
  background: rgba(255, 184, 108, 0.12);
}

.status-dot.performance-unset {
  border-color: rgba(148, 163, 184, 0.38);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
}

.account-table th,
.account-table td {
  padding: 9px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-table th:first-child,
.account-table td:first-child {
  width: 38px;
  padding-left: 6px;
  padding-right: 4px;
  text-align: center;
}

.employee-table th:first-child,
.employee-table td:first-child {
  width: auto;
  padding-left: 10px;
  padding-right: 10px;
  text-align: left;
}

.account-table th:nth-child(2),
.account-table td:nth-child(2) {
  padding-right: 6px;
}

.account-table th:nth-child(3),
.account-table td:nth-child(3) {
  padding-left: 4px;
}

.account-table td:last-child {
  overflow: visible;
}

.cell-sub {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
}

.account-table td.empty-cell {
  width: auto;
  height: 88px;
  color: var(--muted);
  text-align: center;
  overflow: visible;
}

.table-actions button {
  padding: 0 10px;
}

.account-table .table-actions {
  overflow: visible;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pager-summary,
.pager-controls,
.pager-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-summary {
  color: var(--muted);
  font-size: 13px;
}

.pager-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager-controls label {
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.status-dot.assigned {
  border-color: rgba(79, 195, 247, 0.42);
  color: #9bd3ff;
  background: rgba(79, 195, 247, 0.12);
}

.status-dot.issue {
  border-color: rgba(255, 107, 115, 0.42);
  color: var(--red);
  background: rgba(255, 107, 115, 0.12);
}

.status-dot.recycled {
  border-color: rgba(151, 176, 207, 0.34);
  color: var(--muted);
  background: rgba(151, 176, 207, 0.10);
}

.profile-panel {
  max-width: 820px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-grid div {
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.profile-grid span,
.profile-grid strong {
  display: block;
}

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

.profile-grid strong {
  margin-top: 8px;
}

.wide-dialog {
  width: min(620px, calc(100vw - 36px));
}

.wide-dialog .text-input,
.wide-dialog .text-area,
.wide-dialog .select-input {
  margin-bottom: 10px;
}

.field-label,
.dialog-muted {
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  margin: 6px 0 8px;
}

.dialog-muted {
  margin: 0 0 10px;
}

.import-status {
  min-height: 18px;
}

.type-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.type-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.82);
  color: var(--text);
  font-size: 13px;
}

.type-check-grid input[type="checkbox"] {
  flex: 0 0 auto;
}

.import-grid {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 8px;
}

.text-area.tall {
  min-height: 170px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(10, 20, 34, 0.96);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.order-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.order-performance-groups {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.order-profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.order-profit-grid .metric-card {
  padding: 12px 14px;
}

.order-profit-grid .metric-card span {
  font-size: 12px;
}

.order-profit-grid .metric-card strong {
  margin-top: 8px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.order-search-profit {
  color: #a9c7df;
  font-size: 12px;
}

.profit-negative {
  color: #ff9aa2;
}

.profit-positive {
  color: #7bdab6;
}

.profit-summary {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin: 12px 0 0;
}

.profit-price-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profit-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.profit-price-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profit-price-item strong {
  color: #e9f4ff;
}

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

.profit-price-field {
  display: grid;
  gap: 4px;
  min-width: 148px;
}

.profit-price-field span {
  font-size: 11px;
}

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

.profit-table .col-profit-employee {
  width: 210px;
}

.profit-table .col-profit-usage {
  width: 260px;
}

.profit-table .col-profit-money {
  width: 120px;
}

.status-dot.profit-ok {
  border-color: rgba(37, 214, 149, 0.42);
  color: var(--green);
  background: rgba(37, 214, 149, 0.12);
}

.status-dot.profit-bad {
  border-color: rgba(255, 107, 115, 0.42);
  color: var(--red);
  background: rgba(255, 107, 115, 0.12);
}

.order-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.order-search-input {
  flex: 1 1 260px;
  max-width: 520px;
  height: 34px;
}

.order-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-search-result-head {
  color: var(--muted);
  font-size: 12px;
}

.order-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(12, 22, 36, 0.58);
}

.order-search-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-search-item-main > strong {
  overflow: hidden;
  color: #e9f4ff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-search-meta,
.order-search-rule {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-search-side {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.order-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-deduction-state {
  color: #7bdab6;
  font-size: 12px;
}

.order-deduction-state.has-deduction {
  color: #ffc47c;
}

.order-search-empty {
  margin-top: 0;
}

.order-deduction-summary {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 27, 43, 0.82);
  line-height: 1.55;
}

.order-deduction-summary strong {
  color: #d9f6ff;
}

.order-performance-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(12, 22, 36, 0.58);
}

.order-group-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 0.75fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
}

.order-group-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-group-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-group-name-line > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-group-name-line .status-dot {
  flex: 0 0 auto;
}

.order-group-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 8px;
  min-width: 0;
}

.order-group-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.order-group-stat span {
  color: var(--muted);
  font-size: 11px;
}

.order-group-stat strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.order-group-details {
  display: none;
  border-top: 1px solid var(--line);
}

.order-performance-group.is-expanded .order-group-details {
  display: block;
}

.order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}

.order-rejection-text {
  color: #ffb7bb;
  font-size: 12px;
}

.order-edit-input {
  width: 100%;
  min-width: 100px;
  padding: 7px 8px;
}

.order-admin-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}

.order-admin-table th:first-child,
.order-admin-table td:first-child {
  width: 17%;
  padding-left: 9px;
  padding-right: 9px;
  text-align: left;
}

.order-admin-table th:nth-child(2),
.order-admin-table td:nth-child(2) {
  width: 10%;
  padding-right: 9px;
}

.order-admin-table th:nth-child(3),
.order-admin-table td:nth-child(3) {
  width: 12%;
  padding-left: 9px;
}

.order-admin-table th:nth-child(4),
.order-admin-table td:nth-child(4) {
  width: 12%;
}

.order-admin-table th:nth-child(5),
.order-admin-table td:nth-child(5) {
  width: 16%;
}

.order-admin-table th:nth-child(6),
.order-admin-table td:nth-child(6) {
  width: 9%;
}

.order-admin-table th:nth-child(7),
.order-admin-table td:nth-child(7) {
  width: 9%;
}

.order-admin-table th:nth-child(8),
.order-admin-table td:nth-child(8) {
  width: 15%;
}

.order-admin-table th:nth-child(9),
.order-admin-table td:nth-child(9) {
  width: 10%;
}

.order-admin-table td:last-child {
  white-space: nowrap;
}

.order-pending {
  color: #f5c87a;
  border-color: rgba(245, 200, 122, 0.35);
  background: rgba(245, 200, 122, 0.1);
}

.order-approved {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.1);
}

.order-rejected {
  color: #ffb7bb;
  border-color: rgba(255, 183, 187, 0.35);
  background: rgba(255, 183, 187, 0.1);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

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

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

  .console-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .console-nav {
    display: block;
  }

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

  .nav-group-title {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .metric-grid.home-key-metrics,
  .dashboard-grid,
  .dashboard-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .console-topbar,
  .module-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-group-summary {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .order-group-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .employee-row {
    grid-template-columns: 1fr;
  }

  .account-body {
    margin-left: 0;
  }

  .card-actions {
    flex-direction: column;
  }

  .topbar-controls,
  .import-grid {
    grid-template-columns: 1fr;
    display: grid;
    width: 100%;
  }

  .admin-key,
  .filter-row .text-input,
  .select-input {
    width: 100%;
  }

  .metric-grid.home-key-metrics,
  .usage-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Employee order workspace */
.order-page {
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(8, 14, 25, 0.96), rgba(17, 16, 37, 0.9)),
    radial-gradient(circle at 12% 0%, rgba(44, 167, 214, 0.16), transparent 32%),
    #090d16;
}

.order-shell {
  width: min(1080px, calc(100vw - 36px));
  margin: 22px auto 42px;
}

.order-login-panel {
  width: min(520px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
  border-radius: 8px;
  background: rgba(13, 18, 31, 0.94);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.order-login-brand,
.order-title-block,
.order-section-head,
.order-records-head,
.order-record-group-head,
.order-record-number,
.order-record-details,
.order-topbar,
.order-top-actions,
.order-form-actions,
.order-group-title,
.order-process-item,
.order-date-control {
  display: flex;
  align-items: center;
}

.order-login-brand {
  gap: 14px;
  margin-bottom: 22px;
}

.order-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(86, 207, 239, 0.42);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(35, 93, 126, 0.84), rgba(51, 38, 94, 0.82));
  color: #c9f5ff;
  font-size: 20px;
  font-weight: 800;
}

.order-kicker {
  display: block;
  margin-bottom: 5px;
  color: #73cde7;
  font-size: 11px;
  letter-spacing: 0;
}

.order-login-panel h1,
.order-title-block h1 {
  font-size: 23px;
  line-height: 1.25;
}

.order-login-panel p,
.order-title-block p,
.order-records-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-field > span {
  color: #b8c5d5;
  font-size: 12px;
}

.order-field em {
  color: #718197;
  font-size: 11px;
  font-style: normal;
}

.order-login-button {
  margin-top: 18px;
}

.order-notice {
  width: min(1080px, 100%);
  margin: 14px auto;
  border-radius: 6px;
  background: rgba(28, 111, 150, 0.14);
  color: #cdeffc;
}

.order-notice.is-error {
  color: #ffd8dc;
}

.order-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(520px, calc(100vw - 32px));
  max-height: 46vh;
  padding: 12px 14px;
  border: 1px solid rgba(54, 197, 255, 0.4);
  border-radius: 8px;
  background: rgba(10, 20, 34, 0.96);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.order-toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.order-toast.is-error {
  border-color: rgba(255, 107, 115, 0.5);
}

.order-toast-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(37, 214, 149, 0.16);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.order-toast.is-error .order-toast-icon {
  background: rgba(255, 107, 115, 0.14);
  color: var(--red);
}

.order-toast-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.order-toast-message {
  font-size: 14px;
  line-height: 1.5;
}

.order-toast-detail {
  margin: 0;
  max-height: 30vh;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(8, 17, 31, 0.6);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.order-toast-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.order-toast-close:hover {
  border-color: rgba(54, 197, 255, 0.5);
  color: var(--text);
}

.order-workspace {
  display: grid;
  gap: 14px;
}

.order-topbar {
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.order-title-block {
  display: block;
  min-width: 0;
}

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

.order-date-control {
  gap: 8px;
}

.order-date-control span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.order-date-control .select-input {
  min-width: 156px;
  height: 36px;
}

.order-refresh-button {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 22px;
}

.order-logout-button {
  min-height: 36px;
  padding: 0 12px;
  color: #aab8cb;
}

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

.order-stat-card {
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(14, 20, 34, 0.86);
  box-shadow: inset 0 1px 18px rgba(65, 170, 207, 0.035);
}

.order-stat-card span,
.order-stat-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.order-stat-card strong {
  display: block;
  margin: 10px 0 4px;
  color: #edf8ff;
  font-size: 27px;
  line-height: 1;
}

.order-stat-card small {
  color: #718197;
  font-size: 11px;
}

.order-stat-pending {
  border-color: rgba(245, 200, 122, 0.24);
}

.order-stat-pending strong {
  color: #f2cd8d;
}

.order-stat-approved {
  border-color: rgba(125, 211, 252, 0.24);
}

.order-stat-approved strong {
  color: #8cdcf3;
}

.order-stat-rejected {
  border-color: rgba(255, 183, 187, 0.24);
}

.order-stat-rejected strong {
  color: #f1aeb5;
}

.order-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 14px;
}

.order-entry-panel,
.order-process-panel,
.order-records-panel {
  padding: 18px;
  border-radius: 6px;
  background: rgba(13, 19, 32, 0.9);
}

.order-section-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.order-section-head h2,
.order-records-head h2 {
  font-size: 18px;
  line-height: 1.25;
}

.order-date-chip,
.order-live-dot {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(86, 207, 239, 0.26);
  border-radius: 999px;
  background: rgba(58, 160, 193, 0.1);
  color: #91d9eb;
  font-size: 12px;
  white-space: nowrap;
}

.order-live-dot {
  border-color: rgba(37, 214, 149, 0.24);
  background: rgba(37, 214, 149, 0.08);
  color: #7bdab6;
}

.order-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.65fr) minmax(130px, 0.55fr);
  gap: 12px;
}

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

.dialog-form-grid .order-field:last-child {
  grid-column: 1 / -1;
}

.order-field-wide {
  grid-column: span 1;
}

.order-form-grid .order-field:last-child {
  grid-column: 1 / -1;
}

.order-form-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.order-form-actions .primary-button {
  width: auto;
  min-width: 150px;
  margin-top: 0;
}

.order-form-actions .secondary-button {
  min-height: 40px;
}

.order-process-list {
  display: grid;
  gap: 2px;
}

.order-process-item {
  align-items: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.order-process-item:last-child {
  border-bottom: 0;
}

.order-process-item > b {
  color: #638da5;
  font-size: 11px;
  font-weight: 700;
}

.order-process-item strong,
.order-process-item span {
  display: block;
}

.order-process-item strong {
  color: #dae9f5;
  font-size: 13px;
}

.order-process-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.order-records-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.order-filter-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.order-filter-tab {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.order-filter-tab:hover,
.order-filter-tab.active {
  border-color: rgba(86, 207, 239, 0.24);
  background: rgba(73, 170, 202, 0.1);
  color: #d7f4ff;
}

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

.order-record-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.38);
}

.order-record-group-head {
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.order-record-group-head > div:first-child > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.order-group-title {
  gap: 8px;
}

.order-group-title > strong {
  color: #dbe7f2;
  font-size: 13px;
}

.order-group-resubmit {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.order-record-items {
  display: grid;
}

.order-record-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid rgba(151, 176, 207, 0.11);
}

.order-record-item:last-child {
  border-bottom: 0;
}

.order-record-main {
  min-width: 0;
  flex: 1;
}

.order-record-number {
  gap: 8px;
  min-width: 0;
}

.order-record-number strong {
  overflow: hidden;
  color: #eef7ff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-record-number span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(126, 111, 209, 0.25);
  border-radius: 4px;
  background: rgba(97, 82, 165, 0.1);
  color: #bdb5ed;
  font-size: 11px;
}

.order-record-details {
  align-items: stretch;
  gap: 24px;
  margin-top: 10px;
}

.order-record-details > div {
  min-width: 92px;
}

.order-record-details small,
.order-record-details b {
  display: block;
}

.order-record-details small {
  margin-bottom: 4px;
  color: #738398;
  font-size: 11px;
}

.order-record-details b {
  overflow: hidden;
  color: #d7e5f0;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-record-details .order-record-note {
  max-width: min(360px, 40vw);
}

.order-record-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.order-record-actions .secondary-button,
.order-record-actions .danger-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.order-record-actions .danger-button {
  padding: 0 10px;
}

.order-record-item .order-rejection-text {
  margin-top: 10px;
  line-height: 1.5;
}

.order-empty-state {
  display: grid;
  gap: 6px;
  min-height: 130px;
  place-content: center;
  border-color: rgba(151, 176, 207, 0.2);
  background: rgba(255, 255, 255, 0.015);
}

.order-empty-state strong {
  color: #dbe9f5;
  font-size: 14px;
}

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

@media (max-width: 860px) {
  .order-topbar,
  .order-records-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .order-entry-grid {
    grid-template-columns: 1fr;
  }

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

  .order-filter-tabs {
    width: 100%;
  }

  .order-filter-tab {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .order-shell {
    width: min(100% - 22px, 540px);
    margin-top: 11px;
  }

  .order-login-panel,
  .order-entry-panel,
  .order-process-panel,
  .order-records-panel {
    padding: 14px;
  }

  .order-stats-grid {
    gap: 7px;
  }

  .order-stat-card {
    min-height: 90px;
    padding: 12px;
  }

  .order-stat-card strong {
    font-size: 23px;
  }

  .order-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .order-form-grid .order-field-wide,
  .order-form-grid .order-field:last-child {
    grid-column: 1 / -1;
  }

  .order-record-group-head,
  .order-record-item {
    align-items: stretch;
    flex-direction: column;
  }

  .order-record-actions {
    justify-content: flex-end;
  }

  .order-record-details {
    gap: 12px;
  }

  .order-record-details .order-record-note {
    max-width: 42vw;
  }

  .order-date-control {
    width: 100%;
  }

  .order-date-control .select-input {
    flex: 1;
  }

  .order-logout-button {
    flex: 1;
  }
}

/* Order performance and payroll workspace */
.admin-login-status,
.employee-session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(37, 214, 149, 0.34);
  border-radius: 999px;
  background: rgba(37, 214, 149, 0.1);
  color: #8ee6c4;
  font-size: 12px;
  font-weight: 700;
}

.admin-key[hidden],
.admin-login-status[hidden],
#adminLogout[hidden] {
  display: none !important;
}

.performance-shell {
  width: min(1180px, calc(100vw - 36px));
}

.employee-mobile-tabs {
  display: none;
}

.employee-section {
  display: grid;
  gap: 12px;
}

.section-heading,
.payroll-total-row,
.employee-order-row,
.employee-order-title,
.employee-order-meta,
.report-filter-bar,
.report-summary-strip,
.daily-payroll-row,
.deduction-row,
.admin-deduction-row,
.payroll-global-rule {
  display: flex;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  font-size: 18px;
  line-height: 1.25;
}

.dashboard-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.section-caption,
.field-helper {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.performance-order-form {
  grid-template-columns: minmax(220px, 1fr) 150px 150px 130px;
}

.performance-order-form .order-field-wide {
  grid-column: 1 / -1;
}

.field-helper {
  margin-top: 10px;
  line-height: 1.5;
}

.salary-rule-highlight {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(86, 207, 239, 0.2);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(45, 113, 150, 0.15), rgba(78, 63, 148, 0.12));
}

.salary-rule-highlight span,
.salary-rule-highlight small {
  color: var(--muted);
  font-size: 12px;
}

.salary-rule-highlight strong {
  color: #bdefff;
  font-size: 28px;
}

.report-filter-tabs {
  flex: 0 0 auto;
}

.report-filter-bar {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.report-filter-field {
  width: 170px;
}

.report-custom-fields {
  display: contents;
}

.report-summary-strip {
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(86, 207, 239, 0.18);
  border-radius: 6px;
  background: rgba(27, 53, 72, 0.24);
  color: var(--muted);
  font-size: 12px;
}

.report-summary-strip strong {
  color: #d8f5ff;
  font-size: 18px;
}

.employee-order-row {
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.38);
}

.employee-order-main {
  min-width: 0;
}

.employee-order-title {
  gap: 8px;
  min-width: 0;
}

.employee-order-title strong {
  overflow: hidden;
  color: #edf8ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-category-tag {
  padding: 4px 7px;
  border: 1px solid rgba(126, 111, 209, 0.28);
  border-radius: 4px;
  background: rgba(126, 111, 209, 0.1);
  color: #bbb5ef;
  font-size: 11px;
}

.employee-order-meta {
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.employee-order-actions {
  flex: 0 0 auto;
}

.employee-payroll-grid,
.payroll-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.payroll-management-grid > .console-panel:only-child {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 880px;
}

.payroll-total-row {
  gap: 10px;
  margin: 12px 0;
}

.payroll-total-row > div {
  flex: 1;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.payroll-total-row span,
.daily-payroll-row span,
.deduction-row span,
.admin-deduction-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.payroll-total-row strong {
  display: block;
  margin-top: 8px;
  color: #d9f6ff;
  font-size: 22px;
}

.payroll-total-row .payroll-net {
  border-color: rgba(86, 207, 239, 0.25);
  background: rgba(60, 155, 190, 0.08);
}

.daily-payroll-list,
.deduction-list,
.admin-deduction-list {
  display: grid;
  gap: 8px;
}

.daily-payroll-row {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.daily-payroll-row > div {
  min-width: 92px;
}

.daily-payroll-row > div:first-child {
  min-width: 128px;
}

.daily-payroll-row b,
.deduction-row b,
.admin-deduction-row b,
.net-text {
  color: #d9f6ff;
}

.deduction-text {
  color: #f6bf86;
}

.deduction-row,
.admin-deduction-row {
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.deduction-row strong,
.admin-deduction-row strong {
  display: block;
  margin-bottom: 4px;
}

.payroll-summary {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin: 12px 0;
}

.payroll-toolbar .compact-select {
  width: 128px;
  min-width: 128px;
}

.range-separator {
  color: var(--muted);
  font-size: 12px;
}

.payroll-table {
  min-width: 980px;
}

.payroll-table .col-payroll-employee {
  width: 190px;
}

.payroll-table .col-payroll-number {
  width: 110px;
}

.payroll-table .col-payroll-money {
  width: 130px;
}

.payroll-global-rule {
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.payroll-global-rule .order-field {
  width: 220px;
}

.payroll-rules-table {
  min-width: 520px;
}

.payroll-deduction-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 140px minmax(190px, 1.25fr) 150px;
  gap: 8px;
  margin: 12px 0;
}

.salary-preset-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 0.9fr) auto;
  align-items: end;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.salary-preset-form .order-field {
  margin: 0;
}

.salary-preset-form button {
  min-height: 40px;
}

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

.salary-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.salary-preset-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.salary-preset-row strong {
  overflow: hidden;
  color: #e7f7ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.salary-preset-row.is-disabled {
  opacity: 0.62;
}

.payroll-deduction-form .deduction-reason-field {
  grid-column: span 2;
}

.payroll-deduction-form .deduction-note-field {
  grid-column: 1 / span 3;
}

.payroll-deduction-form button {
  min-height: 40px;
}

.admin-deduction-row > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .employee-payroll-grid,
  .payroll-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.employee-authed.order-page {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .performance-shell {
    width: min(100% - 18px, 540px);
    margin-top: 10px;
  }

  .order-workspace {
    gap: 10px;
  }

  .order-topbar {
    gap: 10px;
    padding-top: 0;
  }

  .order-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .order-top-actions .employee-session-badge {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 28px;
  }

  .order-top-actions .secondary-button {
    min-height: 40px;
  }

  .employee-mobile-tabs {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border: 1px solid rgba(151, 176, 207, 0.22);
    border-radius: 8px;
    background: rgba(8, 13, 24, 0.96);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
  }

  .employee-mobile-tabs button {
    min-width: 0;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #9dadc2;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
  }

  .employee-mobile-tabs button:hover,
  .employee-mobile-tabs button.active {
    border-color: rgba(86, 207, 239, 0.32);
    background: linear-gradient(135deg, rgba(58, 160, 193, 0.18), rgba(91, 71, 168, 0.15));
    color: #d9f7ff;
  }

  body.employee-authed [data-mobile-panel] {
    display: none;
  }

  body.employee-authed [data-mobile-panel].mobile-active {
    display: grid;
    animation: employeePanelIn 180ms ease-out;
  }

  .report-custom-fields[hidden] {
    display: none !important;
  }

  .report-custom-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .order-entry-grid.mobile-active,
  .employee-payroll-grid.mobile-active {
    grid-template-columns: 1fr;
  }

  .order-process-panel {
    padding: 12px;
  }

  .order-process-list {
    display: none;
  }

  .salary-rule-highlight {
    margin-bottom: 0;
  }

  .performance-order-form,
  .report-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .performance-order-form .order-field-wide,
  .performance-order-form .order-field:last-child {
    grid-column: auto;
  }

  .section-heading,
  .employee-order-row,
  .report-summary-strip,
  .payroll-total-row,
  .daily-payroll-row,
  .deduction-row,
  .payroll-global-rule,
  .admin-deduction-row {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter-field,
  .payroll-global-rule .order-field {
    width: 100%;
  }

  .order-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-form-actions .primary-button,
  .order-form-actions .secondary-button,
  .employee-order-actions,
  .employee-order-actions .secondary-button {
    width: 100%;
  }

  .employee-order-title {
    flex-wrap: wrap;
  }

  .payroll-total-row > div {
    min-height: 66px;
  }

  .daily-payroll-row > div,
  .daily-payroll-row > div:first-child {
    min-width: 0;
  }

  .payroll-deduction-form {
    grid-template-columns: 1fr;
  }

  .salary-preset-form {
    grid-template-columns: 1fr;
  }

  .salary-preset-row {
    align-items: stretch;
    flex-direction: column;
  }

  .salary-preset-row .table-actions {
    width: 100%;
  }

  .salary-preset-row .table-actions button {
    flex: 1;
  }

  .payroll-deduction-form .deduction-reason-field,
  .payroll-deduction-form .deduction-note-field {
    grid-column: auto;
  }

  .order-search-item,
  .order-search-side {
    align-items: stretch;
    flex-direction: column;
  }

  .order-search-side {
    width: 100%;
  }

  .order-search-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .order-search-actions button {
    flex: 1 1 130px;
  }

  .order-search-input {
    max-width: none;
  }

  .order-profit-grid {
    grid-template-columns: 1fr;
  }

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

  .profit-price-item {
    align-items: stretch;
    flex-direction: column;
  }

  .profit-price-field {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1300px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@keyframes employeePanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.employee-authed [data-mobile-panel].mobile-active {
    animation: none;
  }

  .employee-mobile-tabs button {
    transition: none;
  }
}

/* Boss login screen. Glass panel style inspired by GitHub MIT template
   Himel-Sarder/Glassmorphism-Login-Page, restyled for this console. */
.admin-login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 18px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(18, 63, 99, 0.38), rgba(9, 15, 27, 0.92) 46%, rgba(36, 24, 66, 0.34)),
    #07101d;
}

.admin-login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(115, 190, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 190, 235, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.admin-login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 36px 34px 30px;
  border: 1px solid rgba(131, 177, 219, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(17, 31, 52, 0.9), rgba(10, 18, 33, 0.88)),
    rgba(8, 16, 29, 0.72);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(168, 219, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: adminLoginIn 360ms ease both;
}

.admin-login-emblem {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 1px solid rgba(103, 209, 247, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(72, 185, 232, 0.2), rgba(120, 79, 218, 0.16)),
    rgba(11, 23, 39, 0.92);
  color: #bdefff;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(72, 185, 232, 0.14);
}

.admin-login-emblem.admin-login-logo {
  overflow: hidden;
  padding: 0;
  background: #0a1526;
}

.admin-login-emblem.admin-login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 订单追缴双类型与快速登记：顺运发布补丁 */
.manual-deduction-form {
  grid-template-columns: minmax(130px, 0.8fr) 130px minmax(190px, 1.2fr) 140px;
}

.deduction-quick-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  margin: 12px 0 8px;
}

.deduction-quick-summary {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(83, 199, 230, 0.055);
}

.deduction-quick-summary.is-ready {
  border-color: rgba(83, 199, 230, 0.38);
}

.deduction-quick-summary strong {
  color: #d9f6ff;
}

.deduction-kind-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
}

.deduction-kind-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.deduction-kind-grid input {
  accent-color: #53c7e6;
}

@media (max-width: 1100px) {
  .deduction-quick-bar {
    grid-template-columns: 1fr;
  }
}

/* 订单明细紧凑布局 v2：压缩列宽与间距，操作按钮无需横向滚动 */
.order-admin-table {
  min-width: 1040px;
}

.order-admin-table .order-edit-input {
  min-width: 0;
  padding: 5px 6px;
}

.order-admin-table th:nth-child(1),
.order-admin-table td:nth-child(1) { width: 14%; }
.order-admin-table th:nth-child(2),
.order-admin-table td:nth-child(2) { width: 7%; }
.order-admin-table th:nth-child(3),
.order-admin-table td:nth-child(3) { width: 7%; }
.order-admin-table th:nth-child(4),
.order-admin-table td:nth-child(4) { width: 8%; }
.order-admin-table th:nth-child(5),
.order-admin-table td:nth-child(5) { width: 8%; }
.order-admin-table th:nth-child(6),
.order-admin-table td:nth-child(6) { width: 8%; }
.order-admin-table th:nth-child(7),
.order-admin-table td:nth-child(7) { width: 11%; }
.order-admin-table th:nth-child(8),
.order-admin-table td:nth-child(8) { width: 7%; }
.order-admin-table th:nth-child(9),
.order-admin-table td:nth-child(9) { width: 8%; }
.order-admin-table th:nth-child(10),
.order-admin-table td:nth-child(10) { width: 8%; }
.order-admin-table th:nth-child(11),
.order-admin-table td:nth-child(11) { width: 4%; }
.order-admin-table th:nth-child(12),
.order-admin-table td:nth-child(12) { width: 112px; }

.order-admin-table th,
.order-admin-table td {
  padding: 5px 6px;
}

.order-admin-table .compact-number {
  width: 60px;
}

.order-admin-table .compact-channel {
  width: 70px;
}

.order-admin-table td .text-input[data-order-field="note"] {
  width: 64px;
}

.order-row-actions {
  gap: 4px;
}

.order-row-actions .tiny-button {
  height: 26px;
  padding: 0 8px;
}

/* 批量设置员工可用类型 */
.employee-table .col-employee-check {
  width: 42px;
}

.batch-type-tools {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.batch-type-tools .secondary-button {
  padding: 5px 12px;
  font-size: 12px;
}
