* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
  background: #eef1f6;
}

.erp-layout {
  display: flex;
  min-height: 100vh;
}

.erp-sidebar {
  width: 168px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
}

.erp-brand {
  padding: 14px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.erp-brand-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.erp-brand-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.erp-nav {
  padding: 8px 6px;
  flex: 1;
}

.erp-nav-label {
  font-size: 10px;
  color: #64748b;
  padding: 8px 8px 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.erp-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 2px;
  border-radius: 4px;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.15s;
}

.erp-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.erp-nav-item.active {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  font-weight: 600;
}

.erp-nav-icon {
  width: 14px;
  text-align: center;
  opacity: 0.85;
  font-size: 11px;
}

.erp-sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #475569;
}

.erp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.erp-topbar {
  height: 42px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.erp-breadcrumb {
  font-size: 11px;
  color: #64748b;
}

.erp-breadcrumb strong {
  color: #1e293b;
  font-weight: 600;
}

.erp-topbar-meta {
  font-size: 10px;
  color: #94a3b8;
}

.erp-content {
  padding: 12px 14px;
  flex: 1;
}

.erp-page-header {
  margin-bottom: 10px;
}

.erp-page-header-compact {
  margin-bottom: 6px;
}

.erp-page-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 3px;
}

.erp-page-title-inline {
  margin: 0;
  line-height: 1.4;
}

.erp-page-desc {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

.erp-page-desc-inline {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
}

.erp-card-compact .erp-card-body-compact {
  padding: 8px 10px;
}

.erp-toolbar-compact {
  gap: 6px;
}

.erp-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.erp-card-header {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #fafbfc;
}

.erp-card-body {
  padding: 10px 12px;
}

.erp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.erp-field label {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 500;
}

.erp-input {
  width: 140px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  color: #334155;
  outline: none;
  transition: border-color 0.15s;
}

.erp-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.erp-input-wide {
  width: 180px;
}

.erp-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.5;
}

.erp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.erp-btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.erp-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.erp-btn-secondary {
  background: #fff;
  color: #475569;
  border-color: #cbd5e1;
}

.erp-btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}

.erp-btn-success {
  background: #059669;
  color: #fff;
  border-color: #059669;
}

.erp-btn-success:hover:not(:disabled) {
  background: #047857;
}

.erp-btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.erp-btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}

.erp-cell-alert,
.erp-table td.erp-cell-alert {
  color: #dc2626;
  font-weight: 600;
}

.erp-cell-warning,
.erp-table td.erp-cell-warning {
  color: #ca8a04;
  font-weight: 600;
}

.erp-toolbar-spacer {
  flex: 1;
}

.erp-meta {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
}

.erp-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.erp-table thead th.cell-checkbox {
  overflow: visible;
  z-index: 2;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 1200px;
}

.erp-table thead {
  background: #f8fafc;
}

.erp-table th {
  padding: 6px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}

.erp-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: middle;
}

.erp-table tbody tr:hover {
  background: #f8fafc;
}

.erp-table .cell-id {
  color: #1e293b;
  font-weight: 500;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  min-width: 0;
  max-width: 220px;
}

.erp-influencer-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.erp-influencer-email-inline {
  flex: 1 1 72px;
  min-width: 0;
  max-width: 108px;
}

.erp-influencer-email-inline .erp-editable-wrap {
  max-width: 100%;
  min-width: 0;
}

