:root {
  color-scheme: light;
  --bg: #f0f2f5;
  --bg-soft: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --text: #303133;
  --text-secondary: #606266;
  --muted: #909399;
  --line: #e4e7ed;
  --line-light: #ebeef5;
  --brand: #409eff;
  --brand-hover: #66b1ff;
  --brand-light: #ecf5ff;
  --brand-dark: #337ecc;
  --success: #67c23a;
  --success-bg: #f0f9eb;
  --success-border: #c2e7b0;
  --warn: #e6a23c;
  --warn-bg: #fdf6ec;
  --warn-border: #f5dab1;
  --danger: #f56c6c;
  --danger-bg: #fef0f0;
  --danger-border: #fbc4c4;
  --shadow-sm: 0 1px 4px rgba(0, 21, 41, 0.06);
  --shadow: 0 2px 12px rgba(0, 21, 41, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 21, 41, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 220px;
  --header-h: 56px;
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-hover);
}

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

/* ── Auth pages ── */

body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(64, 158, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(103, 194, 58, 0.08), transparent 50%),
    linear-gradient(160deg, #eef2f8 0%, #f5f7fa 45%, #fafbfc 100%);
}

.auth-box {
  width: min(420px, 100%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 28px;
}

.auth-card .brand {
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .brand h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.auth-card .brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #53a8ff);
  box-shadow: 0 4px 14px rgba(64, 158, 255, 0.35);
}

.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-foot a {
  font-weight: 500;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  margin: 16px auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── App shell (sidebar layout) ── */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--line-light);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.sidebar-brand:hover {
  background: var(--surface-2);
  color: inherit;
}

.sidebar-brand .brand-mark {
  width: 32px;
  height: 32px;
  margin: 0;
  font-size: 13px;
  border-radius: 8px;
}

.sidebar-brand-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.sidebar-link.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 500;
}

.sidebar-link .icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid var(--line-light);
}

.sidebar-divider {
  height: 1px;
  margin: 10px 14px;
  background: var(--line-light);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-page .app-header-sub {
  display: none;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.app-header {
  min-height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  gap: 16px;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-header-text {
  min-width: 0;
}

.app-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.app-header-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.user-menu {
  position: relative;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.user-menu:hover .user-badge,
.user-menu:focus-within .user-badge {
  background: var(--surface);
  border-color: var(--line-light);
  box-shadow: var(--shadow-sm);
}

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

.user-caret {
  font-size: 10px;
  color: var(--muted);
  transition: transform var(--transition);
}

.user-menu:hover .user-caret,
.user-menu:focus-within .user-caret {
  transform: rotate(180deg);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #53a8ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 120;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-head {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 4px;
}

.user-dropdown-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.user-dropdown-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.user-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.app-content {
  flex: 1;
  padding: 20px 24px 32px;
}

/* Legacy page wrapper (fallback) */
.page {
  width: min(1280px, 100%);
  margin: 0 auto;
}

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

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover {
  color: var(--brand);
  border-color: #c6e2ff;
  background: var(--brand-light);
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

.btn.danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn.ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--text);
}

.btn.sm {
  padding: 5px 12px;
  font-size: 13px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition);
  font-size: 14px;
}

.nav-link:hover {
  color: var(--brand);
  background: var(--brand-light);
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 500;
}

/* ── Cards & grid ── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--brand);
  border-radius: 2px;
  flex-shrink: 0;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.section-gap {
  margin-top: 16px;
}

/* ── Metrics ── */

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -8px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-light);
  opacity: 0.5;
}

.metric .label {
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.metric .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.metric .muted {
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.metric-accent .value {
  color: var(--brand);
}

/* ── Forms ── */

.form {
  display: grid;
  gap: 16px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.form input,
.form select,
.form textarea,
.input-inline {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form input:hover,
.form select:hover,
.form textarea:hover,
.input-inline:hover {
  border-color: #c0c4cc;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.input-inline:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.form input::placeholder,
.form textarea::placeholder,
.input-inline::placeholder {
  color: #c0c4cc;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha-img {
  width: 120px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}

.captcha-row input {
  flex: 1;
  min-width: 120px;
}

/* ── Tables ── */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid var(--line-light);
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: #fafcff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ── Tabs ── */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.tab {
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  padding: 9px 18px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--brand);
  background: var(--brand-light);
}

.tab.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Notices ── */

.notice {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: #b88230;
}

.notice.error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 500;
}

.notice.error a {
  color: var(--danger);
  text-decoration: underline;
}

.notice.success {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: #529b2e;
  font-weight: 500;
}

.notice.info {
  border-color: #b3d8ff;
  background: var(--brand-light);
  color: var(--brand-dark);
}

.form .notice {
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Utilities ── */

.muted {
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--success-border);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--success);
  font-size: 12px;
  background: var(--success-bg);
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--line-light);
}

