:root {
  --bg: #f3f6f9;
  --panel: #ffffff;
  --soft: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --line: #d7e0ea;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #0f9f6e;
  --green-soft: #e8f7ef;
  --red: #d92d20;
  --red-soft: #fde8e7;
  --amber: #b7791f;
  --amber-soft: #fff4d8;
  --shadow: 0 16px 34px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 10px 24px rgba(16, 24, 40, 0.06);
  font-family: "NSimSun", "新宋体", "SimSun", "宋体", "Microsoft YaHei", serif;
}

#page-qa-system .qa-body {
  display: grid;
  gap: 16px;
}

#page-qa-system .qa-table-wrap {
  overflow-x: auto;
}

#page-qa-system .qa-table tbody tr {
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#page-qa-system .qa-table tbody tr.qa-empty-row {
  cursor: default;
  transform: none;
  background: transparent;
  box-shadow: none;
}

#page-qa-system .qa-table tbody tr.qa-empty-row td {
  height: 78px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(90deg, rgba(245, 248, 252, 0.72), rgba(237, 246, 250, 0.56));
}

#page-qa-system .qa-table tbody tr:hover,
#page-qa-system .qa-table tbody tr.selected {
  background: linear-gradient(90deg, rgba(226, 255, 247, 0.88), rgba(235, 244, 255, 0.92));
  box-shadow: inset 4px 0 0 #13b8a6;
  transform: translateY(-1px);
}

#page-qa-system .qa-table tbody tr.qa-empty-row:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

#page-qa-system .qa-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

#page-qa-system .qa-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-qa-system .qa-reply-field,
#page-qa-system .qa-upload-zone {
  grid-column: span 2;
}

#page-qa-system .qa-reply-field {
  grid-column: span 2;
}

#page-qa-system .qa-upload-zone {
  grid-column: span 2;
  width: 100%;
  min-height: 84px;
  justify-self: stretch;
  display: grid;
  grid-template-columns: 40px minmax(0, 320px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 16px;
  border: 1px dashed rgba(46, 107, 246, 0.38);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236, 247, 255, 0.95), rgba(231, 255, 248, 0.95));
  cursor: pointer;
}

#page-qa-system .qa-upload-zone i {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2f7df4, #12b8a6);
}

#page-qa-system .qa-upload-zone strong {
  grid-column: 2;
  grid-row: 1;
  color: var(--text);
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

#page-qa-system .qa-upload-zone span {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: 320px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

#page-qa-system .qa-action-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-content: start;
}

#page-qa-system .qa-action-stack .button {
  width: 100%;
}

:root[data-theme="dark"] #page-qa-system .qa-table tbody tr:hover,
:root[data-theme="dark"] #page-qa-system .qa-table tbody tr.selected {
  background: linear-gradient(90deg, rgba(19, 83, 99, 0.88), rgba(30, 55, 90, 0.9));
}

:root[data-theme="dark"] #page-qa-system .qa-upload-zone {
  background: linear-gradient(135deg, rgba(18, 37, 55, 0.96), rgba(14, 62, 68, 0.92));
  border-color: rgba(84, 227, 204, 0.36);
}

#page-qa-system .qa-table {
  table-layout: fixed;
  min-width: 0;
}

#page-qa-system .qa-empty-row,
#page-qa-system .qa-empty-row td {
  width: 100%;
}

#page-qa-system .qa-upload-zone {
  max-width: none;
}

#page-qa-system .qa-upload-zone::before,
#page-qa-system .qa-upload-zone::after {
  content: "";
}

#page-qa-system .qa-table {
  width: 100%;
}

#page-qa-system .qa-table .qa-empty-row td.empty {
  display: table-cell;
  width: auto;
  min-width: 0;
}

#page-qa-system .qa-editor-grid > .qa-reply-field,
#page-qa-system .qa-editor-grid > .qa-upload-zone {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

@media (min-width: 761px) {
  #page-qa-system .qa-table-wrap {
    overflow-x: visible;
  }

  #page-qa-system .qa-table tbody tr.qa-empty-row {
    display: table-row;
  }

  #page-qa-system .qa-table tbody tr.qa-empty-row td.empty {
    display: table-cell;
    width: auto;
    min-width: 0;
    padding: 22px 18px;
    text-align: center;
  }

  #page-qa-system .qa-upload-zone {
    min-height: 96px;
  }
}

@media (max-width: 760px) {
  #page-qa-system .qa-editor,
  #page-qa-system .qa-editor-grid {
    grid-template-columns: 1fr;
  }

  #page-qa-system .qa-reply-field,
  #page-qa-system .qa-upload-zone {
    grid-column: auto;
    width: 100%;
    max-width: none;
  }

  #page-qa-system .qa-upload-zone {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  #page-qa-system .qa-upload-zone strong,
  #page-qa-system .qa-upload-zone span {
    grid-column: 2;
    max-width: none;
  }

  #page-qa-system .qa-action-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-qa-system .qa-table-wrap {
    overflow: visible;
  }

  #page-qa-system .qa-table,
  #page-qa-system .qa-table tbody {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  #page-qa-system .qa-table thead {
    display: none;
  }

  #page-qa-system .qa-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }

  #page-qa-system .qa-table tr.qa-empty-row {
    display: block;
    min-height: 72px;
    padding: 0;
  }

  #page-qa-system .qa-table tr.qa-empty-row td {
    display: block;
    min-height: 72px;
    padding: 24px 12px;
    text-align: center;
  }

  #page-qa-system .qa-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    padding: 2px 0;
    border: 0;
    word-break: break-word;
  }

  #page-qa-system .qa-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }

  #page-qa-system .qa-table tr.qa-empty-row td {
    display: block;
    grid-template-columns: none;
  }

  #page-qa-system .qa-table tr.qa-empty-row td::before {
    display: none;
  }
}

:root[data-theme="dark"] {
  --bg: #101722;
  --panel: #172230;
  --soft: #1e2b3a;
  --text: #f8fbff;
  --muted: #c7d4e4;
  --line: #3a4c62;
  --blue: #5d8dff;
  --blue-soft: #1f335d;
  --green: #22c58f;
  --green-soft: #143d33;
  --red: #ff7569;
  --red-soft: #4b2528;
  --amber: #f6c56b;
  --amber-soft: #493a1f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(93, 141, 255, 0.12), transparent 34%),
    var(--bg);
}