.erp-influencer-email-inline .editable-email {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 1px 4px;
  font-size: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.erp-influencer-email-inline .editable-email:focus {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.erp-influencer-email-inline .save-status {
  display: none;
}

.erp-email-send-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 16px;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.erp-email-send-badge--success {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.erp-email-send-badge--failed {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.erp-email-log-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
}

.erp-email-log-status--sent {
  color: #047857;
  background: #ecfdf5;
}

.erp-email-log-status--failed {
  color: #b91c1c;
  background: #fef2f2;
}

.erp-email-log-status--skipped {
  color: #64748b;
  background: #f1f5f9;
}

.erp-email-var-panel {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.erp-email-var-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.erp-email-var-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.erp-email-var-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
  color: #1d4ed8;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
}

.erp-email-var-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.erp-email-var-hint {
  margin-top: 8px;
  margin-bottom: 0;
}

.erp-influencer-id-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.erp-audit-app-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.erp-audit-app-badge--same {
  background: #94a3b8;
  color: #fff;
}

.erp-audit-app-badge--same:hover {
  background: #64748b;
}

.erp-audit-app-badge--mixed {
  background: #ef4444;
  color: #fff;
}

.erp-audit-app-badge--mixed:hover {
  background: #dc2626;
}

.erp-audit-apps-wrap {
  overflow-x: auto;
}

.erp-audit-apps-table {
  width: 100%;
  min-width: 980px;
}

.erp-audit-apps-table th,
.erp-audit-apps-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.erp-audit-apps-table .cell-app-id {
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.erp-audit-apps-table .cell-audit-reason,
.erp-audit-apps-table .cell-remark {
  max-width: 180px;
  word-break: break-word;
}

.erp-pin-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 1px 3px;
  line-height: 1;
  opacity: 0.35;
  border-radius: 2px;
  color: #64748b;
}

.erp-pin-btn:hover {
  opacity: 0.85;
  background: #f1f5f9;
}

.erp-pin-btn.is-pinned {
  opacity: 1;
  color: #2563eb;
}

.erp-pin-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1.03-1 1.03 1v-7H19v-2c-1.66 0-3-1.34-3-3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1.03-1 1.03 1v-7H19v-2c-1.66 0-3-1.34-3-3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.erp-trend-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 1px 3px;
  line-height: 1;
  opacity: 0.45;
  border-radius: 2px;
  color: #64748b;
}

.erp-trend-btn:hover {
  opacity: 0.9;
  background: #f1f5f9;
  color: #2563eb;
}

.erp-trend-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.erp-trend-pct {
  font-weight: 600;
  white-space: nowrap;
}

.erp-trend-pct.up {
  color: #16a34a;
}

.erp-trend-pct.down {
  color: #dc2626;
}

.erp-trend-pct.flat {
  color: #64748b;
}

.erp-trend-modal .erp-modal {
  max-width: 420px;
  width: calc(100% - 32px);
  overflow: hidden;
}

.erp-trend-modal-body {
  padding-top: 8px;
  overflow: hidden;
}

.erp-trend-meta {
  margin-bottom: 8px;
  word-break: break-all;
}

.erp-trend-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.erp-trend-table th,
.erp-trend-table td {
  padding: 5px 4px;
  font-size: 11px;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  box-sizing: border-box;
}

.erp-trend-table th {
  white-space: normal;
  line-height: 1.3;
  font-size: 10px;
}

.erp-trend-table th:nth-child(1),
.erp-trend-table td:nth-child(1) {
  width: 24%;
}

.erp-trend-table th:nth-child(2),
.erp-trend-table td:nth-child(2),
.erp-trend-table th:nth-child(3),
.erp-trend-table td:nth-child(3),
.erp-trend-table th:nth-child(4),
.erp-trend-table td:nth-child(4) {
  width: 25.33%;
  text-align: center;
}

.erp-table .cell-muted {
  color: #94a3b8;
}

.erp-table .cell-truncate {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-table td.cell-remark {
  max-width: 140px;
}

.erp-table td.cell-remark .erp-editable-wrap {
  max-width: 100%;
  min-width: 0;
}

.erp-table td.cell-remark .editable-remark {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.erp-table td.cell-remark .editable-remark:focus {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.erp-editable {
  width: 100%;
  padding: 3px 6px;
  font-size: 11px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #334155;
  outline: none;
}

.erp-editable:hover {
  border-color: #e2e8f0;
  background: #fff;
}

.erp-editable:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.erp-editable-wrap {
  position: relative;
  min-width: 90px;
}

.erp-save-status {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  padding-left: 6px;
  font-size: 10px;
  white-space: nowrap;
}

.erp-upload-zone {
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #fafbfc;
}

.erp-upload-zone:hover,
.erp-upload-zone.dragover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.erp-upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.erp-upload-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.erp-upload-hint {
  font-size: 10px;
  color: #94a3b8;
}

.erp-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
}

.erp-link {
  font-size: 11px;
  color: #2563eb;
  text-decoration: none;
}

.erp-link:hover {
  text-decoration: underline;
}

.erp-link-external {
  color: #2563eb;
  text-decoration: none;
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.erp-link-external:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.erp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.hidden {
  display: none !important;
}

.erp-modal-overlay.hidden {
  display: none;
}

.erp-modal {
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  width: 100%;
  max-width: 360px;
  margin: 0 16px;
}

.erp-modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.erp-modal-body {
  padding: 14px;
  font-size: 11px;
  color: #475569;
}

.erp-modal-footer {
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.erp-tag-list {
  font-size: 10px;
  color: #64748b;
  line-height: 1.8;
}

.erp-tag-list span {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 1px 5px;
  margin: 1px 2px 1px 0;
  color: #475569;
}

.erp-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.erp-tab {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.erp-tab:hover {
  color: #334155;
  background: #fff;
  border-color: #e2e8f0;
}

.erp-tab.active {
  color: #2563eb;
  background: #fff;
  border-color: #bfdbfe;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.erp-tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  background: #f1f5f9;
  border-radius: 8px;
  color: #64748b;
}

.erp-tab.active .erp-tab-count {
  background: #dbeafe;
  color: #2563eb;
}

.erp-collab-tab-hint {
  padding: 6px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.erp-collab-tab-hint.hidden {
  display: none;
}

.erp-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  font-size: 11px;
  color: #64748b;
}

.erp-pagination-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.erp-group-header-row {
  background: #f8fafc;
}

.erp-group-header-row:hover {
  background: #f1f5f9;
}

.erp-group-header-row td {
  border-bottom: 1px solid #e2e8f0;
  background: inherit;
}

.erp-group-header-id {
  white-space: nowrap;
}

.erp-group-header-empty {
  padding: 6px 10px !important;
}

.erp-group-header-cell {
  padding: 6px 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.erp-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  padding: 0;
  font-size: 10px;
  color: #64748b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  cursor: pointer;
  vertical-align: middle;
}

.erp-group-toggle:hover {
  border-color: #94a3b8;
  color: #334155;
}

.erp-group-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 10px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 2px;
}

.erp-group-hint {
  margin-left: 8px;
  font-size: 10px;
  color: #94a3b8;
}

.erp-group-child-row {
  background: #fcfdfe;
}

.erp-group-child-row.is-hidden {
  display: none;
}

.erp-group-child-row .cell-indent {
  padding-left: 28px !important;
  color: #94a3b8;
  font-size: 10px;
}

.erp-audit-y {
  color: #059669;
  font-weight: 600;
}

.erp-audit-n {
  color: #dc2626;
  font-weight: 600;
}

.erp-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.erp-sortable:hover {
  color: #2563eb;
}

.erp-sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  color: #94a3b8;
}

.erp-sort-indicator.active {
  color: #2563eb;
}

.erp-detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  font-size: 11px;
}

.erp-detail-label {
  color: #64748b;
  font-weight: 500;
}

.erp-detail-value {
  color: #334155;
  word-break: break-all;
  min-width: 0;
}

.erp-influencer-id-edit {
  display: block;
}

.erp-influencer-id-view,
.erp-influencer-id-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.erp-influencer-id-view.hidden,
.erp-influencer-id-form.hidden {
  display: none;
}

.erp-influencer-id-display {
  min-width: 0;
  word-break: break-all;
}

.erp-influencer-id-edit .erp-influencer-id-input {
  min-width: 180px;
  max-width: 100%;
  flex: 1 1 180px;
}

.erp-influencer-id-edit-hint {
  flex: 1 1 100%;
  margin: 6px 0 0;
}

.erp-influencer-id-history-item {
  flex: 1 1 100%;
  margin: 4px 0 0;
  line-height: 1.45;
  word-break: break-all;
}

.erp-influencer-id-history-item + .erp-influencer-id-history-item {
  margin-top: 2px;
}

.erp-detail-section-title {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.erp-detail-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.erp-detail-stack {
  display: block;
}

.erp-detail-app-block + .erp-detail-app-block {
  margin-top: 12px;
}

.erp-detail-shared-grid,
.erp-detail-app-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  font-size: 11px;
}

.erp-detail-followup {
  font-size: 11px;
}

.erp-follow-up-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 320px;
  overflow-y: auto;
}

.erp-follow-up-item {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.erp-follow-up-meta {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 10px;
}

.erp-follow-up-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.erp-follow-up-item-head .erp-follow-up-meta {
  margin-bottom: 0;
}

.erp-follow-up-date {
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.erp-import-summary {
  margin: 0 0 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #64748b;
  font-size: 12px;
}

.erp-follow-up-content {
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.erp-follow-up-form textarea {
  width: 100%;
  margin-top: 6px;
  resize: vertical;
}

.erp-follow-up-actions {
  margin-top: 8px;
}

.erp-follow-up-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  max-width: 320px;
  white-space: nowrap;
  min-width: 0;
}

.erp-follow-up-open {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-size: inherit;
}

.erp-follow-up-preview {
  flex: 1 1 auto;
  min-width: 0;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-follow-up-preview:hover {
  color: #2563eb;
}

.erp-follow-up-sep {
  flex-shrink: 0;
  color: #cbd5e1;
}

.erp-follow-up-count {
  flex-shrink: 0;
  color: #2563eb;
  font-size: 10px;
  white-space: nowrap;
}

.erp-follow-up-count:hover {
  text-decoration: underline;
}

.erp-follow-up-empty {
  color: #94a3b8;
  font-size: 10px;
}

.erp-follow-up-empty:hover {
  color: #2563eb;
}

.cell-follow-up {
  max-width: 320px;
}

.erp-follow-up-link {
  border: none;
  background: transparent;
  padding: 0;
  color: #2563eb;
  cursor: pointer;
  font-size: inherit;
}

.erp-follow-up-link:hover {
  text-decoration: underline;
}

.erp-modal-wide {
  max-width: 640px;
}

.erp-detail-modal-tabs {
  margin-bottom: 12px;
}

.erp-btn-view {
  padding: 2px 8px;
  font-size: 10px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 6px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

.login-brand {
  font-size: 28px;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.08em;
}

.login-title {
  margin: 8px 0 4px;
  font-size: 16px;
  color: #0f172a;
}

.login-sub,
.login-hint {
  font-size: 11px;
  color: #64748b;
}

.login-error {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.4;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 0;
}

.erp-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.erp-user-menu {
  position: relative;
}

.erp-user-btn {
  padding: 4px 10px;
  font-size: 11px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  cursor: pointer;
}

.erp-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 120px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  z-index: 100;
  display: block;
}

.erp-user-dropdown.hidden {
  display: none !important;
}

.erp-user-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 11px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: #334155;
}

.erp-user-dropdown button:hover {
  background: #f8fafc;
}

.erp-nav-group {
  margin-top: 2px;
}

.erp-nav-parent {
  cursor: default;
}

.erp-nav-submenu {
  padding-left: 28px;
  padding-bottom: 4px;
}

.erp-nav-subitem {
  display: block;
  padding: 5px 8px;
  font-size: 11px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 3px;
}

.erp-nav-subitem:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.erp-nav-subitem.active {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}

.erp-page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.erp-form-field {
  margin-bottom: 10px;
}

.erp-form-field label {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
}

.erp-upload-zone.compact {
  padding: 16px;
}

.quill-editor {
  min-height: 220px;
  background: #fff;
}

.cell-checkbox {
  width: 32px;
  min-width: 32px;
  text-align: center;
  padding: 4px !important;
  position: relative;
  overflow: visible;
}

.erp-select-all-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.erp-select-all-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  z-index: 120;
  padding: 4px 0;
}

.erp-select-all-menu.hidden {
  display: none !important;
}

.erp-select-all-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 11px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: #334155;
  white-space: nowrap;
}

.erp-select-all-menu button:hover {
  background: #f8fafc;
}

.erp-select-all-menu button[data-scope="clear"] {
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}

.cell-checkbox input {
  margin: 0;
  cursor: pointer;
}

.cell-audit {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}

.cell-assignee {
  width: 72px;
  min-width: 72px;
  max-width: 88px;
}

.cell-assignee.assignee-conflict,
.erp-table-collab .cell-assignee.assignee-conflict {
  color: #b45309;
  font-weight: 600;
  max-width: 72px;
}

.cell-tags {
  min-width: 100px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
}

.erp-tags-cell {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  line-height: 1;
  overflow: hidden;
}

.erp-tags-cell-collapsed {
  cursor: pointer;
  border-radius: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.erp-tags-cell-collapsed:hover {
  background: #f8fafc;
}

.erp-tags-cell-editing {
  cursor: default;
  padding: 2px 0;
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
}

.erp-tags-empty {
  font-size: 10px;
  color: #94a3b8;
  line-height: 20px;
}

.erp-tag-more {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  flex-shrink: 0;
}

.erp-tag-list-readonly {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.erp-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 20px;
  max-width: 72px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 10px;
  line-height: 18px;
  flex-shrink: 0;
}

.erp-tag-chip.readonly {
  padding-right: 6px;
}

.erp-tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 56px;
}

.erp-tag-remove {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 0 1px;
  opacity: 0;
  transition: opacity 0.12s;
}

.erp-tag-chip:hover .erp-tag-remove {
  opacity: 1;
}

.erp-tag-remove:hover {
  color: #dc2626;
}

.erp-tag-add-input {
  width: 72px;
  min-width: 72px;
  height: 20px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  flex-shrink: 0;
}

.erp-tag-add-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.erp-tag-add-input::placeholder {
  font-size: 9px;
}

.cell-model {
  max-width: 160px;
}

.cell-audit-reason {
  min-width: 88px;
  max-width: 140px;
}

.cell-audit-reason .erp-editable-wrap,
.cell-audit-reason .erp-editable {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-import-time {
  min-width: 96px;
  white-space: nowrap;
  font-size: 10px;
  color: #64748b;
}

.erp-th-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 108px;
}

.erp-th-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.erp-th-filter-select {
  width: 100%;
  min-width: 0;
  font-size: 10px;
  padding: 2px 4px;
}

.erp-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
}

.erp-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.cell-fulfillment {
  min-width: 96px;
}

.fulfillment-select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%2364748b' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 14px;
}

.fulfillment-tone-empty {
  background-color: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.fulfillment-tone-sign {
  background-color: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
}

.fulfillment-tone-publish {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.fulfillment-tone-published {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.fulfillment-tone-reshoot {
  background-color: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.fulfillment-tone-overdue {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.cell-fulfillment select {
  width: 100%;
  min-width: 92px;
}

.cell-sample-date {
  min-width: 72px;
  white-space: nowrap;
}

.erp-table-collab {
  table-layout: fixed;
  width: 100%;
  min-width: 1080px;
}

.erp-table-collab th,
.erp-table-collab td {
  padding: 4px 5px;
}

.erp-table-collab .cell-id {
  width: 280px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
}

.erp-table-collab .cell-id .erp-influencer-id-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.erp-table-collab .cell-id .erp-influencer-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.erp-table-collab .cell-id .erp-link-external {
  display: inline-block;
  flex-shrink: 0;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 11px;
}

.erp-table-collab .cell-id .erp-influencer-email-inline {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 96px;
}

.erp-table-collab .cell-email {
  width: 108px;
  max-width: 108px;
  min-width: 0;
}

.erp-table-collab td.cell-email .erp-editable-wrap {
  max-width: 100%;
  min-width: 0;
}

.erp-table-collab td.cell-email .editable-email {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.erp-table-collab td.cell-email .editable-email:focus {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.erp-table td.cell-email {
  max-width: 160px;
}

.erp-table td.cell-email .erp-editable-wrap {
  max-width: 100%;
  min-width: 0;
}

.erp-table td.cell-email .editable-email {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.erp-table-collab .cell-fulfillment {
  width: 72px;
  max-width: 72px;
  min-width: 0;
}

.erp-table-collab .cell-fulfillment .fulfillment-select {
  width: 100%;
  min-width: 0;
  font-size: 10px;
}

.erp-table-collab .cell-tags {
  width: 140px;
  max-width: 160px;
  min-width: 120px;
}

.erp-table-collab .cell-tags .erp-tags-cell-collapsed {
  flex-wrap: nowrap;
  overflow: hidden;
}

.erp-table-collab .cell-tags .erp-tag-chip {
  max-width: 72px;
}

.erp-table-collab .cell-tags .erp-tag-text {
  max-width: 56px;
}

.erp-table-collab .cell-assignee {
  width: 58px;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-table-collab .cell-video-count,
.erp-table-collab .cell-order-count,
.erp-table-collab .cell-refund-count {
  width: 46px;
  max-width: 50px;
  text-align: center;
  white-space: nowrap;
}

.erp-table-collab th.cell-video-count,
.erp-table-collab th.cell-order-count,
.erp-table-collab th.cell-refund-count {
  text-align: center;
  font-size: 9px;
  line-height: 1.2;
  padding: 3px 2px;
  white-space: normal;
}

.erp-table-collab .cell-sample-date {
  width: 82px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.erp-table-collab td.cell-remark {
  width: auto;
  max-width: none;
  min-width: 120px;
}

.erp-table-collab .cell-action {
  width: 48px;
  max-width: 52px;
  white-space: nowrap;
}

.erp-table-collab th.cell-remark-head {
  width: auto;
}

.sample-date-link {
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.sample-date-link-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  text-decoration: none;
  white-space: nowrap;
}

.sample-date-link-wrap:hover {
  text-decoration: underline;
}

.sample-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  white-space: nowrap;
}

.sample-date-duplicate .sample-date-link-wrap {
  color: #b45309;
}

.sample-date-same-model-duplicate .sample-date-link-wrap {
  color: #dc2626;
}

.sample-date-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.sample-date-badge-same-model {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.cell-sample-date .sample-date-wrap {
  vertical-align: middle;
}

.erp-table-collab .cell-order-count .order-count-link {
  display: inline-block;
  min-width: 100%;
  text-align: center;
}

.erp-table-stats {
  min-width: 1400px;
}

.erp-table-stats .cell-assignee-head,
.erp-table-stats .cell-assignee-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 72px;
  max-width: 88px;
  white-space: nowrap;
}

.erp-table-stats thead .cell-assignee-head {
  z-index: 3;
}

.erp-table-stats .erp-stats-period-head {
  text-align: center;
  font-size: 11px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.erp-table-stats .erp-stats-metric-head {
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  padding: 4px 3px;
}

.erp-table-stats .erp-stats-value {
  text-align: center;
  font-size: 11px;
  padding: 4px 3px;
  white-space: nowrap;
}

.erp-table-stats .erp-stats-group-audit {
  background: #fafafa;
}

.erp-table-stats .erp-stats-group-sample {
  background: #f0fdf4;
}

.erp-table-stats .erp-stats-group-alliance {
  background: #eff6ff;
}

.erp-table-sample-stats {
  min-width: 960px;
}

.erp-table-sample-stats .cell-assignee-name,
.erp-table-sample-stats .cell-assignee-head {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 72px;
  white-space: nowrap;
}

.erp-table-sample-stats .erp-stats-total-row {
  background: #f8fafc;
}

.erp-table-sample-stats .erp-stats-total-row td {
  border-top: 2px solid #cbd5e1;
}

.erp-table-sample-stats .erp-stats-link {
  font-weight: 600;
}

.erp-table-sample-stats thead {
  position: relative;
  z-index: 2;
}

.erp-table-sample-stats thead th {
  overflow: visible;
  vertical-align: middle;
}

.erp-table-sample-stats .erp-metric-help-tip {
  top: calc(100% + 6px);
  bottom: auto;
  z-index: 1000;
}

.erp-table-sample-stats .erp-metric-help-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #1e293b;
}

.erp-table-sample-stats .erp-metric-help:hover,
.erp-table-sample-stats .erp-metric-help:focus {
  z-index: 1001;
}

.erp-metric-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
}

.erp-metric-help {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  outline: none;
}

.erp-metric-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #94a3b8;
  color: #fff;
  font-size: 9px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
  font-family: Georgia, 'Times New Roman', serif;
}

.erp-metric-help:hover .erp-metric-help-icon,
.erp-metric-help:focus .erp-metric-help-icon {
  background: #64748b;
}

.erp-metric-help-tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 4px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  z-index: 30;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transition: opacity 0.15s ease;
}

.erp-metric-help-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.erp-metric-help:hover .erp-metric-help-tip,
.erp-metric-help:focus .erp-metric-help-tip,
.erp-metric-help:focus-within .erp-metric-help-tip {
  visibility: visible;
  opacity: 1;
}

.erp-toolbar-wrap {
  flex-wrap: wrap;
  row-gap: 8px;
}

.erp-custom-date-field.hidden {
  display: none;
}

.erp-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.sample-order-highlight {
  background: #fef9c3 !important;
  box-shadow: inset 0 0 0 1px #fde047;
}

.erp-email-preview-box {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
}

.erp-form-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.erp-form-inline .erp-input[type='number'] {
  width: 96px;
}

.erp-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.erp-nav-subitem.active {
  color: #2563eb;
  background: #eff6ff;
}

.erp-editable-narrow {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding: 2px 4px;
  text-align: center;
}

.wiki-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11px;
  color: #64748b;
}

.wiki-article-content {
  min-height: 120px;
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
}

.wiki-article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
}

.wiki-broken-image {
  min-height: 80px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  object-fit: contain;
}

.wiki-edit-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
}

.wiki-edit-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.wiki-edit-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.wiki-edit-editor-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  margin-bottom: 0;
}

.wiki-quill-editor {
  flex: 1;
  min-height: 420px;
}

.wiki-edit-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: #fafbfc;
  border-top: 1px solid #e2e8f0;
  z-index: 20;
}

.erp-import-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.erp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.erp-radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #334155;
  cursor: pointer;
}

.erp-radio-item input {
  margin: 0;
}

.hidden-text {
  display: none;
}

select.erp-input {
  height: 28px;
}

@keyframes erpAutofillStart {
  from { opacity: 1; }
  to { opacity: 1; }
}

input.erp-input:-webkit-autofill {
  animation-name: erpAutofillStart;
  animation-duration: 0.001s;
}
