* {
  box-sizing: border-box;
}

:root {
  --primary: #FF0000;
  --primary-hover: #D90000;
  --text: #222222;
  --muted: #777777;
  --border: #E8E8E8;
  --panel: #FFFFFF;
  --page-bg: #F6F7F9;
  --soft-bg: #F8F8F8;
  --radius: 8px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select {
  font: inherit;
}

button {
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(255, 0, 0, .18);
  outline-offset: 2px;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background-image: url('https://static-1324107613.cos.ap-shanghai.myqcloud.com/images/bg.png');
  background-size: cover;
  background-position: center;
}

.login-panel {
  width: 430px;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 92px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.login-logo {
  width: min(220px, 50vw);
  height: auto;
  margin-top: 18vh;
  display: block;
}

.login-spacer {
  flex: 0 0 44px;
}

.qr-wrap {
  margin: 0 auto 14px;
  width: 220px;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
}

.qrcode {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
}

.qrcode canvas,
.qrcode img,
.qrcode table {
  display: block;
  margin: auto;
}

.login-countdown {
  min-height: 18px;
  margin: 0;
  color: #666666;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.qr-fallback {
  max-width: 180px;
  word-break: break-all;
  color: #999;
  font-size: 12px;
  text-align: center;
}

.qrcode:empty,
.qr-fallback:empty {
  display: none;
}

.login-status {
  min-height: 22px;
  width: 100%;
  color: #333333;
  background: transparent;
  text-align: center;
  margin: 18px 0 0;
  padding: 0 12px;
  border-radius: 0;
  font-size: 14px;
}

.primary-btn,
.toolbar button,
.load-more {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.primary-btn:hover,
.toolbar button:hover,
.load-more:hover,
.image-btn:hover,
.save-score:hover,
.delete-bank-info:hover,
#viewerDownloadBtn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.login-footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  color: #777777;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  text-shadow: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 26px 18px;
}

.brand {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.brand img {
  width: 132px;
  height: auto;
  display: block;
}

.nav,
.logout {
  width: 100%;
  height: 44px;
  margin-bottom: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  padding: 0 16px;
  color: #444444;
  font-size: 14px;
  cursor: pointer;
}

.nav:hover,
.logout:hover {
  background: #F4F4F4;
  color: var(--text);
}

.nav.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(255, 0, 0, .16);
}

.logout {
  margin-top: auto;
  margin-bottom: 0;
  color: #666666;
  background: #F3F3F3;
  text-align: center;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 4px 0 2px;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 650;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.user-badge {
  color: #555555;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toolbar input,
.toolbar select {
  flex: 1;
  height: 42px;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius);
  padding: 0 14px;
  color: #333333;
  background: #FFFFFF;
  min-width: 220px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-input-wrap input {
  width: 100%;
  padding-right: 44px;
}

.toolbar .search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #D8D8D8;
  color: #FFFFFF;
  font-size: 16px;
  cursor: pointer;
}

.toolbar .search-clear:hover {
  background: #BFBFBF;
}

.toolbar .date-filter {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666666;
  font-size: 13px;
  white-space: nowrap;
}

.toolbar .date-filter input {
  flex: none;
  width: 148px;
}

.merchant-table-wrap,
.profile-card,
.stats-grid div,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.merchant-table-wrap {
  overflow-x: auto;
  padding: 0;
}

.merchant-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.merchant-table th,
.merchant-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.merchant-table th {
  color: #777777;
  background: #FAFAFA;
  font-weight: 600;
  white-space: nowrap;
}

.merchant-table tbody tr:hover {
  background: #FFF8F8;
}

.merchant-row {
  cursor: pointer;
}

.merchant-table tbody tr:last-child td {
  border-bottom: none;
}

.merchant-no,
.merchant-name-cell {
  color: #2E2E2E;
  font-weight: 500;
}

.merchant-name-cell {
  min-width: 190px;
}

.product-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-icons img {
  width: 24px;
  height: 24px;
  display: block;
}

.product-empty {
  color: #999999;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.enabled {
  color: #14823B;
  background: #EAF7EF;
}

.status-badge.disabled {
  color: #D90000;
  background: #FFECEC;
}

.work-order-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #999999;
  border-radius: 4px;
  background: #F5F5F5;
  box-sizing: border-box;
  vertical-align: middle;
}

.work-order-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 13px;
  height: 8px;
  background: #999999;
  clip-path: polygon(0 100%, 38% 38%, 58% 68%, 78% 20%, 100% 100%);
}

.work-order-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #999999;
}

