:root {
  --red: #ee1616;
  --red-dark: #b70e0e;
  --gold: #c49a4a;
  --ink: #261714;
  --muted: #8a7b75;
  --line: #efe5dc;
  --paper: #fffaf2;
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 70px rgba(84, 35, 20, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: #fffaf5;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 225, 157, 0.55), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(238, 22, 22, 0.13), transparent 32%),
    linear-gradient(135deg, #fff8ea 0%, #f7efe7 48%, #fff 100%);
}

body.is-guest {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 213, 126, 0.28), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(238, 22, 22, 0.12), transparent 28%),
    linear-gradient(135deg, #fff7e7 0%, #fffaf2 48%, #fff 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-guest .app-shell {
  display: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  background: linear-gradient(180deg, #401e14 0%, #1e1110 100%);
  color: #fff;
  box-shadow: 18px 0 50px rgba(64, 30, 20, 0.16);
}

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

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(145deg, #fff6e0, #fff);
  box-shadow: inset 0 0 0 2px rgba(196, 154, 74, 0.25);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
}

.brand p,
.topbar p,
.table-head p,
.quick-stats p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.brand p {
  color: rgba(255, 255, 255, 0.62);
}

.module-nav {
  display: grid;
  gap: 10px;
}

.module-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
}

.module-tab.active {
  color: #35170d;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe4a8, #fff6de);
  box-shadow: 0 14px 28px rgba(255, 206, 116, 0.2);
}

.module-tab strong {
  font-size: 15px;
}

.module-tab span {
  font-size: 12px;
  opacity: 0.78;
}

.sidebar-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 30px clamp(24px, 4vw, 52px) 32px;
}

.app-footer {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  color: rgba(138, 123, 117, 0.36);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.7;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.app-footer-meta,
.app-footer-slogan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 6px;
  color: rgba(138, 123, 117, 0.32);
}

.app-footer-slogan {
  margin-top: 3px;
}

.app-footer-sep {
  color: inherit;
}

.app-footer-logo {
  display: inline-block;
  height: 1.05em;
  width: auto;
  max-height: 1.05em;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  background: transparent;
  opacity: 0.44;
}

.app-footer--auth {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  margin-top: 0;
  padding: 0 20px;
  max-width: none;
  z-index: 1;
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px !important;
  color: var(--gold) !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.topbar h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.primary-btn.is-busy,
.ghost-btn.is-busy,
.danger-btn.is-busy {
  cursor: wait;
  opacity: 0.72;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff5b2f);
  box-shadow: 0 14px 24px rgba(238, 22, 22, 0.22);
}

.ghost-btn {
  color: var(--ink);
  border: 1px solid rgba(196, 154, 74, 0.35);
  background: rgba(255, 255, 255, 0.72);
}

.ghost-btn.small {
  min-height: 36px;
  padding: 0 16px;
}

.danger-btn {
  color: #fff;
  background: #1f1715;
}

.text-btn {
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  background: transparent;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.quick-stats div,
.content-card,
.login-card,
.editor-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-stats div {
  padding: 20px 22px;
}

.quick-stats span {
  font-size: 28px;
  font-weight: 900;
  color: var(--red);
}

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

.table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.table-head h3 {
  margin: 0;
  font-size: 20px;
}

.list-wrap {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.list-tools {
  padding-top: 18px;
}

.deal-filter-panel {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.78);
}

.member-filter-panel,
.doctor-filter-panel,
.consult-order-filter-panel,
.partner-filter-panel {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.78);
}

.member-filter-panel {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.doctor-filter-panel {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.consult-order-filter-panel {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.partner-filter-panel {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.member-filter-panel .ghost-btn.small,
.doctor-filter-panel .ghost-btn.small,
.consult-order-filter-panel .ghost-btn.small,
.partner-filter-panel .ghost-btn.small {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  white-space: nowrap;
}

.doctor-filter-panel select:disabled,
.partner-filter-panel select:disabled {
  color: #b8a99a;
  background: #f7f2ed;
  cursor: not-allowed;
}

.member-filter-panel label > span,
.doctor-filter-panel label > span,
.consult-order-filter-panel label > span,
.partner-filter-panel label > span {
  display: block;
}

.member-filter-panel label > span,
.doctor-filter-panel label > span,
.consult-order-filter-panel label > span,
.partner-filter-panel label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-filter-panel select,
.member-filter-panel input,
.doctor-filter-panel select,
.doctor-filter-panel input,
.consult-order-filter-panel select,
.consult-order-filter-panel input,
.partner-filter-panel select,
.partner-filter-panel input {
  width: 100%;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #eaded4;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.member-filter-panel select:focus,
.member-filter-panel input:focus,
.doctor-filter-panel select:focus,
.doctor-filter-panel input:focus,
.consult-order-filter-panel select:focus,
.consult-order-filter-panel input:focus,
.partner-filter-panel select:focus,
.partner-filter-panel input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 154, 74, 0.12);
}

.deal-filter-panel strong,
.deal-filter-panel span {
  display: block;
}

.deal-filter-panel strong {
  font-size: 15px;
}

.deal-filter-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.deal-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(196, 154, 74, 0.28);
  border-radius: 999px;
  color: #6f625c;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions .ghost-btn {
  min-height: 36px;
  padding: 0 14px;
}

.item-card--coupons .row-actions {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  justify-content: stretch;
  min-width: 560px;
}

.item-card--coupons .row-actions .ghost-btn {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
}

.filter-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--red);
}

.filter-check.active {
  color: var(--red-dark);
  border-color: rgba(238, 22, 22, 0.3);
  background: #fff1ee;
}

.list-wrap--deals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.list-wrap--users {
  display: block;
}

.list-wrap--doctors {
  display: block;
}

.list-wrap--homeButtons {
  display: block;
}

.home-button-admin-layout {
  display: grid;
  gap: 18px;
}

.home-button-admin-group {
  padding: 18px;
  border: 1px solid rgba(218, 197, 174, 0.78);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.92);
}