.tag.primary {
  background: var(--brand-light);
  color: var(--brand);
  border-color: #b3d8ff;
}

.hidden {
  display: none !important;
}

.qr {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
}

.pay-box {
  border: 1px dashed var(--brand);
  background: var(--brand-light);
}

.chart-card canvas {
  max-height: 260px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar .input-inline {
  flex: 1;
  min-width: 200px;
}

/* ── Toast ── */

#portalToast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

#portalToast .notice {
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Modal ── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 0;
  animation: modalIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header h2 {
  margin: 0;
}

.modal-header h2::before {
  display: none;
}

.modal-close {
  flex-shrink: 0;
  min-width: 32px;
  padding: 4px 8px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.plan-tier {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.plan-tier h3 {
  margin: 0 0 10px;
}

/* ── 会员概览卡片（用户中心用量页） ── */

.member-dashboard {
  padding: 0;
  overflow: hidden;
}

.member-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  background: linear-gradient(135deg, #3a8ee6 0%, #409eff 42%, #66b1ff 100%);
  color: #fff;
  position: relative;
}

.member-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 90% at 100% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgba(255, 255, 255, 0.1), transparent 50%);
  pointer-events: none;
}

.member-hero.inactive {
  background: linear-gradient(135deg, #6b7280 0%, #909399 55%, #a8abb2 100%);
}

.member-hero.expired {
  background: linear-gradient(135deg, #c45656 0%, #f56c6c 45%, #f89898 100%);
}

.member-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 280px;
}

.member-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.member-hero-text {
  min-width: 0;
}

.member-hero-label {
  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.member-hero-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tier-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.member-live-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

.member-hero-meta {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.member-hero-meta .member-remain {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  font-size: 12px;
}

.member-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.member-hero-actions .btn.primary {
  background: #fff;
  color: var(--brand-dark);
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.member-hero-actions .btn.primary:hover {
  background: #f5f9ff;
  color: var(--brand);
}

.member-hero.expired .member-hero-actions .btn.primary,
.member-hero.inactive .member-hero-actions .btn.primary {
  color: #c45656;
}

.member-hero.inactive .member-hero-actions .btn.primary {
  color: #606266;
}

.member-hero-actions .btn.ghost-on-hero {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.member-hero-actions .btn.ghost-on-hero:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.member-body {
  padding: 22px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.member-wallet {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-light);
  background: var(--surface-2);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.member-wallet:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.member-wallet.credits-wallet {
  background: linear-gradient(145deg, var(--brand-light) 0%, var(--surface) 72%);
  border-color: #d9ecff;
}

.member-wallet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.member-wallet-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line-light);
  color: var(--brand);
}

.member-wallet.credits-wallet .member-wallet-icon {
  background: #fff;
  border-color: #d9ecff;
}

.member-wallet.balance-wallet .member-wallet-icon {
  color: var(--success);
}

.member-wallet-head > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.member-wallet-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.member-wallet-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.member-wallet-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  flex-shrink: 0;
  text-align: right;
}

.member-wallet.credits-wallet .member-wallet-value {
  color: var(--brand);
}

.member-wallet.balance-wallet .member-wallet-value {
  color: var(--success);
}

.member-quota {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-light);
}

.member-quota-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.member-quota-meta span:last-child {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.member-deduct-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  font-size: 13px;
}

.member-deduct-flow .flow-step {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-light);
  color: var(--text-secondary);
}

.member-deduct-flow .flow-step.primary {
  background: var(--brand-light);
  border-color: #d9ecff;
  color: var(--brand-dark);
  font-weight: 600;
}

.member-deduct-flow .flow-arrow {
  color: var(--muted);
  font-size: 16px;
}

.member-footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 720px) {
  .member-hero {
    padding: 20px 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .member-hero-actions {
    width: 100%;
  }

  .member-hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .member-body {
    padding: 18px 16px 16px;
  }

  .member-wallet-grid {
    grid-template-columns: 1fr;
  }

  .member-wallet-value {
    font-size: 24px;
  }

  .member-tier-name {
    font-size: 20px;
  }
}

/* ── 充值余额页 ── */

.recharge-dashboard {
  padding: 0;
  overflow: hidden;
}

.member-wallet.full-width {
  max-width: 100%;
}

.recharge-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  background: linear-gradient(135deg, #4caf50 0%, #67c23a 42%, #85ce61 100%);
  color: #fff;
  position: relative;
}

.recharge-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 90% at 100% 0%, rgba(255, 255, 255, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgba(255, 255, 255, 0.12), transparent 50%);
  pointer-events: none;
}

.recharge-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 280px;
}