.work-order-icon span {
  position: absolute;
  right: -9px;
  top: -10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #FF0000;
  color: #FFFFFF;
  font-size: 10px;
  text-align: center;
  box-sizing: border-box;
  z-index: 1;
}

.merchant-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.detail-btn,
.image-btn {
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.detail-btn {
  background: #F3F3F3;
  color: #333333;
}

.image-btn {
  color: #ffffff;
  background: var(--primary);
}

.detail-btn:hover {
  color: #ffffff;
  background: var(--primary);
}

.merchant-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: #666666;
  font-size: 13px;
}

.merchant-pager button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--panel);
  color: #333333;
  cursor: pointer;
}

.merchant-pager button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.merchant-pager button:disabled {
  color: #BBBBBB;
  cursor: not-allowed;
  background: #F5F5F5;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: #444444;
  cursor: pointer;
}

.tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.table-wrap {
  overflow: auto;
  padding: 0;
}

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

th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid #EEEEEE;
  font-size: 14px;
}

th {
  color: #666666;
  background: #FAFAFA;
  font-weight: 600;
}

tbody tr:hover {
  background: #FFF8F8;
}

.score-input {
  width: 92px;
  height: 34px;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius);
  padding: 0 8px;
}

.save-score {
  border: 0;
  border-radius: var(--radius);
  height: 34px;
  padding: 0 12px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.worker-layout {
  display: block;
}

.worker-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.worker-form-modal {
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 12px;
}

.worker-form-modal label {
  margin-bottom: 0;
}

.worker-form-modal .center-modal-actions {
  grid-column: 1 / -1;
}

.worker-form h3 {
  margin: 0 0 14px;
}

.worker-form label {
  display: block;
  margin-bottom: 12px;
  color: #666;
  font-size: 13px;
}

.worker-form input,
.worker-form select {
  width: 100%;
  height: 38px;
  margin-top: 6px;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius);
  padding: 0 10px;
}

.worker-form label.field-invalid input,
.worker-form label.field-invalid select {
  border-color: var(--primary);
  background: #FFF8F8;
}

.worker-form .field-error {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.35;
}

.edit-worker,
.edit-bank-info,
.delete-bank-info {
  border: 0;
  border-radius: var(--radius);
  height: 34px;
  padding: 0 12px;
  background: #F3F3F3;
  color: #333;
  cursor: pointer;
}

.edit-worker:hover,
.edit-bank-info:hover {
  color: #ffffff;
  background: var(--primary);
}

.delete-bank-info {
  margin-left: 8px;
  color: #ffffff;
  background: var(--primary);
}

.center-modal[hidden] {
  display: none;
}

.center-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 24px;
}

.center-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
}

.center-modal-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}

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

.center-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.center-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #F3F3F3;
  color: #666666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

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

.center-modal-actions button {
  min-width: 112px;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: #F3F3F3;
  color: #666666;
  cursor: pointer;
}

.center-modal-actions .primary-btn {
  background: var(--primary);
  color: #FFFFFF;
}

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

.section-heading {
  margin: 18px 0 10px;
  color: #333333;
  font-size: 18px;
  font-weight: 650;
}

.stats-grid span {
  display: block;
  color: #777;
}

.stats-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 30px;
  line-height: 1.1;
}

.empty {
  padding: 80px;
  text-align: center;
  color: #999;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.merchant-loading {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #999999;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.red-spinner {
  width: 28px;
  height: 28px;
  border: 4px solid #FFE1E1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: redSpin .8s linear infinite;
}

@keyframes redSpin {
  to {
    transform: rotate(360deg);
  }
}

.export-overlay[hidden] {
  display: none;
}

.export-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .68);
  backdrop-filter: blur(2px);
}

