﻿@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #f6f8fc;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --ink: #1b2a41;
  --muted: #6c7a92;
  --accent: #3f6ef5;
  --accent-strong: #3157c9;
  --warn: #ff9b4a;
  --danger: #e05a5a;
  --border: #e7edf6;
  --shadow: 0 18px 45px rgba(24, 45, 90, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-y: scroll;
  background: radial-gradient(circle at top right, rgba(63, 110, 245, 0.16), transparent 45%),
    radial-gradient(circle at 18% 18%, rgba(187, 205, 255, 0.2), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.bg-glow {
  position: fixed;
  inset: -20% 0 auto 0;
  height: 60vh;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8vw;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

pre {
    white-space: pre-wrap; /* 核心：允许自动换行 */
    word-wrap: break-word; /* 长单词/长链接强制换行 */
    overflow-x: hidden; /* 禁用横向滚动条（可选） */
    max-width: 100%; /* 不超过父容器宽度 */
    display: block;
}

/* 公式容器强制不溢出 */
.katex {
    overflow-x: auto;
    max-width: 100%;
    display: inline-block;
}

.brand {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--ink);
}

.pill,
.ghost,
.danger {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.pill {
  background: var(--accent);
  color: #ffffff;
}

.pill:hover {
  background: var(--accent-strong);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.points {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(63, 110, 245, 0.12);
  font-size: 13px;
  color: var(--ink);
}

.circle-number {
  display: inline-grid;
  place-items: center;
  min-width: 1.8em;
  height: 1.8em;
  padding: 0 0.35em;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
}

.page {
  position: relative;
  z-index: 1;
  padding: 40px 8vw 80px;
}

.footer {
  padding: 20px 8vw 30px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: center;
  margin-bottom: 40px;
}

.hero-copy h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  margin: 0 0 12px;
}

.hero-copy p {
  color: var(--muted);
  max-width: 520px;
}

.hero-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.user-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  justify-self: end;
}

.panel-tabs {
  display: flex;
  gap: 0;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.slanted-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(63, 110, 245, 0.04);
}

.slanted-tabs .tab {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  border: 0;
  transform: skewX(-12deg);
  transition: all 0.2s ease;
  flex: 1;
  color: var(--muted);
}

.slanted-tabs .tab span {
  display: block;
  transform: skewX(12deg);
  font-weight: 600;
}

.slanted-tabs .tab.active {
  background: rgba(63, 110, 245, 0.16);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(63, 110, 245, 0.3);
  z-index: 1;
}

.slanted-tabs .tab:hover {
  color: var(--ink);
}

.slanted-tabs .tab:first-child {
  border-radius: 14px 0 0 14px;
}

.slanted-tabs .tab:last-child {
  border-radius: 0 14px 14px 0;
  margin-left: -18px;
}

.user-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.user-identity > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(63, 110, 245, 0.14);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
}

.user-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.user-email {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.metric {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(63, 110, 245, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.metric-value {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.user-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.support-title {
  font-weight: 700;
  font-size: 16px;
}

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

.support-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(63, 110, 245, 0.04);
  font-size: 13px;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
}

.search-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -4px 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(63, 110, 245, 0.05);
  color: var(--muted);
  font-size: 14px;
}

.search-summary strong {
  color: var(--ink);
}

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

.card {
    background: var(--card);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 180px;
    box-shadow: var(--shadow);
    color: black !important; /* 加 !important 就能强制覆盖内联样式 */
    font-size: 12pt !important;
}

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

.card-type {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(63, 110, 245, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.card p {
  /*color: var(--muted);*/
  margin: 0;
}
.card-html * {
    max-width: 100% !important;
    width: auto !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    color: black !important; /* 加 !important 就能强制覆盖内联样式 */
    font-size: 12pt !important;
}

.card-html {
    /*color: var(--ink);*/
    line-height: 1.6;
    overflow-x: auto;
    white-space: normal;
    word-wrap: break-word;
}

.card-html p,
.card-html ul,
.card-html ol {
  margin: 0 0 10px;
}

.compound-question {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.compound-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(63, 110, 245, 0.04);
}

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


.card .meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.card-link {
  margin-top: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.card-answer-btn {
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
}

.card-answer-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.card-answer-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

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

.answer-reveal-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(63, 110, 245, 0.05);
}

.answer-reveal-item-title {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.pagination {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.page-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}

.page-info {
  color: var(--muted);
  font-size: 12px;
  padding: 0 6px;
}

.auth-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: center;
}

.auth-card {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-side {
  padding: 24px;
  background: linear-gradient(130deg, rgba(63, 110, 245, 0.12), rgba(187, 205, 255, 0.2));
  border-radius: 24px;
  border: 1px solid var(--border);
}

.auth-side h2 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.auth-highlight {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: rgba(63, 110, 245, 0.14);
  color: var(--ink);
  border-color: rgba(63, 110, 245, 0.32);
}

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

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form input,
.form textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
}

.form textarea {
  resize: vertical;
}

.captcha-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 10px;
  align-items: center;
}

.captcha-image {
  width: 160px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7faff;
  object-fit: cover;
}

.captcha-refresh {
  white-space: nowrap;
  align-self: stretch;
}

.verify-code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.form-tip {
  font-size: 12px;
  color: var(--muted);
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-header h1 {
  margin: 0;
}

.dash-header p {
  margin: 0;
  color: var(--muted);
}

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

.panel {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-weight: 700;
  margin-bottom: 14px;
}

.admin-console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 560px;
  padding: 24px 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(63, 110, 245, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.98));
  color: var(--ink);
  box-shadow: var(--shadow);
}

.admin-sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(63, 110, 245, 0.16), rgba(187, 205, 255, 0.42));
  border: 1px solid rgba(63, 110, 245, 0.16);
  box-shadow: 0 14px 28px rgba(63, 110, 245, 0.16);
}

.admin-sidebar-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-sidebar-subtitle {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.admin-sidebar-group-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 6px;
}

.admin-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  background: rgba(63, 110, 245, 0.04);
  color: var(--muted);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.admin-menu-item:hover {
  background: rgba(63, 110, 245, 0.08);
  border-color: rgba(63, 110, 245, 0.12);
  color: var(--ink);
  transform: translateX(2px);
}

.admin-menu-item.active {
  color: var(--accent-strong);
  background: rgba(63, 110, 245, 0.12);
  border-color: rgba(63, 110, 245, 0.18);
  box-shadow: inset 0 0 0 1px rgba(63, 110, 245, 0.08);
}

.admin-menu-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: rgba(63, 110, 245, 0.12);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.admin-menu-item.active .admin-menu-item-icon {
  background: rgba(63, 110, 245, 0.18);
}

.admin-content-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-page-section {
  gap: 18px;
}

.admin-page-header {
  padding: 4px 2px 0;
}

.admin-users-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-feedback-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 420px);
  color: var(--muted);
  font-size: 13px;
}