:root[data-theme="dark"] .landing-page,
:root[data-theme="dark"] .auth-page {
  background:
    radial-gradient(circle at 14% 8%, rgba(93, 141, 255, 0.16), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(34, 197, 143, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
}

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

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: linear-gradient(180deg, #223247, #1a293b);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #9eafc2;
}

select {
  appearance: none;
  background-image:
    linear-gradient(180deg, #ffffff, #fbfdff),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  padding-right: 38px !important;
}

:root[data-theme="dark"] select {
  background-image:
    linear-gradient(180deg, #223247, #1a293b),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c7d4e4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.app {
  min-height: 100vh;
  padding: 18px;
}

.landing-page {
  min-height: 100vh;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.landing-nav {
  width: min(1180px, calc(100vw - 44px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.landing-brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.landing-brand span {
  color: var(--muted);
  font-size: 12px;
}

.landing-actions,
.landing-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-actions .button,
.landing-cta .button {
  min-width: 112px;
  padding: 0 16px;
}

.landing-hero {
  width: min(1180px, calc(100vw - 44px));
  min-height: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 159, 110, 0.06)),
    #ffffff;
  box-shadow: var(--shadow);
  padding: 38px;
}

.landing-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.landing-copy h1 {
  max-width: 740px;
  font-size: 42px;
  line-height: 1.15;
}

.landing-copy p {
  margin: 0;
  max-width: 740px;
  color: #475467;
  font-size: 16px;
  line-height: 1.9;
}

.landing-preview {
  display: grid;
  gap: 12px;
  align-content: center;
}

.landing-features {
  width: min(1180px, calc(100vw - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.site-footer {
  width: min(1180px, calc(100vw - 44px));
  min-height: 28px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.site-footer:empty {
  display: none;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.site-footer a:hover {
  color: var(--primary);
}

.layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mark, .title-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f9f6e);
  flex: 0 0 auto;
}

.mark.has-image {
  padding: 0;
  background: #ffffff;
  overflow: hidden;
}

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

.title-icon {
  width: 42px;
  height: 42px;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.brand span,
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nav-label {
  padding: 0 8px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

.nav-parent,
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.nav-parent {
  height: 44px;
  justify-content: space-between;
  padding: 0 10px 0 12px;
  color: #344054;
  font-weight: 850;
}

.nav-parent-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.nav-arrow {
  width: 15px;
  height: 15px;
  color: #98a2b3;
  transition: transform 0.16s ease;
  position: relative;
  z-index: 1;
}

.nav-group.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-parent:hover {
  background: var(--soft);
}

.nav-group.active .nav-parent {
  border-color: #d6e4ff;
  background: #f5f8ff;
  color: #175cd3;
}

.sub-nav {
  display: none;
  margin-left: 17px;
  padding-left: 14px;
  border-left: 1px solid #d9e2ec;
  gap: 6px;
}

.nav-group.open .sub-nav {
  display: grid;
}

.nav-item {
  height: 42px;
  gap: 10px;
  padding: 0 12px;
  color: #344054;
  font-weight: 760;
}

.nav-item > * {
  position: relative;
  z-index: 1;
}

.nav-item.active {
  border-color: #bcd0ff;
  background: var(--blue-soft);
  color: #175cd3;
  font-weight: 800;
}

.nav-ripple {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.18) 42%, transparent 72%);
  transform: scale(0);
  opacity: 0.9;
  animation: navRipple 0.56s ease-out forwards;
}

@keyframes navRipple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: var(--soft);
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #344054;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.page { display: none; }
.page.active { display: block; }
.hidden { display: none !important; }

.payment-channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.payment-channel-row {
  border: 1px solid var(--line, #dfe5ec);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-muted, #f8fafc);
}

.payment-channel-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.payment-channel-grid .wide {
  grid-column: span 3;
}

.payment-channel-grid .channel-enabled {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line, #dfe5ec);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.payment-channel-grid .channel-enabled input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.payment-channel-grid .channel-enabled span {
  display: grid;
  gap: 2px;
}

.payment-channel-grid .channel-enabled small {
  color: var(--muted, #738091);
  font-size: 12px;
}

.payment-channel-empty {
  padding: 18px;
  border: 1px dashed var(--line, #dfe5ec);
  border-radius: 8px;
}

.payment-channel-hidden-fields {
  display: none;
}

.payment-channel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.payment-channel-title div {
  display: grid;
  gap: 3px;
}

.payment-channel-title small,
.payment-channel-meta {
  color: var(--muted, #738091);
  font-size: 12px;
}

.payment-channel-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #0f9f94;
  background: #e3f7f4;
}

.payment-channel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-channel-meta {
  display: flex;
  gap: 16px;
  padding-left: 44px;
  margin-top: 9px;
}

.payment-channel-row.is-disabled {
  opacity: .62;
}

.channel-toggle {
  display: inline-flex;
  cursor: pointer;
}

.channel-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.channel-toggle span {
  position: relative;
  display: block;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #aeb8c4;
  transition: background .18s ease;
}

.channel-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}

.channel-toggle input:checked + span {
  background: #0f9f94;
}

.channel-toggle input:checked + span::after {
  transform: translateX(16px);
}

.payment-channel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 42%);
}

.payment-channel-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 10px;
  background: var(--surface, #fff);
  box-shadow: 0 22px 70px rgb(15 23 42 / 24%);
}

.payment-channel-modal > header,
.payment-channel-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #dfe5ec);
}

.payment-channel-modal > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line, #dfe5ec);
  border-bottom: 0;
}

.payment-channel-modal-body {
  padding: 20px;
}

.payment-channel-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-channel-modal-grid .wide {
  grid-column: span 2;
}

.payment-channel-modal-error {
  min-height: 20px;
  margin-top: 10px;
  color: #d14343;
  font-size: 13px;
}

@media (max-width: 900px) {
  .payment-channel-grid {
    grid-template-columns: 1fr;
  }

  .payment-channel-grid .wide {
    grid-column: auto;
  }

  .payment-channel-modal-grid {
    grid-template-columns: 1fr;
  }

  .payment-channel-modal-grid .wide {
    grid-column: auto;
  }
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  min-height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #fff4fb 100%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #1f2937;
  cursor: pointer;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: #8bb8ff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12), 0 0 0 4px rgba(236, 72, 153, 0.08);
  filter: saturate(1.06);
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .front-account-button {
  background: linear-gradient(180deg, #1d2a3a, #172230);
  border-color: var(--line);
  color: var(--text);
}

.front-account-area {
  position: relative;
}

.front-account-button {
  min-height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #fff4fb 100%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  cursor: pointer;
  color: #1f2937;
  font-weight: 850;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.front-account-button:hover {
  transform: translateY(-2px);
  border-color: #8bb8ff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12), 0 0 0 4px rgba(236, 72, 153, 0.08);
  filter: saturate(1.06);
}

.front-account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0f9f8f);
  font-size: 13px;
  font-weight: 900;
}

.front-account-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.front-account-avatar.has-image {
  color: transparent;
}

.front-account-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 174px;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
  z-index: 30;
}

:root[data-theme="dark"] .front-account-dropdown {
  background: var(--panel);
  border-color: var(--line);
}

.front-account-dropdown.show {
  display: grid;
  gap: 6px;
}

.front-account-info {
  display: grid;
  gap: 3px;
  padding: 8px 9px 10px;
  border-bottom: 1px solid #edf2f7;
}

:root[data-theme="dark"] .front-account-info {
  border-bottom-color: var(--line);
}

.front-account-info span,
.front-account-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.front-account-info strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.front-account-dropdown button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

:root[data-theme="dark"] .front-account-dropdown button {
  color: var(--text);
}

.front-account-dropdown button:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(236, 72, 153, 0.08));
  transform: translateX(2px);
  color: #175cd3;
}

.mobile-nav-button,
.mobile-nav-overlay {
  display: none;
}

.title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

input,
select,
textarea {
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bcd2ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.pill.online {
  color: #057047;
  border-color: #b8e6d1;
  background: #f0fff8;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #98a2b3;
}

.pill.online .dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(15, 159, 110, 0.14);
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.home-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 159, 110, 0.06)),
    #ffffff;
  box-shadow: var(--shadow);
  padding: 28px;
}

.home-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.home-kicker {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #175cd3;
  font-size: 13px;
  font-weight: 800;
}

.home-copy h2 {
  margin: 0;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.home-copy p {
  margin: 0;
  max-width: 760px;
  color: #475467;
  font-size: 15px;
  line-height: 1.8;
}

.home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.home-actions .button {
  min-width: 118px;
  padding: 0 16px;
}

.home-panel {
  display: grid;
  gap: 12px;
  align-content: center;
}

.home-stat {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.home-stat span {
  color: var(--muted);
  font-size: 12px;
}

.home-stat strong {
  font-size: 22px;
  line-height: 1.15;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.feature-text {
  margin: 0;
  min-height: 72px;
  color: #475467;
  font-size: 14px;
  line-height: 1.7;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel.nested { box-shadow: none; }

.panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.panel-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
}

.panel-body { padding: 18px; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  margin-bottom: 16px;
}

.mode-tab {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}

.mode-tab.active {
  color: #175cd3;
  border-color: #c7d7fe;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.08);
}

.mode-panel { display: none; }
.mode-panel.active { display: block; }

.field-grid {
  display: grid;
  gap: 13px;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 720;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input,
.field select {
  height: 42px;
}

.field textarea {
  min-height: 118px;
  padding-top: 11px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.button-row.no-margin { margin-top: 0; }

.button {
  min-height: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-weight: 760;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 38%, rgba(255, 255, 255, 0.22));
  opacity: 0;
  transform: translateX(-18%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.button > :not(.button-ripple) {
  position: relative;
  z-index: 1;
}

.button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.15), 0 0 0 4px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.button:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.button.is-pressed,
.button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.12), inset 0 2px 6px rgba(15, 23, 42, 0.13);
}

.button.is-loading {
  pointer-events: none;
  opacity: 0.86;
  animation: buttonPulse 1s ease-in-out infinite;
}

.button.is-loading svg,
.button.quick-loading svg {
  animation: spin 0.8s linear infinite;
}

.button.quick-loading {
  animation: buttonPulse 0.75s ease-in-out infinite;
}

.button-ripple {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.48);
  transform: scale(0);
  opacity: 0.75;
  animation: buttonRipple 0.56s ease-out forwards;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes buttonRipple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes buttonPulse {
  50% {
    filter: brightness(1.08) saturate(1.08);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.16), 0 0 0 4px rgba(37, 99, 235, 0.08);
  }
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2f6df6 0%, #13a7d8 55%, #12b981 100%);
  border-color: rgba(37, 99, 235, 0.42);
}

.button.success {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #12b8a6 52%, #36cfc9 100%);
  border-color: rgba(15, 159, 110, 0.42);
}

.button.secondary {
  color: #175cd3;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #fff4fb 100%);
  border-color: #bfd7ff;
}

.button.secondary:hover {
  border-color: #8bb8ff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.13), 0 0 0 4px rgba(236, 72, 153, 0.08);
}

.button.danger {
  color: #ffffff;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff6b83 48%, #ff8a65 100%);
  border-color: rgba(244, 63, 94, 0.48);
}

.button.danger-light {
  color: #d61f69;
  background: linear-gradient(135deg, #fff9fd 0%, #ffe8f3 55%, #fff1ed 100%);
  border-color: #ffbad6;
}

.button.danger-light:hover {
  border-color: #ff8dbc;
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.14), 0 0 0 4px rgba(244, 63, 94, 0.08);
}

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

.section-label {
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 780;
}

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

.empty {
  min-height: 86px;
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfe;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.empty.compact {
  min-height: 122px;
  margin-top: 14px;
}

.instance-item {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.instance-item.active {
  border-color: #aac1ff;
  background: #f7faff;
}

.instance-name {
  font-size: 14px;
  font-weight: 820;
  line-height: 1.25;
}

.instance-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f7;
  color: #475467;
  white-space: nowrap;
}

.badge.good {
  background: var(--green-soft);
  color: #057047;
}

.badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.loading::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.badge.bad {
  background: var(--red-soft);
  color: #b42318;
}

.badge.danger-soft {
  background: var(--red-soft);
  color: #b42318;
}

.announcement-panel {
  margin-bottom: 16px;
}

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

.announcement-item {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.announcement-item h3,
.home-card h3,
.ticket-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.announcement-item p,
.home-card p,
.ticket-card p {
  margin: 6px 0 0;
  color: #475467;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.announcement-item time,
.ticket-meta,
.ticket-reply time {
  color: var(--muted);
  font-size: 12px;
}

.app-home-grid {
  margin-top: 0;
}

.home-card .panel-body {
  display: grid;
  gap: 10px;
}

.home-card .button {
  width: fit-content;
  padding: 0 16px;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1fr);
  gap: 16px;
}

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

.ticket-card {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

.ticket-card-head > div {
  min-width: 0;
}

.ticket-card-head h3 {
  margin-top: 8px;
}

.ticket-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ticket-replies {
  display: grid;
  gap: 8px;
}

.ticket-reply {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.ticket-reply.admin-reply {
  border-color: #bfe7dd;
  background: #f1fffb;
}

.ticket-reply strong {
  font-size: 13px;
}

.ticket-reply p {
  margin: 5px 0;
}

.ticket-reply-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
  align-items: end;
}

.ticket-reply-box textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.ticket-workbench .panel-body {
  display: grid;
  gap: 14px;
}

.ticket-toolbar,
.ticket-actionbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-search {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.ticket-search input {
  width: min(280px, 62vw);
  height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 0 12px;
}

.ticket-filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-filter {
  height: 40px;
  border: 1px solid #0f9f94;
  border-radius: 8px;
  background: #0f9f94;
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.ticket-filter.active {
  background: #087f78;
}

.ticket-table-wrap {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ticket-table th,
.ticket-table td {
  border-bottom: 1px solid #e5edf5;
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.ticket-table th {
  background: #f3f7fb;
  color: #334155;
  font-size: 13px;
}

.ticket-table td p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ticket-id {
  display: inline-flex;
  min-width: 26px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #2f80d1;
  color: #fff;
  font-weight: 900;
}

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

.points-panel .panel-body {
  display: grid;
  gap: 14px;
}

.points-section {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 253, 250, 0.52) 100%);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.points-section-title h4 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}

.points-section-title p {
  margin-top: 4px;
}

.points-rule-grid {
  margin-top: 4px;
}

.recall-warn-rule-grid {
  grid-template-columns: repeat(2, minmax(160px, 260px));
  align-items: end;
}

.recall-warn-rule-grid .field {
  min-width: 0;
}

.recall-warn-rule-grid .recall-warn-action-field {
  grid-column: 1 / -1;
  max-width: 360px;
}

.recall-warn-rule-grid .recall-warn-small-field input {
  max-width: 260px;
}

.points-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.points-module-card {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 12px;
  padding: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.points-module-card .setting-switch {
  min-height: 76px;
  box-shadow: none;
}

.points-module-body {
  display: grid;
  gap: 12px;
}

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

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

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

.points-share-picker-empty {
  max-width: 420px;
}

.points-share-picker-empty .pretty-select-button {
  min-height: 64px;
}

.points-share-picker-empty .pretty-select-menu {
  width: min(420px, calc(100vw - 48px));
}

.points-share-empty,
.points-share-help {
  border: 1px dashed #b7c7dc;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.86), rgba(236, 253, 245, 0.72));
  color: #475569;
  font-size: 12px;
  line-height: 1.7;
  padding: 10px 12px;
}

.points-share-item {
  align-items: center;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.88);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.points-share-item.linked {
  cursor: default;
}

.points-share-item:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.points-share-item input {
  display: none;
}

.points-share-check {
  border: 2px solid #b7c7dc;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.points-share-item input:checked + .points-share-check {
  background: linear-gradient(135deg, #2f7df2, #11b99a);
  border-color: transparent;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.points-share-check.active {
  align-items: center;
  background: linear-gradient(135deg, #2f7df2, #11b99a);
  border-color: transparent;
  color: #ffffff;
  justify-content: center;
}

.points-share-check.active svg {
  height: 12px;
  width: 12px;
}

.points-share-item.source {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(209, 250, 229, 0.84));
}

.points-share-main {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.points-share-main strong,
.points-share-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-share-main strong {
  color: #0f172a;
  font-size: 13px;
}

.points-share-main em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.points-share-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
}

.points-module-title {
  min-height: 76px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(236, 253, 245, 0.78));
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.points-module-title strong {
  font-size: 15px;
  color: var(--text);
}

.points-module-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.points-shop-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.points-shop-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.76), rgba(236, 253, 245, 0.7));
}

.points-shop-form .full-field,
.points-shop-actions {
  grid-column: 1 / -1;
}

.points-shop-actions {
  justify-content: flex-end;
}

.points-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.points-shop-card {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.points-shop-card-head {
  padding: 12px 14px;
  border-bottom: 1px solid #dbe5ef;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.points-shop-card-head strong {
  color: var(--text);
}

.points-shop-card-head em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.points-shop-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.point-shop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.point-shop-row.order {
  grid-template-columns: minmax(0, 1fr) auto;
}

.point-shop-row strong,
.point-shop-row em,
.point-shop-row p {
  display: block;
  overflow-wrap: anywhere;
}

.point-shop-row strong {
  color: var(--text);
}

.point-shop-row em,
.point-shop-row time {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.point-shop-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.points-side-grid {
  display: grid;
  gap: 16px;
  align-content: start;
}

.points-rank-list,
.points-log-list {
  max-height: 360px;
  overflow: auto;
}

.points-rank-item,
.points-log-item {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.points-log-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.points-rank-no {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-weight: 900;
}

.points-rank-item strong,
.points-log-item strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}

.points-rank-item em,
.points-log-item em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.points-rank-item b,
.points-log-item b {
  color: var(--blue);
  font-size: 18px;
}

.points-log-item b.minus {
  color: #dc2626;
}

.points-log-item b.plus {
  color: #059669;
}

body.dark .points-rank-item,
body.dark .points-log-item {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
}

:root[data-theme="dark"] .points-section,
body.dark .points-section {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(17, 94, 89, 0.16));
  border-color: rgba(148, 163, 184, 0.35);
}

:root[data-theme="dark"] .points-section-title h4,
body.dark .points-section-title h4 {
  color: #f8fbff;
}

:root[data-theme="dark"] .points-section-title .muted,
body.dark .points-section-title .muted {
  color: #c7d4e4;
}

:root[data-theme="dark"] .points-module-card,
body.dark .points-module-card {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: none;
}

:root[data-theme="dark"] .points-share-empty,
:root[data-theme="dark"] .points-share-help,
body.dark .points-share-empty,
body.dark .points-share-help {
  background: linear-gradient(135deg, rgba(21, 45, 63, 0.95), rgba(10, 62, 70, 0.75));
  border-color: #3c536f;
  color: #d5e5f8;
}

:root[data-theme="dark"] .points-share-item,
body.dark .points-share-item {
  background: rgba(23, 36, 52, 0.92);
  border-color: #3a506a;
}

:root[data-theme="dark"] .points-share-item.source,
body.dark .points-share-item.source {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.18));
}

:root[data-theme="dark"] .points-share-main strong,
body.dark .points-share-main strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .points-share-main em,
body.dark .points-share-main em {
  color: #aebfd3;
}

:root[data-theme="dark"] .points-module-title,
body.dark .points-module-title {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(20, 83, 77, 0.35));
  border-color: rgba(148, 163, 184, 0.34);
}

:root[data-theme="dark"] .points-module-title strong,
body.dark .points-module-title strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .points-module-title em,
body.dark .points-module-title em {
  color: #c7d4e4;
}

:root[data-theme="dark"] .points-shop-form,
body.dark .points-shop-form {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(20, 83, 77, 0.26));
  border-color: rgba(96, 165, 250, 0.26);
}

:root[data-theme="dark"] .points-shop-card,
body.dark .points-shop-card {
  background: rgba(15, 23, 42, 0.54);
  border-color: rgba(148, 163, 184, 0.34);
}

:root[data-theme="dark"] .points-shop-card-head,
body.dark .points-shop-card-head {
  border-color: rgba(148, 163, 184, 0.28);
}

:root[data-theme="dark"] .points-shop-card-head strong,
:root[data-theme="dark"] .point-shop-row strong,
body.dark .points-shop-card-head strong,
body.dark .point-shop-row strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .points-shop-card-head em,
:root[data-theme="dark"] .point-shop-row em,
:root[data-theme="dark"] .point-shop-row p,
:root[data-theme="dark"] .point-shop-row time,
body.dark .points-shop-card-head em,
body.dark .point-shop-row em,
body.dark .point-shop-row p,
body.dark .point-shop-row time {
  color: #c7d4e4;
}

:root[data-theme="dark"] .point-shop-row,
body.dark .point-shop-row {
  background: rgba(15, 23, 42, 0.66);
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: none;
}

.point-shop-workbench {
  overflow: hidden;
}

.shop-select-bar {
  margin-bottom: 16px;
}

.shop-select-bar .pretty-select {
  width: min(360px, 100%);
}

.shop-select-bar .pretty-select-button {
  min-height: 58px;
}

.shop-search-field {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #cfe0f4;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #f4fbff);
  color: #5d7088;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.shop-search-field input {
  width: min(280px, 48vw);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.shop-search-field svg {
  width: 16px;
  height: 16px;
  color: #0f9f8f;
}

.points-shop-settings-grid .setting-switch,
.shop-lottery-settings .setting-switch {
  min-height: 78px;
}

.shop-tabs {
  display: inline-flex;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.32);
  border-radius: 8px;
  background: #6b7280;
}

.shop-tabs button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 20px;
  color: #edf6ff;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.shop-tabs button:hover,
.shop-tabs button.active {
  background: linear-gradient(135deg, #238bd3, #16b6a1);
  color: #fff;
}

.shop-tabs button:active {
  transform: scale(0.96);
}

.shop-tab-panel {
  display: none;
}

.shop-tab-panel.active {
  display: grid;
  gap: 14px;
}

.shop-info-strip,
.shop-record-head {
  min-height: 54px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.32), rgba(226, 232, 240, 0.68));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-info-strip {
  justify-content: flex-start;
}

.shop-info-strip strong,
.shop-record-head span {
  color: var(--text);
  font-weight: 900;
}

.points-shop-settings-grid,
.shop-editor-grid,
.shop-lottery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.points-shop-settings-grid .field,
.points-shop-settings-grid .toggle-card {
  min-height: 124px;
}

.points-level-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.points-level-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.points-level-rule-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.points-level-rule-card label span {
  white-space: nowrap;
  font-weight: 800;
}

.points-level-rule-card input {
  width: 100%;
  min-width: 0;
}

.points-level-remove {
  min-width: 74px;
  justify-content: center;
}

.shop-editor-grid {
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1fr) auto;
  align-items: stretch;
}

.shop-editor-card {
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.shop-side-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.shop-side-actions .button {
  min-width: 82px;
}

.shop-table-shell {
  overflow: auto;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.shop-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.shop-data-table th {
  height: 42px;
  background: #4b5563;
  color: #dbeafe;
  text-align: left;
  padding: 0 14px;
  font-size: 13px;
}

.shop-data-table td {
  border-top: 1px solid #d8e3ee;
  padding: 12px 14px;
  color: var(--text);
  vertical-align: middle;
}

.shop-data-table tr.clickable-row {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.shop-data-table tr.clickable-row:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(20, 184, 166, 0.08));
  transform: translateY(-1px);
}

.shop-data-table tr.clickable-row.selected {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(20, 184, 166, 0.15));
  box-shadow: inset 3px 0 0 #0f9f8f;
}

.shop-data-table .empty {
  text-align: center;
  color: var(--muted);
  height: 86px;
}

.speech-period-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid #d7e4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5fbff, #eefbf6);
}

.speech-period-tabs button {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  color: #37506b;
  font-weight: 900;
  background: transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.speech-period-tabs button:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.08);
}

.speech-period-tabs button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

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

.speech-summary-grid article {
  padding: 18px;
  border: 1px solid #d7e5ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f0fffb);
}

.speech-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.speech-summary-grid strong {
  display: block;
  margin-top: 8px;
  color: #071a33;
  font-size: 28px;
  line-height: 1;
}

.speech-table td:nth-child(1) strong {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  border-radius: 999px;
  color: #075985;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.speech-record-head {
  margin: 14px 0 12px;
}

.speech-record-head .action-row {
  justify-content: flex-end;
}

.speech-pager {
  margin-top: 14px;
}

.shop-lottery-grid {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
}

.shop-lottery-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.prize-field textarea {
  min-height: 280px;
}

.point-manage-card {
  margin-top: 6px;
}

.point-manage-card h3 {
  margin: 0;
}

.points-shop-form.simple {
  border-style: solid;
  background: transparent;
}

.left-actions {
  justify-content: flex-start;
}

.compact-pager {
  justify-content: flex-end;
}

.compact-pager.hidden {
  display: none !important;
}

.compact-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

body.dark .shop-tabs {
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(148, 163, 184, 0.42);
}

body.dark .shop-info-strip,
body.dark .shop-record-head {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(20, 83, 77, 0.28));
  border-color: rgba(148, 163, 184, 0.36);
}

body.dark .shop-editor-card,
body.dark .shop-table-shell {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.34);
}

body.dark .shop-search-field {
  background: rgba(29, 43, 60, 0.98);
  border-color: rgba(148, 163, 184, 0.36);
  color: #c7d4e4;
}

body.dark .shop-search-field input {
  color: #f8fbff;
}

body.dark .shop-data-table th {
  background: rgba(30, 41, 59, 0.94);
  color: #f8fbff;
}

body.dark .shop-data-table td {
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fbff;
}

body.dark .shop-data-table tr.clickable-row:hover {
  background: rgba(93, 141, 255, 0.16);
}

body.dark .shop-data-table tr.clickable-row.selected {
  background: rgba(20, 184, 166, 0.18);
  box-shadow: inset 3px 0 0 #2dd4bf;
}

body.dark .speech-period-tabs,
:root[data-theme="dark"] .speech-period-tabs {
  background: rgba(17, 29, 45, 0.96);
  border-color: rgba(125, 153, 188, 0.34);
}

body.dark .speech-period-tabs button,
:root[data-theme="dark"] .speech-period-tabs button {
  color: #dbeafe;
}

body.dark .speech-summary-grid article,
:root[data-theme="dark"] .speech-summary-grid article {
  background: rgba(19, 32, 48, 0.96);
  border-color: rgba(126, 154, 190, 0.38);
}

body.dark .speech-summary-grid strong,
:root[data-theme="dark"] .speech-summary-grid strong {
  color: #f8fbff;
}

:root[data-theme="dark"] #page-speech-stats .shop-info-strip,
:root[data-theme="dark"] #page-speech-stats .speech-record-head {
  background: linear-gradient(135deg, rgba(26, 41, 59, 0.96), rgba(15, 85, 90, 0.34));
  border-color: rgba(148, 163, 184, 0.38);
  color: #f8fbff;
}

:root[data-theme="dark"] #page-speech-stats .speech-record-head span,
:root[data-theme="dark"] #page-speech-stats .shop-info-strip span {
  color: #d8e4f2;
}