.home-button-admin-group__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(234, 222, 212, 0.86);
}

.home-button-admin-group__head h3 {
  margin: 0;
  color: #3d2e29;
  font-size: 17px;
  font-weight: 900;
}

.home-button-admin-group__head p {
  max-width: 520px;
  margin: 0;
  color: #8d7c74;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

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

.home-button-admin-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(238, 226, 213, 0.92);
  border-radius: 18px;
  background: #fff;
}

.home-button-admin-card__icon {
  display: grid;
  place-items: center;
}

.home-button-admin-card__icon .thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: #b88a42;
  font-size: 18px;
  background: #fff8ea;
}

.home-button-admin-card__icon .thumb img {
  object-fit: contain;
  background: #fff8ea;
}

.home-button-admin-card__body {
  min-width: 0;
}

.home-button-admin-card__body h4 {
  margin: 0 0 6px;
  color: #302521;
  font-size: 16px;
  font-weight: 900;
}

.home-button-admin-card__body p {
  margin: 0;
  overflow: hidden;
  color: #7d6d66;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-sort-note {
  margin: 0 0 10px;
  padding: 12px 16px;
  border: 1px solid rgba(196, 154, 74, 0.28);
  border-radius: 16px;
  color: #7b5e43;
  background: rgba(255, 248, 237, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.doctor-table-wrap.is-sortable .doctor-sort-col {
  width: 76px;
  padding-left: 10px;
  padding-right: 6px;
}

.doctor-table-wrap.is-sortable .doctor-sort-cell {
  width: 76px;
  padding: 8px 6px 8px 10px;
}

.doctor-sort-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.doctor-sort-select {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.doctor-sort-select input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}

.doctor-sort-row.is-selected td {
  background: rgba(255, 248, 237, 0.96) !important;
}

.doctor-sort-row.is-selected td.doctor-sort-cell {
  box-shadow: inset 3px 0 0 #ee1616;
}

.doctor-sort-row.is-dragging td {
  opacity: 0.42;
  background: rgba(255, 243, 224, 0.95) !important;
}

.doctor-sort-note .ghost-btn.small {
  margin-left: 10px;
  vertical-align: middle;
}

.doctor-table-wrap.is-sortable .doctor-table {
  border-collapse: separate;
  border-spacing: 0;
}

.doctor-sort-row.is-draggable {
  cursor: grab;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.doctor-sort-row.is-draggable:active {
  cursor: grabbing;
}

.doctor-sort-row.is-drop-target td {
  background: rgba(255, 236, 214, 0.92) !important;
}

.doctor-drop-indicator {
  display: none;
  position: fixed;
  z-index: 1200;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ee1616, #ff8a4c);
  box-shadow: 0 0 0 2px rgba(238, 22, 22, 0.18), 0 6px 18px rgba(238, 22, 22, 0.28);
  pointer-events: none;
}

.doctor-drop-indicator__label {
  position: absolute;
  top: -30px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: #ee1616;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(238, 22, 22, 0.25);
}

.table-drag-handle {
  width: 28px;
  height: 36px;
  font-size: 16px;
  letter-spacing: -0.14em;
}

.member-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.member-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  font-size: 13px;
}

.member-table th,
.member-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(108, 77, 51, 0.09);
  text-align: left;
  white-space: nowrap;
}

.member-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #8a6f55;
  background: #fff8ed;
  font-size: 12px;
  font-weight: 900;
}

.member-table tr:last-child td {
  border-bottom: 0;
}

.member-table.consult-order-table {
  --consult-order-tail-width: 11%;
  --consult-order-action-width: 13%;
  table-layout: fixed;
  width: 100%;
  min-width: 1080px;
}

.member-table.consult-order-table col.consult-order-col {
  width: calc((100% - var(--consult-order-tail-width) - var(--consult-order-action-width)) / 7);
}

.member-table.consult-order-table col.consult-order-col-tail {
  width: var(--consult-order-tail-width);
}

.member-table.consult-order-table col.consult-order-col-tail:last-child {
  width: var(--consult-order-action-width);
}

.member-table.consult-order-table th,
.member-table.consult-order-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

.member-table.consult-order-table td.consult-order-cell-status,
.member-table.consult-order-table td.consult-order-cell-action {
  white-space: nowrap;
}

.consult-order-status-select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #eaded4;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.consult-order-status-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 154, 74, 0.12);
}

.consult-order-status-select:disabled {
  opacity: 0.6;
  cursor: wait;
}

.consult-order-row {
  cursor: pointer;
}

.consult-order-row.is-unread {
  background: rgba(255, 248, 237, 0.72);
}

.consult-order-row:hover td {
  background: rgba(255, 243, 224, 0.55);
}

.member-table.consult-order-table code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-table.consult-order-table td div,
.member-table.consult-order-table td small {
  display: block;
  margin-top: 4px;
  color: #8b7767;
  line-height: 1.45;
}

.member-table.user-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1012px;
}

.member-table.user-table col.user-table-col--user { width: 116px; }
.member-table.user-table col.user-table-col--phone { width: 98px; }
.member-table.user-table col.user-table-col--age { width: 38px; }
.member-table.user-table col.user-table-col--gender { width: 38px; }
.member-table.user-table col.user-table-col--location { width: 96px; }
.member-table.user-table col.user-table-col--time { width: 136px; }
.member-table.user-table col.user-table-col--status { width: 54px; }
.member-table.user-table col.user-table-col--risk { width: 96px; }
.member-table.user-table col.user-table-col--openid { width: 112px; }
.member-table.user-table col.user-table-col--unionid { width: 72px; }
.member-table.user-table col.user-table-col--action { width: 156px; }

.member-table.user-table th,
.member-table.user-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.member-table.user-table th:nth-child(3),
.member-table.user-table td:nth-child(3),
.member-table.user-table th:nth-child(4),
.member-table.user-table td:nth-child(4),
.member-table.user-table th:nth-child(7),
.member-table.user-table td:nth-child(7) {
  padding-left: 6px;
  padding-right: 6px;
}

