:root {
  --brand: #ff8a3d;
  --brand-2: #ffb27a;
  --ink: #1d1b18;
  --text: #57524c;
  --muted: #7b756d;
  --faint: #a39d95;
  --line: #efebe6;
  --line-strong: #e4dfd8;
  --page: #f6f4f1;
  --surface: #fff;
  --action: #be5923;
  --brand-soft: #fff1e6;
  --brand-tint: #fff8f2;
  --brand-deep: #a44712;
  --button: linear-gradient(180deg, #f8995a 0%, #ec7735 100%);
  --green: #1f8a5f;
  --green-soft: #e8f4ed;
  --red: #b94138;
  --red-soft: #fff0ed;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  font-synthesis: none;
  font-feature-settings: "tnum";
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button {
  background: none;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #be592340;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--action);
  box-shadow: 0 0 0 3px #be592318;
}
input,
select,
textarea {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 8px;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input,
select {
  height: 36px;
  padding: 0 11px;
}
textarea {
  padding: 10px 12px;
  resize: vertical;
  min-height: 96px;
  line-height: 1.7;
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
  font-size: 13px;
}
input[type="checkbox"] {
  accent-color: var(--action);
  width: 16px;
  height: 16px;
  box-shadow: none;
  flex-shrink: 0;
}
input[type="date"] {
  font-variant-numeric: tabular-nums;
}
input[readonly] {
  background: #f8f7f5;
  color: var(--muted);
}
select {
  padding-right: 28px;
}
::selection {
  background: #ffe0c8;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
.muted {
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}
.pre-wrap {
  white-space: pre-wrap;
}
.wrap-text {
  white-space: normal;
  overflow-wrap: anywhere;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.align-right {
  text-align: right;
}
.boot-state {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.btn:hover {
  background: #faf8f5;
  border-color: #d6cfc6;
}
.btn-primary {
  background: var(--button);
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 3px 7px -4px #ec773580,
    inset 0 1px #ffffff35;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #f28c4b, #e57030);
  border-color: transparent;
}
.btn-link {
  border: 0;
  color: var(--action);
  background: transparent;
  padding: 5px 0;
  min-height: 32px;
}
.btn-link:hover {
  color: var(--brand-deep);
  background: transparent;
}
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}
.btn-quiet:hover {
  background: #f5f2ee;
  border-color: transparent;
}
.btn-small {
  min-height: 32px;
  padding: 4px 11px;
  font-size: 12px;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  background: #f4f1ec;
  color: var(--ink);
}
.workspace {
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 30;
  padding: 27px 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.sidebar .brand {
  padding: 0 12px;
}
.brand strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 9px;
  background: linear-gradient(145deg, #ffa766, #f0702c);
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow:
    0 4px 12px -4px #f0702c99,
    inset 0 1px 0 #ffffff55;
}
.brand-mark i {
  display: block;
  width: 4px;
  border-radius: 3px;
  background: #fff;
}
.brand-mark i:nth-child(1) {
  height: 9px;
  opacity: 0.7;
}
.brand-mark i:nth-child(2) {
  height: 13px;
  opacity: 0.85;
}
.brand-mark i:nth-child(3) {
  height: 18px;
}
.sidebar-label {
  font-size: 11px;
  color: var(--faint);
  padding: 27px 14px 10px;
  letter-spacing: 0.5px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  height: 42px;
  color: var(--text);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav a:hover {
  background: #f8f6f3;
  color: var(--ink);
}
.sidebar nav a.active {
  background: var(--brand-soft);
  color: var(--action);
}
.sidebar nav a.active .icon {
  stroke-width: 1.85;
}
.nav-divider {
  border-top: 1px solid var(--line);
  margin: 13px 12px;
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 18px 2px;
  margin-top: auto;
}
.sidebar-foot > div {
  flex: 1;
  min-width: 0;
}
.sidebar-foot strong {
  display: block;
  font-weight: 500;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-foot small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2eee8;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.staff-avatar {
  background: var(--brand-soft);
  color: var(--action);
}
.workspace-main {
  margin-left: 224px;
  min-width: 0;
}
.topbar {
  height: 61px;
  background: #ffffffec;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  color: var(--faint);
}
.breadcrumb strong {
  font-weight: 400;
  color: var(--text);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.secure-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.secure-label .icon {
  width: 14px;
  height: 14px;
}
.mobile-menu {
  display: none;
}
.main-content {
  padding: 27px 28px 40px;
  max-width: 1700px;
  margin: 0 auto;
  outline: none;
  min-height: calc(100vh - 112px);
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}
.page-header h1 {
  font-size: 24px;
  letter-spacing: -0.4px;
  line-height: 1.5;
}
.page-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 28px 19px;
  font-size: 11px;
  color: var(--faint);
  gap: 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 20px 21px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-head h2 {
  font-size: 15px;
  font-weight: 600;
}
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.panel-head .btn {
  align-self: center;
}
.filters {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 21px 18px;
  flex-wrap: wrap;
}
.search-field {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 270px;
  max-width: 390px;
  flex: 1;
}
.search-field .icon {
  position: absolute;
  left: 11px;
  color: var(--faint);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding-left: 35px;
  font-size: 13px;
  background: #fcfbf9;
}
.filters select {
  font-size: 13px;
  min-width: 125px;
}
.tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line-strong);
  margin: 0 0 21px;
  padding: 0 2px;
  overflow-x: auto;
}
.tabs button {
  position: relative;
  padding: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.tabs button.active {
  color: var(--action);
  font-weight: 600;
}
.tabs button.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--action);
  border-radius: 2px;
}
.table-scroll {
  overflow: auto;
  overscroll-behavior-x: contain;
}
.page-data {
  position: relative;
}
.page-status {
  position: absolute;
  right: 0;
  top: -22px;
  color: var(--muted);
  font-size: 12px;
}
.page-status-error {
  position: relative;
  top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--bg);
}
.page-status[hidden] {
  display: none;
}
.skeleton {
  display: inline-block;
  width: min(100%, 120px);
  min-width: 36px;
  height: 14px;
  border-radius: 4px;
  background: var(--line);
  vertical-align: middle;
  visibility: hidden;
  animation:
    skeleton-reveal 0s 150ms forwards,
    skeleton-pulse 1.6s 150ms ease-in-out infinite;
}
.load-unavailable {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.data-unavailable {
  color: var(--faint);
}
.pagination-pending {
  color: var(--faint);
}
.chart-placeholder {
  width: 100%;
  align-self: center;
  text-align: center;
}
@keyframes skeleton-reveal {
  to {
    visibility: visible;
  }
}
@keyframes skeleton-pulse {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: skeleton-reveal 0s 150ms forwards;
  }
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  background: #faf9f6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: 39px;
  letter-spacing: 0.2px;
}
td,
th {
  padding: 12px 17px;
  vertical-align: middle;
}
td:first-child,
th:first-child {
  padding-left: 21px;
}
td:last-child,
th:last-child {
  padding-right: 21px;
}
td {
  height: 62px;
  border-bottom: 1px solid #f2efeb;
  color: var(--text);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fdfbf8;
}
td strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  display: block;
}
td small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
td .btn-link {
  font-size: 12px;
}
td .numeric {
  font-weight: 600;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.identity > div {
  min-width: 0;
}
.identity small {
  font-size: 10px;
}
.record-id {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.version-tag {
  padding: 4px 7px;
  border: 1px solid #eee9e1;
  border-radius: 5px;
  font-size: 11px;
  color: var(--muted);
  background: #faf8f5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f2f0ec;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 400;
}
.status i {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-active,
.status-paid,
.status-completed,
.status-published,
.status-succeeded,
.status-resolved {
  background: #edf5ee;
  color: #4b8359;
}
.status-pending,
.status-open,
.status-requested,
.status-scheduled,
.status-refunding,
.status-processing,
.status-in_progress {
  background: #fff3e3;
  color: #ad762d;
}
.status-rejected,
.status-failed,
.status-urgent,
.status-support {
  background: #fdf0ec;
  color: #b5624b;
}
.status-refunded {
  background: #edf2fa;
  color: #6382a2;
}
.content-cell {
  white-space: normal;
  min-width: 250px;
  max-width: 480px;
}
.content-cell strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
.content-cell small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.6;
  max-width: 60ch;
}
.pagination {
  padding: 15px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  gap: 16px;
}
.pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-number {
  min-width: 16px;
  text-align: center;
  color: var(--text);
}
.empty-state {
  padding: 46px 20px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--faint);
  white-space: normal;
}
.empty-state .icon {
  width: 27px;
  height: 27px;
  margin-bottom: 5px;
  stroke-width: 1.25;
}
.empty-state strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.empty-state span {
  font-size: 12px;
  color: var(--muted);
}
.loading-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 260px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #f0e6dc;
  border-top-color: var(--action);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 38px 24px;
  text-align: center;
}
.error-panel h2 {
  font-size: 16px;
}
.error-panel p {
  font-size: 13px;
  margin: 9px auto 20px;
  color: var(--muted);
  max-width: 70ch;
  overflow-wrap: anywhere;
}
.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #eae5dd;
  background: #f9f7f3;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.7;
}
.inline-note > .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
  font-size: 11px;
  color: var(--muted);
}
.live-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: #78a082;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.date-filter {
  display: flex;
  gap: 9px;
  align-items: center;
}
.date-filter input {
  font-size: 12px;
  height: 32px;
  padding: 0 8px;
  width: 135px;
  background: #fff;
}
.date-filter .btn {
  min-height: 32px;
  font-size: 12px;
}
.metric-strip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 21px 0;
  margin-bottom: 23px;
}
.metric-strip > div {
  padding: 0 23px;
  border-right: 1px solid var(--line);
}
.metric-strip > div:last-child {
  border: 0;
}
.metric-strip span {
  font-size: 12px;
  color: var(--muted);
}
.metric-strip strong {
  display: block;
  font-size: 28px;
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: -0.5px;
  margin-top: 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric-strip small {
  font-size: 10px;
  color: var(--faint);
  display: block;
  margin-top: 4px;
}
.metric-strip.compact strong {
  font-size: 24px;
}
.todo-strip {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-bottom: 24px;
}
.todo-strip h2 {
  font-size: 12px;
  white-space: nowrap;
  font-weight: 500;
  color: var(--muted);
}
.todo-list {
  display: flex;
  flex: 1;
  gap: 13px;
  flex-wrap: wrap;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 175px;
  text-align: left;
  background: #faf6ef;
  border: 1px solid #eee4d7;
  padding: 11px 14px;
  border-radius: 8px;
}
.todo-item span {
  font-size: 12px;
  color: var(--action);
}
.todo-item strong {
  font-size: 18px;
  font-weight: 550;
  margin-left: auto;
  color: var(--action);
}
.todo-item .icon {
  width: 13px;
  height: 13px;
  color: var(--action);
}
.todo-item:hover {
  background: #fff2df;
  border-color: #e4c5a1;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr);
  gap: 20px;
}
.overview-grid .panel {
  margin: 0;
}
.chart-legend {
  display: flex;
  gap: 17px;
  font-size: 10px;
  color: var(--muted);
  padding: 0 22px;
}
.chart-legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.chart-legend i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}
.orange {
  background: #ee9b62;
}
.gray {
  background: #d6cec3;
}
.bar-chart {
  display: flex;
  height: 215px;
  gap: 8px;
  padding: 25px 23px 0;
  overflow: hidden;
}
.bar-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bar-pair {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 157px;
  border-bottom: 1px solid #eee8de;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 38px,
    #f6f3ed 38px,
    #f6f3ed 39px
  );
}
.bar-pair i {
  display: block;
  width: 33%;
  max-width: 16px;
  border-radius: 3px 3px 0 0;
  min-height: 0;
}
.bar-report {
  background: #eea06b;
}
.bar-user {
  background: #d9d1c5;
}
.bar-column > span {
  font-size: 9px;
  white-space: nowrap;
  margin-top: 11px;
  color: var(--faint);
}
.chart-footnote {
  font-size: 10px;
  color: var(--muted);
  padding: 13px 22px 20px;
}
.ai-summary {
  padding: 0 22px 4px;
}
.ai-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1ede7;
  padding: 14px 0;
  gap: 15px;
}
.ai-summary > div:last-child {
  border: 0;
}
.ai-summary span {
  font-size: 12px;
  color: var(--muted);
}
.ai-summary strong {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.note {
  background: #faf7f1;
  padding: 11px 13px;
  border-radius: 7px;
  margin: 13px 20px 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.document-list {
  padding: 0 21px 10px;
}
.document-row {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.document-row:last-child {
  border: 0;
}
.document-row:hover {
  background: #fdfaf6;
}
.document-icon {
  width: 36px;
  height: 39px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--action);
  border-radius: 8px;
}
.document-row > span:nth-child(2) {
  flex: 1;
}
.document-row strong {
  font-weight: 500;
  font-size: 13px;
}
.document-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.document-row > .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 21px 17px;
  gap: 12px;
}
.health-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  gap: 12px;
}
.health-grid > div > span:first-child {
  font-size: 13px;
}
.panel > .inline-note {
  margin: 0 21px 20px;
}
.detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: 620px;
  max-width: 100vw;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: -10px 0 40px #34250e12;
}
.detail-panel::backdrop {
  background: #28251f45;
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 20px 25px;
  position: sticky;
  top: 0;
  background: #fffffff5;
  z-index: 2;
}
.detail-header span {
  font-size: 10px;
  color: var(--muted);
}
.detail-header h2 {
  font-size: 20px;
  margin-top: 3px;
  font-weight: 600;
}
.detail-body {
  padding: 23px 25px 30px;
  overflow-wrap: anywhere;
}
.detail-body .loading-panel {
  border: 0;
}
.notice {
  padding: 12px 14px;
  background: #faf5ed;
  border: 1px solid #eee4d5;
  border-radius: 8px;
  color: #9a7952;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.pairs {
  margin-bottom: 22px;
}
.pair {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  padding: 10px 0;
  border-bottom: 1px solid #f3efea;
  gap: 14px;
  font-size: 12px;
}
.pair dt {
  color: var(--muted);
}
.pair dd {
  color: var(--text);
  overflow-wrap: anywhere;
}
.pair:last-child {
  border-bottom: 0;
}
/* 面板内的定义列表与标题同侧对齐，分隔线内收，限宽避免短值拉出整行空白。 */
.panel > .pairs {
  max-width: 560px;
  margin-bottom: 0;
  padding: 2px 21px 14px;
}
.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 12px;
  margin-top: 25px;
}
.order-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.order-summary h3 {
  font-size: 19px;
  margin: 13px 0 4px;
}
.order-summary p {
  font-size: 12px;
  color: var(--muted);
}
.order-summary > strong {
  font-size: 29px;
  font-weight: 500;
  padding-top: 15px;
  letter-spacing: -0.5px;
}
.detail-body table {
  font-size: 12px;
  white-space: normal;
}
.detail-body td {
  height: 46px;
  padding: 11px 10px;
}
.detail-body th {
  padding: 9px 10px;
}
.detail-body .table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.detail-body form {
  margin: 0 0 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
  min-width: 0;
}
.field > span {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 40px;
  min-width: 0;
  background: #fcfbf9;
  font-size: 13px;
  border-radius: 8px;
}
.field textarea {
  height: auto;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  background: #fff;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  margin: 3px 0 20px;
  line-height: 1.8;
}
.check-row input {
  margin: 3px 0 0;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 22px;
}
.form-error {
  padding: 10px 12px;
  background: #fff0eb;
  border: 1px solid #f0d5c9;
  border-radius: 7px;
  font-size: 12px;
  color: #b05b3e;
  line-height: 1.7;
  margin: 14px 0;
}
.form-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.danger-section {
  border: 1px solid #ecd6cd;
  border-radius: 8px;
  padding: 13px 15px;
  margin-top: 22px;
  background: #fffdfb;
}
.danger-section summary {
  font-size: 12px;
  color: #ac6047;
  cursor: pointer;
}
.danger-section > p {
  font-size: 12px;
  margin: 12px 0 18px;
  line-height: 1.8;
  color: #96705c;
}
.danger-section form {
  margin: 0;
}
.prose {
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
  max-width: 78ch;
}
.prose h3 {
  font-size: 14px;
  color: var(--ink);
  margin: 24px 0 9px;
}
.prose p {
  margin: 0 0 10px;
}
.prose .article-image-link {
  display: block;
  margin: 0 0 10px;
}
.prose .article-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
.ticket-subject {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 16px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 11px;
}
.timeline li {
  border-left: 1px solid #eadfd0;
  padding: 0 0 24px 22px;
  position: relative;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9c8b3;
  border: 2px solid #fff;
  box-sizing: content-box;
}
.timeline li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.timeline strong {
  font-weight: 500;
  color: var(--text);
}
.timeline time {
  font-size: 10px;
  color: var(--faint);
}
.timeline p {
  margin-top: 6px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
}
.object-summary {
  font-size: 12px;
}
.object-summary > div {
  padding: 8px 0;
  border-bottom: 1px solid #f3eee7;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}
.object-summary dt {
  color: var(--muted);
}
.object-summary dd {
  overflow-wrap: anywhere;
}
.object-summary .object-summary > div {
  display: block;
  padding: 4px 0;
}
.object-summary .object-summary dt {
  margin-bottom: 3px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, 90vw);
  background: #363029;
  color: #fff;
  padding: 12px 19px;
  box-shadow: 0 7px 25px #27201820;
  border-radius: 9px;
  font-size: 13px;
  z-index: 100;
  line-height: 1.6;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: #fff;
}
.login-story {
  padding: 39px 50px 24px;
  background: #f8f4ed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.brand-context {
  color: var(--muted);
  font-size: 12px;
  padding-left: 12px;
  border-left: 1px solid #dcd1c2;
  margin-left: 4px;
}
.story-copy {
  margin: auto 0;
  padding: 65px 0 20px;
  position: relative;
}
.story-line {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #dd9b63;
  margin-bottom: 22px;
}
.story-copy h1 {
  font-size: 38px;
  line-height: 1.55;
  letter-spacing: -1px;
  font-weight: 550;
  color: var(--ink);
}
.story-copy p {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  margin-top: 20px;
}
.story-footer {
  font-size: 11px;
  color: var(--faint);
  padding-top: 30px;
}
.growth-art {
  position: relative;
  height: 190px;
  width: min(370px, 90%);
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: 45px;
  border-bottom: 1px solid #d8cbb8;
  padding: 0 40px 0 70px;
}
.growth-art > i {
  width: 37px;
  background: #e8c39d;
  height: 75px;
  border-radius: 8px 8px 0 0;
  z-index: 1;
}
.growth-art > i:nth-of-type(2) {
  height: 111px;
  background: #e4ad7b;
}
.growth-art > i:nth-of-type(3) {
  height: 153px;
  background: #db9258;
}
.ruler-lines {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35px;
  background: repeating-linear-gradient(
    to top,
    transparent 0 17px,
    #d9c5ac 17px 18px
  );
  border-left: 1px solid #d8c3aa;
}
.growth-dot {
  position: absolute;
  right: 18px;
  top: 10px;
  width: 64px;
  height: 64px;
  background: #f3e2ca;
  border-radius: 50%;
}
.login-side {
  display: grid;
  place-items: center;
  padding: 60px 35px;
}
.login-form {
  width: 100%;
  max-width: 350px;
}
.login-lock {
  color: var(--action);
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee5da;
  border-radius: 12px;
  margin-bottom: 22px;
}
.login-lock .icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.5;
}
.login-form h2 {
  font-size: 25px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
.login-form > p {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 32px;
}
.login-form .field {
  margin-bottom: 20px;
}
.login-form .field input {
  height: 44px;
  font-size: 14px;
  background: #fff;
}
.login-submit {
  width: 100%;
  height: 44px;
  font-size: 14px;
  margin-top: 8px;
  border-radius: 9px;
}
.login-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 24px;
}
.login-note .icon {
  width: 14px;
  height: 14px;
}
@media (min-width: 1600px) {
  .main-content {
    padding-top: 32px;
  }
  .page-header {
    margin-bottom: 26px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  }
  .bar-chart {
    height: 250px;
  }
  .bar-pair {
    height: 185px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 204px;
  }
  .workspace-main {
    margin-left: 204px;
  }
  .main-content {
    padding: 24px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .metric-strip > div {
    padding: 0 17px;
  }
  .metric-strip strong {
    font-size: 25px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-grid .ai-summary {
    display: flex;
    gap: 28px;
  }
  .ai-summary > div {
    flex: 1;
    display: block;
    border: 0;
  }
  .ai-summary strong {
    display: block;
    margin-top: 5px;
  }
  .todo-strip {
    display: block;
  }
  .todo-strip h2 {
    margin-bottom: 10px;
  }
  .login-story {
    padding: 35px;
  }
  .story-copy h1 {
    font-size: 32px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 6px 0 35px #2a1c101a;
    width: 224px;
  }
  .sidebar.expanded {
    transform: none;
  }
  .workspace-main {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    padding: 0 17px;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .secure-label {
    display: none;
  }
  .main-content {
    padding: 22px 18px;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .metric-strip {
    grid-template-columns: 1fr 1fr;
    row-gap: 23px;
  }
  .metric-strip > div:nth-child(2) {
    border-right: 0;
  }
  .workspace-footer {
    padding: 0 18px 18px;
  }
  .login-story {
    padding: 28px;
  }
  .login-layout {
    grid-template-columns: 0.9fr 1fr;
  }
  .story-copy h1 {
    font-size: 28px;
  }
  .brand-context {
    display: none;
  }
  .growth-art {
    gap: 12px;
    padding-left: 50px;
    padding-right: 0;
  }
}
@media (max-width: 600px) {
  .login-layout {
    display: block;
    background: #fff;
  }
  .login-story {
    padding: 23px;
    background: #f8f4ed;
  }
  .story-copy,
  .story-footer {
    display: none;
  }
  .login-side {
    padding: 46px 25px;
  }
  .login-form {
    max-width: 400px;
  }
  .topbar-actions .btn {
    font-size: 11px;
    padding: 5px;
  }
  .breadcrumb {
    font-size: 11px;
    gap: 6px;
  }
  .breadcrumb > strong {
    display: none;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header p {
    max-width: 28ch;
  }
  .metric-strip strong {
    font-size: 23px;
  }
  .metric-strip > div {
    padding: 0 14px;
  }
  .overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .date-filter {
    width: 100%;
    gap: 7px;
  }
  .date-filter input {
    width: 128px;
  }
  .todo-list {
    display: grid;
    grid-template-columns: 1fr;
  }
  .todo-item {
    min-width: 0;
  }
  .panel-head {
    padding: 17px 15px;
    align-items: flex-start;
  }
  .panel-head .btn {
    font-size: 12px;
  }
  .filters {
    padding: 0 15px 16px;
  }
  .search-field {
    min-width: 180px;
    max-width: none;
    width: 100%;
    flex-basis: 100%;
  }
  .panel-head p {
    line-height: 1.7;
  }
  .pagination {
    padding: 13px 15px;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .workspace-footer {
    font-size: 10px;
    flex-direction: column;
    gap: 2px;
  }
  .health-grid {
    grid-template-columns: 1fr;
  }
  .detail-header {
    padding: 17px 18px;
  }
  .detail-body {
    padding: 20px 18px;
  }
  .pair {
    grid-template-columns: 95px 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .object-summary > div {
    grid-template-columns: 90px 1fr;
  }
  .order-summary > strong {
    font-size: 25px;
  }
  .bar-chart {
    gap: 4px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .chart-legend,
  .chart-footnote {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.environment-badge {
  font-size: 10px;
  padding: 3px 8px;
  background: #fff3df;
  color: #b1803f;
  border: 1px solid #f0e0c5;
  border-radius: 5px;
  white-space: nowrap;
}

/* Article authoring: one continuous document with an optional local phone view. */
.detail-panel.article-editor-panel {
  width: 92vw;
  max-width: 960px;
  overflow: hidden;
}
.detail-panel.article-editor-panel[open] {
  display: flex;
  flex-direction: column;
}
.article-editor-panel > .detail-header {
  flex: none;
  position: relative;
  padding: 17px 25px;
}
.article-editor-panel > .detail-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.article-editor-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0 !important;
}
.article-editor-view-tabs {
  display: flex;
  gap: 7px;
  flex: none;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
}
.article-editor-view-tabs .btn {
  min-height: 31px;
  padding: 5px 14px;
  font-size: 13px;
}
.article-editor-view-tabs .active,
.article-preview-heading .active {
  background: #fff1e6;
  color: #a44712;
  border-color: #eacdb6;
}
.article-editor-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.article-compose {
  max-width: 850px;
  min-width: 0;
  margin: 0 auto;
  padding: 20px 26px 30px;
}
.article-compose fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.article-editor-summary {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.article-editor-summary > span:first-child {
  color: var(--action);
  font-weight: 600;
}
.article-editor-summary > span:last-child {
  margin-left: auto;
}
.article-body-label {
  margin-bottom: 8px;
  font-size: 12px;
}
.article-body-label strong {
  font-weight: 500;
}
.article-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #faf9f6;
}
.article-editor-toolbar .btn,
.article-editor-toolbar select {
  height: 31px;
  min-height: 31px;
  font-size: 12px;
  padding: 4px 9px;
  background: #fff;
}
.article-editor-toolbar select {
  max-width: 112px;
  border-radius: 6px;
}
.article-editor-toolbar .icon {
  width: 13px;
  height: 13px;
}
.article-rich-body {
  min-height: 350px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  outline: none;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: #fff;
}
.article-rich-body:focus {
  border-color: #c89467;
  box-shadow: 0 0 0 2px #c8946714;
}
.article-rich-body p,
.article-rich-body div {
  margin: 0 0 14px;
}
.article-rich-body h3 {
  margin: 22px 0 12px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 600;
}
.article-rich-body > :first-child {
  margin-top: 0;
}
.article-rich-body > :last-child {
  margin-bottom: 0;
}
.article-rich-body ul,
.article-rich-body ol {
  padding-left: 25px;
  margin: 0 0 14px;
}
.article-rich-body li {
  min-height: 28px;
}
.article-rich-body table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}
.article-rich-body td,
.article-rich-body th {
  border: 1px solid var(--line);
  height: auto;
  min-width: 35px;
  padding: 7px 9px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article-rich-media {
  margin: 18px 0;
  cursor: pointer;
  position: relative;
  outline: none;
  border-radius: 3px;
}
.article-rich-media.is-selected {
  outline: 2px solid #b97840;
  outline-offset: 4px;
}
.article-rich-media img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.article-rich-image-message {
  display: block;
  padding: 24px 16px;
  border: 1px dashed #d8c7b6;
  background: #faf7f2;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  white-space: normal;
}
.article-rich-image-message strong {
  display: block;
  font-weight: 600;
}
.article-rich-image-message > span {
  display: block;
  margin-top: 6px;
}
.article-rich-image-message.is-failed {
  color: #9a4c34;
  background: #fff5f0;
  border-color: #e0b6a4;
}
.article-image-tools {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid #eadccc;
  border-radius: 7px;
  background: #faf8f4;
}
.article-image-tools .field {
  margin-bottom: 9px;
}
.article-image-tools input {
  height: 35px;
}
.article-image-tools > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.article-image-tools .btn {
  font-size: 12px;
  min-height: 31px;
}
.article-image-hint {
  margin: 8px 0 20px;
}
.article-editor-fold {
  border-top: 1px solid var(--line);
  padding: 15px 0 5px;
  margin-top: 5px;
}
.article-editor-fold summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.article-editor-fold:not([open]) summary {
  margin-bottom: 7px;
}
.article-system-records {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  font-size: 12px;
  gap: 12px 10px;
  margin: 0 0 14px;
}
.article-system-records dt {
  color: var(--muted);
}
.article-system-records dd {
  overflow-wrap: anywhere;
}
.article-preview-pane {
  padding: 24px 24px 36px;
  min-height: 100%;
  background: #f7f5f1;
}
.article-preview-heading {
  max-width: 375px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.article-preview-heading > div {
  display: flex;
  gap: 4px;
}
.article-preview-heading .btn {
  min-height: 29px;
  font-size: 12px;
  padding: 4px 10px;
}
.article-phone-scroll {
  width: 100%;
  overflow: hidden;
}
.article-phone-footprint {
  width: 330.4px;
  height: 697.6px;
  margin: 0 auto;
  position: relative;
}
.article-phone {
  width: 413px;
  height: 872px;
  border: 10px solid #292827;
  border-radius: 46px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  top: 0;
  transform: scale(0.8);
  transform-origin: top left;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Helvetica Neue",
    sans-serif;
  color: #1d1b18;
  box-shadow: 0 0 0 1px #ddd8d1;
}
.article-phone-status {
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  position: relative;
}
.article-phone-status i {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 26px;
  border-radius: 18px;
  background: #252422;
}
.article-phone-title {
  height: 44px;
  flex: none;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #efece7;
  font-size: 20px;
}
.article-phone-title strong {
  font-size: 15px;
  font-weight: 600;
}
.article-phone-title span {
  font-size: 16px;
}
.article-phone-viewport {
  width: 393px;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: #fff;
}
.article-phone-home {
  height: 22px;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}
.article-phone-home::after {
  content: "";
  width: 125px;
  height: 5px;
  background: #292827;
  border-radius: 4px;
}
.article-phone * {
  box-sizing: border-box;
}
.article-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.article-save-message {
  flex: 1;
  min-width: 0;
}
.article-save-message .form-error {
  margin: 0;
  max-height: 100px;
  overflow: auto;
}
.article-save-message .form-error:not([hidden]) + .form-hint {
  display: none;
}
.article-save-controls {
  display: flex;
  gap: 7px;
}
.article-save-controls select {
  min-width: 95px;
  height: 37px;
  font-size: 12px;
}
/* Native article rules at 750rpx = 375 logical CSS pixels. */
.article-phone .draft-post-page {
  padding: 16px 14px 20px;
}
.draft-post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}
.draft-post-author > b {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  font-size: 13px;
  background: linear-gradient(145deg, #ffe2c8, #ffcfa6);
  color: #9a4a17;
}
.draft-post-author > div {
  flex: 1;
  min-width: 0;
}
.draft-post-author strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.draft-post-author small {
  display: block;
  color: #7b756d;
  font-size: 13px;
  margin-top: 1px;
}
.draft-tag {
  display: inline-block;
  background: #fff1e6;
  color: #a44712;
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.article-phone .draft-post-title {
  font-size: 22px;
  line-height: 1.5;
  margin: 18px 0 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.draft-article-body {
  color: #46515d;
  font-size: 15px;
  line-height: 2;
}
.draft-article-body .draft-article-paragraph {
  margin: 0 0 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-article-body .draft-article-heading {
  font-size: 16px;
  font-weight: 600;
  line-height: 2;
  margin: 0 0 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-article-list {
  font-size: 15px;
  line-height: 2;
  margin: 0 0 13px;
  padding-left: 20px;
  white-space: pre-wrap;
}
.draft-article-list li {
  padding-left: 3px;
}
.draft-article-table {
  width: 100%;
  margin: 0 0 13px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #46515d;
}
.article-phone .draft-article-table td,
.article-phone .draft-article-table th {
  border: 1px solid #efebe6;
  padding: 4px 6px;
  font-size: 15px;
  line-height: 2;
  height: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  background: transparent;
  text-align: left;
}
.draft-article-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 13px;
  object-fit: contain;
}
.draft-failed-image {
  padding: 25px 15px;
  margin-bottom: 13px;
  font-size: 13px;
  background: #fff2e6;
  color: #9a5128;
  border: 1px dashed #e6bc96;
  text-align: center;
}
.draft-failed-image small {
  display: block;
  margin-top: 6px;
}
.draft-placeholder {
  color: #aaa098;
}
.draft-article-source {
  margin: 14px 0;
  padding: 12px 13px;
  border: 1px solid #efebe6;
  border-radius: 12px;
  background: #faf8f5;
}
.draft-article-source > b {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  background: #e8f4ed;
  color: #1f8a5f;
}
.draft-article-source > p {
  font-size: 14px;
  color: #57524c;
  line-height: 1.6;
  margin-top: 6px;
}
.draft-article-source > span {
  display: block;
  padding-top: 6px;
  font-size: 13px;
  color: #a44712;
}
.draft-post-tools {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.draft-post-tools > span {
  padding: 7px 12px;
  border: 1px solid #efebe6;
  border-radius: 9px;
  font-size: 13px;
  color: #57524c;
}
.draft-post-tools > span:last-child {
  margin-left: auto;
}
.draft-post-disclaimer {
  border-top: 1px solid #efebe6;
  padding-top: 10px;
  color: #7b756d;
  font-size: 13px;
  line-height: 1.8;
}
.draft-feed-page {
  background: #f8f6f3;
  min-height: 480px;
  padding: 16px 14px;
}
.draft-feed-card {
  background: #fff;
  border: 1px solid #efebe6;
  border-radius: 18px;
  padding: 14px 15px 12px;
}
.draft-feed-open {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.draft-feed-main {
  flex: 1;
  min-width: 0;
}
.article-phone .draft-feed-main h2 {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.draft-feed-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: #57524c;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
.draft-feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: #7b756d;
  font-size: 13px;
}
.draft-feed-foot > span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  font-size: 12px;
}
.draft-feed-foot b {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: linear-gradient(145deg, #ffe2c8, #ffcfa6);
  color: #9a4a17;
  font-size: 13px;
}
.draft-feed-foot > span:last-child {
  white-space: nowrap;
  font-size: 11px;
}
.draft-feed-cover {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 12px;
  flex: none;
}
.draft-feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  border-top: 1px solid #efebe6;
  padding-top: 9px;
  color: #7b756d;
  font-size: 13px;
}
.draft-feed-meta > span:last-child {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .detail-panel.article-editor-panel {
    width: 100vw;
  }
  .article-editor-panel > .detail-header {
    padding: 14px 17px;
  }
  .article-editor-view-tabs {
    padding: 10px 16px;
  }
  .article-compose {
    padding: 18px 16px 25px;
  }
  .article-rich-body {
    padding: 14px;
    min-height: 330px;
  }
  .article-editor-toolbar {
    gap: 4px;
  }
  .article-editor-toolbar .btn,
  .article-editor-toolbar select {
    padding: 4px 7px;
  }
  .article-preview-pane {
    padding: 18px 0 30px;
  }
  .article-preview-heading {
    padding: 0 16px;
  }
  .article-editor-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .article-save-message {
    flex-basis: 100%;
  }
  .article-save-controls {
    margin-left: auto;
  }
}

/* Keep article authoring compact; other detail headers and fields retain their rules. */
.article-editor-panel > .detail-header {
  padding: 12px 24px;
}
.article-editor-panel > .detail-header > div > span {
  display: none;
}
.article-editor-panel > .detail-header h2 {
  margin: 0;
  font-size: 18px;
}
.article-editor-view-tabs {
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.article-editor-view-tabs .article-editor-summary {
  margin: 0 0 0 auto;
  gap: 12px;
}
.article-compose {
  padding-top: 15px;
}
.article-compose .field {
  gap: 5px;
  margin-bottom: 12px;
}
.article-compose .field input,
.article-compose .field select {
  height: 36px;
}
.article-compose textarea[data-editor-field="excerpt"] {
  min-height: 60px;
  height: 60px;
  padding: 8px 11px;
  line-height: 20px;
}
.article-rich-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}
.article-rich-toolbar .article-image-tools {
  margin: 0;
  padding: 9px 12px;
  border-radius: 0;
  border-bottom: 0;
}
.article-rich-toolbar .article-image-tools .field {
  margin-bottom: 7px;
}
@media (max-width: 600px) {
  .article-editor-panel > .detail-header {
    padding: 11px 16px;
  }
  .article-editor-view-tabs {
    gap: 5px;
  }
  .article-editor-view-tabs .btn {
    padding: 5px 9px;
  }
  .article-editor-view-tabs .article-editor-summary {
    font-size: 11px;
    gap: 7px;
  }
  .article-editor-summary > span:nth-child(2) {
    display: none;
  }
  .article-compose {
    padding-top: 13px;
  }
}

/* ProseMirror supplies the sole editing host and its native selection model. */
.article-rich-body:focus-within {
  border-color: #c89467;
  box-shadow: 0 0 0 2px #c8946714;
}
.article-rich-body .tiptap {
  min-height: 310px;
  margin: 0;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.article-rich-body .tiptap > :last-child {
  margin-bottom: 0;
}
.article-rich-body li > p {
  margin: 0;
}
.article-rich-body td > p,
.article-rich-body th > p {
  margin: 0;
}
.article-rich-body .ProseMirror-selectednode {
  outline: 2px solid #bd8557;
  outline-offset: 3px;
}
.article-rich-body .selectedCell {
  background: #f6eadf;
}
.article-rich-body .ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
}
.article-rich-body .ProseMirror-gapcursor::after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid #222;
  animation: article-cursor-blink 1.1s steps(2, start) infinite;
}
.article-rich-body .ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}
@keyframes article-cursor-blink {
  to {
    visibility: hidden;
  }
}
.article-editor-toolbar .article-format-button {
  min-width: 30px;
  font-size: 14px;
}
.article-editor-toolbar .btn.active {
  color: #8a562d;
  background: #f4e9dc;
  border-color: #d2ac88;
}
.article-editor-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}
.draft-article-body strong,
.prose strong {
  font-weight: 700;
}
.draft-article-body em,
.prose em {
  font-style: italic;
}
.draft-article-body u,
.prose u {
  text-decoration: underline;
  text-underline-offset: 2px;
}
