#xboard-gift-card-page {
  position: fixed;
  top: var(--xgc-top, 0px);
  right: 0;
  bottom: 0;
  left: var(--xgc-left, 0px);
  z-index: 30;
  display: none;
  overflow: auto;
  background: #f5f7fb;
  color: #2f343b;
}

body.xgc-open #xboard-gift-card-page {
  display: block;
}

.xgc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

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

.xgc-title {
  margin: 0;
  color: #252a31;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.xgc-subtitle {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

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

.xgc-card {
  border: 1px solid #e8edf3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 39, 49, 0.04);
}

.xgc-card-header {
  padding: 20px 22px 0;
}

.xgc-card-title {
  margin: 0;
  color: #252a31;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.xgc-card-desc {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.xgc-card-body {
  padding: 18px 22px 22px;
}

.xgc-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.xgc-field label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.xgc-input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 8px 12px;
  color: #1f2937;
  font-size: 14px;
  line-height: 20px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.xgc-input:focus {
  border-color: #2f7d80;
  box-shadow: 0 0 0 3px rgba(47, 125, 128, 0.12);
}

.xgc-btn {
  min-height: 38px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 16px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.xgc-btn:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.xgc-btn-primary {
  border-color: #2f7d80;
  background: #2f7d80;
  color: #fff;
}

.xgc-btn-primary:hover {
  border-color: #276a6d;
  background: #276a6d;
}

.xgc-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.xgc-alert {
  display: none;
  margin-top: 14px;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.xgc-alert.is-visible {
  display: block;
}

.xgc-alert-info {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.xgc-alert-success {
  border: 1px solid #dcfce7;
  background: #f0fdf4;
  color: #15803d;
}

.xgc-alert-error {
  border: 1px solid #fee2e2;
  background: #fef2f2;
  color: #b42318;
}

.xgc-kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.xgc-kv dt {
  color: #667085;
}

.xgc-kv dd {
  min-width: 0;
  margin: 0;
  color: #2f343b;
  word-break: break-word;
}

.xgc-reward-list,
.xgc-history-list {
  display: grid;
  gap: 10px;
}

.xgc-reward-item,
.xgc-history-item {
  border: 1px solid #edf1f5;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fbfcfd;
}

.xgc-reward-name,
.xgc-history-title {
  color: #252a31;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.xgc-reward-value,
.xgc-history-meta {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.xgc-empty {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.xgc-history-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

[data-xgc-link] {
  cursor: pointer;
}

body.xgc-open .n-menu-item:not([data-xgc-link]) .n-menu-item-content--selected,
body.xgc-open .n-menu-item:not([data-xgc-link]) .n-menu-item-content--selected::before,
body.xgc-open .n-menu-item:not([data-xgc-link]) .n-menu-item-content--selected::after {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

#xboard-gift-card-page[data-xgc-theme="dark"] {
  background: #101418;
  color: #d7dde5;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-title,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-card-title,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-reward-name,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-history-title {
  color: #f3f6fa;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-subtitle,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-card-desc,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-reward-value,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-history-meta,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-empty,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-kv dt {
  color: #9aa4b2;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-card {
  border-color: #29313b;
  background: #171c22;
  box-shadow: none;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-input {
  border-color: #374151;
  background: #11161c;
  color: #e5e7eb;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-input::placeholder {
  color: #758195;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-btn {
  border-color: #3c4654;
  background: #1e252d;
  color: #e5e7eb;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-btn:hover {
  border-color: #4f5d6d;
  background: #252d37;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-btn-primary {
  border-color: #3c9a9d;
  background: #2f7d80;
  color: #fff;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-reward-item,
#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-history-item {
  border-color: #2b333d;
  background: #121820;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-kv dd {
  color: #d7dde5;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-alert-info {
  border-color: #1e3a5f;
  background: #10243c;
  color: #9cc8ff;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-alert-success {
  border-color: #1f5b38;
  background: #102b1c;
  color: #8be0a8;
}

#xboard-gift-card-page[data-xgc-theme="dark"] .xgc-alert-error {
  border-color: #743333;
  background: #351617;
  color: #ffaaa5;
}

@media (max-width: 900px) {
  .xgc-wrap {
    padding: 22px 14px 36px;
  }

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

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

  .xgc-btn {
    width: 100%;
  }
}