.member-table.user-table th:nth-child(9),
.member-table.user-table td:nth-child(9),
.member-table.user-table th:nth-child(10),
.member-table.user-table td:nth-child(10) {
  padding-left: 8px;
  padding-right: 8px;
}

.member-table.user-table th:last-child,
.member-table.user-table td:last-child {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  padding: 8px 10px;
  vertical-align: middle;
}

.member-table.user-table th,
.member-table.user-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.member-table.user-table .member-user-cell,
.member-table.user-table .member-id-cell {
  min-width: 0;
}

.member-table.user-table .member-user-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-table.user-table .member-id-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-table.user-table code {
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-table.user-table .coupon-copy-inline-btn {
  flex: 0 0 auto;
  padding: 4px 7px;
  font-size: 11px;
}

.member-table.user-table td:last-child {
  white-space: normal;
}

.member-action-cell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.member-table.user-table .member-action-cell .ghost-btn.small,
.member-table.user-table .member-delete-btn,
.member-table.user-table .member-access-btn,
.member-table.user-table .member-risk-log-btn,
.member-table.user-table .member-whitelist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 6px 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.member-table.user-table .member-delete-btn {
  color: var(--red-dark);
  border-color: rgba(255, 59, 48, 0.28);
  background: #fff5f2;
}

.consult-order-cell-status,
.consult-order-cell-action {
  box-sizing: border-box;
  padding-left: 8px;
  padding-right: 8px;
  vertical-align: middle;
}

.consult-order-cell-action {
  text-align: center;
  overflow: hidden;
}

.consult-order-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.consult-order-log-btn {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.consult-order-delete-btn {
  flex: 0 0 auto;
  color: var(--red-dark);
  border-color: rgba(255, 59, 48, 0.28);
  background: #fff5f2;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.action-panel.wide-action-panel {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
}

.operation-log-table-wrap {
  width: 100%;
  max-height: min(62vh, 620px);
  overflow: auto;
  border: 1px solid #eadfce;
  border-radius: 12px;
  background: #fff;
}

.operation-log-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
}

.operation-log-table th,
.operation-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1e8dc;
  color: #5c4f45;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.operation-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #faf6f1;
  color: #7a6a5c;
  font-weight: 700;
}

.operation-log-table tr:last-child td {
  border-bottom: none;
}

.operation-log-empty {
  padding: 28px;
  border: 1px dashed #dcccb8;
  border-radius: 12px;
  color: #8b7767;
  text-align: center;
  background: #faf6f1;
}

.export-confirm-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.export-confirm-form .field {
  display: grid;
  gap: 10px;
}

.export-confirm-form .field label {
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.export-confirm-form .field select,
.export-confirm-form .field input {
  width: 100%;
  margin-top: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
}

.export-confirm-form .field--full {
  grid-column: auto;
}

.export-confirm-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.export-confirm-panel {
  display: grid;
  gap: 22px;
}

[data-coupon-export-preview-body] {
  display: grid;
  gap: 16px;
}

.export-confirm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.export-confirm-grid div,
.export-confirm-range,
.export-confirm-warning {
  padding: 14px 16px;
  border: 1px solid #eadfce;
  border-radius: 12px;
  background: #fffaf3;
}

.export-confirm-grid span {
  display: block;
  color: #8b7767;
  font-size: 12px;
  line-height: 1.5;
}

.export-confirm-grid strong {
  display: block;
  margin-top: 6px;
  color: #2c211b;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.export-confirm-range strong {
  display: block;
  margin-bottom: 6px;
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
}

.export-confirm-range p {
  margin: 0;
  color: #6b5b4f;
  font-size: 14px;
  line-height: 1.6;
}

.export-confirm-warning {
  font-size: 13px;
  line-height: 1.6;
  color: #8a5a00;
  background: #fff6dd;
}

.member-table code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  color: #7b5e43;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.member-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-user-cell img,
.member-user-cell span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #e9b65e, #ee1616);
  font-weight: 900;
  object-fit: cover;
}

.member-table.doctor-table {
  table-layout: fixed;
  width: 100%;
  min-width: 960px;
}

.member-table.doctor-table th,
.member-table.doctor-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.member-table.doctor-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: bottom;
}

.doctor-table-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #604f48;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.doctor-table-sort:hover {
  color: #c45a4a;
}

.doctor-table-sort.is-active {
  color: #c45a4a;
}

.doctor-table-sort__icon {
  flex: 0 0 auto;
  min-width: 12px;
  color: #a5968f;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.doctor-table-sort.is-active .doctor-table-sort__icon {
  color: #c45a4a;
}

.member-table.doctor-table .doctor-cell-status .doctor-table-sort,
.member-table.doctor-table .doctor-cell-code .doctor-table-sort {
  justify-content: center;
  text-align: center;
}

.member-table.doctor-table .doctor-cell-base {
  width: 12%;
}

.member-table.doctor-table .doctor-cell-good-at {
  width: 22%;
}

