:root {
  --ok: #14964d;
  --danger: #b82222;
  --warn: #b56f00;
  --blue: #1264c0;
  --bg: #f4f6f9;
  --line: #d9e0ea;
  --mobile-bg: #f6f6f8;
  --mobile-card: #ffffff;
  --mobile-text: #101828;
  --mobile-muted: #8b95a7;
  --mobile-primary: #2463eb;
  --mobile-primary-soft: #eaf1ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); }
html, body {
  overscroll-behavior: none;
  touch-action: manipulation;
}
.hidden { display: none !important; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.08); padding: 24px; width: 360px; }
.card h1 { margin: 0 0 8px; font-size: 24px; }
.card p { margin: 0 0 16px; color: #667; font-size: 13px; }
input, select, button, textarea { width: 100%; padding: 10px; margin: 6px 0; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
button { background: #1f6feb; color: #fff; border: none; cursor: pointer; }
button:hover { opacity: .92; }
button.ghost { background: #eceff4; color: #333; }
.error { color: var(--danger); min-height: 20px; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #111827; color: #fff; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.app.sidebar-hidden { grid-template-columns: 0 1fr; }
.app.sidebar-hidden .sidebar { width: 0; padding: 0; overflow: hidden; }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
#userInfo { font-size: 13px; color: #d1d5db; margin-bottom: 8px; }
#menu button { margin: 4px 0; text-align: left; background: #1f2937; }
#menu button.active { background: #2563eb; }
.content { padding: 20px; }
.content-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.content-head h2 { margin: 0; }
#sidebarToggle { width: auto; min-width: 92px; padding: 8px 12px; }
#toolbar { margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-title { font-size: 18px; font-weight: 700; color: #1f2937; }
.col-dropdown { margin-left: auto; position: relative; }
.col-dropdown > summary { list-style: none; cursor: pointer; background: #eef2f7; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.col-dropdown > summary::-webkit-details-marker { display: none; }
.col-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 8px; z-index: 20; display: grid; gap: 6px; text-align: left; }
.col-menu label { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.col-menu input { width: auto; margin: 0; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { border: 1px solid var(--line); padding: 12px 8px; font-size: 13px; text-align: center; vertical-align: middle; line-height: 1.4; }
th { background: #f7f9fc; }
.sort-th { cursor: pointer; user-select: none; }
.customer-name-cell { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 auto; }
.badge { padding: 2px 8px; border-radius: 999px; color: #fff; display: inline-block; }
.badge.ok { background: var(--ok); }
.badge.light-green { background: #b8eec6; color: #135b2a; }
.badge.danger { background: var(--danger); }
.badge.warn { background: var(--warn); }
.badge.blue { background: var(--blue); }
.badge.gray { background: #6b7280; }
.badge { text-align: center; min-width: 52px; }
.contact-link, .project-link { color: inherit; cursor: pointer; text-decoration: none; font-weight: inherit; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.entry-wrap { width: 66.6667%; margin: 0 auto; }
.form-item { background: #fafbfe; border: 1px solid #e7ecf4; border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; }
.form-item label { display: block; font-size: 13px; color: #374151; margin: 0; white-space: nowrap; }
.form-item input, .form-item select { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 12px; border-radius: 8px; }
.stat strong { display: block; font-size: 20px; }
.dashboard-stats .stat { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.process-board { margin-top: 10px; }
.process-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.process-board h3 { margin: 0; font-size: 15px; }
.process-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
.process-step { background: #fbfdff; border: 1px solid #e5ebf2; border-radius: 8px; padding: 10px; }
.process-title, .process-step { cursor: pointer; }
.process-step:hover, .process-title:hover { filter: brightness(0.98); }
.process-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.process-index { width: 20px; height: 20px; border-radius: 999px; background: #e9eef7; color: #1f2937; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.process-name { font-size: 13px; color: #1f2937; font-weight: 600; }
.process-track { height: 10px; background: #edf2f7; border-radius: 999px; overflow: hidden; }
.process-fill { height: 100%; border-radius: 999px; min-width: 2px; }
.process-meta { margin-top: 8px; display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #64748b; }
.process-meta b { color: #111827; font-size: 16px; }
.progress-modal { width: min(1220px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.progress-table-wrap { width: 100%; overflow: auto; border: 1px solid #dfe6ee; border-radius: 10px; }
.progress-table { min-width: 1040px; }
.progress-table td { white-space: nowrap; }
.stage-chip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #1f2937; font-size: 12px; }
.stage-chip b { color: #374151; font-size: 12px; }
.progress-total { display: inline-block; min-width: 56px; padding: 2px 8px; border-radius: 999px; background: #e8f7ee; color: #0f6a34; font-weight: 700; }
.progress-bar-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; min-width: 280px; }
.progress-bar-track { height: 14px; background: #e8edf4; border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #22c55e); border-radius: 999px; min-width: 2px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dash-grid h3 { margin: 0 0 10px; font-size: 15px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.bar-track { height: 10px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: #2f80ed; }
.bar-fill.green { background: #2a9d62; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th, .mini-table td { border: 1px solid #e5ebf2; padding: 6px; font-size: 12px; text-align: center; }
.mini-table th { background: #f7f9fc; }
.muted { color: #6b7280; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { width: 360px; max-width: 92vw; background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 14px; }
.modal-box h4 { margin: 0 0 10px; }
.modal-row { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; }
.modal-row:last-child { border-bottom: none; }
.modal-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.actions-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-sm { width: auto; min-width: 88px; padding: 6px 10px; font-size: 12px; margin: 0; }
.action-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e6f0ff; color: #174ea6; font-weight: 700; }
.modal-box.biz { width: 760px; max-width: 96vw; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 8px; }
.detail-item { background: #f7fafc; border: 1px solid #e5edf5; border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; text-align: left; }
.detail-item .k { color: #4b5563; font-size: 12px; }
.detail-item .v { color: #111827; font-weight: 600; word-break: break-word; }

.mobile-topbar,
.mobile-bottom-nav,
.mobile-fab { display: none; }

.mobile-topbar {
  position: relative;
  top: auto;
  z-index: 10;
  margin: -20px -20px 0;
  padding: 12px 16px 10px;
  background: rgba(246, 246, 248, 0.92);
  border-bottom: 1px solid #e6e9f0;
}

.mobile-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-topbar-side,
.mobile-topbar-icon {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--mobile-text);
  font-size: 22px;
}

.mobile-topbar-icon.flat,
.mobile-topbar-avatar.flat {
  background: #f5f7fb;
  border: 1px solid #dbe4f1;
  color: #64748b;
  font-size: 18px;
  font-weight: 800;
}

.mobile-topbar-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #d8e1ef;
  border-radius: 999px;
  background: #f3f6fb;
  color: #5b6679;
  font-size: 16px;
  font-weight: 800;
  padding: 0;
}

.mobile-topbar-icon svg,
.mobile-topbar-avatar svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.mobile-topbar-side.ghosted {
  color: transparent;
  pointer-events: none;
}

.mobile-topbar-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mobile-text);
}

.mobile-search {
  position: relative;
  margin-top: 14px;
}

.mobile-search-block {
  margin-top: 0;
}

.mobile-search input {
  margin: 0;
  padding: 14px 16px 14px 42px;
  border: 0;
  border-radius: 16px;
  background: #e9edf5;
  color: var(--mobile-text);
  font-size: 14px;
}

.mobile-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mobile-muted);
  font-size: 18px;
}

.mobile-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.mobile-chip-row::-webkit-scrollbar { display: none; }

.mobile-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: #e6ebf3;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.mobile-chip.active {
  background: var(--mobile-primary);
  color: #fff;
}

.mobile-chip:not(.active)::after {
  content: "⌄";
  margin-left: 6px;
  font-size: 12px;
  vertical-align: 1px;
}

.mobile-filter-group .mobile-chip::after {
  content: "";
  margin: 0;
}

.mobile-chip[data-chip-value="全部订单"]::after,
.mobile-chip.active::after {
  content: "";
  margin: 0;
}

.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 35;
  display: flex;
  width: min(100%, 430px);
  transform: translateX(-50%);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid #e6e9f0;
}

.mobile-bottom-nav button {
  flex: 1;
  margin: 0;
  padding: 4px 0 0;
  background: transparent;
  color: #9aa4b5;
  border-radius: 0;
}

.mobile-bottom-nav button.active {
  color: var(--mobile-primary);
}

.mobile-nav-icon {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

.mobile-nav-label {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.mobile-bottom-nav button.active .mobile-nav-label {
  font-size: 15px;
  font-weight: 900;
}

.mobile-fab {
  position: fixed;
  right: max(16px, calc((100vw - min(100vw, 430px)) / 2 + 16px));
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 36;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(36, 99, 235, 0.35);
  font-size: 32px;
  line-height: 1;
  padding: 0;
}

.mobile-page {
  display: grid;
  gap: 14px;
  padding-bottom: 98px;
}

.mobile-page.home-redesign {
  gap: 16px;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #2463eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
}

.home-brand-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-notify {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: transparent;
  color: #1f2937;
  font-size: 20px;
}

.home-notify::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.home-stats-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.home-stats-strip::-webkit-scrollbar {
  display: none;
}

.home-stat-card {
  text-align: center;
  padding: 14px 8px;
}

.home-stat-card-compact {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  min-height: 120px;
  padding: 16px 8px 12px;
  border-radius: 18px;
}

.home-stat-card.clickable {
  cursor: pointer;
}

.home-stat-card .label {
  color: var(--mobile-primary);
  font-size: 12px;
  font-weight: 800;
}

.home-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
}

.home-stat-card-compact strong {
  margin-top: 10px;
  font-size: 26px;
}

.home-stat-card small {
  display: block;
  margin-top: 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}

.home-amount-switch-wrap {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.home-amount-switch-title {
  color: #8b95a7;
  font-size: 12px;
  font-weight: 800;
}

.home-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #ffd4d4;
  background: #fff1f1;
}

.home-alert-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  flex: 0 0 auto;
}

.home-alert-title {
  color: #dc2626;
  font-size: 15px;
  font-weight: 900;
}

.home-alert-desc {
  margin-top: 4px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
}

.home-alert button {
  width: auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ef4444;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-filter-field {
  display: grid;
  gap: 6px;
}

.mobile-filter-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.mobile-filter-field select {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: #e9edf5;
  color: var(--mobile-text);
  font-size: 14px;
  font-weight: 700;
  appearance: none;
}

.home-amount-switch {
  display: flex;
  gap: 10px;
  margin: 0;
}

.home-switch-btn {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #edf2fa;
  color: #7b8798;
  font-size: 12px;
  font-weight: 800;
}

.home-switch-btn.active {
  background: #2463eb;
  color: #fff;
}

.home-tabs {
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 16px;
  background: #eceff5;
}

.home-tab {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 10px 8px;
  border-radius: 12px;
  background: transparent;
  color: #7b8798;
  font-size: 13px;
  font-weight: 800;
}

.home-tab.active {
  background: #fff;
  color: var(--mobile-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.home-order-card {
  overflow: hidden;
  padding: 0;
}

.home-order-main {
  padding: 16px;
}

.home-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-order-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.home-order-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--mobile-primary);
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 auto;
}

.home-order-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.home-order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.home-order-meta .owner {
  color: #7b8798;
  font-size: 12px;
  font-weight: 700;
}

.home-order-meta .amount {
  color: var(--mobile-primary);
  font-size: 18px;
  font-weight: 900;
}

.home-order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}

.home-order-footer .due {
  color: #ef4444;
  font-weight: 800;
}

.home-order-footer .soft {
  color: #c0c7d4;
}

.home-order-footer .warn {
  color: #9ca3af;
  font-style: italic;
}

.mobile-card {
  background: var(--mobile-card);
  border: 1px solid #ebeff5;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

.mobile-section-title {
  margin: 10px 2px 2px;
  color: var(--mobile-text);
  font-size: 14px;
  font-weight: 800;
}

.mobile-muted-title {
  margin: 2px 2px 0;
  color: #9aa4b5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mobile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-stat.full {
  grid-column: 1 / -1;
}

.mobile-stat-label {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mobile-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  color: var(--mobile-text);
}

.mobile-stat-trend {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
}

.mobile-stat-trend.up { color: #12b76a; }
.mobile-stat-trend.down { color: #f04438; }
.mobile-stat-trend.flat { color: #98a2b3; }

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

.mobile-process-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.mobile-process-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-process-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #d5def0;
  color: #9aa4b5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.mobile-process-dot.done {
  background: #dff7ea;
  border-color: #b7ebcd;
  color: #14a04b;
}

.mobile-process-dot.current {
  background: #edf3ff;
  border-color: #c7d7ff;
  color: var(--mobile-primary);
}

.mobile-process-line {
  width: 2px;
  flex: 1;
  background: #e4e9f2;
  margin-top: 4px;
}

.mobile-process-item:last-child .mobile-process-line { display: none; }

.mobile-process-name {
  margin: 2px 0 2px;
  font-size: 15px;
  font-weight: 800;
}

.mobile-process-status {
  font-size: 12px;
  font-weight: 700;
}

.mobile-process-status.done { color: #14a04b; }
.mobile-process-status.current { color: var(--mobile-primary); }
.mobile-process-status.pending { color: #98a2b3; }

.mobile-chart {
  background: linear-gradient(180deg, #f5f8ff 0%, #edf3ff 100%);
  border: 1px solid #dbe7ff;
}

.mobile-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mobile-chart-tag {
  padding: 4px 8px;
  border-radius: 10px;
  background: #fff;
  color: var(--mobile-primary);
  font-size: 10px;
  font-weight: 800;
}

.mobile-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 110px;
}

.mobile-bars span {
  flex: 1;
  border-radius: 10px 10px 0 0;
  background: rgba(36, 99, 235, 0.2);
}

.mobile-bars span.highlight {
  background: var(--mobile-primary);
}

.mobile-order-card {
  display: grid;
  gap: 12px;
}

.mobile-filter-group {
  display: grid;
  gap: 10px;
}

.mobile-filter-title {
  padding: 0 2px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.mobile-filter-group.category .mobile-chip-row,
.mobile-filter-group.substatus .mobile-chip-row {
  gap: 8px;
}

.mobile-filter-group.category .mobile-chip {
  min-width: calc((100% - 16px) / 3);
  justify-content: center;
}

.mobile-filter-group.substatus .mobile-chip {
  min-width: calc((100% - 16px) / 3);
  justify-content: center;
}

.mobile-filter-summary {
  padding: 0 2px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.mobile-order-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-order-id {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mobile-order-name {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--mobile-text);
}

.mobile-order-project {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.mobile-order-milestone {
  border-left: 4px solid var(--mobile-primary);
  background: #f4f6fb;
  border-radius: 14px;
  padding: 12px 14px;
}

.mobile-order-actions {
  display: flex;
  gap: 10px;
}

.mobile-order-actions button {
  width: auto;
  margin: 0;
  padding: 9px 14px;
}

.mobile-empty {
  padding: 22px 18px;
  color: #98a2b3;
  text-align: center;
  font-size: 13px;
}

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

.mobile-staff-card,
.mobile-customer-card,
.mobile-log-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dce7ff, #eef2ff);
  color: var(--mobile-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.mobile-meta-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
}

.mobile-meta-sub {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
}

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

.mobile-icon-btn {
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  background: #edf3ff;
  color: var(--mobile-primary);
  border-radius: 12px;
}

.mobile-icon-btn.danger {
  background: #fff1f1;
  color: #d92d20;
}

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

.mobile-form-section h4 {
  margin: 4px 2px 0;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-field-grid {
  display: grid;
  gap: 12px;
}

.mobile-field-grid.two {
  grid-template-columns: 1fr 1fr;
}

.mobile-field {
  background: var(--mobile-card);
  border: 1px solid #e9edf5;
  border-radius: 16px;
  padding: 12px;
}

.mobile-field label {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.mobile-field input,
.mobile-field select,
.mobile-field textarea {
  margin: 0;
  border: 1px solid #e6ebf2;
  background: #f6f8fc;
  border-radius: 12px;
}

.mobile-readonly {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fc;
  color: var(--mobile-text);
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.mobile-footer-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 34;
  display: flex;
  gap: 12px;
  width: min(100%, 430px);
  transform: translateX(-50%);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid #e6e9f0;
}

.mobile-footer-actions button {
  margin: 0;
  height: 46px;
  border-radius: 14px;
  font-weight: 800;
}

.mobile-footer-actions .ghost {
  background: #fff;
  border: 1px solid #d9e2f2;
}

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

.mobile-kv {
  display: grid;
  gap: 6px;
}

.mobile-kv b {
  color: #667085;
  font-size: 12px;
}

.mobile-kv pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.mobile-sheet {
  width: min(100%, 430px);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px 20px;
}

.mobile-sheet-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-sheet-item,
.mobile-notice-item {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f6f8fc;
  color: var(--mobile-text);
  text-align: left;
  font-size: 15px;
  font-weight: 700;
}

.mobile-sheet-item.active {
  background: #eaf1ff;
  color: var(--mobile-primary);
}

.mobile-notice-item strong {
  display: block;
  margin-bottom: 4px;
}

.mobile-notice-item span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 2; }
  .grid2, .stats, .form-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .entry-wrap { width: 100%; }
  .form-item { grid-template-columns: 88px 1fr; }
}

@media (max-width: 768px) {
  body {
    background: var(--mobile-bg);
    color: var(--mobile-text);
  }

  .card {
    width: min(92vw, 360px);
    border-radius: 22px;
    padding: 22px;
  }

  .app {
    display: block;
    min-height: 100vh;
  }

  .sidebar,
  .content-head,
  #toolbar {
    display: none !important;
  }

  .content {
    padding: 20px 16px 0;
    max-width: 430px;
    margin: 0 auto;
  }

  .mobile-topbar,
  .mobile-bottom-nav,
  .mobile-fab {
    display: block;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .mobile-page.table-wrap table,
  .mobile-page table {
    display: none;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-box,
  .modal-box.biz,
  .progress-modal {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    padding: 18px 16px 20px;
  }

  .detail-grid,
  .grid2,
  .stats,
  .dash-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .mobile-field-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}