:root[data-theme="dark"] #page-speech-stats .shop-search-field {
  background: rgba(15, 27, 44, 0.98);
  border-color: rgba(125, 153, 188, 0.42);
  color: #d8e4f2;
}

:root[data-theme="dark"] #page-speech-stats .shop-search-field input {
  color: #f8fbff;
  background: transparent;
}

:root[data-theme="dark"] #page-speech-stats .shop-search-field input::placeholder {
  color: #9fb3ca;
}

:root[data-theme="dark"] #page-speech-stats .shop-table-shell {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.34);
}

:root[data-theme="dark"] #page-speech-stats .shop-data-table th {
  background: rgba(30, 41, 59, 0.94);
  color: #f8fbff;
}

:root[data-theme="dark"] #page-speech-stats .shop-data-table tbody tr {
  background: rgba(18, 34, 54, 0.92);
}

:root[data-theme="dark"] #page-speech-stats .shop-data-table tbody tr:nth-child(even) {
  background: rgba(17, 47, 56, 0.82);
}

:root[data-theme="dark"] #page-speech-stats .shop-data-table td {
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fbff;
}

@media (max-width: 760px) {
  #page-points-shop {
    min-width: 0;
  }

  #page-points-shop .panel {
    border-radius: 8px;
    overflow: hidden;
  }

  .shop-select-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .shop-select-bar .feature-select-field,
  .shop-select-bar .feature-select-state,
  .shop-select-bar .button {
    width: 100%;
    min-width: 0;
  }

  .shop-select-bar .pretty-select {
    width: 100%;
  }

  .shop-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    border-radius: 10px;
    background: transparent;
    gap: 8px;
    border: 0;
  }

  .shop-tabs button {
    min-width: 0;
    width: 100%;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--text);
    background: linear-gradient(135deg, #ffffff, #f2f8ff);
  }

  .shop-tabs button.active {
    color: #ffffff;
    border-color: transparent;
  }

  .points-shop-settings-grid,
  .shop-editor-grid,
  .shop-lottery-grid,
  .shop-lottery-settings {
    grid-template-columns: 1fr;
  }

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

  .speech-period-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .speech-period-tabs button {
    padding: 9px 8px;
    font-size: 12px;
  }

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

  .shop-info-strip,
  .shop-record-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 12px;
  }

  .shop-record-head .action-row,
  .settings-actions,
  .left-actions,
  .compact-pager {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .shop-record-head .action-row .button,
  .settings-actions .button,
  .left-actions .button,
  .compact-pager .button {
    width: 100%;
  }

  .shop-search-field,
  .shop-search-field input {
    width: 100%;
  }

  .shop-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .shop-data-table {
    min-width: 0;
    display: block;
  }

  .shop-data-table thead {
    display: none;
  }

  .shop-data-table tbody {
    display: grid;
    gap: 10px;
  }

  .shop-data-table tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d8e3ee;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
  }

  .shop-data-table td {
    border: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }

  .shop-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }

  .shop-data-table td:empty::before {
    content: "";
  }

  .shop-data-table td .action-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .shop-data-table td .button {
    width: 100%;
  }

  .shop-editor-card,
  .points-shop-form.simple {
    min-width: 0;
  }

  .prize-field textarea {
    min-height: 180px;
  }

  body.dark .shop-tabs button {
    color: #f8fbff;
    background: rgba(29, 43, 60, 0.98);
    border-color: rgba(148, 163, 184, 0.36);
  }

  body.dark .shop-tabs button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
  }

  body.dark .shop-data-table tr {
    background: rgba(29, 43, 60, 0.86);
    border-color: rgba(148, 163, 184, 0.3);
  }
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  color: #2563eb;
  background: #eaf1ff;
}

.status.warn {
  color: #b7791f;
  background: #fff4d8;
}

.status.info {
  color: #2563eb;
  background: #eaf1ff;
}

.status.good {
  color: #0f9f6e;
  background: #e8f7ef;
}

.status.danger-soft {
  color: #d92d20;
  background: #fde8e7;
}

.button.mini {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}

.ticket-modal.hidden {
  display: none !important;
}

.ticket-dialog {
  width: min(860px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 18px;
  display: grid;
  gap: 14px;
}

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

.ticket-create-fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
}

.ticket-dialog .form-field {
  gap: 7px;
}

.ticket-dialog .form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.ticket-dialog .form-field select {
  min-height: 42px;
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 13px;
  line-height: 42px;
}

.ticket-detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #475467;
  font-size: 13px;
}

.ticket-thread {
  display: grid;
  gap: 12px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 4px;
}

.ticket-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
}

.ticket-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2f80d1;
  color: #fff;
  font-weight: 900;
}

.ticket-message.admin .ticket-avatar {
  background: #0f9f94;
}

.ticket-message-body {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fbff;
}

.ticket-message.admin .ticket-message-body {
  background: #f1fffb;
  border-color: #bfe7dd;
}

.ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #475467;
  font-size: 13px;
}

.ticket-message-body p {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-message-body small {
  color: #64748b;
}

.ticket-upload {
  min-height: 42px;
  border: 1px dashed #9ab6d8;
  border-radius: 8px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 900;
  color: #2563eb;
}

.ticket-upload input {
  display: none;
}

.ticket-image-preview,
.ticket-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-image-preview span {
  border-radius: 6px;
  background: #eef4ff;
  padding: 6px 10px;
  color: #1d4ed8;
  font-size: 12px;
}

.ticket-image-button {
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  padding: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #fff4fb 100%);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  position: relative;
  isolation: isolate;
}

.ticket-image-button:hover {
  transform: translateY(-2px);
  border-color: #8bb8ff;
  filter: saturate(1.05);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12), 0 0 0 4px rgba(236, 72, 153, 0.08);
}

.ticket-image-button:active {
  transform: translateY(1px) scale(0.98);
}

.ticket-image-button img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.detail-stack {
  display: grid;
  gap: 16px;
}

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

.summary-item {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  display: grid;
  gap: 7px;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.summary-item strong {
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hosted-area {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.qr-wrap {
  min-height: 284px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 18px;
}

.qr-card {
  width: 226px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.qr-card canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: none;
}

.qr-card.has-code canvas { display: block; }

.qr-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background:
    linear-gradient(90deg, #17202a 10px, transparent 10px) 0 0 / 24px 24px,
    linear-gradient(#17202a 10px, transparent 10px) 0 0 / 24px 24px,
    #ffffff;
  opacity: 0.13;
}

.qr-card.has-code .qr-placeholder { display: none; }

.qr-overlay {
  position: absolute;
  inset: 12px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #344054;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.45;
  padding: 18px;
}

.qr-card.has-code .qr-overlay { display: none; }

.spaced { margin-top: 16px; }

.reverse-url {
  min-height: 46px;
  padding: 12px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  color: #175cd3;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.config-block {
  min-height: 214px;
  padding: 14px;
  border-radius: 8px;
  background: #101828;
  color: #e4e7ec;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.log-list {
  min-height: 92px;
  max-height: 152px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.log-list.large {
  min-height: 520px;
  max-height: calc(100vh - 190px);
}

.log-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e7edf3;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
}

.runtime-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.runtime-summary {
  color: #344054;
  font-size: 13px;
  line-height: 1.4;
}

.runtime-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.runtime-actions .button {
  min-width: 78px;
  padding: 0 14px;
}

.runtime-tabs {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8eef5;
  margin: 0 auto 18px;
}

.runtime-tab {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  font-weight: 760;
}

.runtime-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0f9f6e);
}

.runtime-panel {
  max-width: 1220px;
  margin: 0 auto;
}

.runtime-head {
  align-items: flex-start;
}

.runtime-list {
  min-height: 548px;
  max-height: 548px;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fbfcfe;
}

.pagination {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.pagination .button {
  width: 88px;
}

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

.pagination span {
  min-width: 92px;
  text-align: center;
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}

.runtime-columns {
  display: grid;
  grid-template-columns: 86px 54px 156px 132px 58px 150px minmax(0, 1fr) 68px;
  gap: 12px;
  align-items: center;
  padding: 0 24px 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.runtime-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: 86px 54px 156px 132px 58px 150px minmax(0, 1fr) 68px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.runtime-time {
  color: #101828;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.runtime-actor,
.runtime-receiver,
.runtime-target,
.runtime-source,
.runtime-kind {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 8px;
  background: #eef5ff;
  color: #0f2f6f;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-receiver {
  background: #f2f4f7;
  color: #344054;
}

.runtime-target {
  background: #c7d2ee;
}

.runtime-source {
  background: #eef5ff;
  color: #175cd3;
}

.runtime-kind {
  border: 1px solid #bed3ff;
  background: #f6faff;
  color: #175cd3;
}

.runtime-message {
  min-width: 0;
  color: #101828;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
}

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

.message-image {
  width: 72px;
  height: 72px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
  background: #f8fafc;
}

.message-image-missing {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
}

.runtime-view {
  height: 30px;
  border: 1px solid #bcd0ff;
  border-radius: 8px;
  background: #f6faff;
  color: #175cd3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.runtime-detail {
  grid-column: 1 / -1;
  display: none;
  margin-top: -2px;
  padding: 12px;
  border-radius: 8px;
  background: #101828;
  color: #e4e7ec;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.runtime-row.expanded .runtime-detail {
  display: block;
}

.log-settings-panel {
  max-width: 1180px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.notice-box {
  min-height: 50px;
  border: 1px solid #8bb2ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 18px;
  color: #175cd3;
  background: linear-gradient(135deg, #edf4ff, #e8f7f4);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.settings-section {
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  margin-top: 16px;
}

.settings-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.2;
}

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

.setting-switch {
  min-height: 76px;
  border: 1px solid #cfe4df;
  border-radius: 8px;
  background: #eefcf8;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "switch title"
    "switch desc";
  align-items: center;
  gap: 2px 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.setting-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-switch > span {
  grid-area: switch;
  width: 45px;
  height: 25px;
  border-radius: 999px;
  position: relative;
  background: #cbd5e1;
  transition: background 0.16s ease;
}

.setting-switch > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.22);
  transition: transform 0.16s ease;
}

.setting-switch input:checked + span {
  background: linear-gradient(135deg, #2563eb, #0f9f8f);
}

.setting-switch input:checked + span::after {
  transform: translateX(20px);
}

.setting-switch strong {
  grid-area: title;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.setting-switch em {
  grid-area: desc;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.setting-switch:has(input:not(:checked)) {
  border-color: #d8dee8;
  background: #f5f7fa;
}

.command-center-panel {
  width: min(100%, 1360px);
  max-width: none;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.command-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 8px;
  color: #0f3b3a;
  background: linear-gradient(135deg, #ecfdf5 0%, #eef6ff 100%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.command-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbff 55%, #f1fffb 100%);
}

.command-search,
.command-module-select {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.command-search:focus-within,
.command-module-select:focus-within {
  border-color: #8bb8ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
  transform: translateY(-1px);
}

.command-search svg {
  width: 17px;
  height: 17px;
  color: #64748b;
}

.command-search input,
.command-module-select select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #101828;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.command-module-select span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.command-filter-meta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 8px;
  color: #0f766e;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.command-table-wrap {
  margin-top: 14px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  overflow: auto;
  background: #ffffff;
}

.command-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.command-table th:nth-child(1),
.command-table td:nth-child(1) {
  width: 108px;
}

.command-table th:nth-child(2),
.command-table td:nth-child(2) {
  width: 170px;
}

.command-table th:nth-child(4),
.command-table td:nth-child(4) {
  width: 120px;
}

.command-table th:nth-child(5),
.command-table td:nth-child(5) {
  width: 380px;
}

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

.command-table th {
  color: #344054;
  background: #f3f8fb;
  font-weight: 900;
}

.command-table tbody tr {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  transition: background 0.16s ease;
}

.command-table tbody tr:hover {
  background: linear-gradient(135deg, #f5fbff 0%, #f0fffa 100%);
}

.command-table td strong {
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.command-module-badge,
.command-permission {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.command-module-badge {
  border: 1px solid #bdd4ff;
  color: #175cd3;
  background: #f3f8ff;
}

.command-permission {
  border: 1px solid rgba(20, 184, 166, 0.22);
  color: #047857;
  background: #ecfdf5;
}

.command-example-cell {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.command-example-cell code {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #d9e7ff;
  border-radius: 8px;
  color: #175cd3;
  background: #f3f8ff;
  font-family: "NSimSun", "新宋体", "SimSun", "宋体", "Microsoft YaHei", serif;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.command-section {
  margin-top: 16px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.command-section-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #e5edf5;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbff 55%, #f1fff9 100%);
}

.command-section-head strong {
  display: block;
  color: #101828;
  font-size: 17px;
  font-weight: 900;
}

.command-section-head em {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.command-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.command-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.09);
}

.command-card strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.command-card em {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.command-card code {
  display: inline-flex;
  max-width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #d9e7ff;
  border-radius: 8px;
  color: #175cd3;
  background: #f3f8ff;
  font-family: "NSimSun", "新宋体", "SimSun", "宋体", "Microsoft YaHei", serif;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.copy-command.copied {
  border-color: rgba(20, 184, 166, 0.48);
  color: #047857;
  background: linear-gradient(135deg, #ecfdf5, #e0f2fe);
}

.command-variable-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed #b7cdf8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff 0%, #f5fffc 100%);
}

.command-variable-box strong {
  display: block;
  margin-bottom: 10px;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}

.command-variable-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-variable-box span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #bdd4ff;
  border-radius: 999px;
  color: #175cd3;
  background: #f3f8ff;
  font-size: 12px;
  font-weight: 900;
}

.compact-settings {
  max-width: 420px;
}

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

.number-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.number-field input {
  width: 160px;
  height: 44px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  font-weight: 900;
}

.number-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.number-field em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.group-auth-dashboard {
  display: grid;
  gap: 16px;
}

.group-auth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(15, 159, 110, 0.15), transparent 30%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  position: relative;
  overflow: hidden;
}

.group-auth-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: #0f766e;
  background: #e7f8f5;
  font-size: 12px;
  font-weight: 900;
}

.auth-wallet-card {
  border: 1px solid rgba(15, 159, 110, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(236, 255, 249, 0.96), rgba(248, 251, 255, 0.96));
  padding: 18px;
  display: grid;
  gap: 6px;
  box-shadow: 0 16px 32px rgba(15, 159, 110, 0.12);
  position: relative;
  overflow: hidden;
}

.auth-wallet-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 159, 110, 0.18), transparent 68%);
}

.auth-wallet-card span,
.auth-wallet-card small {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.auth-wallet-card strong {
  font-size: 26px;
  letter-spacing: 0;
}

.group-auth-layout {
  display: grid;
  grid-template-columns: minmax(370px, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: start;
}

.panel-head.compact {
  min-height: 0;
}

.panel-head.compact h3 {
  margin: 0;
  font-size: 18px;
}

.auth-form-panel .panel-body {
  display: grid;
  gap: 16px;
}

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

.auth-input-card {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px 15px 15px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input-card:focus-within {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.08);
}

.auth-input-card span {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-action-row {
  margin-top: 2px;
  gap: 12px;
}

.auth-action-row .button {
  flex: 1;
  min-height: 50px;
  border-radius: 14px;
}

.auth-action-row .button.primary {
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.auth-action-row .button.success {
  box-shadow: 0 14px 28px rgba(15, 159, 110, 0.18);
}

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

.auth-package-card {
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px 14px 15px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-package-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.09);
}

.auth-package-card strong {
  font-size: 15px;
  color: var(--text);
}

.auth-package-card span,
.auth-package-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.auth-package-card.active {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.12);
  background:
    linear-gradient(180deg, #f8fbff, #eef5ff);
}

.package-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eaf1ff;
  margin-bottom: 2px;
}

.auth-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.auth-renew-item {
  display: grid;
  gap: 8px;
}

.auth-list-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.auth-row {
  min-height: 76px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 92px 96px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
}

.auth-group-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-group-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.auth-group-main > div,
.auth-expire {
  display: grid;
  gap: 4px;
}

.auth-group-main em,
.auth-expire span {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.auth-expire strong {
  font-size: 14px;
  line-height: 1.25;
}

.auth-renew-toggle {
  min-width: 84px;
  justify-content: center;
}

.auth-renew-panel {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.04);
}

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

.auth-renew-head strong {
  font-size: 15px;
}

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

.auth-renew-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 12px;
}

.auth-renew-actions {
  justify-content: flex-start;
}

.renew-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.renew-payment-dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.renew-payment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #e6edf5;
}

.renew-payment-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.renew-payment-head .eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.renew-payment-body {
  padding: 22px;
}

.renew-step-label {
  margin-bottom: 12px;
  color: #16233b;
  font-size: 16px;
  font-weight: 700;
}

.renew-package-options {
  display: grid;
  gap: 10px;
}

.renew-package-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.renew-package-option:has(input:checked) {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.renew-package-option input {
  accent-color: #2563eb;
}

.renew-package-option span {
  display: grid;
  gap: 5px;
  flex: 1;
}

.renew-package-option em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.renew-package-option > i {
  color: #9aabc0;
}

.renew-payment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.renew-invoice {
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #fbfdff;
}

.renew-invoice-brand {
  padding: 15px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f9f87);
  font-size: 16px;
  font-weight: 700;
}

.renew-invoice-status {
  padding: 14px 16px 0;
  color: #e67e22;
  font-weight: 700;
}

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

.renew-invoice-grid div {
  display: grid;
  gap: 5px;
}

.renew-invoice-grid span,
.renew-invoice-note {
  color: var(--muted);
  font-size: 13px;
}

.renew-invoice-price {
  color: #dc2626;
  font-size: 18px;
}

.renew-invoice-note {
  padding: 12px 16px;
  border-top: 1px solid #e6edf5;
}

.renew-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 8px 10px;
  text-align: center;
}

.renew-success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #16a34a;
}

.renew-success h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.renew-success p {
  margin: 0 0 8px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .renew-payment-modal {
    padding: 10px;
  }

  .renew-payment-body,
  .renew-payment-head {
    padding: 16px;
  }

  .renew-invoice-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .renew-payment-actions {
    flex-wrap: wrap;
  }
}

.auth-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed #c7d4e2;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.welcome-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  border-color: rgba(20, 184, 166, 0.16);
  background:
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff, #f7fbff 54%, #f2fffb);
}

.welcome-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #2563eb, #14b8a6);
}

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

.welcome-config-card {
  min-width: 0;
}

.feature-select-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(220px, 320px) minmax(120px, 150px) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 184, 166, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.96));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

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

.feature-select-title strong {
  font-size: 18px;
}

.feature-select-title em,
.feature-select-field span,
.feature-select-state em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.feature-select-field {
  position: relative;
  display: grid;
  gap: 7px;
}

.feature-select-field select {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--text);
  background-color: #ffffff;
  min-width: 0;
}

.native-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pretty-select {
  position: relative;
  min-width: 0;
}

.pretty-select-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid #d6e1ed;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 184, 166, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pretty-select-button.compact {
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  min-height: 42px;
  padding: 8px 10px;
}

.pretty-select-button:hover,
.pretty-select.open .pretty-select-button {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.1);
}

