* {
  box-sizing: border-box;
}

.repair-detail {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.repair-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.repair-detail-grid > div,
.repair-detail-block {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #e4ecef;
  border-radius: 12px;
  background: #f8fbfc;
}

.repair-detail-grid span,
.repair-detail-block > span {
  color: #83919a;
  font-size: 12px;
}

.repair-detail-grid strong,
.repair-detail-grid a,
.repair-detail-block strong {
  overflow-wrap: anywhere;
  color: #263c49;
  font-size: 14px;
  font-weight: 650;
}

.repair-detail-grid a {
  color: #16876f;
  text-decoration: none;
}

.repair-detail-block p {
  margin: 0;
  color: #435865;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.repair-detail-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.repair-detail-images a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #eaf1f3;
  aspect-ratio: 1;
}

.repair-detail-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.repair-detail-empty {
  color: #9aa5ac !important;
}

.assist-modal-card { width: min(980px, calc(100vw - 40px)); }
.assist-rules-label { display: grid; gap: 8px; margin-top: 18px; }
.assist-rules-label textarea { min-height: 96px; resize: vertical; }
.welfare-type-fields { margin-top: 18px; }
.welfare-image-field { display: grid; justify-items: start; gap: 8px; }
.welfare-image-field > span { color: #334155; }
.welfare-image-field small { color: #8793a6; font-size: 12px; font-weight: 600; }
.welfare-image-upload {
  position: relative;
  display: grid;
  place-items: center;
  width: min(264px, 100%);
  height: 150px;
  min-height: 150px;
  padding: 0;
  overflow: hidden;
  border: 2px dashed #c5d2e2;
  border-radius: 12px;
  color: #91a1b7;
  background: #f7f9fc;
  box-shadow: none;
}
.welfare-image-upload:hover { border-color: #4c7cf0; color: #4c7cf0; background: #f4f7ff; }
.welfare-image-upload-plus { font-size: 44px; font-weight: 300; line-height: 1; transform: translateY(-2px); }
.welfare-image-upload img { display: block; width: 100%; height: 100%; object-fit: contain; background: #f7f9fc; }
.welfare-image-upload img[hidden] { display: none; }
.welfare-image-upload.has-image { border-style: solid; }
.welfare-image-upload.has-image .welfare-image-upload-plus { display: none; }
.welfare-popup-settings { display: grid; gap: 12px; margin-top: 18px; padding: 14px; border: 1px solid #dbe4f0; border-radius: 10px; background: #f8fafc; }
.welfare-popup-settings-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #e2e8f0; }
.welfare-popup-settings-head strong { color: #334155; font-size: 13px; line-height: 1.4; }
.welfare-popup-settings-head span { color: #8793a6; font-size: 11px; font-weight: 600; }
.welfare-popup-image-field .welfare-image-upload { width: min(220px, 100%); height: 124px; min-height: 124px; }
.welfare-popup-image-field .welfare-image-upload-plus { font-size: 36px; }
.welfare-popup-image-field .welfare-image-upload.has-image { width: min(360px, 100%); height: auto; min-height: 0; }
.welfare-popup-image-field .welfare-image-upload.has-image img { width: 100%; height: auto; max-height: none; object-fit: contain; }
.banner-image-field .welfare-image-upload { width: min(340px, 100%); height: 132px; min-height: 132px; border-radius: 10px; }
.banner-image-field .welfare-image-upload-plus { font-size: 38px; }
.banner-image-field .welfare-image-upload img { object-fit: contain; }
.welfare-rich-editor-field { display: grid; gap: 8px; }
.welfare-rich-editor-field > span { color: #334155; font-weight: 700; }
.welfare-rich-editor { overflow: hidden; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
.welfare-rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 1px solid #dbe4f0; background: #f8fafc; }
.welfare-rich-toolbar button { height: 30px; padding: 0 10px; background: #fff; }
.welfare-rich-editor-content { min-height: 320px; padding: 20px; overflow-wrap: anywhere; color: #334155; background: #fff; font-size: 15px; font-weight: 500; line-height: 1.8; outline: none; }
.welfare-rich-editor-content:empty::before { color: #9aa8ba; content: attr(data-placeholder); pointer-events: none; }
.welfare-rich-editor-content p { margin: 0 0 14px; }
.welfare-rich-editor-content h2 { margin: 20px 0 12px; color: #172033; font-size: 24px; line-height: 1.4; }
.welfare-rich-editor-content blockquote { margin: 16px 0; padding: 10px 14px; border-left: 4px solid #9eb6df; color: #64748b; background: #f5f8fc; }
.welfare-rich-editor-content img { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 8px; }
.welfare-type-picker { padding: 14px 16px; border: 1px solid #cddcff; border-radius: 12px; background: #f4f7ff; }
.welfare-type-picker span { color: #66758d; font-size: 12px; font-weight: 600; }
.welfare-article-fields { display: grid; gap: 18px; margin-top: 18px; }
.welfare-article-fields.hidden { display: none; }
.assist-reward-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.assist-reward-head div { display: grid; gap: 4px; }
.assist-reward-head span { color: #8992a3; font-size: 12px; }
.assist-reward-rows { display: grid; gap: 10px; }
.assist-reward-row { display: grid; grid-template-columns: 150px minmax(260px,1fr) 130px auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid #edf0f5; border-radius: 12px; background: #fafbfe; }
.assist-reward-row label { display: grid; gap: 7px; }
.admin-user-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.admin-user-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; overflow: hidden; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#4c9aff,#7a63ee); }
.admin-user-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-user-avatar span { font-size: 15px; font-weight: 750; }
.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 210px;
}

.user-row-actions button {
  width: auto;
  min-width: 58px;
  white-space: nowrap;
}

.user-row-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
@media (max-width: 760px) { .assist-reward-row { grid-template-columns: 1fr; } }

body {
  margin: 0;
  color: #172033;
  background: #e7ecf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 18px 54px rgba(15, 23, 42, .18);
}

.login-card h1 {
  font-size: 26px;
}

.login-card p {
  margin-top: 6px;
  color: #6b7280;
}

.login-form {
  display: grid;
  gap: 14px;
}

button,
input,
select,
textarea,
.nav-item {
  font: inherit;
}

button,
.nav-item {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #c7d2df;
  border-radius: 6px;
  color: #263445;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

button:not(:disabled):hover {
  border-color: #9aa9bb;
  background: #eef3f8;
}

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

button.primary {
  border-color: #1877f2;
  color: #fff;
  background: #1877f2;
}

.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 22px 18px;
  color: #fff;
  background: #111827;
}

.brand {
  display: grid;
  gap: 4px;
  padding: 4px 4px 26px;
}

.brand strong {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: .2px;
}

.brand span {
  color: #7f8ca3;
  font-size: 12px;
  font-weight: 600;
}

nav {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #8fa1ba;
  background: transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
}

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-caret {
  transition: transform .16s ease;
}

.nav-group.collapsed .nav-group-items {
  display: none;
}

.nav-group.collapsed .nav-caret {
  transform: rotate(-90deg);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  padding: 0 14px 0 28px;
  border: 0;
  border-radius: 6px;
  color: #a8b3c5;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:not(:disabled):hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, .12);
}

.nav-item.active {
  color: #fff;
  background: #2563eb;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .9);
  font-weight: 800;
}

.nav-item:disabled {
  color: #64748b;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  opacity: 1;
}

.coupon-nav-item {
  padding-left: 14px;
  margin-top: 4px;
  color: #c7d2e2;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 24px;
  background: linear-gradient(180deg, #eef2f7 0%, #e6ebf2 100%);
}

.admin-global-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 58px;
  margin: -24px -24px 24px;
  padding: 8px 24px;
  border-bottom: 1px solid #d7e0ea;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.admin-global-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

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

.topbar p,
.editor-head span {
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logout-button {
  border-color: #fecaca;
  color: #b42318;
  background: #fff7f7;
}

.admin-logout-button:not(:disabled):hover {
  border-color: #f87171;
  color: #991b1b;
  background: #fff1f2;
}

.admin-notification-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #526273;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.admin-sound-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.admin-sound-toggle i {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .16s ease;
}

.admin-sound-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
  transition: transform .16s ease;
}

.admin-sound-toggle input:checked + i {
  background: #2563eb;
}

.admin-sound-toggle input:checked + i::after {
  transform: translateX(16px);
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  font-size: 19px;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #eef2f7;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: 50px;
  right: 0;
  z-index: 90;
  width: min(380px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .2);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #e5eaf0;
  background: #f8fafc;
}

.notification-head > div {
  display: grid;
  gap: 3px;
}

.notification-head strong {
  color: #172033;
  font-size: 15px;
}

.notification-head span {
  color: #718096;
  font-size: 12px;
}

.notification-head button {
  flex: none;
  height: 30px;
  padding: 0 10px;
  border: 0;
  color: #2563eb;
  background: transparent;
  font-size: 12px;
}

.notification-list {
  display: grid;
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  height: auto;
  min-height: 82px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  background: #fff;
  line-height: 1.4;
  text-align: left;
}

.notification-item.unread {
  box-shadow: inset 3px 0 #2563eb;
}

.notification-item.read {
  background: #f8fafc;
}

.notification-item.read strong {
  color: #526273;
}

.notification-item.read span {
  color: #718096;
  font-weight: 500;
}

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

.notification-item:not(:disabled):hover {
  background: #f1f6ff;
}

.notification-item strong {
  color: #172033;
  font-size: 13px;
}

.notification-item span {
  color: #526273;
  font-size: 12px;
  font-weight: 650;
}

.notification-item small {
  color: #94a3b8;
  font-size: 11px;
}

.notification-empty {
  padding: 36px 20px;
  color: #8a98a8;
  font-size: 13px;
  text-align: center;
}

.api-host {
  display: none;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 160px 160px 88px;
  gap: 10px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.toolbar.forum-toolbar {
  grid-template-columns: minmax(260px, 1fr) 160px 88px;
}

.toolbar.simple-toolbar {
  grid-template-columns: 88px;
}

.toolbar.coupon-toolbar {
  grid-template-columns: minmax(220px, 1fr) 140px 88px;
}

.toolbar.delivery-toolbar {
  grid-template-columns: 180px 140px 88px;
}

.toolbar.order-toolbar {
  grid-template-columns: minmax(220px, 1fr) 160px 88px;
}

.toolbar.task-admin-toolbar {
  grid-template-columns: minmax(220px, 1fr) 140px 140px 130px 142px 142px 76px 76px;
}

.toolbar.record-toolbar {
  grid-template-columns: 220px minmax(240px, 1fr) 160px 88px;
}

.record-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.record-tabs button {
  width: 100%;
}

.record-tabs button.active {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.toolbar.banner-toolbar {
  grid-template-columns: 180px 140px 88px;
}

.toolbar.guide-toolbar {
  grid-template-columns: minmax(220px, 1fr) 180px 140px 88px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c7d2df;
  border-radius: 6px;
  color: #172033;
  background: #fbfdff;
  font-size: 13px;
  font-weight: 650;
}

input::placeholder,
textarea::placeholder {
  color: #7b8794;
  font-size: 13px;
  font-weight: 650;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

input[readonly] {
  color: #64748b;
  background: #f1f5f9;
}

input,
select {
  height: 36px;
  padding: 0 10px;
}

textarea {
  padding: 10px;
  resize: vertical;
}

.table-card,
.editor-card {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.table-card {
  margin-top: 18px;
  overflow: hidden;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.metric-card span,
.metric-card small,
.panel-head span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.metric-card strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.dashboard-panel {
  margin-top: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d7e0ea;
  background: #f8fafc;
}

.panel-head h2 {
  font-size: 16px;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-legend .pv {
  background: #2563eb;
}

.chart-legend .uv {
  background: #14b8a6;
}

.chart-legend .clicks {
  background: #f59e0b;
}

.chart-panel {
  margin-top: 18px;
}

.chart-tooltip {
  position: relative;
}

.chart-tooltip::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  display: none;
  width: max-content;
  max-width: 260px;
  padding: 7px 9px;
  border-radius: 6px;
  color: #fff;
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .22);
  content: attr(data-tip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.chart-tooltip::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  z-index: 5;
  display: none;
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, .94);
  content: "";
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

.chart-tooltip:hover::after,
.chart-tooltip:hover::before {
  display: block;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-height: 220px;
  padding: 18px 18px 16px;
}

.bar-chart-item {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto auto;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.bar-chart-track,
.multi-bar-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 150px;
  border-radius: 6px;
  background: #eef3f8;
}

.bar-chart-fill {
  display: block;
  width: 42%;
  min-height: 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #22c55e 0%, #2563eb 100%);
}

.bar-chart-item strong {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-chart-item small,
.multi-bar-item small,
.rank-chart-row small {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.multi-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-height: 220px;
  padding: 18px;
}

.multi-bar-item {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.multi-bar-bars {
  gap: 5px;
  padding: 0 8px;
}

.multi-bar {
  width: 22%;
  border-radius: 5px 5px 0 0;
}

.multi-bar.pv {
  background: #2563eb;
}

.multi-bar.uv {
  background: #14b8a6;
}

.multi-bar.clicks {
  background: #f59e0b;
}

.rank-chart {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.rank-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(160px, 2fr) 44px 58px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.rank-chart-row span {
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-chart-row strong {
  color: #172033;
  font-size: 13px;
  font-weight: 850;
}

.rank-chart-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.rank-chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #22c55e 100%);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: #475569;
  background: #edf2f7;
  font-weight: 700;
}

tbody tr:hover {
  background: #f6f9fc;
}

td strong {
  display: block;
  color: #172033;
}

td small {
  color: #6b7280;
}

.product-cell {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.product-cell img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.category-cell .category-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.category-cell .category-name strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-cell .category-name small,
.category-cell .category-name span {
  display: none;
}

.banner-cell {
  grid-template-columns: 96px minmax(0, 1fr);
}

.banner-cell img {
  width: 96px;
  height: 46px;
}

.banner-cell .category-name {
  min-width: 0;
}

.banner-cell .category-name strong,
.banner-cell .category-name span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.banner-cell .category-name span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 700;
}

.status.off_sale {
  color: #6b7280;
  background: #f3f4f6;
}

.status.pending {
  color: #b45309;
  background: #fffbeb;
}

.status.rejected {
  color: #be123c;
  background: #fff1f2;
}

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

.row-actions button {
  height: 30px;
  padding: 0 10px;
}

.row-actions button.danger {
  color: #be123c;
  background: #fff1f2;
}

button.danger {
  color: #be123c;
  background: #fff1f2;
}

.material-cell {
  display: grid;
  gap: 6px;
  align-items: start;
}

.after-sale-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.after-sale-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fbff;
}

.after-sale-item img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.after-sale-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.after-sale-item strong,
.after-sale-item span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.after-sale-item div span,
.after-sale-empty {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.after-sale-item > span {
  color: #be123c;
  font-weight: 800;
}

.after-sale-empty {
  padding: 12px;
  border-radius: 8px;
  background: #f8fbff;
}

.legal-detail {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.legal-detail-grid {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fbff;
}

.legal-detail-grid span,
.legal-detail-block span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.legal-detail-grid strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.legal-detail-block {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
}

.legal-detail-block p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.legal-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-materials a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.legal-materials .legal-material-preview {
  position: relative;
  display: block;
  width: 112px;
  height: 84px;
  overflow: hidden;
  padding: 0;
  border-radius: 8px;
  background: #e2e8f0;
}

.legal-material-preview img,
.legal-message-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legal-material-preview span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 5px 7px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  font-size: 11px;
  text-align: center;
}

.legal-empty {
  padding: 12px;
  border-radius: 8px;
  color: #64748b;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 700;
}

.legal-messages {
  display: grid;
  gap: 10px;
}

.legal-message {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fbff;
}

.legal-message.admin {
  background: #eff6ff;
}

.legal-message.user {
  background: #f0fdf4;
}

.legal-message div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.legal-message strong {
  color: #0f172a;
  font-size: 12px;
}

.legal-message span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.legal-message p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.legal-message-attachment {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.legal-message-image {
  display: block;
  width: 132px;
  height: 96px;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
}

.link-btn {
  width: fit-content;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #2563eb;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
}

.link-btn:hover {
  color: #1d4ed8;
  background: transparent;
  box-shadow: none;
}

.empty {
  display: none;
  padding: 42px;
  color: #7b8794;
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: #64748b;
  font-size: 13px;
}

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

.pagination button {
  height: 30px;
  padding: 0 12px;
}

.editor-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-weight: 700;
}

label.span-two {
  grid-column: 1 / -1;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.repeat-head,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.field-section {
  display: grid;
  gap: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #c7d2df;
  border-radius: 999px;
  background: #eef3f8;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.tag-check input {
  width: auto;
  height: auto;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #d3dce8;
  border-radius: 8px;
  background: #f8fafc;
}

.choice-item {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.choice-item input {
  flex: 0 0 auto;
  width: auto;
  height: auto;
}

.choice-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty {
  display: block;
  grid-column: 1 / -1;
  padding: 18px;
}

.upload-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

.admin-image-field-preview {
  margin-top: 8px;
}

.admin-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-image-gallery a {
  display: block;
  width: 132px;
  height: 92px;
  overflow: hidden;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  background: #eef2f7;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.admin-image-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-image-gallery.compact {
  gap: 6px;
  margin-top: 7px;
}

.admin-image-gallery.compact a {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.admin-image-empty {
  display: grid;
  place-items: center;
  width: 132px;
  height: 76px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 650;
}

.category-icon-preview-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.category-icon-preview-row > span {
  min-width: 64px;
  padding-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.category-icon-preview-row .admin-image-field-preview {
  margin-top: 0;
}

.category-icon-preview-row .admin-image-gallery a,
.category-icon-preview-row .admin-image-empty {
  width: 80px;
  height: 80px;
}

.admin-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-image-lightbox.hidden {
  display: none;
}

.admin-image-lightbox-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(2, 6, 23, .78);
  box-shadow: none;
}

.admin-image-lightbox-card {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  max-width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
}

.admin-image-lightbox-card img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
  object-fit: contain;
}

.admin-image-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, .88);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

body.admin-image-lightbox-open {
  overflow: hidden;
}

.repeat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 34px;
  gap: 8px;
  color: #4b5563;
  font-weight: 700;
}

.repeat-row input,
.repeat-row select {
  font: inherit;
  color: #172033;
}

.image-row {
  grid-template-columns: minmax(0, 1fr) 88px 76px 34px;
}

.image-row-preview {
  grid-column: 1 / -1;
  margin-top: 0;
}

.detail-image-head {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d7e0ea;
}

.detail-image-head p {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
}

.fixed-image-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid #c7d2df;
  border-radius: 6px;
  color: #475569;
  background: #eef3f8;
  font-size: 13px;
  font-weight: 700;
}

.spec-row {
  grid-template-columns: 110px minmax(0, 1fr) 34px;
}

.sku-row {
  grid-template-columns: 150px minmax(220px, 1fr) 92px 92px 78px 86px 34px;
  align-items: center;
}

.sku-count {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.icon-btn {
  width: 34px;
  padding: 0;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  display: none;
  width: max-content;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 18px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17, 24, 39, .94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .28);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, -50%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.modal.hidden,
.hidden {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .46);
}

.modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  width: min(960px, calc(100vw - clamp(24px, 6vw, 64px)));
  min-width: 0;
  max-height: calc(100vh - clamp(24px, 6vw, 64px));
  overflow: hidden;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #eef2f7;
  box-shadow: 0 24px 72px rgba(15, 23, 42, .24);
}

#categoryForm {
  width: min(960px, calc(100vw - clamp(24px, 6vw, 64px)));
}

#categoryForm .modal-body {
  gap: 16px;
}

#categoryForm .repeat-list {
  max-height: 260px;
  overflow: auto;
}

#categoryForm .upload-field {
  grid-template-columns: minmax(0, 1fr) 72px;
}

#categoryForm .upload-field input {
  min-width: 0;
}

.banner-modal-card {
  width: min(960px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.modal-card > .grid,
.banner-modal-card > .grid,
.modal-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 22px 32px 24px;
}

.banner-modal-card .upload-field {
  grid-template-columns: minmax(0, 1fr) 72px;
}

.banner-modal-card .upload-field input {
  min-width: 0;
}

.guide-modal-card {
  width: min(880px, calc(100vw - 48px));
}

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.product-modal-card {
  width: min(1180px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.material-modal-card {
  width: min(980px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.user-detail-modal-card {
  width: min(820px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.coupon-grant-modal-card {
  width: min(620px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.coupon-record-modal-card {
  width: min(1120px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.coupon-grant-body label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 750;
}

.coupon-grant-body label small {
  color: #7b8798;
  font-size: 12px;
  font-weight: 600;
}

.coupon-grant-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  color: #64748b;
  background: #f6faff;
  line-height: 1.55;
}

.coupon-grant-preview strong {
  width: 100%;
  color: #172033;
  font-size: 15px;
}

.coupon-grant-preview span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #315f92;
  background: #e7f1ff;
  font-size: 12px;
}

.coupon-record-body {
  min-height: 220px;
  overflow: auto;
  padding: 22px 26px 26px;
}

.coupon-record-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.coupon-record-table {
  min-width: 960px;
}

.coupon-record-table td {
  vertical-align: top;
}

.coupon-record-table td strong,
.coupon-record-table td small {
  display: block;
}

.coupon-record-table td small {
  margin-top: 6px;
  color: #718096;
  font-size: 11px;
  line-height: 1.55;
}

.coupon-record-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #137154;
  background: #ddf8ee;
  font-size: 12px;
  font-weight: 800;
}

.coupon-record-status.finished {
  color: #64748b;
  background: #edf1f5;
}

.coupon-record-status.partial_revoked,
.coupon-record-status.revoked {
  color: #a34a2c;
  background: #ffede6;
}

.admin-task-table {
  min-width: 1180px;
}

.admin-task-table td {
  vertical-align: top;
}

.admin-task-table td strong,
.admin-task-table td small {
  display: block;
}

.admin-task-table td small {
  max-width: 230px;
  margin-top: 5px;
  overflow: hidden;
  color: #718096;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted {
  color: #8b98a8;
}

.admin-task-detail-modal {
  width: min(980px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.admin-task-action-modal {
  width: min(600px, calc(100vw - clamp(24px, 6vw, 64px)));
}

.admin-task-detail-body {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 22px 28px 28px;
}

.admin-task-detail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  background: #fff;
}

.admin-task-detail-section h3 {
  color: #1f2937;
  font-size: 16px;
}

.admin-task-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-task-summary-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 7px;
  background: #f7f9fc;
}

.admin-task-summary-grid span,
.admin-task-remark span {
  color: #728096;
  font-size: 12px;
}

.admin-task-summary-grid strong {
  overflow-wrap: anywhere;
  color: #172033;
}

.admin-task-remark {
  padding: 13px 14px;
  border-left: 3px solid #8eb8ed;
  border-radius: 6px;
  background: #f4f8fd;
}

.admin-task-remark p {
  margin-top: 6px;
  color: #334155;
  line-height: 1.65;
}

.admin-task-fee-list {
  display: grid;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.admin-task-fee-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px;
  border-bottom: 1px solid #e7edf4;
}

.admin-task-fee-list > div:last-child {
  border-bottom: 0;
}

.admin-task-fee-list span {
  color: #64748b;
}

.admin-task-timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 8px;
}

.admin-task-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 18px;
}

.admin-task-timeline-item::before {
  position: absolute;
  top: 13px;
  bottom: -2px;
  left: 6px;
  width: 2px;
  background: #dbe5ef;
  content: "";
}

.admin-task-timeline-item:last-child::before {
  display: none;
}

.admin-task-timeline-item > i {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 3px solid #e5f1ff;
  border-radius: 50%;
  background: #3988df;
  box-sizing: border-box;
}

.admin-task-timeline-item.admin > i {
  border-color: #fff0df;
  background: #e8892f;
}

.admin-task-timeline-item p {
  margin-top: 4px;
  color: #526175;
  line-height: 1.55;
}

.admin-task-timeline-item small {
  display: block;
  margin-top: 5px;
  color: #8a98aa;
}

.admin-task-action-warning {
  padding: 13px 15px;
  border: 1px solid #f1c9ad;
  border-radius: 8px;
  color: #934a20;
  background: #fff7ed;
  line-height: 1.65;
}

.user-detail-body {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 22px 32px 26px;
}

.user-detail-loading,
.user-address-empty {
  padding: 36px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

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

.user-detail-summary div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.user-detail-summary span,
.user-address-card small {
  color: #64748b;
  font-size: 12px;
}

.user-order-trend-section {
  display: grid;
  gap: 14px;
}

.user-order-trend-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.user-order-trend-head h3 {
  color: #111827;
  font-size: 17px;
}

.user-order-trend-head p {
  margin-top: 4px;
  color: #718096;
  font-size: 12px;
}

.user-order-trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #526175;
  font-size: 12px;
}

.user-order-trend-legend span {
  position: relative;
  padding-left: 18px;
}

.user-order-trend-legend span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 4px;
  border-radius: 999px;
  background: #3b82f6;
  content: "";
  transform: translateY(-50%);
}

.user-order-trend-legend .task::before {
  background: #f59e0b;
}

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

.user-order-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7faff);
}

.user-order-metrics span,
.user-order-metrics small {
  overflow: hidden;
  color: #718096;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-order-metrics strong {
  color: #172033;
  font-size: 21px;
  line-height: 1.25;
}

.user-order-chart-card {
  position: relative;
  min-width: 0;
  padding: 8px 10px 2px;
  border: 1px solid #dce6f1;
  border-radius: 9px;
  background: #fff;
}

.user-order-chart-scroll {
  width: 100%;
  overflow-x: auto;
}

.user-order-chart {
  display: block;
  width: 100%;
  min-width: 660px;
  height: auto;
}

.user-order-chart .chart-grid line {
  stroke: #e5ebf2;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.user-order-chart .chart-grid text {
  fill: #8491a3;
  font-size: 10px;
  text-anchor: end;
}

.user-order-chart .chart-grid .x-label {
  text-anchor: middle;
}

.user-order-chart polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.user-order-chart .market-line {
  stroke: #3b82f6;
}

.user-order-chart .task-line {
  stroke: #f59e0b;
}

.user-order-chart .market-dot {
  fill: #fff;
  stroke: #3b82f6;
  stroke-width: 2;
}

.user-order-chart .task-dot {
  fill: #fff;
  stroke: #f59e0b;
  stroke-width: 2;
}

.user-order-chart .chart-hover-guide {
  display: none;
  pointer-events: none;
  stroke: #94a3b8;
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.user-order-chart .chart-hover-guide.visible,
.user-order-chart .chart-hover-dot.visible {
  display: block;
}

.user-order-chart .chart-hover-dot {
  display: none;
  pointer-events: none;
  stroke: #fff;
  stroke-width: 2;
}

.user-order-chart .chart-hover-dot.market {
  fill: #3b82f6;
}

.user-order-chart .chart-hover-dot.task {
  fill: #f59e0b;
}

.user-order-chart-tooltip {
  position: absolute;
  z-index: 3;
  top: 14px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid rgba(30, 41, 59, .12);
  border-radius: 7px;
  color: #fff;
  background: rgba(23, 32, 51, .92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  font-size: 12px;
  pointer-events: none;
  transform: translateX(-50%);
}

.user-order-chart-tooltip.visible {
  display: grid;
}

.user-order-chart-tooltip strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.user-order-chart-tooltip span {
  position: relative;
  padding-left: 13px;
}

.user-order-chart-tooltip span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  content: "";
  transform: translateY(-50%);
}

.user-order-chart-tooltip .task::before {
  background: #f59e0b;
}

.user-order-trend-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #8491a3;
}

.user-address-section,
.user-address-list {
  display: grid;
  gap: 12px;
}

.user-address-section-title,
.user-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-address-section-title h3 {
  color: #111827;
  font-size: 17px;
}

.user-address-section-title span {
  color: #64748b;
  font-size: 13px;
}

.user-address-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.user-address-card p {
  color: #111827;
  line-height: 1.6;
}

.user-address-default {
  padding: 3px 8px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 750;
}

.material-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 22px 32px 28px;
}

.rider-detail-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.rider-detail-panel div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rider-detail-panel span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.rider-detail-panel strong {
  min-width: 0;
  color: #111827;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 32px 20px;
  border-top: 1px solid #d6dee9;
  background: #f8fafc;
}

.material-preview-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.material-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.material-preview-head strong {
  color: #111827;
  font-size: 15px;
}

.material-preview-head span {
  color: #64748b;
  font-size: 12px;
}

.material-preview-link {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef6ff;
}

.material-preview-link img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.material-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  font-size: 14px;
  text-align: center;
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 32px 22px;
  border-bottom: 1px solid #d6dee9;
  background: #f8fafc;
}

.modal-head h2 {
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

.modal-head p {
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.form-scroll {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 22px 32px 24px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d3dce8;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.section-title {
  display: grid;
  gap: 4px;
}

.section-title.compact {
  gap: 3px;
}

.section-title h3,
.repeat-head h3 {
  color: #172033;
  font-size: 16px;
  line-height: 1.2;
}

.section-title p,
.repeat-head p,
.sku-help {
  color: #7b8794;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.sku-help {
  padding: 9px 11px;
  border-radius: 6px;
  background: #f1f5f9;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 32px;
  border-top: 1px solid #d6dee9;
  background: #f8fafc;
}

.form-action-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subcategory-row {
  grid-template-columns: minmax(180px, 1fr) 84px 88px 34px;
  gap: 10px;
}

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

  .editor-card {
    position: static;
  }

  .grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sku-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 34px;
  }
}

.settings-status-card,
.settings-form-card {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid #dfe7ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(30, 64, 96, .08);
}

.settings-status-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-status-card strong {
  padding: 7px 14px;
  border-radius: 999px;
  color: #8a4b10;
  background: #fff2df;
}

.settings-status-card strong.open {
  color: #147a46;
  background: #e7f8ef;
}

.settings-status-card p,
.settings-help {
  margin: 12px 0 0;
  color: #718096;
  line-height: 1.65;
}

.settings-form-card .form-actions {
  margin-top: 20px;
  padding: 0;
}

.pricing-config-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  background: #f8fafc;
}

.settings-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 14px;
  padding-top: 22px;
  border-top: 1px solid #edf2f7;
}

.settings-section-title strong {
  color: #263445;
  font-size: 17px;
}

.settings-section-title span {
  color: #8794a3;
  font-size: 13px;
}

@media (max-width: 760px) {
  .metric-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .modal-card,
  #categoryForm,
  .banner-modal-card,
  .product-modal-card,
  .user-detail-modal-card,
  .coupon-grant-modal-card,
  .coupon-record-modal-card,
  .admin-task-detail-modal,
  .admin-task-action-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-head,
  .modal-card > .grid,
  .banner-modal-card > .grid,
    .modal-body,
    .user-detail-body,
    .coupon-record-body,
    .admin-task-detail-body,
    .form-scroll,
  .form-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .grid.two,
  .grid.five,
  .user-detail-summary,
  .admin-task-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .user-order-trend-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .toolbar.task-admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .settings-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .image-row,
  .spec-row,
  .sku-row {
    grid-template-columns: 1fr;
  }
}