.export-loading {
  position: relative;
  min-width: 260px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
  color: #666666;
  font-size: 14px;
}

.export-cancel {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F3F3;
  color: #666666;
  font-size: 20px;
  cursor: pointer;
}

.export-cancel:hover {
  color: #FFFFFF;
  background: var(--primary);
}

.docs-list {
  display: grid;
  gap: 16px;
}

.doc-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .035);
}

.doc-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 4px;
}

.doc-card-mark {
  width: 4px;
  height: 20px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--primary);
  flex: none;
}

.doc-card h3 {
  margin: 0;
  color: #333333;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 650;
}

.doc-section {
  margin-top: 12px;
}

.doc-sub-title {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: #F8F8F8;
  border-radius: var(--radius);
  padding: 0 14px;
  color: #333333;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.doc-sub-title:hover {
  color: var(--primary);
}

.doc-arrow {
  color: #cccccc;
  font-size: 22px;
  line-height: 1;
  transition: transform .18s ease;
}

.doc-sub-title.expanded .doc-arrow {
  transform: rotate(90deg);
}

.doc-content {
  padding: 10px 0 2px;
}

.doc-content-box {
  padding: 13px 15px;
  border-radius: var(--radius);
  background: #FFFFFF;
  color: #666666;
  font-size: 14px;
  line-height: 1.75;
}

.doc-content-box p {
  margin: 0 0 6px;
}

.doc-content-box p:last-child {
  margin-bottom: 0;
}

.doc-direct-box {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: #F8F8F8;
  color: #666666;
  font-size: 14px;
  line-height: 1.75;
}

.doc-direct-box p {
  margin: 0 0 6px;
}

.doc-direct-box p:last-child {
  margin-bottom: 0;
}

.doc-link {
  display: inline-block;
  margin-top: 14px;
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.doc-link:hover {
  color: var(--primary);
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
}

.viewer-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  height: min(760px, calc(100vh - 56px));
  background: var(--panel);
  border-radius: var(--radius);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.viewer-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.viewer-header h3 {
  margin: 0;
  font-size: 18px;
}

.viewer-header p {
  margin: 6px 0 0;
  color: #777777;
  font-size: 13px;
}

.viewer-icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F3F3;
  color: #333333;
  font-size: 28px;
  cursor: pointer;
}

.viewer-stage {
  position: relative;
  min-height: 0;
  background: #111111;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.viewer-image-frame {
  position: relative;
  max-width: 86%;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  background: #000000;
  transition: transform .18s ease;
  transform-origin: center;
}

.viewer-image-frame[hidden] {
  display: none;
}

.viewer-image {
  max-width: 100%;
  max-height: calc(86vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.viewer-image-caption {
  min-height: 46px;
  padding: 10px 16px;
  background: #000000;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-empty {
  color: #ffffff;
  font-size: 16px;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 72px;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  color: #333333;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.viewer-nav.prev {
  left: 18px;
}

.viewer-nav.next {
  right: 18px;
}

.viewer-nav:disabled,
.viewer-toolbar button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.viewer-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.viewer-toolbar button {
  height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  background: #F3F3F3;
  color: #333333;
  cursor: pointer;
}

.viewer-toolbar button:hover:not(:disabled),
.viewer-icon-btn:hover {
  color: #ffffff;
  background: #FF0000;
}

#viewerDownloadBtn {
  color: #ffffff;
  background: #FF0000;
}

#viewerDownloadBtn:hover:not(:disabled) {
  filter: brightness(.92);
}

.detail-content {
  overflow: auto;
  padding: 18px;
}

.detail-page-content {
  max-width: 620px;
  padding: 0;
}

.detail-back-btn {
  height: 38px;
  margin-bottom: 16px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  background: #F3F3F3;
  color: #333333;
  cursor: pointer;
}

.detail-back-btn:hover {
  color: #FFFFFF;
  background: var(--primary);
}

.merchant-mini-header,
.merchant-mini-section,
.detail-service-entry {
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 14px;
}

.merchant-mini-header {
  padding: 20px;
}

.merchant-mini-name,
.merchant-mini-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

.merchant-mini-name {
  margin-bottom: 12px;
}