.member-table.doctor-table .doctor-cell-recommend {
  width: 14%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.member-table.doctor-table .doctor-cell-status {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  white-space: nowrap;
}

.member-table.doctor-table .doctor-cell-code {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  white-space: nowrap;
}

.member-table.doctor-table .doctor-cell-action {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  white-space: nowrap;
}

.member-table.doctor-table .doctor-cell-action .ghost-btn.small {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.member-table.doctor-table .doctor-user-cell strong,
.member-table.doctor-table .doctor-user-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-table.doctor-table .doctor-cell-code code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-user-cell > div {
  display: grid;
  gap: 3px;
}

.doctor-user-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.doctor-page-controls,
.member-page-controls,
.consult-order-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doctor-page-controls label,
.member-page-controls label,
.consult-order-page-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.doctor-page-controls select,
.member-page-controls select,
.consult-order-page-controls select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #eaded4;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.doctor-code-auto {
  display: grid;
  gap: 8px;
}

.doctor-code-auto.is-waiting .doctor-code-display {
  color: var(--muted);
  background: #faf7f4;
}

.doctor-code-display {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f2ed;
  color: #8b3f2f;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.doctor-code-editor {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 42px;
  border: 1px solid #eaded4;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.doctor-code-prefix {
  padding: 0 12px;
  color: #8b3f2f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #f7f2ed;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.doctor-code-editor input {
  flex: 1;
  min-width: 88px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.member-id-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-status {
  display: inline-flex;
  min-width: 56px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2f7a4f;
  background: #eaf8ef;
  font-size: 12px;
  font-weight: 900;
}

.member-status.is-blocked {
  color: var(--red-dark);
  background: #fff0ed;
}

.member-status.is-duplicate {
  color: #9a3412;
  background: #fff7ed;
}

.member-phone-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.member-duplicate-alert {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.6;
}

.member-table.user-table tr.is-duplicate-phone td {
  background: #fffaf3;
}

.member-table.user-table tr.is-duplicate-phone td:first-child {
  box-shadow: inset 3px 0 0 #f97316;
}

.member-table.user-table th:nth-child(8),
.member-table.user-table td:nth-child(8) {
  overflow: visible;
}

.member-risk-reasons {
  max-width: 100%;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.member-risk-tip-float {
  position: fixed;
  z-index: 2200;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(38, 23, 20, 0.94);
  box-shadow: 0 14px 32px rgba(38, 23, 20, 0.24);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  pointer-events: none;
}

.member-access-btn {
  white-space: nowrap;
}

.member-access-btn.is-block {
  color: var(--red-dark);
  border-color: rgba(255, 59, 48, 0.28);
  background: #fff5f2;
}

.member-access-btn.is-restore {
  color: #2f7a4f;
  border-color: rgba(47, 122, 79, 0.28);
  background: #edf8f1;
}

.member-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-card {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.item-card.is-draggable {
  grid-template-columns: 34px 86px 1fr auto;
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.item-card--deals {
  min-height: 150px;
}

.item-card--deals.is-draggable {
  grid-template-columns: 34px 72px minmax(0, 1fr) auto;
}

.item-card--deals .thumb {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 26px;
  box-shadow: 0 16px 28px rgba(238, 22, 22, 0.14);
}

.item-card--deals .thumb img {
  object-fit: contain;
  background: #fff3f3;
}

.item-card--deals .item-main h4 {
  font-size: 17px;
}

.item-card--deals .item-main p {
  max-width: none;
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.item-card.is-draggable:active {
  cursor: grabbing;
}

.item-card.is-dragging {
  opacity: 0.58;
  transform: scale(0.992);
}

.item-card.drop-before {
  border-top-color: var(--red);
  box-shadow: inset 0 4px 0 rgba(238, 22, 22, 0.18);
}

.item-card.drop-after {
  border-bottom-color: var(--red);
  box-shadow: inset 0 -4px 0 rgba(238, 22, 22, 0.18);
}

.drag-handle {
  display: grid;
  width: 32px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #b39668;
  background: #fff6e6;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.18em;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.thumb {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), #ff734f);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-main h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.item-main p {
  display: -webkit-box;
  max-width: 780px;
  margin: 0;
  overflow: hidden;
  color: #6f625c;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  color: #8a5f18;
  font-size: 12px;
  font-weight: 700;
  background: #fff3d8;
}

.pill.home-show {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6747);
}

.pill.off {
  color: #9b9b9b;
  background: #f0f0f0;
}

.editor-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(30, 17, 16, 0.48);
  backdrop-filter: blur(16px);
  z-index: 20;
}

.action-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(30, 17, 16, 0.5);
  backdrop-filter: blur(16px);
  z-index: 24;
}

.confirm-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(30, 17, 16, 0.52);
  backdrop-filter: blur(14px);
  z-index: 28;
}

.confirm-panel {
  width: min(460px, calc(100vw - 40px));
  padding: 28px 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 72, 50, 0.1), transparent 34%),
    linear-gradient(145deg, #fffdf9, #fff7ed);
  box-shadow: 0 28px 90px rgba(44, 16, 9, 0.28);
  animation: popIn 0.18s ease-out;
}

.confirm-panel.is-warning {
  background:
    radial-gradient(circle at 92% 8%, rgba(196, 154, 74, 0.16), transparent 34%),
    linear-gradient(145deg, #fffdf9, #fff7ed);
}

.confirm-panel.is-neutral {
  background:
    radial-gradient(circle at 92% 8%, rgba(47, 122, 79, 0.12), transparent 34%),
    linear-gradient(145deg, #fffdf9, #fff7ed);
}

.confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.confirm-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.confirm-icon {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff5b2f);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(238, 22, 22, 0.22);
}

.confirm-panel.is-warning .confirm-icon {
  background: linear-gradient(135deg, #c49a4a, #e8b45d);
  box-shadow: 0 12px 24px rgba(196, 154, 74, 0.24);
}

.confirm-panel.is-neutral .confirm-icon {
  background: linear-gradient(135deg, #2f7a4f, #4aa56d);
  box-shadow: 0 12px 24px rgba(47, 122, 79, 0.22);
}

.confirm-message {
  margin: 0 0 22px;
  color: #6f5f56;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-actions .danger-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff5b2f);
  box-shadow: 0 14px 24px rgba(238, 22, 22, 0.22);
}

.confirm-actions .primary-btn {
  min-width: 108px;
}

.confirm-actions .ghost-btn,
.confirm-actions .danger-btn,
.confirm-actions .primary-btn {
  min-width: 96px;
}

.login-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 221, 142, 0.28), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(238, 22, 22, 0.12), transparent 28%),
    linear-gradient(135deg, #fff8ea 0%, #fffaf5 52%, #fff 100%);
  background-color: #fffaf5;
  z-index: 30;
}

.login-mask::before {
  position: fixed;
  top: 9vh;
  left: 8vw;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(255, 230, 159, 0.18), transparent 68%);
  pointer-events: none;
}

.login-vision {
  position: fixed;
  top: 76px;
  left: 72px;
  max-width: min(760px, calc(100vw - 144px));
  color: rgba(94, 67, 55, 0.09);
  font-size: clamp(24px, 2.8vw, 46px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.32;
  white-space: normal;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.login-card {
  position: relative;
  width: min(380px, calc(100vw - 48px));
  padding: 36px 32px 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 30px 90px rgba(44, 16, 9, 0.24);
  z-index: 1;
}

.login-logo {
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(196, 154, 74, 0.18);
}

.login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.login-card p {
  margin: 0 0 20px;
  color: #7d6d66;
  line-height: 1.7;
}

.login-verse {
  margin: 0 0 20px;
  padding: 0;
  color: #5e4337;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .login-card {
    padding: 32px 24px 28px;
  }

  .login-vision {
    top: 42px;
    left: 28px;
    max-width: calc(100vw - 56px);
    font-size: 28px;
    line-height: 1.25;
    white-space: normal;
  }

  .login-verse {
    font-size: 13px;
  }
}

.login-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  justify-items: center;
}

.login-card input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  outline: none;
  background: #fff;
}