.pretty-select-button > svg {
  color: #8da0b6;
  transition: transform 0.16s ease;
}

.pretty-select.open .pretty-select-button > svg {
  transform: rotate(180deg);
}

.pretty-select-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, #e8f1ff, #e8fff8);
  color: #0f9f6e;
}

.pretty-select-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pretty-select-avatar.empty {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #ffffff;
}

.pretty-select-mini-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #0f9f6e;
  background: rgba(20, 184, 166, 0.12);
}

.pretty-select-text,
.pretty-select-option span {
  min-width: 0;
}

.pretty-select-text strong,
.pretty-select-text em,
.pretty-select-option strong,
.pretty-select-option em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pretty-select-text strong,
.pretty-select-option strong {
  font-size: 13px;
  font-weight: 900;
}

.pretty-select-text em,
.pretty-select-option em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pretty-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
}

.pretty-select.open .pretty-select-menu {
  display: grid;
  animation: dropdownIn 0.16s ease both;
}

.pretty-select-label {
  padding: 2px 4px 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pretty-select-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.pretty-select-option.compact {
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 40px;
  padding: 8px 10px;
}

.pretty-select-option:hover,
.pretty-select-option.active {
  border-color: rgba(37, 99, 235, 0.28);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.1)),
    #f8fbff;
  transform: translateY(-1px);
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-select-state {
  display: grid;
  gap: 5px;
  min-height: 42px;
  align-content: center;
  padding: 9px 12px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 12px;
  background: rgba(236, 253, 245, 0.82);
}

.feature-select-state span {
  color: #047857;
  font-weight: 900;
}

.feature-console-top {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 0.75fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.feature-context-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 98px;
  padding: 15px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 184, 166, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.feature-context-card.select-card {
  display: grid;
  align-content: center;
  gap: 8px;
}

.feature-context-card small,
.feature-context-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.feature-context-card strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}

.feature-context-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #0f9f6e;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.welcome-config-card textarea {
  min-height: 146px;
  resize: vertical;
}

.welcome-variable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.variable-chip {
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
    #ffffff;
  color: #175cd3;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.variable-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.12);
}

.welcome-image-upload {
  display: grid;
  grid-template-columns: 22px auto;
  place-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(20, 184, 166, 0.06));
  color: #175cd3;
  font-weight: 900;
  cursor: pointer;
}

.welcome-image-upload input {
  display: none;
}

.welcome-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.welcome-image-preview img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.name-card-preview {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, #f4fbff 0%, #ecfdf5 100%);
}

.name-card-preview span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.name-card-preview strong {
  width: fit-content;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.10);
}

:root[data-theme="dark"] .name-card-preview {
  background: #1a293b;
  border-color: var(--line);
  color: #d8e4f2;
}

:root[data-theme="dark"] .name-card-preview span {
  color: var(--muted);
}

:root[data-theme="dark"] .name-card-preview strong {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(128, 170, 255, 0.34);
  color: #f8fbff;
}

.welcome-switch {
  min-height: 86px;
}

.welcome-switch .danger-hint {
  color: #dc2626;
  font-weight: 800;
}

.recall-layout {
  display: grid;
  gap: 16px;
}

.recall-panel {
  box-shadow: var(--shadow);
}

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

.recall-combo-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.86), rgba(236, 253, 245, 0.78));
}

.recall-switch-grid > .recall-combo-start {
  grid-column: 1;
}

.recall-combo-card .setting-switch {
  min-height: 74px;
}

.recall-combo-card .field {
  min-width: 0;
}

.recall-prompt-field {
  margin-top: 14px;
}

.danger-text {
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 13px;
  font-weight: 900;
}

.welcome-group-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.welcome-group-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.welcome-group-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.1);
}

.welcome-group-item.active {
  border-color: rgba(20, 184, 166, 0.42);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(20, 184, 166, 0.1)),
    #ffffff;
}

.welcome-group-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.18);
}

.welcome-group-item strong,
.welcome-group-item em {
  display: block;
}

.welcome-group-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.spaced-panel {
  margin-top: 16px;
}

.cq-code {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(15, 159, 110, 0.96)),
    #17202a;
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  z-index: 150;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}

.confirm-card {
  width: min(420px, 94vw);
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32%),
    #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
}

.confirm-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.confirm-card h3 {
  margin: 0;
  font-size: 18px;
}