.merchant-mini-name strong {
  flex: 1;
  min-width: 0;
  color: #333333;
  font-size: 22px;
  font-weight: 650;
}

.merchant-mini-id {
  color: #666666;
  font-size: 14px;
  margin-bottom: 16px;
}

.merchant-mini-id b {
  flex: 1;
  color: #333333;
  font-weight: 500;
}

.copy-btn {
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.copy-btn:hover {
  opacity: .72;
}

.copy-btn img {
  width: 18px;
  height: 18px;
  display: block;
  margin: 3px;
}

.merchant-mini-section {
  overflow: hidden;
}

.merchant-mini-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid #F5F5F5;
}

.merchant-mini-row:last-child {
  border-bottom: none;
}

.merchant-mini-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #666666;
  font-size: 14px;
}

.merchant-mini-value {
  flex: 1;
  min-width: 0;
  color: #333333;
  text-align: right;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-report-btn {
  border: 1px solid #FFB3B3;
  border-radius: 6px;
  padding: 4px 8px;
  background: #FFF7F7;
  color: #FF6B6B;
  font-size: 12px;
  cursor: pointer;
}

.detail-service-entry {
  width: 100%;
  min-height: 58px;
  border: 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333333;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.detail-service-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-service-icon {
  color: var(--primary);
}

.detail-service-arrow {
  color: #CCCCCC;
  font-size: 24px;
}

.detail-loading {
  padding: 60px;
  text-align: center;
  color: #999999;
}

.mini-modal[hidden] {
  display: none;
}

.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: end center;
  padding: 28px;
}

.mini-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.mini-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  min-height: 360px;
  background: #FFFFFF;
  border-radius: 16px 16px 8px 8px;
  padding: 24px 22px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}

.mini-modal-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: #DDDDDD;
}

.mini-modal-panel h3 {
  margin: 0 0 18px;
  font-size: 18px;
}

.mini-modal-tip {
  margin: 0 0 20px;
  color: #999999;
  font-size: 14px;
}

.mini-modal-panel select {
  width: 100%;
  height: 46px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #F5F5F5;
  color: #333333;
}

.mini-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.mini-modal-actions button {
  flex: 1;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #F5F5F5;
  color: #666666;
  cursor: pointer;
}

.mini-modal-actions .primary-btn {
  background: var(--primary);
  color: #FFFFFF;
}

.service-request-panel {
  min-height: 430px;
}

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

.service-option {
  position: relative;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: #F5F5F5;
  color: #333333;
  cursor: pointer;
}

.service-option.selected {
  background: #FFF1F1;
  color: var(--primary);
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .brand {
    width: auto;
    min-width: 104px;
    height: 38px;
    margin: 0 4px 0 0;
    flex: 0 0 auto;
  }

  .brand img {
    width: 104px;
  }

  .nav,
  .logout {
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
    height: 36px;
    margin: 0;
    padding: 0 14px;
    text-align: center;
    white-space: nowrap;
    font-size: 13px;
    border-radius: 8px;
  }

  .content {
    padding: 16px 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .user-badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.4;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .toolbar input,
  .toolbar select,
  .toolbar .date-filter,
  .toolbar button {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .search-input-wrap {
    width: 100%;
    min-width: 0;
  }

  .toolbar .search-clear {
    width: 24px;
    height: 24px;
    right: 12px;
  }

  .toolbar .date-filter {
    justify-content: space-between;
    padding: 0 12px;
    border: 1px solid #DDDDDD;
    border-radius: var(--radius);
    background: #FFFFFF;
  }

  .toolbar .date-filter input {
    width: min(210px, 62%);
    height: 40px;
    border: 0;
    padding: 0;
    text-align: right;
  }

  .merchant-actions {
    justify-content: flex-start;
  }

  .merchant-table-wrap,
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .merchant-pager {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
  }

  .merchant-pager button {
    height: 36px;
    padding: 0 12px;
  }

  .merchant-pager span {
    width: 100%;
    order: -1;
    text-align: center;
  }

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

  .worker-form-modal {
    grid-template-columns: 1fr;
  }

  .viewer-toolbar {
    justify-content: flex-start;
    overflow-x: auto;
  }
}