.field select.multi-select {
  min-height: 154px;
  padding: 10px 12px;
}

.field select.multi-select option {
  padding: 7px 8px;
  border-radius: 8px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #eaded4;
  border-radius: 16px;
  background: #fff;
}

.check-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #f0e5da;
  border-radius: 999px;
  color: #604f48;
  background: #fffaf2;
  font-size: 13px;
  font-weight: 800;
}

.check-chip input {
  width: 14px;
  min-height: auto;
  accent-color: var(--red);
}

.login-card input:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(196, 154, 74, 0.13);
}

.login-card .login-fields input {
  width: 60%;
}

.login-card .full {
  display: block;
  width: 60%;
  margin: 0 auto;
}

.login-tip {
  display: block;
  margin-top: 14px;
  color: #a5968f;
  font-size: 12px;
}

.editor-mask {
  justify-items: center;
  padding: 24px;
}

.editor-panel {
  width: min(1120px, calc(100vw - 96px));
  max-height: calc(100vh - 56px);
  padding: 30px;
  overflow: auto;
  animation: popIn 0.18s ease-out;
}

.action-panel {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  padding: 28px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 72, 50, 0.14), transparent 30%),
    linear-gradient(145deg, #fffdf9, #fff7ed);
  box-shadow: 0 28px 90px rgba(44, 16, 9, 0.28);
  animation: popIn 0.18s ease-out;
}

.action-panel.compact-action-panel {
  width: min(480px, calc(100vw - 40px));
  max-width: 480px;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.action-head h3 {
  margin: 0;
  font-size: 26px;
}

.action-head p:last-child {
  max-width: 390px;
  margin: 8px 0 0;
  color: #7d6d66;
  line-height: 1.65;
}

.editor-head h3 {
  margin: 0;
  font-size: 24px;
}

.round-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3ece6;
  font-size: 24px;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px 22px;
}

.form-grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
}

.form-grid--cols-3 .field textarea {
  min-height: 96px;
}

.form-grid--cols-3 .multi-select {
  min-height: 120px;
}

.doctor-editor-traits-row {
  display: grid;
  gap: 12px;
}

.doctor-editor-clinic-avatar-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.doctor-editor-clinic-avatar-row__clinic > .field {
  min-width: 0;
}