.recharge-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.recharge-hero-text {
  min-width: 0;
}

.recharge-hero-balance {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 4px;
}

.recharge-hero-meta {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.recharge-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.recharge-tier-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.recharge-expire {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}

.recharge-panel {
  padding: 22px 28px 20px;
}

.recharge-panel-head {
  margin-bottom: 16px;
}

.recharge-panel-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.recharge-panel-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.recharge-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

.recharge-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 108px;
  padding: 18px 14px;
  border: 2px solid var(--line-light);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
}

.recharge-amount-card:hover {
  border-color: var(--success);
  background: var(--success-bg);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.recharge-amount-card:active {
  transform: translateY(0);
}

.recharge-amount-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.recharge-amount-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.recharge-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 40px 28px;
}

.recharge-blocked-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.recharge-blocked h2 {
  margin: 0;
  font-size: 18px;
}

.recharge-blocked p {
  margin: 0;
  max-width: 420px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.recharge-pay {
  padding: 0;
  overflow: hidden;
  border-color: #c2e7b0;
}

.recharge-pay-head {
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--success-bg) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--success-border);
}

.recharge-pay-head h2 {
  margin: 0;
  font-size: 18px;
}

.recharge-pay-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.recharge-pay-body {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px;
}

.recharge-pay-qr {
  flex-shrink: 0;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
}

.recharge-pay-qr .qr {
  display: block;
  margin: 0;
}

.recharge-pay-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recharge-pay-order {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.recharge-pay-order strong {
  color: var(--text);
  font-size: 22px;
}

@media (max-width: 720px) {
  .recharge-hero {
    padding: 20px 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .recharge-hero-side {
    align-items: flex-start;
  }

  .recharge-expire {
    text-align: left;
  }

  .recharge-hero-balance {
    font-size: 30px;
  }

  .recharge-panel {
    padding: 18px 16px;
  }

  .recharge-amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .recharge-amount-card {
    min-height: 96px;
    padding: 14px 10px;
  }

  .recharge-amount-value {
    font-size: 20px;
  }

  .recharge-pay-body {
    padding: 18px 16px;
    justify-content: center;
  }
}

.balance-hint {
  font-size: 13px;
  color: var(--muted);
}

.balance-hint strong {
  color: var(--brand);
  font-size: 15px;
}

.credits-quota {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.credits-quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.credits-quota-label { color: var(--muted); }
.credits-quota-nums {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.credits-quota-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.credits-quota-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #22c55e);
  transition: width 0.35s ease;
}
.credits-quota-fill.low { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.credits-quota-fill.critical { background: linear-gradient(90deg, #f87171, #ef4444); }
.credits-quota-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Error page ── */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.error-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

/* ── Mobile sidebar toggle ── */

.sidebar-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius);
}

.sidebar-toggle:hover {
  background: var(--surface-2);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99;
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .app-content {
    padding: 16px;
  }

  .app-header {
    padding: 0 16px;
  }

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

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px 22px;
  }

  .metric .value {
    font-size: 22px;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* ══════════════════════════════════════
   Admin console enhancements
   ══════════════════════════════════════ */

.admin-page .app-content {
  background: var(--bg);
}

.admin-page .tabs {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-sm);
  gap: 4px;
  margin-bottom: 20px;
}

.admin-page .tab {
  border-radius: 8px;
  font-weight: 500;
}

.admin-page .tab.active {
  box-shadow: var(--shadow-sm);
}

.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-page-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.admin-page-head h2::before {
  display: none;
}

.admin-page-head .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.admin-panel > h2 {
  margin-top: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.admin-stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--brand-light);
}

.admin-stat-icon.green { background: var(--success-bg); }
.admin-stat-icon.orange { background: var(--warn-bg); }
.admin-stat-icon.purple { background: #f3e8ff; }

.admin-stat-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-body .label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.admin-stat-body .value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.admin-stat-body .value-row.money {
  gap: 2px;
}

.admin-stat-body .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.admin-stat-body .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

.admin-stat-body .currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.admin-stat-body .value.accent {
  color: var(--brand);
}

.admin-stat-body .value-row.money .currency + .value.accent {
  color: var(--brand);
}

/* ── Pricing cards ── */

.pricing-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.pricing-tier-card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pricing-tier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--line-light);
}

.pricing-tier-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.pricing-tier-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-tier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pricing-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
}

.pricing-plan-card {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pricing-plan-card:hover {
  border-color: #c6e2ff;
  box-shadow: var(--shadow-sm);
}

.pricing-plan-card.disabled {
  opacity: 0.55;
}

.plan-cycle-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-light);
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}