.confirm-card p {
  margin: 8px 0 0;
  color: #475467;
  line-height: 1.7;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .announcement-item,
:root[data-theme="dark"] .ticket-table-wrap,
:root[data-theme="dark"] .ticket-dialog,
:root[data-theme="dark"] .confirm-card,
:root[data-theme="dark"] .auth-row,
:root[data-theme="dark"] .auth-input-card,
:root[data-theme="dark"] .auth-wallet-card,
:root[data-theme="dark"] .welcome-group-item,
:root[data-theme="dark"] .instance-item,
:root[data-theme="dark"] .feature-select-bar,
:root[data-theme="dark"] .feature-select-state,
:root[data-theme="dark"] .runtime-row,
:root[data-theme="dark"] .log-modal-card,
:root[data-theme="dark"] .summary-item,
:root[data-theme="dark"] .settings-section,
:root[data-theme="dark"] .command-section,
:root[data-theme="dark"] .command-card,
:root[data-theme="dark"] .auth-package-card,
:root[data-theme="dark"] .welcome-config-card,
:root[data-theme="dark"] .feature-context-card {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .landing-hero,
:root[data-theme="dark"] .home-hero {
  background:
    linear-gradient(135deg, rgba(93, 141, 255, 0.16), rgba(34, 197, 143, 0.10)),
    var(--panel);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .landing-preview,
:root[data-theme="dark"] .home-stat,
:root[data-theme="dark"] .home-card,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-tabs {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .landing-brand strong,
:root[data-theme="dark"] .landing-copy h1,
:root[data-theme="dark"] .home-copy h2,
:root[data-theme="dark"] .home-stat strong,
:root[data-theme="dark"] .home-card h3,
:root[data-theme="dark"] .auth-head h2,
:root[data-theme="dark"] .remember-row {
  color: var(--text);
}

:root[data-theme="dark"] .landing-brand span,
:root[data-theme="dark"] .landing-copy p,
:root[data-theme="dark"] .home-copy p,
:root[data-theme="dark"] .feature-text,
:root[data-theme="dark"] .home-stat span,
:root[data-theme="dark"] .auth-head p {
  color: var(--muted);
}

:root[data-theme="dark"] .home-kicker {
  background: rgba(34, 197, 143, 0.15);
  color: #8ff7d3;
}

:root[data-theme="dark"] .auth-tab {
  background: transparent;
  color: var(--muted);
}

:root[data-theme="dark"] .auth-tab.active {
  color: #ffffff;
  border-color: rgba(128, 170, 255, 0.42);
  background: linear-gradient(135deg, #2b7cf6, #12b8a6);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .captcha-question,
:root[data-theme="dark"] .icon-button {
  background: linear-gradient(180deg, #26384d, #1d2c3f);
  border-color: var(--line);
  color: #dce9fb;
}

:root[data-theme="dark"] .panel-head,
:root[data-theme="dark"] .ticket-table th,
:root[data-theme="dark"] .command-table th,
:root[data-theme="dark"] .command-section-head {
  background: #1b2938;
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .nav-parent,
:root[data-theme="dark"] .nav-item {
  color: #d8e4f2;
}

:root[data-theme="dark"] .nav-parent:hover,
:root[data-theme="dark"] .nav-item:hover {
  color: #ffffff;
  background: rgba(93, 141, 255, 0.13);
}

:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .nav-group.active .nav-parent {
  color: #f8fbff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(20, 184, 166, 0.18));
  border-color: rgba(147, 197, 253, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 22px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .nav-group.active .nav-parent .nav-arrow,
:root[data-theme="dark"] .nav-item.active svg,
:root[data-theme="dark"] .nav-group.active .nav-parent svg {
  color: #bfdbfe;
  stroke: currentColor;
}

:root[data-theme="dark"] .nav-section,
:root[data-theme="dark"] .field label,
:root[data-theme="dark"] .hint,
:root[data-theme="dark"] .feature-select-title em,
:root[data-theme="dark"] .feature-select-field span,
:root[data-theme="dark"] .feature-select-state em,
:root[data-theme="dark"] .pretty-select-text em,
:root[data-theme="dark"] .pretty-select-option em,
:root[data-theme="dark"] .setting-switch em {
  color: #c7d4e4;
}

:root[data-theme="dark"] .field label,
:root[data-theme="dark"] .setting-switch strong,
:root[data-theme="dark"] .panel-head h2,
:root[data-theme="dark"] .panel-head h3,
:root[data-theme="dark"] .panel-title,
:root[data-theme="dark"] .feature-select-title strong,
:root[data-theme="dark"] .pretty-select-text strong,
:root[data-theme="dark"] .pretty-select-option strong {
  color: #ffffff;
}

:root[data-theme="dark"] .ticket-table td,
:root[data-theme="dark"] .runtime-row,
:root[data-theme="dark"] .auth-row,
:root[data-theme="dark"] .summary-item,
:root[data-theme="dark"] .welcome-group-item,
:root[data-theme="dark"] .instance-item,
:root[data-theme="dark"] .feature-select-bar,
:root[data-theme="dark"] .settings-section,
:root[data-theme="dark"] .command-table td,
:root[data-theme="dark"] .command-table tbody tr,
:root[data-theme="dark"] .command-card {
  border-color: var(--line);
}

:root[data-theme="dark"] .feature-select-state span {
  color: #6ee7b7;
}

:root[data-theme="dark"] .setting-switch {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(29, 43, 60, 0.96));
  border-color: rgba(45, 212, 191, 0.26);
  color: var(--text);
}

:root[data-theme="dark"] .setting-switch strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .setting-switch em {
  color: #c7d4e4;
}

:root[data-theme="dark"] .setting-switch:has(input:not(:checked)) {
  background: #1a293b;
  border-color: var(--line);
}

:root[data-theme="dark"] .recall-combo-card {
  background: linear-gradient(135deg, rgba(19, 34, 52, 0.96), rgba(13, 48, 52, 0.88));
  border-color: rgba(126, 154, 190, 0.38);
}

:root[data-theme="dark"] .pretty-select-button,
:root[data-theme="dark"] .pretty-select-menu {
  background: rgba(29, 43, 60, 0.98);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .pretty-select-option:hover,
:root[data-theme="dark"] .pretty-select-option.active {
  background: rgba(93, 141, 255, 0.22);
  border-color: rgba(96, 165, 250, 0.34);
}

:root[data-theme="dark"] .variable-chip,
:root[data-theme="dark"] .welcome-image-upload {
  background: rgba(93, 141, 255, 0.20);
  border-color: rgba(128, 170, 255, 0.42);
  color: #f8fbff;
}

:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .ticket-message-body,
:root[data-theme="dark"] .ticket-upload {
  background: #1a293b;
  border-color: var(--line);
  color: #d8e4f2;
}

:root[data-theme="dark"] .button.secondary {
  background: linear-gradient(180deg, #26384d, #1d2c3f);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .subtitle,
:root[data-theme="dark"] .ticket-table td p,
:root[data-theme="dark"] .announcement-item p,
:root[data-theme="dark"] .home-card p {
  color: var(--muted);
}

:root[data-theme="dark"] .welcome-image-preview,
:root[data-theme="dark"] .command-table-wrap,
:root[data-theme="dark"] .command-filter-bar,
:root[data-theme="dark"] .command-variable-box,
:root[data-theme="dark"] .command-tip {
  background: #1a293b;
  border-color: var(--line);
  color: #d8e4f2;
}

:root[data-theme="dark"] .command-table tbody tr,
:root[data-theme="dark"] .command-card,
:root[data-theme="dark"] .log-row,
:root[data-theme="dark"] .runtime-row,
:root[data-theme="dark"] .summary-item,
:root[data-theme="dark"] .instance-item,
:root[data-theme="dark"] .auth-package-card,
:root[data-theme="dark"] .feature-context-card {
  background: #162435;
  color: var(--text);
}

:root[data-theme="dark"] .command-table tbody tr:hover,
:root[data-theme="dark"] .command-card:hover,
:root[data-theme="dark"] .log-row:hover,
:root[data-theme="dark"] .runtime-row:hover,
:root[data-theme="dark"] .instance-item:hover,
:root[data-theme="dark"] .auth-package-card:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.1));
}

:root[data-theme="dark"] .instance-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(20, 184, 166, 0.12));
  border-color: rgba(147, 197, 253, 0.46);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .command-search,
:root[data-theme="dark"] .command-module-select,
:root[data-theme="dark"] .command-search input,
:root[data-theme="dark"] .command-module-select select,
:root[data-theme="dark"] .number-field input,
:root[data-theme="dark"] .welcome-config-card textarea,
:root[data-theme="dark"] .feature-select-field select {
  background: #1a293b;
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .command-table td strong,
:root[data-theme="dark"] .command-card strong,
:root[data-theme="dark"] .command-section-head strong,
:root[data-theme="dark"] .command-variable-box strong,
:root[data-theme="dark"] .auth-package-card strong,
:root[data-theme="dark"] .feature-context-card strong,
:root[data-theme="dark"] .settings-section h3,
:root[data-theme="dark"] .number-field span,
:root[data-theme="dark"] .runtime-time,
:root[data-theme="dark"] .runtime-message,
:root[data-theme="dark"] .instance-name,
:root[data-theme="dark"] .summary-item strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .command-card em,
:root[data-theme="dark"] .command-section-head em,
:root[data-theme="dark"] .command-module-select span,
:root[data-theme="dark"] .number-field em,
:root[data-theme="dark"] .auth-package-card span,
:root[data-theme="dark"] .auth-package-card em,
:root[data-theme="dark"] .feature-context-card small,
:root[data-theme="dark"] .feature-context-card em,
:root[data-theme="dark"] .summary-item span,
:root[data-theme="dark"] .instance-meta,
:root[data-theme="dark"] .runtime-summary {
  color: #c7d4e4;
}

:root[data-theme="dark"] .reverse-url {
  background: #1a293b;
  border-color: var(--line);
  color: #93c5fd;
}

:root[data-theme="dark"] .runtime-actor,
:root[data-theme="dark"] .runtime-receiver,
:root[data-theme="dark"] .runtime-target,
:root[data-theme="dark"] .runtime-source,
:root[data-theme="dark"] .runtime-kind {
  background: rgba(93, 141, 255, 0.18);
  border-color: rgba(147, 197, 253, 0.28);
  color: #dbeafe;
}

:root[data-theme="dark"] #page-logs .runtime-row:hover {
  background: linear-gradient(135deg, rgba(35, 51, 74, 0.98), rgba(22, 65, 73, 0.94)) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  color: #f8fbff !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-time,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-message,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-text {
  color: #f8fbff !important;
}

:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-actor,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-receiver,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-target,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-source,
:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-kind {
  background: rgba(96, 165, 250, 0.26) !important;
  border-color: rgba(191, 219, 254, 0.36) !important;
  color: #eff6ff !important;
}

:root[data-theme="dark"] #page-logs .runtime-row:hover .runtime-view {
  background: linear-gradient(135deg, #253a56, #132b3f) !important;
  border-color: rgba(147, 197, 253, 0.5) !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] .command-card code,
:root[data-theme="dark"] .command-example-cell code,
:root[data-theme="dark"] .command-variable-box span {
  background: rgba(93, 141, 255, 0.18);
  border-color: rgba(147, 197, 253, 0.35);
  color: #dbeafe;
}

.image-viewer {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 46px 24px 24px;
  background: rgba(16, 24, 40, 0.78);
  z-index: 80;
}

.image-viewer.show {
  display: grid;
}

.image-viewer img {
  max-width: min(96vw, 1180px);
  max-height: 88vh;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.image-viewer-close {
  position: fixed;
  top: 16px;
  right: 20px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
}

.log-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.36);
  backdrop-filter: blur(7px);
  z-index: 70;
}

.log-modal.show {
  display: flex;
}

.log-modal-card {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.28);
  padding: 18px;
}

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

.log-modal-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

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

.modal-info {
  min-height: 58px;
  border: 1px solid #344054;
  border-radius: 8px;
  background: #4b5563;
  color: #ffffff;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.modal-info span {
  color: #d0d5dd;
  font-size: 12px;
}

.modal-info strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.modal-message {
  min-height: 46px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #344054;
  border-radius: 8px;
  background: #8a8f98;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-message .runtime-target {
  display: none;
}

.modal-raw {
  margin-top: 14px;
  border: 1px solid #344054;
  border-radius: 8px;
  background: #8a8f98;
  color: #ffffff;
}

.modal-raw summary {
  cursor: pointer;
  padding: 11px 12px;
  color: #c7e1ff;
  font-size: 13px;
  font-weight: 800;
}

.modal-raw pre {
  margin: 0;
  padding: 0 12px 12px;
  max-height: 260px;
  overflow: auto;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-page.hidden {
  display: none;
}

.auth-card {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(16, 24, 40, 0.28);
  padding: 18px;
}

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

.auth-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.auth-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #fff4fb 100%);
  color: #175cd3;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: #8bb8ff;
  filter: saturate(1.06);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.13), 0 0 0 4px rgba(236, 72, 153, 0.08);
}

.icon-button:active,
.icon-button.is-pressed {
  transform: translateY(1px) scale(0.98);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  margin-bottom: 14px;
}

.auth-tab {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
}

.auth-tab.active {
  color: #175cd3;
  border-color: #c7d7fe;
  background: #ffffff;
}

.auth-card .field {
  margin-top: 12px;
}

.inline-input,
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
  align-items: center;
}

.inline-input .button {
  width: 116px;
  padding: 0 10px;
}

.captcha-row {
  grid-template-columns: 150px minmax(0, 1fr);
}

.geetest-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: visible;
}

.geetest-box > * {
  width: 100% !important;
  max-width: 100%;
}

.geetest-box .geetest_captcha,
.geetest-box .geetest_holder,
.geetest-box .geetest_btn_svg,
.geetest-box .geetest_btn_click,
.geetest-box .geetest_mask,
.geetest-box .geetest_content,
.geetest-box .geetest_tip_container {
  width: 100% !important;
  max-width: 100% !important;
}

.payment-countdown {
  color: #d97706;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.payment-countdown.expired { color: #dc2626; }

.captcha-question {
  height: 42px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: var(--soft);
  color: #175cd3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
}

.captcha-image {
  width: 130px;
  height: 50px;
  max-height: 38px;
  object-fit: cover;
  border-radius: 6px;
}

.captcha-fallback.hidden,
.captcha-image.hidden {
  display: none;
}

.auth-error {
  min-height: 22px;
  margin-top: 10px;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-assist-row {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.remember-row {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}

.remember-row input {
  width: 16px;
  height: 16px;
}

.link-button {
  border: 0;
  background: transparent;
  color: #175cd3;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 0;
}

.auth-assist-row .link-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #2563eb;
  line-height: 28px;
  min-height: 28px;
}

.link-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

#page-drop-generator .drop-site-version-list {
  display: grid;
  gap: 14px;
}

#page-drop-generator .drop-site-version-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--soft));
}

#page-drop-generator .drop-site-version-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#page-drop-generator .drop-site-version-head strong {
  font-size: 15px;
}

#page-drop-generator textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .workspace,
  .hosted-area,
  .home-hero,
  .ticket-layout {
    grid-template-columns: 1fr;
  }

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

  .auth-row {
    grid-template-columns: minmax(0, 1fr) 190px 84px 90px;
  }
}

@media (max-width: 860px) {
  .app { padding: 10px; }

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

  .sidebar {
    min-height: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .landing-hero,
  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-copy h1 {
    font-size: 32px;
  }

  .auth-row,
  .auth-renew-grid {
    grid-template-columns: 1fr;
  }

  .auth-renew-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .mode-tabs,
  .button-row,
  .summary-grid,
  .home-grid,
  .log-row,
  .announcement-item,
  .ticket-reply-box {
    grid-template-columns: 1fr;
  }

  .home-card .button {
    width: 100%;
  }

  .home-copy h2 {
    font-size: 26px;
  }

  .runtime-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runtime-row {
    grid-template-columns: 1fr;
  }

  .runtime-columns {
    display: none;
  }

  .runtime-actions {
    width: 100%;
  }

  .runtime-actions .button {
    flex: 1 1 120px;
  }

  .front-account-area,
  .front-account-button {
    width: 100%;
  }

  .front-account-button {
    justify-content: space-between;
  }

  .front-account-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .log-modal-grid {
    grid-template-columns: 1fr;
  }

  .command-filter-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .command-search,
  .command-module-select,
  .command-filter-meta {
    width: 100%;
    max-width: 100%;
  }

  .command-module-select {
    min-height: 40px;
    padding: 0 10px;
  }

  .command-module-select select {
    height: 38px;
    max-width: 100%;
  }

  .command-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .command-table {
    min-width: 0;
    width: 100%;
    display: block;
  }

  .command-table thead {
    display: none;
  }

  .command-table tbody {
    display: grid;
    gap: 10px;
  }

  .command-table tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.05);
  }

  .command-table td {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 0;
    border: 0;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .command-table td::before {
    content: attr(data-label);
    color: #667085;
    font-size: 12px;
    font-weight: 900;
  }

  .command-table td[data-label="模块"] {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .command-table td[data-label="模块"]::before {
    flex: 0 0 48px;
  }

  .command-example-cell {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .command-example-cell code {
    width: 100%;
    min-width: 0;
  }

  .command-example-cell .button {
    width: 100%;
  }
}

@media (max-width: 860px) {
  html,
  body,
  .app,
  .layout,
  .main,
  .page,
  .panel,
  .panel-body {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .command-center-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }

  .command-center-panel .panel-head {
    padding: 12px;
  }

  .command-center-panel .panel-body {
    padding: 8px;
  }

  .command-filter-bar {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .command-search,
  .command-module-select,
  .command-filter-meta {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 0 9px;
    overflow: hidden;
  }

  .command-search input,
  .command-module-select select {
    height: 36px;
    font-size: 12px;
    max-width: 100%;
  }

  .command-tip,
  .command-variable-box {
    max-width: 100%;
    padding: 10px;
    overflow-wrap: anywhere;
  }

  .command-table-wrap,
  .command-table-wrap.scroll-x {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    border: 0;
    background: transparent;
  }

  .command-table {
    min-width: 0 !important;
    width: 100%;
    display: block;
  }

  .command-table thead {
    display: none;
  }

  .command-table tbody {
    display: grid;
    gap: 8px;
  }

  .command-table tbody tr {
    display: grid;
    gap: 7px;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: none;
  }

  .command-table td {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 7px;
    padding: 0;
    border: 0;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .command-table td::before {
    content: attr(data-label);
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .command-module-badge,
  .command-permission {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .command-example-cell {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .command-example-cell code {
    min-width: 0;
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .command-example-cell .button {
    width: 100%;
    min-height: 34px;
  }

  .points-module-grid,
  .points-module-body.compact-grid {
    grid-template-columns: 1fr;
  }

  .points-share-list {
    grid-template-columns: 1fr;
  }

  .points-share-picker-empty {
    max-width: 100%;
  }

  .points-share-actions .button {
    width: 100%;
  }

  .points-module-card {
    padding: 10px;
  }

  .points-module-card .setting-switch,
  .points-module-title {
    min-height: 68px;
  }

  .points-shop-title,
  .points-shop-card-head {
    display: grid;
  }

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

  .point-shop-row,
  .point-shop-row.order {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .point-shop-row-actions {
    justify-content: stretch;
  }

  .point-shop-row-actions .button {
    flex: 1;
  }
}

/* Compact Songti typography */
body {
  font-family: "NSimSun", "新宋体", "SimSun", "宋体", "Microsoft YaHei", serif;
  font-size: 14px;
}

h1 {
  font-size: 22px;
}

h2,
.auth-head h2,
.log-modal-head h2 {
  font-size: 18px;
}

h3,
.home-card h3,
.ticket-card h3,
.confirm-card h3,
.brand strong {
  font-size: 15px;
}

.subtitle,
.muted,
.field span,
.form-field span,
.section-label,
.ticket-table th,
.ticket-table td,
.runtime-row,
.modal-info,
.front-account-info span,
.front-account-info em,
.ticket-message-head,
.ticket-message-body small {
  font-size: 12px;
}

.button,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea,
.nav-parent,
.sub-nav button,
.front-account-button,
.theme-toggle,
.ticket-filter,
.pill,
.badge {
  font-size: 13px;
}

select option {
  background: #ffffff;
  color: #0f172a;
}

:root[data-theme="dark"] select option,
body.dark select option {
  background: #172438;
  color: #eef6ff;
}

:root[data-theme="dark"] select option:checked,
body.dark select option:checked {
  background: #2563eb;
  color: #ffffff;
}

.runtime-message,
.ticket-message-body p,
.home-card p,
.announcement-item p {
  font-size: 13px;
  line-height: 1.65;
}

/* Points shop polish */
#page-points-shop .shop-table-shell,
#page-points-shop .shop-editor-card,
#page-points-shop .point-manage-card,
#page-points-shop .points-shop-form.simple {
  color: var(--text);
}

#page-points-shop .shop-data-table td,
#page-points-shop .shop-data-table th,
#page-points-shop .shop-editor-card span,
#page-points-shop .shop-editor-card label,
#page-points-shop .point-manage-card span,
#page-points-shop .point-manage-card label {
  text-shadow: none;
}

body.dark #page-points-shop .panel,
body.dark #page-points-shop .shop-table-shell,
body.dark #page-points-shop .shop-editor-card,
body.dark #page-points-shop .point-manage-card,
body.dark #page-points-shop .points-shop-form.simple,
body.dark #page-points-shop .shop-lottery-grid .field,
body.dark #page-points-shop .points-shop-settings-grid .field,
body.dark #page-points-shop .points-shop-settings-grid .toggle-card {
  background: rgba(20, 31, 46, 0.94);
  border-color: rgba(125, 153, 188, 0.42);
  color: #eef6ff;
}

body.dark #page-points-shop .shop-data-table th {
  background: rgba(33, 48, 68, 0.98);
  color: #f8fbff;
}

body.dark #page-points-shop .shop-data-table tbody tr,
body.dark #page-points-shop .shop-data-table tr.clickable-row {
  background: rgba(17, 28, 43, 0.92);
}

body.dark #page-points-shop .shop-data-table tbody tr:nth-child(even),
body.dark #page-points-shop .shop-data-table tr.clickable-row:nth-child(even) {
  background: rgba(25, 39, 58, 0.92);
}

body.dark #page-points-shop .shop-data-table td {
  color: #f2f7ff;
  border-color: rgba(125, 153, 188, 0.28);
}

body.dark #page-points-shop .shop-data-table td::before,
body.dark #page-points-shop .field span,
body.dark #page-points-shop .muted {
  color: #c8d7ea;
}

body.dark #page-points-shop input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.dark #page-points-shop select,
body.dark #page-points-shop textarea {
  background: rgba(15, 28, 44, 0.98);
  border-color: rgba(145, 169, 200, 0.58);
  color: #f8fbff;
}

body.dark #page-points-shop input::placeholder,
body.dark #page-points-shop textarea::placeholder {
  color: #93a9c5;
}