.doctor-editor-clinic-avatar-row__preview {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.doctor-editor-clinic-avatar-row__preview > label {
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
}

.doctor-editor-clinic-avatar-row__actions-label {
  visibility: hidden;
  margin: 0;
  padding: 0;
  height: auto;
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.doctor-editor-clinic-avatar-row__actions {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.doctor-avatar-preview {
  width: 132px;
  max-width: 100%;
  min-height: 132px;
  aspect-ratio: 1;
}

.doctor-editor-clinic-avatar-row__actions .image-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.doctor-editor-clinic-avatar-row__actions .image-action-row .ghost-btn {
  flex: 1 1 120px;
  justify-content: center;
  min-height: 40px;
}

.doctor-editor-clinic-avatar-row__actions .field-help {
  width: 100%;
  margin-top: 10px;
  line-height: 1.6;
}

.doctor-editor-traits-row__main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.doctor-editor-traits-row__col,
.doctor-editor-traits-row__stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doctor-editor-traits-row__col > .field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doctor-editor-traits-row__col > .field > label {
  flex: 0 0 auto;
  min-height: 38px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 8px;
}

.doctor-editor-traits-row__col .multi-select {
  width: 100%;
  box-sizing: border-box;
}

.doctor-editor-traits-row__col .check-grid--doctor-traits {
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.check-grid--doctor-traits {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #f0e5da;
  border-radius: 14px;
  background: #fffaf7;
  -webkit-overflow-scrolling: touch;
}

.check-grid--doctor-traits .check-chip {
  border-radius: 12px;
  min-height: 34px;
  box-sizing: border-box;
}

.doctor-editor-traits-row__stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.doctor-editor-traits-row__stack > .field {
  min-width: 0;
}

.doctor-editor-traits-row__stack > .field > label:not(.switch-field) {
  min-height: 38px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 8px;
}

.doctor-editor-traits-row__stack .field--grow {
  display: grid;
  grid-template-rows: auto auto auto;
  min-height: 0;
}

.doctor-editor-traits-row__stack .field--grow .doctor-code-auto {
  min-height: 0;
}

.doctor-editor-traits-row__stack .field--grow .field-help {
  margin-top: 0;
}

.doctor-editor-traits-row__stack .field--grow .doctor-code-display {
  min-height: 46px;
  display: flex;
  align-items: center;
}

.doctor-editor-traits-row__stack .switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin: 0;
}

.doctor-editor-traits-row__stack .switch-field span {
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.doctor-editor-traits-row__notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 4px 0 20px;
}

.doctor-editor-note {
  margin: 0;
  color: #9a8b84;
  font-size: 12px;
  line-height: 1.6;
}

.doctor-editor-note--empty {
  display: block;
}

.doctor-editor-recommend-row {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #eaded4;
  border-radius: 16px;
  background: #fffaf6;
}

.doctor-editor-recommend-row__head > .field {
  min-width: 0;
}

.doctor-editor-recommend-row__head .switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  background: #fff;
}

.doctor-editor-recommend-row__tags {
  padding-top: 2px;
}

.doctor-editor-recommend-row__tags > .field {
  min-width: 0;
}

.doctor-editor-bottom-spacer {
  display: none;
}

.editor-panel.is-doctor-editor .editor-actions {
  margin-top: 8px;
  padding-top: 20px;
}

.input-with-unit {
  display: flex;
  align-items: stretch;
  min-height: 46px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.input-with-unit:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(196, 154, 74, 0.13);
}

.input-with-unit input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-with-unit input:focus {
  box-shadow: none;
}

.input-with-unit .input-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #8b766b;
  background: #faf7f4;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

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

.action-fields {
  display: grid;
  gap: 16px;
}

.action-field {
  display: grid;
  gap: 8px;
}

.action-field label {
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
}

.action-field input,
.action-field textarea,
.action-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 16px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

.action-field select {
  padding-right: 40px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8b766b 50%),
    linear-gradient(135deg, #8b766b 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 21px,
    calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.action-field textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.action-field input:focus,
.action-field textarea:focus,
.action-field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(196, 154, 74, 0.13);
}

.action-help {
  color: #9a8b84;
  font-size: 12px;
  line-height: 1.55;
}

.action-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(196, 154, 74, 0.22);
  border-radius: 18px;
  color: #604f48;
  background: rgba(255, 243, 216, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.action-result strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 15px;
}

.action-result textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  color: #5d4a43;
  background: #fff;
  resize: vertical;
}

.coupon-issue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.coupon-issue-summary div {
  padding: 14px;
  border: 1px solid rgba(196, 154, 74, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.coupon-issue-summary strong,
.coupon-issue-summary span {
  display: block;
}

.coupon-issue-summary strong {
  color: var(--red);
  font-size: 22px;
  line-height: 1.1;
}

.coupon-issue-summary span {
  margin-top: 6px;
  color: #8d7b72;
  font-size: 12px;
  font-weight: 800;
}

.coupon-record-table {
  display: grid;
  max-height: 48vh;
  overflow: auto;
  border: 1px solid #eaded4;
  border-radius: 18px;
  background: #fff;
}

.coupon-record-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: #8d7b72;
  font-size: 13px;
  font-weight: 800;
}

.coupon-record-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.coupon-record-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.coupon-record-search input {
  flex: 1;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  color: #2f211c;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.coupon-record-search input:focus {
  border-color: #d7a23a;
  box-shadow: 0 0 0 3px rgba(215, 162, 58, 0.14);
}

.coupon-record-search span {
  flex: 0 0 auto;
  color: #8d7b72;
  font-size: 12px;
  font-weight: 900;
}

.coupon-record-head,
.coupon-record-row {
  display: grid;
  grid-template-columns: 1.45fr 0.6fr 0.95fr 1fr;
  gap: 12px;
  align-items: center;
  min-width: 650px;
  padding: 12px 14px;
}

.coupon-record-head {
  position: sticky;
  top: 0;
  color: #8a5f18;
  background: #fff3d8;
  font-size: 12px;
  font-weight: 900;
  z-index: 1;
}

.coupon-record-row {
  border-top: 1px solid #f1e7df;
  color: #6f625c;
  font-size: 13px;
}

.coupon-record-code-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.coupon-record-row strong {
  color: #2f211c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.coupon-copy-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid #ead0a4;
  border-radius: 999px;
  color: #8a5f18;
  background: #fffaf0;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.coupon-copy-btn:hover {
  border-color: #d7a23a;
  color: #7a170f;
  background: #fff3d8;
}

.coupon-copy-inline-btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid #d7a23a;
  border-radius: 999px;
  color: #7a170f;
  background: #fff3d8;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.coupon-copy-inline-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6747);
  border-color: transparent;
}

.status-chip {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #8a5f18;
  background: #fff3d8;
  font-size: 12px;
  font-weight: 900;
}

.status-claimed {
  color: #1e6a87;
  background: #e6f7ff;
}

.status-verified {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6747);
}

.record-empty {
  padding: 36px 14px;
  border: 1px dashed #e3d6ca;
  border-radius: 18px;
  color: #8a7b75;
  text-align: center;
  background: rgba(255, 250, 246, 0.72);
}

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

.field label {
  color: #604f48;
  font-size: 13px;
  font-weight: 800;
}

.field textarea {
  min-height: 122px;
  padding: 13px 14px;
  resize: vertical;
}

.field-help {
  color: #9a8b84;
  font-size: 12px;
  line-height: 1.55;
}

.field-limit {
  margin-left: 8px;
  color: #b68a46;
  font-weight: 700;
  white-space: nowrap;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #eaded4;
  border-radius: 14px;
  background: #fff;
}

.switch-field input {
  width: 20px;
  min-height: auto;
}

.upload-row {
  display: flex;
  gap: 10px;
}

.image-field {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.image-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #e5d7c7;
  border-radius: 18px;
  color: #a08f86;
  font-size: 13px;
  background: #fffaf2;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-field--poster {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.image-field--poster .image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 12px;
  background: #fffdf8;
}

.image-field--poster .image-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  background: #fff;
}

.image-field--poster .image-controls {
  align-content: start;
  padding-top: 0;
}

.image-field--poster .image-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-field--poster .image-action-row button {
  width: 120px;
}

.image-field--home-promo {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.image-field--home-promo .image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 750 / 318;
  min-height: 0;
  padding: 12px;
  background: #fffdf8;
}

.image-field--home-promo .image-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  background: #fff;
}

.image-field--home-promo .image-controls {
  align-content: start;
  padding-top: 0;
}

.image-field--home-promo .image-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-field--home-promo .image-action-row button {
  width: 120px;
}

