.wechat-entry-view { overflow: auto; background: #f6f8fb; }
.wechat-entry-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); }
.wechat-entry-tabs {
  display: flex;
  gap: 4px;
  width: max-content;
  margin: 18px 28px 0;
  padding: 5px;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #edf2f7;
}
.wechat-entry-tabs button { padding: 9px 18px; border: 0; border-radius: 7px; background: transparent; color: #526174; }
.wechat-entry-tabs button.active { background: #fff; color: #0877ee; box-shadow: 0 2px 7px rgba(15,23,42,.08); }
.wechat-entry-panel { display: none; padding: 18px 28px 32px; }
.wechat-entry-panel.active { display: block; }
.entry-domain-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #bfe997;
  border-radius: 10px;
  background: #f2ffe9;
  color: #375b20;
}
.entry-domain-banner.missing { border-color: #f4d391; background: #fff9e9; color: #8a5c08; }
.entry-domain-banner strong { margin-right: 8px; color: #43bd22; }
.entry-domain-banner.missing strong { color: #e5a513; }
.entry-list-toolbar, .identity-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.entry-filters, .identity-toolbar { align-items: center; }
.entry-filters { display: flex; gap: 10px; }
.entry-filters input, .identity-toolbar input { width: min(320px, 46vw); }
.entry-filters input, .entry-filters select, .identity-toolbar input, .identity-toolbar select,
.qr-customize-controls input[type="text"], .qr-customize-controls input:not([type]) {
  min-height: 40px;
  border: 1px solid #d8e0e9;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}
.long-entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 420px)); gap: 16px; align-items: start; }
.long-entry-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15,23,42,.04);
  overflow: hidden;
}
.long-entry-card-head { display: flex; justify-content: space-between; gap: 10px; padding: 15px; }
.long-entry-card-head strong, .identity-card strong { display: block; color: #172033; }
.long-entry-card-head small, .identity-card small { display: block; margin-top: 4px; color: #8793a5; }
.entry-state-pill { align-self: flex-start; white-space: nowrap; padding: 3px 8px; border-radius: 999px; font-size: 12px; }
.entry-state-pill.active, .entry-state-pill.connected { color: #26820c; border: 1px solid #bde49e; background: #f1ffe9; }
.entry-state-pill.disabled { color: #697586; border: 1px solid #d8e0e8; background: #f4f6f8; }
.entry-state-pill.waiting { color: #9a6800; border: 1px solid #f2d88a; background: #fff9df; }
.long-entry-qr { display: grid; place-items: center; padding: 0 14px 6px; }
.long-entry-qr canvas { display: block; width: min(100%, 380px); height: auto; border-radius: 14px; box-shadow: 0 7px 22px rgba(15,23,42,.09); }
.long-entry-stats { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; color: #667386; }
.entry-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.entry-toggle input { width: 34px; height: 18px; accent-color: #087cf0; }
.long-entry-url { margin: 0 14px; padding: 10px; overflow: hidden; border-radius: 7px; background: #f4f8fb; color: #4a657d; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.long-entry-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 13px 14px; }
.long-entry-actions button { padding: 7px 9px; }
.long-entry-actions .danger-text { color: #e5484d; }
.entry-page-status { min-height: 21px; color: #64748b; }
.entry-empty { grid-column: 1 / -1; padding: 64px 20px; border: 1px dashed #ccd7e3; border-radius: 12px; text-align: center; color: #768397; background: #fff; }
.entry-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 18px; }

.qr-customize-notice { padding: 12px 14px; border: 1px solid #b9dcff; border-radius: 9px; background: #eef8ff; color: #25628f; }
.qr-customize-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(380px, 1.2fr); gap: 24px; margin-top: 16px; }
.qr-design-preview-wrap, .qr-customize-controls { padding: 20px; border: 1px solid #dce4ed; border-radius: 12px; background: #fff; }
.qr-design-preview-wrap { display: grid; place-items: center; min-height: 520px; }
#qrDesignPreview { width: min(100%, 380px); height: auto; box-shadow: 0 8px 28px rgba(15,23,42,.1); }
.qr-customize-controls { display: grid; align-content: start; gap: 17px; }
.qr-customize-controls > label { display: grid; gap: 7px; font-weight: 600; }
.qr-customize-controls input:not([type="radio"]):not([type="color"]):not([type="file"]) { width: 100%; }
.qr-customize-controls fieldset { margin: 0; padding: 12px; border: 1px solid #e0e6ed; border-radius: 9px; }
.qr-customize-controls legend { padding: 0 6px; font-weight: 600; }
.qr-customize-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.qr-choice-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qr-choice-row label, .qr-logo-upload { padding: 8px 10px; border: 1px solid #d9e2ec; border-radius: 7px; cursor: pointer; }
.qr-logo-upload { color: #0877ee; }
.qr-control-hint { display: block; margin-top: 8px; color: #7b8797; font-size: 12px; }
.qr-customize-controls input[type="color"] { width: 78px; height: 40px; padding: 3px; border: 1px solid #d8e0e9; border-radius: 8px; background: #fff; }

.identity-toolbar { justify-content: flex-start; }
.identity-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; }
.identity-card { min-width: 0; padding: 15px; border: 1px solid #dce4ed; border-radius: 11px; background: #fff; }
.identity-card-head { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: start; }
.wechat-identity-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #07c160; color: #fff; font-weight: 800; }
.identity-card .identity-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-waiting-note { margin: 13px 0 0; color: #e05252; font-size: 13px; line-height: 1.5; }
.identity-meta { margin-top: 12px; color: #7b8797; font-size: 12px; }
.identity-disconnect { border: 0; background: transparent; color: #e5484d; cursor: pointer; }

.entry-dialog-head { display: flex; justify-content: space-between; gap: 16px; }
.entry-dialog-head h2 { margin: 0 0 6px; }
.entry-dialog-head p { margin: 0; color: #64748b; }
.entry-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1250px) {
  .identity-grid { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
}
@media (max-width: 920px) {
  .wechat-entry-tabs { margin: 12px; width: auto; overflow-x: auto; }
  .wechat-entry-tabs button { flex: 1 0 auto; }
  .wechat-entry-panel { padding: 12px; }
  .entry-domain-banner, .entry-list-toolbar { align-items: stretch; flex-direction: column; }
  .entry-filters { display: grid; grid-template-columns: 1fr 130px; }
  .entry-filters input, .identity-toolbar input { width: 100%; }
  .long-entry-grid, .identity-grid { grid-template-columns: 1fr; }
  .qr-customize-layout { grid-template-columns: 1fr; }
  .qr-design-preview-wrap { min-height: 420px; }
}