body.dark #page-points-shop .shop-search-field {
  background: rgba(15, 28, 44, 0.98);
  border-color: rgba(145, 169, 200, 0.58);
}

body.dark #page-points-shop .shop-record-head,
body.dark #page-points-shop .shop-info-strip {
  background: linear-gradient(135deg, rgba(30, 46, 67, 0.95), rgba(21, 76, 76, 0.45));
  border-color: rgba(125, 153, 188, 0.45);
}

@media (max-width: 760px) {
  #page-points-shop {
    width: 100%;
    overflow-x: hidden;
  }

  #page-points-shop .panel-head {
    display: grid;
    gap: 12px;
  }

  #page-points-shop .shop-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #page-points-shop .shop-tabs button {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  #page-points-shop .shop-editor-grid,
  #page-points-shop .shop-lottery-grid,
  #page-points-shop .points-shop-settings-grid,
  #page-points-shop .shop-lottery-settings {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  #page-points-shop .shop-editor-card,
  #page-points-shop .point-manage-card,
  #page-points-shop .points-shop-form.simple {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border-radius: 10px;
  }

  #page-points-shop .shop-side-actions,
  #page-points-shop .shop-record-head .action-row,
  #page-points-shop .left-actions,
  #page-points-shop .settings-actions,
  #page-points-shop .compact-pager {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  #page-points-shop .point-manage-card .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  #page-points-shop .button,
  #page-points-shop .point-manage-card .button,
  #page-points-shop .shop-side-actions .button {
    width: 100%;
    min-width: 0;
  }

  #page-points-shop .shop-search-field {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  #page-points-shop .shop-search-field input {
    width: 100%;
    min-width: 0;
  }

  #page-points-shop .shop-data-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
  }

  #page-points-shop .shop-data-table td {
    display: grid;
    grid-template-columns: minmax(74px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    word-break: break-word;
  }

  #page-points-shop .shop-data-table td::before {
    white-space: nowrap;
  }

  #page-points-shop .shop-data-table td .action-row {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  #page-points-shop .shop-data-table td[data-label*="操作"] {
    grid-template-columns: 1fr;
  }

  #page-points-shop .field,
  #page-points-shop .field input,
  #page-points-shop .field select,
  #page-points-shop .field textarea {
    min-width: 0;
    width: 100%;
  }

  #page-points-shop .shop-record-head {
    overflow: hidden;
  }
}

/* Points shop night/mobile fix */
:root[data-theme="dark"] #page-points-shop .panel,
:root[data-theme="dark"] #page-points-shop .shop-table-shell,
:root[data-theme="dark"] #page-points-shop .shop-editor-card,
:root[data-theme="dark"] #page-points-shop .point-manage-card,
:root[data-theme="dark"] #page-points-shop .points-shop-form.simple,
:root[data-theme="dark"] #page-points-shop .points-shop-settings-grid .field,
:root[data-theme="dark"] #page-points-shop .points-shop-settings-grid .setting-switch,
:root[data-theme="dark"] #page-points-shop .shop-lottery-grid .field,
:root[data-theme="dark"] #page-points-shop .shop-lottery-settings,
:root[data-theme="dark"] #page-points-shop .shop-lottery-settings .field,
:root[data-theme="dark"] #page-points-shop .shop-lottery-settings .setting-switch {
  background: rgba(19, 32, 48, 0.96) !important;
  border-color: rgba(126, 154, 190, 0.42) !important;
  color: #eef6ff !important;
  box-shadow: none;
}

:root[data-theme="dark"] #page-points-shop .shop-data-table th {
  background: rgba(43, 58, 79, 0.98) !important;
  color: #f7fbff !important;
}

:root[data-theme="dark"] #page-points-shop .shop-data-table tr,
:root[data-theme="dark"] #page-points-shop .shop-data-table td {
  background: rgba(18, 30, 46, 0.96) !important;
  color: #eef6ff !important;
  border-color: rgba(126, 154, 190, 0.28) !important;
}

:root[data-theme="dark"] #page-points-shop .shop-data-table tbody tr:nth-child(even),
:root[data-theme="dark"] #page-points-shop .shop-data-table tr.clickable-row.selected {
  background: rgba(26, 41, 61, 0.96) !important;
}

:root[data-theme="dark"] #page-points-shop .shop-data-table strong,
:root[data-theme="dark"] #page-points-shop .shop-data-table b,
:root[data-theme="dark"] #page-points-shop .shop-editor-card strong,
:root[data-theme="dark"] #page-points-shop .point-manage-card strong {
  color: #ffffff !important;
}

:root[data-theme="dark"] #page-points-shop .muted,
:root[data-theme="dark"] #page-points-shop .field span,
:root[data-theme="dark"] #page-points-shop .shop-editor-card span,
:root[data-theme="dark"] #page-points-shop .point-manage-card span,
:root[data-theme="dark"] #page-points-shop .shop-data-table td::before {
  color: #bfd0e6 !important;
}

:root[data-theme="dark"] #page-points-shop input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] #page-points-shop select,
:root[data-theme="dark"] #page-points-shop textarea,
:root[data-theme="dark"] #page-points-shop .shop-search-field {
  background: rgba(13, 25, 40, 0.98) !important;
  border-color: rgba(145, 169, 200, 0.64) !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] #page-points-shop input::placeholder,
:root[data-theme="dark"] #page-points-shop textarea::placeholder {
  color: #9eb2cc !important;
}

:root[data-theme="dark"] #page-points-shop .shop-record-head,
:root[data-theme="dark"] #page-points-shop .shop-info-strip {
  background: linear-gradient(135deg, rgba(34, 50, 72, 0.98), rgba(18, 81, 78, 0.52)) !important;
  border-color: rgba(126, 154, 190, 0.46) !important;
  color: #f5fbff !important;
}

:root[data-theme="dark"] #page-points-shop .shop-tabs {
  background: rgba(15, 27, 43, 0.92) !important;
  border-color: rgba(126, 154, 190, 0.36) !important;
}

:root[data-theme="dark"] #page-points-shop .shop-tabs button {
  background: rgba(31, 46, 66, 0.95) !important;
  border-color: rgba(126, 154, 190, 0.24) !important;
  color: #dce9fb !important;
}

:root[data-theme="dark"] #page-points-shop .shop-tabs button:hover {
  background: rgba(42, 62, 88, 0.98) !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] #page-points-shop .shop-tabs button.active {
  background: linear-gradient(135deg, #2b7cf6, #12b8a6) !important;
  color: #ffffff !important;
}

#page-points-shop .compact-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 760px) {
  #page-points-shop .panel-body {
    padding: 12px;
  }

  #page-points-shop .shop-tab-panel {
    min-width: 0;
    overflow: hidden;
  }

  #page-points-shop .shop-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #page-points-shop .shop-tabs button {
    min-width: 0 !important;
    white-space: nowrap;
  }

  #page-points-shop .shop-record-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  #page-points-shop .shop-record-head .action-row {
    grid-template-columns: 1fr !important;
  }

  #page-points-shop .shop-editor-grid,
  #page-points-shop .shop-lottery-grid,
  #page-points-shop .points-shop-settings-grid,
  #page-points-shop .shop-lottery-settings,
  #page-points-shop .points-shop-form.simple {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
    min-width: 0;
  }

  #page-points-shop .shop-editor-card,
  #page-points-shop .point-manage-card,
  #page-points-shop .points-shop-form.simple,
  #page-points-shop .shop-table-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  #page-points-shop .shop-side-actions,
  #page-points-shop .settings-actions,
  #page-points-shop .left-actions,
  #page-points-shop .compact-pager {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  #page-points-shop .point-manage-card .settings-actions,
  #page-points-shop .point-manage-card .left-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #page-points-shop .shop-data-table,
  #page-points-shop .shop-data-table tbody {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px;
  }

  #page-points-shop .shop-data-table thead {
    display: none !important;
  }

  #page-points-shop .shop-data-table tr {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  #page-points-shop .shop-data-table td {
    display: grid !important;
    grid-template-columns: minmax(76px, 0.38fr) minmax(0, 1fr) !important;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    padding: 3px 0 !important;
    border: 0 !important;
    word-break: break-word;
  }

  #page-points-shop .shop-data-table td[data-label*="操作"],
  #page-points-shop .shop-data-table td[data-label*="功能"] {
    grid-template-columns: 1fr !important;
  }

  #page-points-shop .shop-data-table td .action-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
    width: 100%;
  }
}

/* Invite system records */
.invite-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.invite-record-head .shop-search-field {
  width: min(360px, 100%);
}

.invite-record-pager {
  margin-top: 12px;
  justify-content: center;
}

.invite-record-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

:root[data-theme="dark"] #page-invite-system .panel,
:root[data-theme="dark"] #page-invite-system .shop-table-shell,
:root[data-theme="dark"] #page-invite-system .shop-info-strip,
:root[data-theme="dark"] #page-invite-system .shop-record-head,
:root[data-theme="dark"] #page-invite-system .field,
:root[data-theme="dark"] #page-invite-system .setting-switch {
  background: rgba(19, 32, 48, 0.96) !important;
  border-color: rgba(126, 154, 190, 0.42) !important;
  color: #eef6ff !important;
}

:root[data-theme="dark"] #page-invite-system .shop-data-table th {
  background: rgba(43, 58, 79, 0.98) !important;
  color: #f7fbff !important;
}

:root[data-theme="dark"] #page-invite-system .shop-data-table tr,
:root[data-theme="dark"] #page-invite-system .shop-data-table td {
  background: rgba(18, 30, 46, 0.96) !important;
  color: #eef6ff !important;
  border-color: rgba(126, 154, 190, 0.28) !important;
}

:root[data-theme="dark"] #page-invite-system .shop-data-table tbody tr:nth-child(even) {
  background: rgba(26, 41, 61, 0.96) !important;
}

:root[data-theme="dark"] #page-invite-system .muted,
:root[data-theme="dark"] #page-invite-system .field span,
:root[data-theme="dark"] #page-invite-system .shop-data-table td::before {
  color: #bfd0e6 !important;
}

:root[data-theme="dark"] #page-invite-system input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] #page-invite-system select,
:root[data-theme="dark"] #page-invite-system textarea,
:root[data-theme="dark"] #page-invite-system .shop-search-field {
  background: rgba(13, 25, 40, 0.98) !important;
  border-color: rgba(145, 169, 200, 0.64) !important;
  color: #f8fbff !important;
}

@media (max-width: 760px) {
  #page-invite-system .invite-record-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #page-invite-system .invite-record-pager {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #page-invite-system .shop-data-table,
  #page-invite-system .shop-data-table tbody {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px;
  }

  #page-invite-system .shop-data-table thead {
    display: none !important;
  }

  #page-invite-system .shop-data-table tr {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
  }

  #page-invite-system .shop-data-table td {
    display: grid !important;
    grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr) !important;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0 !important;
    border: 0 !important;
    word-break: break-word;
  }
}

.member-control-panel .panel-head {
  align-items: flex-start;
  gap: 16px;
}

.member-control-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(100, 116, 139, 0.14);
}

.member-control-tabs button {
  min-width: 88px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.member-control-tabs button:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.member-control-tabs button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2f7cf6, #13bfa5);
  box-shadow: 0 10px 22px rgba(47, 124, 246, 0.18);
}

.member-control-tab-panel {
  display: none;
}

.member-control-tab-panel.active {
  display: grid;
  gap: 16px;
}

.member-clean-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 99, 99, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 91, 112, 0.12), rgba(255, 183, 77, 0.1));
}

.member-clean-alert div {
  display: grid;
  gap: 6px;
}

.member-clean-alert strong {
  color: #ef4444;
}

.member-clean-alert span {
  color: var(--muted);
  font-size: 13px;
}

:root[data-theme="dark"] #page-member-control .member-control-tabs {
  background: rgba(15, 28, 45, 0.96);
  border-color: rgba(114, 145, 184, 0.42);
}

:root[data-theme="dark"] #page-member-control .points-section,
:root[data-theme="dark"] #page-member-control .member-clean-alert {
  background: rgba(22, 35, 53, 0.96) !important;
  border-color: rgba(126, 154, 190, 0.34) !important;
  color: #f6fbff !important;
}

:root[data-theme="dark"] #page-member-control .field span,
:root[data-theme="dark"] #page-member-control .muted,
:root[data-theme="dark"] #page-member-control .member-clean-alert span {
  color: #c7d6ea !important;
}

:root[data-theme="dark"] #page-member-control input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] #page-member-control select,
:root[data-theme="dark"] #page-member-control textarea {
  background: rgba(13, 25, 40, 0.98) !important;
  border-color: rgba(145, 169, 200, 0.64) !important;
  color: #f8fbff !important;
}

.title-system-panel .field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.title-system-panel .settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.title-system-panel .variable-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(47, 124, 246, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(47, 124, 246, 0.06), rgba(19, 191, 165, 0.08));
}

.title-system-panel .variable-help span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 124, 246, 0.24);
  background: rgba(255, 255, 255, 0.74);
  color: #0b5bd3;
  font-weight: 800;
  font-size: 13px;
}

.title-system-panel .hint {
  font-size: 12px;
  color: var(--muted);
}

:root[data-theme="dark"] #page-title-system .panel,
:root[data-theme="dark"] #page-title-system .points-section,
:root[data-theme="dark"] #page-title-system .setting-switch,
:root[data-theme="dark"] #page-title-system .member-clean-alert,
:root[data-theme="dark"] #page-title-system .feature-context-bar,
:root[data-theme="dark"] #page-title-system .feature-select-card,
:root[data-theme="dark"] #page-title-system .variable-help {
  background: rgba(22, 35, 53, 0.96) !important;
  border-color: rgba(126, 154, 190, 0.34) !important;
  color: #f6fbff !important;
}

:root[data-theme="dark"] #page-title-system .field span,
:root[data-theme="dark"] #page-title-system .muted,
:root[data-theme="dark"] #page-title-system .hint,
:root[data-theme="dark"] #page-title-system .setting-switch small,
:root[data-theme="dark"] #page-title-system .member-clean-alert span {
  color: #c7d6ea !important;
}

:root[data-theme="dark"] #page-title-system input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] #page-title-system select,
:root[data-theme="dark"] #page-title-system textarea {
  background: rgba(13, 25, 40, 0.98) !important;
  border-color: rgba(145, 169, 200, 0.64) !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] #page-title-system .variable-help span {
  background: rgba(31, 58, 92, 0.96);
  border-color: rgba(99, 150, 244, 0.5);
  color: #d8e7ff;
}

@media (max-width: 760px) {
  .member-control-panel .panel-head {
    display: grid;
  }

  .member-control-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .member-control-tabs button {
    min-width: 0;
  }

  .member-clean-alert {
    display: grid;
  }

  .member-clean-alert .button {
    width: 100%;
  }

  #page-title-system .feature-context-bar {
    grid-template-columns: 1fr;
  }

  #page-title-system .title-system-panel .field-grid {
    grid-template-columns: 1fr;
  }

  #page-title-system .title-system-panel .settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #page-title-system .title-system-panel .settings-actions .btn {
    width: 100%;
  }

  #page-title-system .title-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-title-system .title-tabs button {
    min-width: 0;
    width: 100%;
    padding-inline: 8px;
  }
}