.image-field--avatar {
  grid-template-columns: 180px minmax(0, 1fr);
  max-width: 560px;
}

.image-field--avatar .image-preview {
  min-height: 180px;
  aspect-ratio: 1;
}

.image-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-field--avatar .image-clear-btn:disabled,
.image-field--poster .image-clear-btn:disabled,
.image-field--home-promo .image-clear-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.image-preview.is-empty {
  background:
    linear-gradient(45deg, rgba(196, 154, 74, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(196, 154, 74, 0.08) 25%, transparent 25%),
    #fffaf2;
  background-size: 18px 18px;
}

.image-controls {
  display: grid;
  align-content: start;
  gap: 8px;
}

.upload-row input {
  flex: 1;
}

.upload-row button {
  flex: 0 0 auto;
}

.editor-actions {
  position: sticky;
  right: 0;
  bottom: -30px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 24px -30px -30px;
  padding: 18px 30px;
  border-top: 1px solid rgba(234, 222, 212, 0.75);
  border-radius: 0 0 28px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.editor-status {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.editor-stale-warning {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #7a5a1f;
  background: #fff6df;
  border: 1px solid #f0d89a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.editor-status.is-pending {
  color: #7a5a1f;
  background: #fff6df;
  border: 1px solid #f0d89a;
}

.editor-status.is-success {
  color: #1f6b3f;
  background: #ebf8f0;
  border: 1px solid #b8e6cb;
}

.editor-status.is-error {
  color: #9b1c1c;
  background: #fff0f0;
  border: 1px solid #f3c0c0;
}

.editor-status.is-info {
  color: #604f48;
  background: #fffaf6;
  border: 1px solid #eaded4;
}

.action-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 10050;
  min-width: 180px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  background: rgba(38, 23, 20, 0.9);
  transform: translateX(-50%);
}

.empty {
  padding: 50px 20px;
  color: #8a7b75;
  text-align: center;
  border: 1px dashed #e3d6ca;
  border-radius: 22px;
  background: #fffaf6;
}

.list-loading {
  padding: 48px 20px;
  color: #8a7b75;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px dashed #e3d6ca;
  border-radius: 22px;
  background: #fffaf6;
}

.hidden {
  display: none !important;
}

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

  .sidebar {
    position: static;
    border-radius: 0 0 28px 28px;
  }

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

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .list-wrap--deals {
    grid-template-columns: 1fr;
  }

  .home-button-admin-group__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-button-admin-group__head p {
    max-width: none;
    text-align: left;
  }

  .home-button-admin-grid {
    grid-template-columns: 1fr;
  }

  .deal-filter-panel {
    grid-template-columns: 1fr;
  }

  .member-filter-panel,
  .doctor-filter-panel,
  .consult-order-filter-panel,
  .partner-filter-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .editor-panel {
    width: min(620px, 100%);
    padding: 24px;
  }

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

  .doctor-editor-clinic-avatar-row {
    grid-template-columns: 1fr;
  }

  .doctor-editor-traits-row__main,
  .doctor-editor-traits-row__notes {
    grid-template-columns: 1fr;
  }

  .doctor-editor-traits-row__col > .field > label,
  .doctor-editor-traits-row__stack > .field > label:not(.switch-field) {
    min-height: 0;
    margin-bottom: 6px;
  }


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

  .editor-actions {
    margin: 22px -24px -24px;
    padding: 16px 24px;
  }

  .item-card {
    grid-template-columns: 72px 1fr;
  }

  .item-card.is-draggable {
    grid-template-columns: 30px 72px 1fr;
  }

  .item-card > .ghost-btn {
    grid-column: 1 / -1;
  }

  .item-card--coupons .row-actions {
    grid-column: 1 / -1;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-group-title {
  margin: 0 0 10px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.module-tab strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: #ff5b2f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.content-card--panel .table-head {
  display: none;
}

.dashboard-panel,
.analytics-panel {
  display: grid;
  gap: 22px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.analytics-grid .analytics-card {
  padding: 14px 12px;
}

.analytics-grid .analytics-card-value {
  font-size: 24px;
}

.analytics-grid .analytics-card-label,
.analytics-grid .analytics-card-hint {
  font-size: 11px;
  line-height: 1.35;
}

.analytics-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

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

.analytics-card-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.analytics-card-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-form,
.sub-panel {
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.dashboard-form h3,
.sub-panel h3 {
  margin: 0 0 8px;
}

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

.dashboard-form-grid label {
  display: grid;
  gap: 8px;
}

.dashboard-form-grid label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-form-grid input {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

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

.toggle-field {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.analytics-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.analytics-toolbar select,
.analytics-toolbar input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.analytics-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.analytics-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.analytics-section-head h3 {
  margin: 0;
}

.analytics-section-head p {
  max-width: 360px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.analytics-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(38, 23, 20, 0.08);
}

.analytics-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff7a45);
}

.analytics-bar-row--simple {
  grid-template-columns: 1fr auto;
  min-height: 36px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(38, 23, 20, 0.07);
}

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

.funnel-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
}

.funnel-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #8a5d25;
  background: #fff4dc;
  font-size: 13px;
  font-weight: 900;
}

.funnel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.funnel-head span {
  font-size: 18px;
  font-weight: 900;
}

.funnel-track {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(38, 23, 20, 0.08);
}

.funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff9c55);
}

.funnel-hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.action-item {
  display: flex;
  min-height: 112px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(196, 154, 74, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
}

.action-item strong {
  display: block;
  font-size: 14px;
}

.action-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.action-item span {
  font-size: 30px;
  font-weight: 900;
}

.action-item--danger {
  border-color: rgba(238, 22, 22, 0.22);
  background: rgba(255, 239, 238, 0.86);
}

.action-item--warning {
  border-color: rgba(196, 154, 74, 0.28);
  background: rgba(255, 246, 222, 0.9);
}

.status-meter {
  display: grid;
  grid-template-columns: 90px 1fr 38px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}

.status-meter em {
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.coupon-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mini-kpi {
  min-height: 92px;
  padding: 13px;
  border-radius: 16px;
  background: #fffaf2;
  border: 1px solid rgba(196, 154, 74, 0.15);
}

.mini-kpi span,
.mini-kpi em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-kpi strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 24px;
  line-height: 1;
}

.recent-events-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding: 6px 0 4px;
}


.unread-dot {
  margin-left: 6px;
  color: #ff5b2f;
  font-size: 12px;
}

.partner-tools-panel {
  display: grid;
  gap: 12px;
}

.partner-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.partner-view-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  flex: 1;
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.partner-view-meta__sep {
  color: #d1d5db;
}

.partner-view-meta__legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.partner-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.partner-template-download-btn {
  flex-shrink: 0;
}

.partner-view-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(196, 154, 74, 0.28);
  border-radius: 999px;
  color: #6f625c;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.partner-view-tab:hover {
  border-color: rgba(196, 154, 74, 0.45);
  color: var(--ink);
}

