:root {
  --ink: #070a12;
  --ink-2: #111a2d;
  --paper: #f6f7fa;
  --panel: #ffffff;
  --lime: #ff7f00;
  --mint: #3158d8;
  --muted: #5d6575;
  --line: #e2e6ef;
  --danger: #c6543a;
  --warning: #b47c23;
}

.login-art {
  background:
    radial-gradient(circle at 70% 62%, rgba(1, 45, 167, 0.38), transparent 30%),
    linear-gradient(145deg, #03050a, #07132d 65%, #0b1b43);
}

.login-grid {
  background-image:
    linear-gradient(rgba(71, 109, 229, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 109, 229, 0.12) 1px, transparent 1px);
}

.login-orbit {
  border-color: rgba(71, 109, 229, 0.24);
  box-shadow: 0 0 0 50px rgba(1, 45, 167, 0.055), 0 0 0 100px rgba(1, 45, 167, 0.03);
}

.sidebar {
  background: linear-gradient(180deg, #03050a 0%, #071125 100%);
}

.nav-item.active {
  background: rgba(255, 127, 0, 0.11);
  color: var(--lime);
}

.nav-item b,
.login-submit,
.primary-button {
  background: var(--lime);
  color: var(--ink);
}

.storage-indicator i {
  background: #476de5;
  box-shadow: 0 0 8px rgba(71, 109, 229, 0.85);
}

.topbar {
  background: rgba(246, 247, 250, 0.94);
}

.topbar-site-link span,
.topbar-site-link:hover,
.admin-user > span {
  color: var(--lime);
}

.admin-user > span {
  background: var(--ink);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: #3158d8;
  box-shadow: 0 0 0 3px rgba(1, 45, 167, 0.1);
}

.admin-field input[type="checkbox"],
.admin-field input[type="radio"] {
  accent-color: #012da7;
}

.status-pill.pending {
  background: #eef2fb;
  color: #2e4c99;
}

.status-pill.paid,
.status-pill.approved,
.status-pill.completed {
  background: #e8edf9;
  color: #012da7;
}

.login-view .login-form button[type="submit"],
.login-button,
.save-button,
.primary-action {
  background: #012da7;
  color: #fff;
}

.review-approve-button {
  border-color: #012da7;
  background: #012da7;
}

/* ------------------------------------------------------------------
   LIGHT ADMIN THEME
   与官网保持同一套克萊因藍 / 赤橙品牌语言，
   后台以明亮工作台为主，仅保留少量深蓝焦点卡。
------------------------------------------------------------------ */
:root {
  --brand-blue: #012da7;
  --brand-blue-deep: #001b62;
  --brand-blue-bright: #3158d8;
  --brand-blue-soft: #edf3ff;
  --brand-orange: #ff7f00;
  --brand-orange-deep: #d96800;
  --brand-orange-soft: #fff3e4;
  --ink: #091022;
  --ink-2: #1d283d;
  --paper: #f8faff;
  --panel: #ffffff;
  --lime: var(--brand-orange);
  --mint: var(--brand-blue);
  --muted: #657187;
  --line: #e5ebf4;
  --danger: #b84d3b;
  --warning: #a86c13;
  --admin-shadow: 0 14px 38px rgba(1, 35, 115, 0.065);
}

html,
body {
  background: var(--paper);
}

::selection {
  background: rgba(1, 45, 167, 0.14);
  color: var(--brand-blue-deep);
}

/* Login */
.login-view {
  background:
    radial-gradient(circle at 15% 18%, rgba(1, 45, 167, 0.06), transparent 28%),
    #f8faff;
}

.login-art {
  border-right: 1px solid rgba(1, 45, 167, 0.08);
  background:
    radial-gradient(circle at 78% 66%, rgba(1, 45, 167, 0.17), transparent 32%),
    radial-gradient(circle at 18% 18%, rgba(255, 127, 0, 0.08), transparent 22%),
    linear-gradient(145deg, #fbfdff 0%, #edf3ff 58%, #fff8f1 100%);
  color: var(--ink);
}

.login-grid {
  background-image:
    linear-gradient(rgba(1, 45, 167, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 45, 167, 0.045) 1px, transparent 1px);
  mask-image: linear-gradient(155deg, #000 0%, transparent 84%);
}

.login-brand strong {
  color: var(--ink);
}

.login-brand small {
  color: #7e8ba0;
}

.login-message > span {
  color: var(--brand-blue);
}

.login-message h1 {
  color: var(--ink);
}

.login-message p {
  color: #5f6d83;
}

.login-orbit {
  border-color: rgba(1, 45, 167, 0.16);
  box-shadow: 0 0 0 50px rgba(1, 45, 167, 0.035), 0 0 0 100px rgba(255, 127, 0, 0.025);
}

.login-orbit i {
  background: var(--brand-orange);
  box-shadow: 0 0 18px rgba(255, 127, 0, 0.54);
}

.login-meta {
  color: #8b97a9;
}

.login-panel {
  background: rgba(255, 255, 255, 0.62);
}

.login-kicker {
  color: var(--brand-blue);
}

.login-form h2 {
  color: var(--ink);
}

.login-form > p {
  color: var(--muted);
}

.login-form label span {
  color: var(--ink-2);
}

.login-form input {
  border-color: rgba(1, 45, 167, 0.13);
  border-radius: 9px;
  background: #fbfcff;
}

.login-form input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(1, 45, 167, 0.1);
}

.login-submit {
  border-radius: 9px;
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 127, 0, 0.22);
}

.login-submit:hover {
  background: var(--brand-orange-deep);
}

.login-submit i {
  background: var(--brand-blue);
  color: #fff;
}

.login-help,
.back-site {
  color: #7b879a;
}

.back-site:hover {
  color: var(--brand-blue);
}

/* Sidebar */
.sidebar {
  border-right: 1px solid rgba(1, 45, 167, 0.08);
  background:
    radial-gradient(circle at 12% 4%, rgba(1, 45, 167, 0.055), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: var(--ink);
  box-shadow: 10px 0 34px rgba(1, 35, 115, 0.045);
}

.sidebar-brand {
  border-bottom-color: var(--line);
}

.brand-link strong {
  color: var(--ink);
}

.brand-link small {
  color: #8491a5;
}

.sidebar-close {
  color: #69768a;
}

.nav-group-label {
  color: #8a96a9;
}

.nav-item {
  border-radius: 8px;
  color: #5d6a80;
  font-weight: 600;
}

.nav-item:hover {
  background: #f1f6ff;
  color: var(--brand-blue);
}

.nav-item.active {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  box-shadow: inset 3px 0 0 var(--brand-orange);
}

.nav-item b {
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
}

.sidebar-foot {
  border-top-color: var(--line);
}

.storage-indicator {
  color: #748197;
}

.storage-indicator i {
  background: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(1, 45, 167, 0.08);
}

#logoutButton {
  color: #78859a;
}

#logoutButton:hover {
  color: var(--brand-orange-deep);
}

/* Main workspace */
.admin-main {
  background:
    linear-gradient(90deg, rgba(1, 45, 167, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(1, 45, 167, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 94% 4%, rgba(255, 127, 0, 0.045), transparent 20%),
    #f8faff;
  background-size: 46px 46px, 46px 46px, auto, auto;
}

.topbar {
  border-bottom-color: rgba(1, 45, 167, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 24px rgba(1, 35, 115, 0.035);
}

.topbar > div:first-of-type span {
  color: var(--brand-blue);
}

.topbar h1 {
  color: var(--ink);
}

.topbar-site-link {
  color: #56647b;
}

.topbar-site-link span,
.topbar-site-link:hover {
  color: var(--brand-blue);
}

.admin-user {
  border-left-color: var(--line);
}

.admin-user > span {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.admin-user small {
  color: #8491a5;
}

.mobile-menu {
  border-color: var(--line);
  background: #fff;
  color: var(--brand-blue);
}

/* Banners */
.default-password-banner {
  border-color: rgba(255, 127, 0, 0.24);
  border-radius: 12px;
  background: #fff6e9;
  box-shadow: 0 10px 26px rgba(177, 92, 0, 0.055);
}

.default-password-banner strong {
  color: #8b5a12;
}

.default-password-banner span {
  color: #8a7556;
}

.default-password-banner button {
  border-color: rgba(217, 104, 0, 0.38);
  border-radius: 7px;
  color: var(--brand-orange-deep);
}

/* Metrics */
.metric {
  border-color: rgba(1, 45, 167, 0.075);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--admin-shadow);
}

.metric > span {
  color: #637189;
}

.metric:not(.metric-primary) strong {
  color: var(--brand-blue);
}

.metric small {
  color: #8895a8;
}

.metric-primary {
  border-color: transparent;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 127, 0, 0.17), transparent 25%),
    linear-gradient(145deg, #00184f 0%, #012da7 68%, #1949cb 100%);
  color: #fff;
  box-shadow: 0 20px 46px rgba(1, 35, 115, 0.2);
}

.metric-primary > span,
.metric-primary small {
  color: rgba(255, 255, 255, 0.65);
}

.metric-primary strong,
.metric-primary i {
  color: var(--brand-orange);
}

/* Cards and panels */
.panel,
.course-editor,
.payment-editor,
.review-admin-card,
.case-admin-card,
.security-notes article,
.case-upload-guide,
.review-admin-empty,
.case-admin-empty {
  border-color: rgba(1, 45, 167, 0.075);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--admin-shadow);
}

.panel-head {
  border-bottom-color: var(--line);
}

.panel-head p {
  color: #7d8a9e;
}

.view-lead p {
  color: var(--muted);
}

.course-editor > summary:hover {
  background: #f9fbff;
}

.course-summary span,
.course-summary-price {
  color: var(--brand-blue);
}

.course-summary-price {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border: 1px solid rgba(1, 45, 167, 0.16);
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.course-summary-price:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(1, 45, 167, 0.09);
}

.course-summary-price b {
  color: var(--brand-blue);
  font: 800 13px Arial, sans-serif;
}

.course-summary-price .course-quick-price {
  width: 70px;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--brand-blue);
  font: 800 16px Arial, sans-serif;
  text-align: right;
}

.course-summary-price .course-quick-price::-webkit-inner-spin-button,
.course-summary-price .course-quick-price::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.course-body,
.payment-editor-head,
.review-admin-head,
.review-admin-actions,
.form-section-title,
.form-save-row {
  border-color: var(--line);
}

.payment-editor-head {
  border-bottom-color: var(--line);
}

.summary-toggle {
  border-color: rgba(1, 45, 167, 0.15);
  color: var(--brand-blue);
}

/* Actions */
.primary-button,
.login-button,
.save-button,
.primary-action {
  border-color: var(--brand-orange);
  border-radius: 8px;
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 9px 22px rgba(255, 127, 0, 0.18);
}

.primary-button:hover,
.login-button:hover,
.save-button:hover,
.primary-action:hover {
  border-color: var(--brand-orange-deep);
  background: var(--brand-orange-deep);
}

.secondary-button,
.file-button {
  border-color: rgba(1, 45, 167, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-blue);
}

.secondary-button:hover,
.file-button:hover {
  border-color: rgba(1, 45, 167, 0.38);
  background: var(--brand-blue-soft);
}

.row-action {
  border-color: rgba(1, 45, 167, 0.16);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-blue);
}