.plan-price-main {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.plan-price-old {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.plan-detail-row {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.plan-card-foot {
  margin-top: auto;
  padding-top: 4px;
}

.pricing-plan-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.admin-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

.admin-empty strong {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 15px;
}

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

@media (max-width: 560px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .pricing-board {
    grid-template-columns: 1fr;
  }
}

/* ── Content hub: announcements + contact ── */

.content-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 20px;
  align-items: start;
}

.content-main,
.content-contact-card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.content-side {
  position: sticky;
  top: 16px;
}

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

.content-block-head.compact {
  margin-bottom: 14px;
}

.content-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-block-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.content-block-title h3::before {
  display: none;
}

.content-block-title .muted {
  margin: 0;
  font-size: 12px;
}

.content-block-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.content-block-icon.ann {
  background: linear-gradient(135deg, #ecf5ff, #d9ecff);
}

.content-block-icon.contact {
  background: linear-gradient(135deg, #f0f9eb, #e1f3d8);
}

.content-stat-pill {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid #d9ecff;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.content-ann-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-ann-item {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: linear-gradient(180deg, #fafcff 0%, var(--surface) 100%);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.content-ann-item:hover {
  border-color: #c6e2ff;
  box-shadow: var(--shadow-sm);
}

.content-ann-item.is-hidden {
  opacity: 0.65;
  background: var(--surface-2);
}

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

.content-ann-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.content-ann-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.content-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.content-status.live {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.content-status.off {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.content-sort-tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-light);
  padding: 2px 8px;
  border-radius: 999px;
}

.content-ann-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0.85;
}

.content-ann-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.content-ann-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.content-ann-empty strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}

.content-ann-empty .muted {
  margin: 0 0 16px;
}

.content-mock-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1d1e1f;
  border-radius: 10px;
  overflow: hidden;
}

.content-mock-toolbar.compact {
  padding: 8px 12px;
}

.content-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f56c6c;
  flex-shrink: 0;
  animation: annPulse 2s ease-in-out infinite;
}

@keyframes annPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.content-mock-scroll {
  flex: 1;
  min-width: 0;
  color: #e5eaf3;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}

.content-mock-scroll-inner {
  display: inline-block;
  padding-left: 100%;
  animation: content-mock-marquee 18s linear infinite;
}

@keyframes content-mock-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.content-mock-scroll a {
  color: #79bbff;
}

.content-contact-form {
  margin-bottom: 16px;
}

.content-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.content-contact-form textarea {
  min-height: 120px;
  margin-top: 6px;
}

.btn.block {
  width: 100%;
  justify-content: center;
}

.content-phone-mock {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 10px 14px;
  background: linear-gradient(180deg, #f5f7fa 0%, #eef1f6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.content-phone-notch {
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: #dcdfe6;
  margin: 0 auto 10px;
}

.content-phone-screen {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line-light);
  overflow: hidden;
}

.content-phone-bar {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--line-light);
  background: var(--surface-2);
}

.content-phone-body {
  padding: 14px;
  min-height: 140px;
}

.content-phone-section-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.content-phone-contact {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
}

/* ── Announcement modal ── */

.ann-modal-dialog {
  width: min(860px, 100%);
}

.ann-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 20px;
  align-items: start;
}

.ann-modal-form {
  margin: 0;
}

.ann-modal-preview {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--surface-2);
}

.ann-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.ann-preview-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .content-hub {
    grid-template-columns: 1fr;
  }

  .content-side {
    position: static;
  }

  .ann-modal-body {
    grid-template-columns: 1fr;
  }
}

/* legacy ann-grid (unused) */
.ann-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.admin-table-panel .table-wrap {
  border: none;
  border-radius: var(--radius);
}

.modal-dialog.wide {
  width: min(640px, 100%);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.pricing-tier-card.disabled .pricing-tier-head {
  background: var(--surface-2);
}

.pricing-tier-card.disabled {
  opacity: 0.72;
}

.admin-page .chart-card {
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
}

.admin-page .chart-card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-page .chart-card h2::before {
  display: none;
}

.admin-table-panel .empty-state {
  padding: 40px 20px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.admin-table-panel td:last-child,
.admin-table-panel th:last-child {
  white-space: nowrap;
}

.admin-table-panel .btn.sm {
  margin: 2px 0;
}

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