.partner-view-tab.is-active {
  border-color: var(--gold);
  background: rgba(196, 154, 74, 0.14);
  color: var(--ink);
}

.partner-table-wrap {
  margin-top: 4px;
}

.partner-clinic-alias {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
}

.partner-expire.is-warning {
  color: #d97706;
}

.partner-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  background: #f3f4f6;
  color: #374151;
}

.partner-status-pill--signed {
  background: rgba(20, 120, 88, 0.12);
  color: #147858;
}

.partner-status-pill--expired,
.partner-status-pill--terminated {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.partner-status-pill--negotiating {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.partner-city-panel {
  padding: 4px 0;
}

.partner-province-list {
  display: grid;
  gap: 20px;
}

.partner-province-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.55);
}

.partner-province-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.partner-province-head h3 {
  margin: 0;
  font-size: 16px;
}

.partner-province-head span {
  color: var(--muted);
  font-size: 13px;
}

.partner-city-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.partner-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.partner-city-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.partner-city-card--none {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.partner-city-card--low {
  background: #fef9c3;
  border-color: #facc15;
}

.partner-city-card--high {
  background: #ecfdf5;
  border-color: #34d399;
}

.partner-city-card.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.partner-city-card--none.is-clickable:hover {
  border-color: #9ca3af;
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.12);
  transform: translateY(-1px);
}

.partner-city-card--low.is-clickable:hover {
  border-color: #eab308;
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.18);
  transform: translateY(-1px);
}

.partner-city-card--high.is-clickable:hover {
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.16);
  transform: translateY(-1px);
}

.partner-city-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.partner-city-legend__dot--none {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.partner-city-legend__dot--low {
  background: #fef9c3;
  border-color: #facc15;
}

.partner-city-legend__dot--high {
  background: #ecfdf5;
  border-color: #34d399;
}

.partner-city-card__more {
  color: var(--muted);
  font-size: 12px;
}

.partner-city-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.9);
}

.partner-city-context__main {
  display: grid;
  gap: 2px;
}

.partner-city-context__main strong {
  font-size: 15px;
}

.partner-city-context__main span {
  color: var(--muted);
  font-size: 13px;
}

.partner-contract-footnote {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.partner-contract-missing {
  color: #9ca3af;
}

.partner-action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.partner-city-card__empty {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
}

.partner-city-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.partner-city-card__stats {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 13px;
}

.partner-city-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.partner-city-card__list li {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.partner-city-card__list em {
  color: #6b7280;
  font-style: normal;
  font-size: 12px;
}

.partner-contract-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.partner-contract-empty {
  padding: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  color: #6b7280;
  font-size: 13px;
}

.partner-contract-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.partner-contract-item__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.partner-contract-item__main span {
  color: #6b7280;
  font-size: 12px;
}

.partner-contract-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.partner-contract-upload-row {
  margin-top: 4px;
}

.contract-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.contract-preview-panel {
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.contract-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.contract-preview-head h3 {
  margin: 0;
  font-size: 16px;
}

.contract-preview-body {
  min-height: 420px;
  background: #f3f4f6;
}

.contract-preview-body iframe,
.contract-preview-body img {
  width: 100%;
  height: min(72vh, 720px);
  border: 0;
  display: block;
  object-fit: contain;
  background: #fff;
}

.finance-filter-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

.finance-filter-panel label {
  display: grid;
  gap: 6px;
}

.finance-filter-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-filter-panel input,
.finance-filter-panel select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}

.finance-filter-keyword {
  grid-column: span 2;
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.finance-summary-grid article {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fffaf3);
}

.finance-summary-grid span,
.finance-summary-grid small {
  color: var(--muted);
  font-size: 12px;
}

.finance-summary-grid strong {
  font-size: 24px;
}

.finance-summary-grid .is-income,
.finance-amount.is-income {
  color: #18845b;
}

.finance-summary-grid .is-expense,
.finance-amount.is-expense {
  color: #d34444;
}

.finance-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.finance-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.finance-table th,
.finance-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f3ebe4;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

.finance-table th {
  color: var(--muted);
  font-size: 12px;
  background: #fffaf5;
}

.finance-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.finance-amount {
  font-weight: 850;
  white-space: nowrap;
}

.finance-type-badge,
.finance-status,
.finance-voucher-count,
.finance-voucher-missing {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.finance-type-badge.is-income,
.finance-voucher-count,
.finance-status.is-confirmed {
  color: #176b50;
  background: #e6f7f0;
}

.finance-type-badge.is-expense,
.finance-status.is-void {
  color: #a62f2f;
  background: #fff0ee;
}

.finance-status.is-pending,
.finance-voucher-missing {
  color: #8b5b08;
  background: #fff4d6;
}

.finance-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

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

@media (max-width: 1080px) {
  .dashboard-stats:not(.analytics-grid),
  .analytics-layout,
  .dashboard-form-grid,
  .action-grid,
  .coupon-kpi-grid {
    grid-template-columns: 1fr;
  }

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

  .analytics-section-head {
    display: block;
  }

  .analytics-section-head p {
    max-width: none;
    text-align: left;
  }

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