#page-welfare-system .welfare-switch-grid {
  margin-bottom: 16px;
}

#page-welfare-system .shop-editor-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr) auto;
}

#page-welfare-system .shop-side-actions {
  align-content: center;
}

#page-welfare-system .shop-data-table td strong {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-welfare-system .shop-data-table td small {
  color: var(--muted);
}

#page-welfare-system .shop-tab-panel .field textarea {
  min-height: 112px;
}

:root[data-theme="dark"] #page-welfare-system .panel,
:root[data-theme="dark"] #page-welfare-system .shop-editor-card,
:root[data-theme="dark"] #page-welfare-system .shop-table-shell,
:root[data-theme="dark"] #page-welfare-system .field,
:root[data-theme="dark"] #page-welfare-system .setting-switch {
  background: rgba(19, 32, 48, 0.96);
  border-color: rgba(126, 154, 190, 0.42);
  color: #eef6ff;
}

:root[data-theme="dark"] #page-welfare-system .shop-data-table th {
  background: rgba(42, 56, 77, 0.96);
  color: #eaf3ff;
}

:root[data-theme="dark"] #page-welfare-system .shop-data-table td,
:root[data-theme="dark"] #page-welfare-system .shop-data-table td strong {
  color: #f5fbff;
}

:root[data-theme="dark"] #page-welfare-system .shop-data-table tr {
  background: rgba(16, 29, 46, 0.98);
}

:root[data-theme="dark"] #page-welfare-system .field span,
:root[data-theme="dark"] #page-welfare-system .muted,
:root[data-theme="dark"] #page-welfare-system .shop-data-table td small {
  color: #c7d6ea;
}

:root[data-theme="dark"] #page-welfare-system input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] #page-welfare-system select,
:root[data-theme="dark"] #page-welfare-system textarea {
  background: rgba(13, 25, 40, 0.98);
  border-color: rgba(145, 169, 200, 0.64);
  color: #f8fbff;
}

@media (max-width: 760px) {
  #page-welfare-system,
  #page-welfare-system .panel,
  #page-welfare-system .point-shop-workbench,
  #page-welfare-system .shop-tab-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #page-welfare-system .panel-head {
    display: grid;
    gap: 12px;
  }

  #page-welfare-system .shop-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
  }

  #page-welfare-system .shop-tabs button,
  #page-welfare-system .button {
    width: 100%;
    min-width: 0;
  }

  #page-welfare-system .shop-tabs button {
    min-height: 40px;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    background: #f8fbff;
    color: var(--text);
  }

  #page-welfare-system .shop-tabs button:hover,
  #page-welfare-system .shop-tabs button.active {
    border-color: transparent;
    background: linear-gradient(135deg, #238bd3, #16b6a1);
    color: #fff;
  }

  #page-welfare-system .shop-editor-grid,
  #page-welfare-system .welfare-switch-grid,
  #page-welfare-system .shop-side-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  #page-welfare-system .shop-editor-card,
  #page-welfare-system .shop-table-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 12px;
  }

  #page-welfare-system .field,
  #page-welfare-system .field input,
  #page-welfare-system .field select,
  #page-welfare-system .field textarea {
    width: 100%;
    min-width: 0;
  }

  #page-welfare-system .shop-data-table,
  #page-welfare-system .shop-data-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  #page-welfare-system .shop-data-table thead {
    display: none;
  }

  #page-welfare-system .shop-data-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  #page-welfare-system .shop-data-table td {
    display: grid;
    grid-template-columns: minmax(78px, 0.36fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 3px 0;
    border: 0;
    word-break: break-word;
  }

  #page-welfare-system .shop-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
  }

  #page-welfare-system .shop-data-table td[data-label*="操作"] {
    grid-template-columns: 1fr;
  }

  #page-welfare-system .shop-data-table td[data-label*="操作"]::before {
    display: none;
  }

  #page-welfare-system .shop-data-table td .action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  :root[data-theme="dark"] #page-welfare-system .shop-tabs button {
    background: rgba(31, 46, 66, 0.96);
    border-color: rgba(126, 154, 190, 0.34);
    color: #dce9fb;
  }

  :root[data-theme="dark"] #page-welfare-system .shop-tabs button:hover,
  :root[data-theme="dark"] #page-welfare-system .shop-tabs button.active {
    background: linear-gradient(135deg, #2b7cf6, #12b8a6);
    border-color: transparent;
    color: #fff;
  }
}

#page-scheduled-tasks .scheduled-task-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.1fr);
  gap: 14px;
  align-items: start;
}

#page-scheduled-tasks .scheduled-form-card {
  display: grid;
  gap: 12px;
}

#page-scheduled-tasks .scheduled-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-scheduled-tasks .full-field,
#page-scheduled-tasks .scheduled-inline-fields .full-field {
  grid-column: 1 / -1;
}

#page-scheduled-tasks .hidden {
  display: none !important;
}

#page-scheduled-tasks .scheduled-upload-zone {
  min-height: 76px;
  border: 1px dashed rgba(47, 105, 246, 0.45);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(47, 105, 246, 0.08), rgba(18, 184, 166, 0.08));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#page-scheduled-tasks .scheduled-upload-zone:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 184, 166, 0.7);
  box-shadow: 0 12px 26px rgba(47, 105, 246, 0.12);
}

#page-scheduled-tasks .scheduled-upload-zone i {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b7cf6, #12b8a6);
  color: #fff;
}

#page-scheduled-tasks .scheduled-upload-zone strong {
  display: block;
  color: #1261d8;
  font-weight: 900;
}

#page-scheduled-tasks .scheduled-upload-zone span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

#page-scheduled-tasks .scheduled-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

#page-scheduled-tasks .scheduled-task-table td small {
  display: block;
  max-width: 420px;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-theme="dark"] #page-scheduled-tasks .panel,
:root[data-theme="dark"] #page-scheduled-tasks .shop-editor-card,
:root[data-theme="dark"] #page-scheduled-tasks .shop-table-shell,
:root[data-theme="dark"] #page-scheduled-tasks .field,
:root[data-theme="dark"] #page-scheduled-tasks .setting-switch {
  background: rgba(19, 32, 48, 0.96);
  border-color: rgba(126, 154, 190, 0.42);
  color: #eef6ff;
}

:root[data-theme="dark"] #page-scheduled-tasks .shop-data-table th {
  background: rgba(42, 56, 77, 0.96);
  color: #eaf3ff;
}

:root[data-theme="dark"] #page-scheduled-tasks .shop-data-table tr {
  background: rgba(16, 29, 46, 0.98);
}

:root[data-theme="dark"] #page-scheduled-tasks .shop-data-table td,
:root[data-theme="dark"] #page-scheduled-tasks .shop-data-table td strong {
  color: #f5fbff;
}

:root[data-theme="dark"] #page-scheduled-tasks .field span,
:root[data-theme="dark"] #page-scheduled-tasks .muted,
:root[data-theme="dark"] #page-scheduled-tasks .shop-data-table td small,
:root[data-theme="dark"] #page-scheduled-tasks .scheduled-upload-zone span {
  color: #c7d6ea;
}

:root[data-theme="dark"] #page-scheduled-tasks input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] #page-scheduled-tasks select,
:root[data-theme="dark"] #page-scheduled-tasks textarea {
  background: rgba(13, 25, 40, 0.98);
  border-color: rgba(145, 169, 200, 0.64);
  color: #f8fbff;
}

:root[data-theme="dark"] #page-scheduled-tasks .scheduled-upload-zone {
  background: linear-gradient(135deg, rgba(43, 124, 246, 0.16), rgba(18, 184, 166, 0.12));
  border-color: rgba(126, 154, 190, 0.42);
}

:root[data-theme="dark"] #page-scheduled-tasks .scheduled-upload-zone strong {
  color: #dce9ff;
}

@media (max-width: 760px) {
  #page-scheduled-tasks,
  #page-scheduled-tasks .panel,
  #page-scheduled-tasks .shop-tab-panel,
  #page-scheduled-tasks .shop-table-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #page-scheduled-tasks .panel-head,
  #page-scheduled-tasks .scheduled-list-head {
    display: grid;
    gap: 12px;
  }

  #page-scheduled-tasks .shop-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
  }

  #page-scheduled-tasks .shop-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    background: #f8fbff;
    color: var(--text);
  }

  #page-scheduled-tasks .shop-tabs button:hover,
  #page-scheduled-tasks .shop-tabs button.active {
    border-color: transparent;
    background: linear-gradient(135deg, #238bd3, #16b6a1);
    color: #fff;
  }

  #page-scheduled-tasks .scheduled-task-grid,
  #page-scheduled-tasks .scheduled-inline-fields,
  #page-scheduled-tasks .settings-actions.left-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  #page-scheduled-tasks .button,
  #page-scheduled-tasks .settings-actions .button {
    width: 100%;
    min-width: 0;
  }

  #page-scheduled-tasks .field,
  #page-scheduled-tasks .field input,
  #page-scheduled-tasks .field select,
  #page-scheduled-tasks .field textarea {
    width: 100%;
    min-width: 0;
  }

  #page-scheduled-tasks .shop-data-table,
  #page-scheduled-tasks .shop-data-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  #page-scheduled-tasks .shop-data-table thead {
    display: none;
  }

  #page-scheduled-tasks .shop-data-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  #page-scheduled-tasks .shop-data-table td {
    display: grid;
    grid-template-columns: minmax(76px, 0.36fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 3px 0;
    border: 0;
    word-break: break-word;
  }

  #page-scheduled-tasks .shop-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
  }

  #page-scheduled-tasks .shop-data-table td:last-child {
    grid-template-columns: 1fr;
  }

  #page-scheduled-tasks .shop-data-table td:last-child::before {
    display: none;
  }

  :root[data-theme="dark"] #page-scheduled-tasks .shop-tabs button {
    background: rgba(31, 46, 66, 0.96);
    border-color: rgba(126, 154, 190, 0.34);
    color: #dce9fb;
  }

  :root[data-theme="dark"] #page-scheduled-tasks .shop-tabs button:hover,
  :root[data-theme="dark"] #page-scheduled-tasks .shop-tabs button.active {
    background: linear-gradient(135deg, #2b7cf6, #12b8a6);
    border-color: transparent;
    color: #fff;
  }
}

/* Entry pages need to stay dark even when their standalone styles are loaded later. */
:root[data-theme="dark"] .landing-page,
:root[data-theme="dark"] .auth-page {
  background:
    radial-gradient(circle at 14% 8%, rgba(93, 141, 255, 0.16), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(34, 197, 143, 0.12), transparent 28%),
    var(--bg) !important;
  color: var(--text);
}

:root[data-theme="dark"] .landing-hero,
:root[data-theme="dark"] .home-hero {
  background:
    linear-gradient(135deg, rgba(93, 141, 255, 0.16), rgba(34, 197, 143, 0.1)),
    var(--panel) !important;
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .landing-preview,
:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .home-card,
:root[data-theme="dark"] .home-stat,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-tabs {
  background: var(--panel) !important;
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .landing-copy h1,
:root[data-theme="dark"] .landing-brand strong,
:root[data-theme="dark"] .home-copy h2,
:root[data-theme="dark"] .home-card h3,
:root[data-theme="dark"] .home-stat strong,
:root[data-theme="dark"] .auth-head h2,
:root[data-theme="dark"] .auth-tab.active,
:root[data-theme="dark"] .remember-row {
  color: var(--text);
}

:root[data-theme="dark"] .landing-copy p,
:root[data-theme="dark"] .landing-brand span,
:root[data-theme="dark"] .home-copy p,
:root[data-theme="dark"] .home-card p,
:root[data-theme="dark"] .feature-text,
:root[data-theme="dark"] .auth-head p,
:root[data-theme="dark"] .home-stat span {
  color: var(--muted);
}

:root[data-theme="dark"] .auth-tab {
  background: transparent;
  color: var(--muted);
}

:root[data-theme="dark"] .auth-tab.active {
  background: linear-gradient(135deg, #2b7cf6, #12b8a6) !important;
  border-color: rgba(128, 170, 255, 0.42);
  color: #fff;
  box-shadow: 0 16px 30px rgba(19, 184, 166, 0.18);
}

:root[data-theme="dark"] .captcha-question,
:root[data-theme="dark"] .icon-button {
  background: linear-gradient(180deg, #26384d, #1d2c3f) !important;
  border-color: var(--line);
  color: #dce9fb;
}

/* Strong entry-page dark-mode guard: later responsive blocks used to make these pages white again. */
:root[data-theme="dark"] #landingPage,
:root[data-theme="dark"] #authPage,
:root[data-theme="dark"] .landing-page,
:root[data-theme="dark"] .auth-page {
  background:
    radial-gradient(circle at 16% 10%, rgba(93, 141, 255, 0.16), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(34, 197, 143, 0.12), transparent 28%),
    #101722 !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] .landing-page *,
:root[data-theme="dark"] .auth-page * {
  border-color: var(--line);
}

:root[data-theme="dark"] .landing-hero,
:root[data-theme="dark"] .landing-preview,
:root[data-theme="dark"] .home-hero,
:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .home-card,
:root[data-theme="dark"] .home-stat,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-tabs,
:root[data-theme="dark"] .auth-form {
  background: linear-gradient(135deg, rgba(23, 34, 48, 0.98), rgba(17, 29, 43, 0.98)) !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] .landing-copy p,
:root[data-theme="dark"] .landing-brand span,
:root[data-theme="dark"] .home-copy p,
:root[data-theme="dark"] .home-card p,
:root[data-theme="dark"] .home-stat span,
:root[data-theme="dark"] .auth-head p,
:root[data-theme="dark"] .auth-card label,
:root[data-theme="dark"] .auth-card .muted {
  color: #c7d4e4 !important;
}

:root[data-theme="dark"] .auth-card input,
:root[data-theme="dark"] .auth-card select,
:root[data-theme="dark"] .auth-card textarea {
  background: #1d2c3f !important;
  color: #f8fbff !important;
  border-color: #3a4c62 !important;
}

#page-custom-api-system .api-body {
  display: grid;
  gap: 16px;
}

#page-custom-api-system .api-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

#page-custom-api-system .api-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

#page-custom-api-system .api-table th,
#page-custom-api-system .api-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
}

#page-custom-api-system .api-table tbody tr {
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#page-custom-api-system .api-table tbody tr:hover,
#page-custom-api-system .api-table tbody tr.selected {
  background: linear-gradient(90deg, rgba(226, 255, 247, 0.9), rgba(235, 244, 255, 0.95));
  box-shadow: inset 4px 0 0 #12b8a6;
}

#page-custom-api-system .api-table tbody tr.api-empty-row {
  cursor: default;
}

#page-custom-api-system .api-table tbody tr.api-empty-row:hover {
  background: transparent;
  box-shadow: none;
}

#page-custom-api-system .api-table .empty {
  height: 84px;
  text-align: center;
  color: var(--muted);
}

#page-custom-api-system .custom-api-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(33, 197, 173, 0.52);
  border-radius: 12px;
  background: linear-gradient(135deg, #2f7df4 0%, #18bda4 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.22);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#page-custom-api-system .custom-api-add-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.26);
}

#page-custom-api-system .custom-api-add-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

#page-custom-api-system .custom-api-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

#page-custom-api-system .custom-api-pager.hidden {
  display: none;
}

#page-custom-api-system .custom-api-pager button {
  min-width: 92px;
}

#page-custom-api-system .api-editor {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 251, 248, 0.82));
}