.row-action:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.row-action-danger,
.delete-button,
.delete-order-button,
.review-delete-button {
  color: #aa4d3b;
}

.row-action-danger {
  border-color: rgba(184, 77, 59, 0.18);
}

.review-approve-button {
  border-color: var(--brand-blue);
  border-radius: 6px;
  background: var(--brand-blue);
  color: #fff;
}

.review-approve-button:hover {
  background: var(--brand-blue-deep);
}

.review-unapprove-button {
  border-color: rgba(1, 45, 167, 0.14);
  border-radius: 6px;
  background: #fff;
  color: #5d6a80;
}

.review-delete-button {
  border-color: rgba(184, 77, 59, 0.18);
  border-radius: 6px;
  background: #fff8f6;
}

/* Forms and tables */
.admin-field > span,
.qr-upload-copy span,
.toggle-label {
  color: var(--ink-2);
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.search-box input,
.order-toolbar select,
.view-filter {
  border-color: rgba(1, 45, 167, 0.13);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.search-box input:focus,
.order-toolbar select:focus,
.view-filter:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(1, 45, 167, 0.1);
}

.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: #9aa5b7;
}

.input-prefix-wrap b,
.search-box svg {
  color: #7e8ba0;
  stroke: #7e8ba0;
}

.toggle-label input,
.admin-field input[type="checkbox"],
.admin-field input[type="radio"] {
  accent-color: var(--brand-blue);
}