.admin-search input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
}

.admin-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-summary {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(63, 110, 245, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-user-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.94));
}

.admin-user-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-user-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.admin-user-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-user-email {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-user-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.admin-user-status.is-active {
  color: #1f6b43;
  background: rgba(53, 179, 126, 0.14);
}

.admin-user-status.is-disabled {
  color: #9a3d34;
  background: rgba(225, 98, 78, 0.16);
}

.admin-user-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-user-meta span {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(63, 110, 245, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.admin-user-ops {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 110, 245, 0.12);
}

.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  flex: 1 1 420px;
}

.admin-inline-form[data-action="password"] {
  grid-template-columns: minmax(0, 220px) auto;
  flex: 0 1 360px;
}

.admin-inline-form input {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
}

.admin-inline-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-inline-note {
  min-width: 180px;
}

.admin-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-feedback-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.94));
}

.admin-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.admin-feedback-header-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-feedback-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-feedback-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.admin-feedback-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-feedback-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(63, 110, 245, 0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.admin-feedback-delete {
  padding-inline: 14px;
}

.admin-feedback-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-feedback-meta span {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(63, 110, 245, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.admin-feedback-preview {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(63, 110, 245, 0.2);
  background: rgba(63, 110, 245, 0.04);
  color: var(--ink);
  line-height: 1.6;
}

.table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.8fr 0.8fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.table-row.header {
  background: rgba(63, 110, 245, 0.1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.form.compact {
  margin-bottom: 16px;
}

.article-shell {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
}

.article-header h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  margin: 0 0 10px;
}

.article-meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.article-body {
  margin-top: 20px;
  line-height: 1.7;
  color: #273142;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 12px;
}

.article-action {
  margin-top: 16px;
}

.empty {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}

.hidden {
  display: none;
}

.hint {
  color: var(--warn);
  font-size: 13px;
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 100;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 50, 95, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30;
  backdrop-filter: blur(6px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
  position: relative;
  animation: pop-in 0.2s ease;
}

.modal-title {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 22px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
}

.recharge-modal {
  width: min(460px, 92vw);
  text-align: center;
}

.recharge-message {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.recharge-qr-shell {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.recharge-qr-image {
  width: min(180px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(24, 45, 90, 0.08);
}

.recharge-tip {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.recharge-action {
  width: 100%;
}

@keyframes pop-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

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

  .user-panel {
    max-width: none;
    justify-self: stretch;
  }

  .topbar {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .table-row.header {
    display: none;
  }

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

  .admin-sidebar {
    position: static;
    min-height: auto;
    padding: 20px 16px;
  }

  .admin-sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-menu-item {
    flex: 1 1 180px;
  }

  .admin-toolbar,
  .admin-user-header,
  .admin-feedback-header {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-feedback-actions {
    justify-content: flex-start;
  }

  .admin-user-ops {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-inline-form,
  .admin-inline-form[data-action="password"] {
    grid-template-columns: 1fr;
    flex: 1 1 auto;
  }

  .admin-inline-actions {
    width: 100%;
  }

  .admin-inline-actions .ghost,
  .admin-inline-form .ghost,
  .admin-toolbar-actions .ghost,
  .admin-toolbar-actions .pill {
    width: 100%;
  }

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

  .captcha-image,
  .captcha-refresh {
    width: 100%;
  }
}