#page-custom-api-system .api-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#page-custom-api-system .api-wide {
  grid-column: 1 / -1;
}

#page-custom-api-system .variable-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(231, 255, 248, 0.88));
}

#page-custom-api-system .variable-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-weight: 800;
}

#page-custom-api-system .variable-strip button {
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 999px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #eef6ff, #e8fff8);
  color: #0f5bcc;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#page-custom-api-system .variable-strip button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
}

#page-keyword-forward-system .api-editor,
#page-mass-send-system .api-editor {
  border: 1px solid rgba(147, 166, 190, 0.28);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

#page-keyword-forward-system .variable-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(231, 255, 248, 0.88));
}

#page-keyword-forward-system .variable-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-weight: 800;
}

#page-keyword-forward-system .variable-strip button {
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 999px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #eef6ff, #e8fff8);
  color: #0f5bcc;
  font-weight: 900;
  cursor: pointer;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip-grid button,
.chip-grid span {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: #f8fbff;
  color: #0f2a55;
  padding: 8px 12px;
  font-weight: 800;
}

.chip-grid button.active {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.feature-result {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.feature-result-row {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #172554;
  font-weight: 800;
}

.feature-result-row.ok {
  border-color: rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.08);
}

.feature-result-row.fail {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.08);
}

#page-custom-api-system .hidden-by-custom-api,
.custom-api-modal.hidden,
.custom-api-advanced-panel.hidden,
.custom-api-advanced-toggle.hidden,
.custom-api-advanced-panel label.hidden {
  display: none !important;
}

.custom-api-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.custom-api-dialog {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: var(--panel, #ffffff);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.custom-api-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.custom-api-modal-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.custom-api-modal-head p {
  margin: 0;
  color: var(--muted);
}

.custom-api-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 24px;
}

.custom-api-form-grid label,
.custom-api-advanced-panel label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.custom-api-form-grid label span,
.custom-api-advanced-panel label span {
  font-size: 13px;
}

.custom-api-form-grid input,
.custom-api-form-grid select,
.custom-api-form-grid textarea,
.custom-api-advanced-panel input,
.custom-api-advanced-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.custom-api-form-grid textarea,
.custom-api-advanced-panel textarea {
  resize: vertical;
}

.custom-api-form-grid .span-2 {
  grid-column: 1 / -1;
}

.custom-api-switch-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px !important;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
}

.custom-api-switch-card input {
  width: 20px;
  height: 20px;
}

.custom-api-switch-card strong,
.custom-api-switch-card em {
  display: block;
}

.custom-api-switch-card em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.api-variable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.api-variable-row button,
.custom-api-advanced-toggle {
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #0f5bcc;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}

.custom-api-advanced-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.custom-api-advanced-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.custom-api-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.api-rule-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

:root[data-theme="dark"] .custom-api-dialog,
:root[data-theme="dark"] .custom-api-form-grid input,
:root[data-theme="dark"] .custom-api-form-grid select,
:root[data-theme="dark"] .custom-api-form-grid textarea,
:root[data-theme="dark"] .custom-api-advanced-panel input,
:root[data-theme="dark"] .custom-api-advanced-panel textarea {
  background: #172230;
}

:root[data-theme="dark"] .custom-api-advanced-panel {
  background: rgba(23, 34, 48, 0.92);
}

:root[data-theme="dark"] #page-custom-api-system .api-table-wrap,
:root[data-theme="dark"] #page-custom-api-system .api-editor {
  background: linear-gradient(135deg, rgba(23, 34, 48, 0.96), rgba(16, 37, 47, 0.92));
  border-color: #3a4c62;
}

:root[data-theme="dark"] #page-custom-api-system .api-table th {
  background: #263446;
  color: #f8fbff;
}

:root[data-theme="dark"] #page-custom-api-system .api-table td {
  background: rgba(23, 34, 48, 0.92);
  color: #f8fbff;
  border-color: #3a4c62;
}

:root[data-theme="dark"] #page-custom-api-system .api-table tbody tr:hover td,
:root[data-theme="dark"] #page-custom-api-system .api-table tbody tr.selected td {
  background: linear-gradient(90deg, rgba(19, 83, 99, 0.9), rgba(30, 55, 90, 0.92));
}

:root[data-theme="dark"] #page-custom-api-system .api-table .empty {
  color: #c7d4e4;
}

:root[data-theme="dark"] #page-custom-api-system .variable-strip {
  background: rgba(13, 148, 136, 0.13);
  border-color: rgba(45, 212, 191, 0.35);
}

:root[data-theme="dark"] #page-custom-api-system .variable-strip button {
  background: linear-gradient(135deg, #24364c, #173b42);
  border-color: rgba(96, 165, 250, 0.38);
  color: #dbeafe;
}

@media (max-width: 760px) {
  .custom-api-modal {
    padding: 12px;
  }

  .custom-api-form-grid,
  .custom-api-advanced-panel {
    grid-template-columns: 1fr;
  }

  .custom-api-modal-actions {
    flex-direction: column;
  }

  .custom-api-modal-actions button {
    width: 100%;
  }

  #page-custom-api-system .api-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #page-custom-api-system .api-table,
  #page-custom-api-system .api-table tbody {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  #page-custom-api-system .api-table thead {
    display: none;
  }

  #page-custom-api-system .api-table tr {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
  }

  #page-custom-api-system .api-table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    padding: 2px 0;
    border: 0;
  }

  #page-custom-api-system .api-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }

  #page-custom-api-system .api-table tr.api-empty-row td {
    display: block;
    min-height: 72px;
    padding: 22px 12px;
    text-align: center;
  }

  #page-custom-api-system .api-table tr.api-empty-row td::before {
    display: none;
  }

  #page-custom-api-system .api-editor {
    padding: 12px;
  }

  #page-custom-api-system .api-editor-grid {
    grid-template-columns: 1fr;
  }

  #page-custom-api-system .api-wide {
    grid-column: auto;
  }

  #page-custom-api-system .qa-action-stack {
    grid-template-columns: 1fr;
  }
}

/* Final guards: keep public/auth pages and QA editor consistent after theme changes. */
:root[data-theme="dark"] #landingPage,
:root[data-theme="dark"] #authPage,
:root[data-theme="dark"] .landing-page,
:root[data-theme="dark"] .auth-page,
:root[data-theme="dark"] .login-page,
:root[data-theme="dark"] .register-page,
body.dark #landingPage,
body.dark #authPage,
body.dark .landing-page,
body.dark .auth-page,
body.dark .login-page,
body.dark .register-page {
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34%), #101722 !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] #landingPage .card,
:root[data-theme="dark"] #authPage .card,
:root[data-theme="dark"] .landing-card,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .register-card,
body.dark #landingPage .card,
body.dark #authPage .card,
body.dark .landing-card,
body.dark .auth-card,
body.dark .login-card,
body.dark .register-card {
  background: rgba(23, 34, 48, 0.94) !important;
  border-color: #34475f !important;
  color: #f8fbff !important;
}

#page-qa-system .qa-table tbody tr.qa-empty-row td,
#page-qa-system .qa-table .qa-empty-row .empty {
  display: table-cell !important;
  width: 100% !important;
  max-width: none !important;
  text-align: center !important;
}

#page-qa-system .qa-upload-zone {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 82px !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

#page-qa-system .qa-upload-zone strong,
#page-qa-system .qa-upload-zone span,
#page-qa-system .qa-upload-zone small {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
}

:root[data-theme="dark"] body:has(#landingPage:not(.hidden)),
:root[data-theme="dark"] body:has(#authPage:not(.hidden)),
body.dark:has(#landingPage:not(.hidden)),
body.dark:has(#authPage:not(.hidden)) {
  background: radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.16), transparent 30%), #101722 !important;
  color: #f8fbff !important;
}

:root[data-theme="dark"] #landingPage input,
:root[data-theme="dark"] #authPage input,
:root[data-theme="dark"] #landingPage select,
:root[data-theme="dark"] #authPage select,
:root[data-theme="dark"] #landingPage textarea,
:root[data-theme="dark"] #authPage textarea,
body.dark #landingPage input,
body.dark #authPage input,
body.dark #landingPage select,
body.dark #authPage select,
body.dark #landingPage textarea,
body.dark #authPage textarea {
  background: rgba(19, 34, 56, 0.96) !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  color: #f8fbff !important;
}

#page-qa-system .qa-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#page-qa-system .qa-editor-grid > .qa-upload-zone {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  min-height: 96px !important;
  padding: 18px 22px !important;
}

@media (max-width: 760px) {
  #page-qa-system .qa-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* Public dashboard refresh: keep the existing component contract, update only presentation. */
:root {
  --public-ink: #10253f;
  --public-muted: #6b7c91;
  --public-line: #d8e2ec;
  --public-cyan: #19a7a0;
  --public-blue: #2563eb;
  --public-surface: #ffffff;
}

body:has(#landingPage:not(.hidden)),
body:has(#authPage:not(.hidden)) {
  background: #eef3f7;
}

.landing-page {
  position: relative;
  isolation: isolate;
  padding: 28px clamp(18px, 4vw, 64px) 36px;
  gap: 22px;
  background: #eef3f7;
}

.landing-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 310px;
  background: #10253f;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
}

.landing-nav {
  width: min(1240px, 100%);
  min-height: 58px;
}

.landing-brand strong,
.landing-brand span {
  color: #ffffff;
}

.landing-brand span { color: #b7c8dc; }

.landing-brand .mark {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--public-cyan);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(25, 167, 160, 0.28);
}

.landing-actions .button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.landing-actions .button.secondary:hover { background: rgba(255, 255, 255, 0.18); }

.landing-hero {
  width: min(1240px, 100%);
  min-height: 440px;
  grid-template-columns: minmax(0, 1fr) 320px;
  padding: clamp(30px, 5vw, 68px);
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(16, 37, 63, 0.16);
}

.home-kicker,
.landing-copy .home-kicker {
  color: #087f7a;
  background: #e1f5f2;
  border: 1px solid #b8e6df;
}

.landing-copy h1 {
  max-width: 780px;
  margin: 0;
  color: var(--public-ink);
  font-size: 52px;
  letter-spacing: -0.02em;
}

.landing-copy p { color: var(--public-muted); max-width: 700px; }

.landing-cta .button.primary,
.home-welcome .button.primary {
  background: var(--public-blue);
  border-color: var(--public-blue);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.landing-preview { gap: 10px; }

.landing-preview .home-stat {
  min-height: 94px;
  border: 1px solid var(--public-line);
  border-left: 4px solid var(--public-cyan);
  border-radius: 10px;
  background: #f7fafc;
  box-shadow: none;
}

.landing-preview .home-stat strong { color: var(--public-ink); }

.landing-features {
  width: min(1240px, 100%);
  gap: 18px;
}

.landing-features .panel {
  border: 1px solid var(--public-line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 37, 63, 0.06);
}

.landing-features .panel-head { background: #ffffff; }
.landing-features .panel-title { color: var(--public-ink); }

.home-welcome {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  gap: 26px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 18px;
  background: #10253f;
  box-shadow: 0 20px 42px rgba(16, 37, 63, 0.18);
}

.home-welcome::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(111, 227, 215, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(111, 227, 215, 0.06), 0 0 0 56px rgba(111, 227, 215, 0.04);
}

.home-welcome-copy { position: relative; z-index: 1; align-content: center; }
.home-welcome-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #77e2d7; font-size: 12px; font-weight: 800; }
.home-welcome h2 { max-width: 680px; margin: 16px 0 10px; color: #ffffff; font-size: 40px; line-height: 1.18; }
.home-welcome p { max-width: 620px; margin: 0; color: #b7c8dc; line-height: 1.8; }
.home-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.home-welcome .button.quiet { color: #d8f7f3; border-color: rgba(119, 226, 215, 0.35); background: rgba(119, 226, 215, 0.1); }
.home-welcome-stats { position: relative; z-index: 1; display: grid; align-content: center; gap: 10px; }
.home-welcome-stats > div { display: grid; gap: 7px; padding: 15px 17px; border: 1px solid rgba(183, 200, 220, 0.2); border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.home-welcome-stats span { color: #91a8c0; font-size: 12px; }
.home-welcome-stats strong { display: flex; align-items: center; gap: 8px; color: #ffffff; font-size: 17px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #64e1a7; box-shadow: 0 0 0 4px rgba(100, 225, 167, 0.16); }

#page-home .announcement-panel { margin-top: 18px; border-radius: 14px; box-shadow: 0 10px 28px rgba(16, 37, 63, 0.06); }
#page-home .home-card { border-radius: 14px; box-shadow: 0 10px 28px rgba(16, 37, 63, 0.06); }
#page-home .home-card h3 { color: var(--public-ink); font-size: 20px; }

.auth-page {
  position: relative;
  padding: 32px;
  background: #eef3f7;
}

.auth-page::before {
  content: "群管机器人 · 安全接入平台";
  position: absolute;
  top: 34px;
  left: 38px;
  color: #91a1b2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-card {
  width: min(470px, calc(100vw - 32px));
  padding: 34px;
  border: 1px solid #d7e2ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(16, 37, 63, 0.16);
}

.auth-head { margin-bottom: 24px; }
.auth-head h2 { color: var(--public-ink); font-size: 27px; }
.auth-head p { color: var(--public-muted); line-height: 1.6; }
.auth-tabs { margin-bottom: 22px; padding: 4px; border: 0; border-radius: 10px; background: #edf3f8; }
.auth-tab { height: 40px; border-radius: 8px; color: #728399; }
.auth-tab.active { color: #1556c0; border-color: #c9dcfb; background: #ffffff; box-shadow: 0 4px 10px rgba(16, 37, 63, 0.08); }
.auth-card .field { margin-top: 16px; }
.auth-card label { color: #30445b; font-weight: 800; }
.auth-card input { min-height: 46px; border-color: #d4e0ea; border-radius: 10px; background: #f9fbfd; }
.auth-card input:focus { background: #ffffff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.auth-submit { min-height: 48px; margin-top: 10px; border-radius: 10px; background: var(--public-blue); border-color: var(--public-blue); }
.captcha-inline-box { min-height: 48px; margin: 16px 0 4px; }
.captcha-inline-box .geetest_captcha,
.captcha-inline-box .geetest_holder,
.captcha-inline-box .geetest_btn_svg,
.captcha-inline-box .geetest_btn_click,
.captcha-inline-box .geetest_mask,
.captcha-inline-box .geetest_content,
.captcha-inline-box .geetest_tip_container { width: 100% !important; max-width: 100% !important; }
.captcha-inline-start { width: 100%; min-height: 46px; justify-content: center; border: 1px dashed #9db7d2; border-radius: 10px; color: #356189; background: #f5f9fc; }
.captcha-inline-start:hover { border-color: var(--public-cyan); color: #087f7a; background: #effbf9; }
.captcha-inline-ok, .captcha-inline-error { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 0 13px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.captcha-inline-ok { color: #087f55; border: 1px solid #b8e6d1; background: #effbf5; }
.captcha-inline-error { color: #b42318; border: 1px solid #f2c5bf; background: #fff5f3; }

@media (max-width: 760px) {
  .landing-page { padding: 16px; }
  .landing-page::before { height: 220px; clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); }
  .landing-nav { align-items: flex-start; }
  .landing-brand span { display: none; }
  .landing-hero { padding: 24px 20px; border-radius: 14px; }
  .landing-copy h1 { font-size: 34px; }
  .home-welcome h2 { font-size: 30px; }
  .home-welcome { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 14px; }
  .home-welcome-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-welcome-stats > div { padding: 11px; }
  .home-welcome-stats strong { font-size: 13px; }
  .auth-page { padding: 18px; }
  .auth-page::before { position: static; align-self: flex-start; margin: 0 0 8px; }
  .auth-card { padding: 24px 18px; }
}

#page-game-bridge .table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#page-game-bridge .table-actions .button {
  margin: 0;
}