.toggle-row {
  border-top-color: var(--line);
}

.order-toolbar {
  border-bottom-color: var(--line);
}

.order-table th {
  border-bottom-color: var(--line);
  background: #f7faff;
  color: #7b889c;
}

.order-table td {
  border-bottom-color: #eef3fa;
  color: #3b485e;
}

.order-table tbody tr:hover {
  background: #f5f9ff;
}

.student-cell span,
.program-cell span,
.date-cell,
.source-tag {
  color: #8491a5;
}

.amount-cell {
  color: var(--brand-blue);
}

.status-new {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.status-contacted,
.pay-awaiting_review {
  background: var(--brand-orange-soft);
  color: #9b5e0d;
}

.status-enrolled,
.pay-paid {
  background: #e8f6ef;
  color: #24705a;
}

.status-completed,
.pay-unpaid {
  background: #f0f3f8;
  color: #68758a;
}

.status-cancelled,
.pay-refunded {
  background: #fbece8;
  color: #9a4d3d;
}

/* QR / upload */
.qr-preview {
  border-color: rgba(1, 45, 167, 0.16);
  border-radius: 12px;
  background: #f8faff;
  color: #8591a4;
}

.qr-upload-copy small,
.add-hint {
  color: #8591a4;
}

.form-section-title > span {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.form-section-title p {
  color: #8591a4;
}

.form-save-row > span {
  color: var(--brand-blue);
}

.sticky-save {
  border-color: rgba(1, 45, 167, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(1, 35, 115, 0.12);
}

.sticky-save span {
  color: #758298;
}

/* Notices */
.notice-card {
  border-color: rgba(255, 127, 0, 0.24);
  border-left-color: var(--brand-orange);
  border-radius: 10px;
  background: var(--brand-orange-soft);
}

.notice-card strong {
  color: #875512;
}

.notice-card p {
  color: #806f55;
}

.password-message {
  border-radius: 8px;
}

.password-message.success {
  background: #e8f6ef;
  color: #24705a;
}

.security-icon {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.security-notes p {
  color: #6f7c90;
}

.security-notes code {
  border-radius: 4px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

/* Reviews and cases */
.review-admin-person span,
.review-admin-meta span {
  color: #7f8ca0;
}

.review-admin-stars {
  color: var(--brand-orange);
}

.review-admin-content {
  color: #3e4b61;
}

.review-admin-meta span {
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.case-upload-guide > span {
  color: var(--brand-blue);
}

.case-admin-image {
  background: #e9f0fb;
}

.case-admin-order {
  border-radius: 999px;
  background: rgba(0, 27, 98, 0.82);
  color: var(--brand-orange);
}

.case-admin-empty {
  border-color: rgba(1, 45, 167, 0.14);
  background: rgba(237, 243, 255, 0.55);
}

/* Dialog and toast */
.order-dialog {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 36px 90px rgba(1, 20, 65, 0.24);
}

.order-dialog::backdrop {
  background: rgba(3, 12, 35, 0.46);
}

.dialog-head {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 94% 18%, rgba(255, 127, 0, 0.09), transparent 24%),
    linear-gradient(135deg, #edf3ff, #ffffff);
  color: var(--ink);
}

.dialog-head span {
  color: var(--brand-blue);
}

.dialog-head button {
  border-color: rgba(1, 45, 167, 0.16);
  color: #58657a;
}

.dialog-head button:hover {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.order-detail-grid {
  background: var(--brand-blue-soft);
}

.order-detail-grid > div {
  background: #fff;
}

.order-detail-grid span {
  color: #7c899d;
}

.order-form-actions span {
  color: var(--brand-blue);
}

.admin-toast {
  border-radius: 9px;
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 16px 40px rgba(1, 35, 115, 0.24);
}

.admin-toast.error {
  background: #a44535;
}

.empty-state,
.empty-state span {
  color: #7e8b9f;
}

.empty-radar,
.empty-radar::before {
  border-color: rgba(1, 45, 167, 0.16);
}

.empty-radar i {
  background: var(--brand-orange);
}

@media (max-width: 800px) {
  .login-art {
    min-height: 315px;
  }

  .sidebar {
    box-shadow: 24px 0 60px rgba(1, 35, 115, 0.14);
  }
}

/* Membership management */
.member-admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.member-admin-metrics article {
  padding: 18px 20px;
  border: 1px solid rgba(1, 45, 167, 0.1);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(1, 35, 115, 0.04);
}

.member-admin-metrics span,
.member-admin-metrics small {
  display: block;
  color: #758297;
  font-size: 10px;
}

.member-admin-metrics strong {
  display: inline-block;
  margin: 4px 5px 0 0;
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.1;
}

.member-admin-metrics small {
  display: inline;
}

.member-admin-panel,
.member-applications-panel {
  margin-bottom: 16px;
}

.member-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.member-toolbar .search-box {
  flex: 1;
}

.user-admin-list {
  display: grid;
  gap: 9px;
}

.user-admin-card {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(1, 45, 167, 0.09);
  border-radius: 12px;
  background: #fbfcff;
  transition: border-color 0.2s, background 0.2s;
}

.user-admin-card:hover {
  border-color: rgba(1, 45, 167, 0.22);
  background: #fff;
}

.user-admin-avatar {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-weight: 900;
}

.user-admin-identity { min-width: 0; }

.user-admin-identity h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.user-admin-identity p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #77849a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-membership {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.member-tier-badge,
.member-account-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 800;
}

.member-tier-badge {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.member-tier-badge.lifetime {
  background: var(--brand-orange-soft);
  color: #b95300;
}

.member-tier-badge.none {
  background: #f0f2f6;
  color: #7d8798;
}

.member-account-status.active {
  color: #168448;
}

.member-account-status.disabled {
  color: #a44535;
}

.user-admin-membership small {
  color: #8490a3;
  font-size: 9px;
}

.user-admin-edit {
  border: 1px solid rgba(1, 45, 167, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-blue);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 800;
}

.user-admin-edit:hover {
  background: var(--brand-blue);
  color: #fff;
}

.membership-application-list {
  display: grid;
  gap: 9px;
}

.member-application-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(1, 45, 167, 0.09);
  border-radius: 12px;
  background: #fbfcff;
}

.member-application-card h3 {
  margin: 0;
  font-size: 13px;
}

.member-application-card p,
.member-application-meta span {
  margin: 3px 0 0;
  color: #77849a;
  font-size: 10px;
}

.member-application-meta {
  display: grid;
  gap: 2px;
}

.member-application-meta strong {
  color: var(--brand-blue);
  font-size: 12px;
}

.member-application-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-application-actions select {
  border: 1px solid rgba(1, 45, 167, 0.16);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: #3d4a60;
  font-size: 10px;
}

.member-application-delete {
  border: 1px solid rgba(180, 35, 24, 0.2);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: #b42318;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.member-application-delete:hover {
  border-color: rgba(180, 35, 24, 0.4);
  background: #fff2f0;
}

.membership-editor {
  display: grid;
  gap: 16px;
}

.membership-save-bar {
  position: sticky;
  top: 83px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(1, 45, 167, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(1, 30, 95, 0.08);
  backdrop-filter: blur(12px);
}

.membership-save-bar > div {
  display: grid;
  gap: 1px;
}

.membership-save-bar strong {
  color: var(--brand-blue);
  font-size: 12px;
}

.membership-save-bar span {
  color: #7b879a;
  font-size: 10px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.panel-heading > div > span {
  color: var(--brand-orange-deep);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.panel-heading h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
}

.panel-heading p {
  margin: 4px 0 0;
  color: #7b879a;
  font-size: 10px;
}

.ghost-button {
  flex: 0 0 auto;
  border: 1px solid rgba(1, 45, 167, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-blue);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 800;
}

.ghost-button:hover {
  background: var(--brand-blue);
  color: #fff;
}

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

.membership-tier-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(1, 45, 167, 0.11);
  border-radius: 13px;
  background: #fbfcff;
}

.membership-tier-card.vip-card {
  background: linear-gradient(145deg, #071a55, #012da7);
  border-color: transparent;
}

.membership-tier-card.vip-card .admin-field > span,
.membership-tier-card.vip-card .membership-tier-title span {
  color: rgba(255, 255, 255, 0.58);
}

.membership-tier-card.vip-card .admin-field input,
.membership-tier-card.vip-card .admin-field textarea {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.membership-tier-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.membership-tier-title strong {
  color: var(--brand-blue);
  font-size: 12px;
}

.membership-tier-title > div > span {
  display: block;
  margin-top: 1px;
  color: #8b96a8;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.membership-tier-card.vip-card .membership-tier-title strong {
  color: #fff;
}

.membership-mini-action {
  border: 0;
  background: transparent;
  color: #a34a3a;
  font-size: 9px;
  font-weight: 800;
}

.membership-mini-action:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.membership-tier-card .editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.membership-tier-card .admin-field {
  margin: 0;
}

.membership-tier-card .admin-field textarea {
  min-height: 145px;
  resize: vertical;
  font-size: 10px;
  line-height: 1.6;
}

.admin-check-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #536177;
  font-size: 10px;
}

.membership-tier-card.vip-card .admin-check-field {
  color: rgba(255, 255, 255, 0.7);
}

.admin-check-field input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-blue);
}

.membership-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.membership-card-editor {
  display: grid;
  gap: 10px;
}

.membership-item-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(1, 45, 167, 0.1);
  border-radius: 11px;
  background: #fbfcff;
}

.membership-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.membership-item-head strong {
  color: var(--brand-blue);
  font-size: 11px;
}

.membership-item-card .editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.membership-item-card .admin-field {
  margin: 0;
}

.admin-sub-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #667389;
  font-size: 9px;
  font-weight: 700;
}

.admin-sub-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--brand-blue);
}

.user-dialog {
  width: min(780px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 36px 90px rgba(1, 20, 65, 0.24);
}

.user-dialog::backdrop {
  background: rgba(3, 12, 35, 0.46);
}

.user-dialog-form {
  display: grid;
  gap: 13px;
  padding: 0 24px 24px;
}

.user-dialog-form .dialog-head {
  margin: 0 -24px;
}

.user-dialog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: #536177;
  font-size: 10px;
}

.user-dialog-summary strong {
  color: var(--brand-blue);
}

.user-membership-orders {
  display: grid;
  gap: 7px;
}

.user-membership-order-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f7fb;
  color: #5d697c;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .membership-tier-editor { grid-template-columns: 1fr 1fr; }
  .member-admin-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .membership-editor-grid { grid-template-columns: 1fr; }
  .member-application-card { grid-template-columns: 1fr; }
  .member-application-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .member-toolbar,
  .membership-save-bar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .member-admin-metrics,
  .membership-tier-editor {
    grid-template-columns: 1fr;
  }
  .user-admin-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .user-admin-membership {
    grid-column: 2 / 3;
    justify-items: start;
  }
  .user-admin-edit { grid-column: 3; grid-row: 1 / 3; }
  .membership-save-bar { top: 67px; }
  .membership-item-card .editor-row,
  .membership-tier-card .editor-row { grid-template-columns: 1fr; }
}

/* Product & store order management */
.view-lead-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-lead-actions .secondary-button,
.view-lead-actions .primary-button { min-height: 40px; white-space: nowrap; }
.product-order-admin-panel { margin-bottom: 22px; }
.product-order-admin-panel .panel-heading { align-items: flex-start; }
.product-order-admin-list { display: grid; gap: 12px; }
.product-order-admin-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcff; }
.product-order-admin-card:hover { border-color: rgba(1, 45, 167, 0.2); background: #fff; }
.product-order-admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.product-order-title { display: grid; gap: 3px; min-width: 0; }
.product-order-title strong { color: var(--ink); font-size: 13px; letter-spacing: 0.03em; }
.product-order-title span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.product-order-amount { flex-shrink: 0; text-align: right; }
.product-order-amount span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; }
.product-order-amount strong { display: block; margin-top: 2px; color: var(--blue); font-size: 20px; letter-spacing: -0.03em; }
.product-order-items { display: grid; gap: 5px; margin: 13px 0 0; padding: 11px 0; border-top: 1px solid #e9edf5; border-bottom: 1px solid #e9edf5; list-style: none; }
.product-order-items li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; font-size: 10px; }
.product-order-items li > span { padding: 3px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 8px; font-weight: 800; text-align: center; }
.product-order-items li > strong { overflow: hidden; color: var(--ink-soft); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.product-order-items li > b { color: var(--muted); font-size: 9px; }
.product-order-items li > em { color: var(--blue); font-size: 10px; font-style: normal; font-weight: 800; }
.product-order-meta { display: flex; flex-wrap: wrap; gap: 5px 13px; padding-top: 10px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.product-order-meta span { position: relative; }
.product-order-controls { display: grid; grid-template-columns: 120px 120px minmax(150px, 1fr) auto auto; align-items: end; gap: 9px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #e9edf5; }
.product-order-control { display: grid; gap: 4px; }
.product-order-control > span { color: var(--muted); font-size: 8px; font-weight: 800; }
.product-order-control select,
.product-order-control input { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-soft); font-size: 10px; }
.product-order-save { min-height: 34px !important; padding: 0 12px !important; border-radius: 8px !important; font-size: 9px !important; }
.product-order-delete { align-self: center; margin: 0 !important; padding: 6px 0 !important; white-space: nowrap; }
.product-order-empty { margin-top: 8px; }

.product-section-divider { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 28px 0 14px; padding-top: 23px; border-top: 1px solid var(--line); }
.product-section-divider span { color: var(--orange-deep); font-size: 8px; font-weight: 900; letter-spacing: 0.17em; }
.product-section-divider h3 { margin: 3px 0 0; font-family: var(--display); font-size: 23px; letter-spacing: -0.03em; }
.product-section-divider p { max-width: 520px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: right; }

.product-editor > summary { grid-template-columns: auto 52px minmax(0, 1fr) auto auto; }
.product-summary-thumb { width: 48px; height: 38px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(135deg, var(--blue-soft), var(--orange-soft)); color: var(--blue); font-size: 8px; font-weight: 900; letter-spacing: 0.06em; }
.product-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-image-editor { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 20px; padding: 15px; border: 1px dashed #ccd5e6; border-radius: 12px; background: #fbfcff; }
.product-image-preview { min-height: 128px; display: grid; place-content: center; gap: 4px; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #e9eefb, #fff1df); color: var(--muted); text-align: center; font-size: 9px; }
.product-image-preview.has-image { background: #fff; }
.product-image-preview img { width: 100%; height: 128px; object-fit: cover; }
.product-image-preview small { color: #9aa4b6; font-size: 8px; }
.product-image-upload { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.product-image-upload strong { width: 100%; color: var(--ink); font-size: 11px; }
.product-image-upload p { width: 100%; margin: 0 0 2px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.product-upload-button { position: relative; overflow: hidden; }
.product-remove-image { margin: 0 !important; padding: 7px 0 !important; }
.product-image-status { width: 100%; margin-top: 2px; color: var(--muted); font-size: 8px; }

@media (max-width: 900px) {
  .product-order-controls { grid-template-columns: 1fr 1fr; }
  .product-order-note { grid-column: 1 / -1; }
  .product-order-save, .product-order-delete { width: 100%; }
  .product-section-divider { align-items: flex-start; flex-direction: column; gap: 8px; }
  .product-section-divider p { text-align: left; }
}

@media (max-width: 640px) {
  .view-lead-actions { width: 100%; }
  .view-lead-actions > * { flex: 1; }
  .product-order-admin-head { flex-direction: column; gap: 8px; }
  .product-order-amount { text-align: left; }
  .product-order-controls { grid-template-columns: 1fr; }
  .product-order-note { grid-column: auto; }
  .product-image-editor { grid-template-columns: 1fr; }
  .product-image-preview { min-height: 180px; }
  .product-image-preview img { height: 180px; }
  .product-editor > summary { grid-template-columns: auto 44px minmax(0, 1fr) auto; }
  .product-editor > summary .course-summary-price { grid-column: 2 / 4; grid-row: 2; }
  .product-editor > summary .summary-toggle { grid-row: 1 / 3; grid-column: 4; }
}