:root {
  --bg: #f7f9fc;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --panel-border: rgba(22, 93, 255, 0.14);
  --text: #1e293b;
  --muted: #64748b;
  --accent: #165dff;
  --accent-soft: rgba(22, 93, 255, 0.1);
  --success: #1fa971;
  --warning: #d8861f;
  --danger: #d94e5f;
  --shadow: 0 18px 45px rgba(22, 93, 255, 0.14);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --sidebar-width: 276px;
  --btn-gradient: linear-gradient(90deg, #165dff 0%, #45a3ff 100%);
}

[data-theme="dark"] {
  --bg: #0f1726;
  --panel: rgba(18, 27, 43, 0.92);
  --panel-strong: #162234;
  --panel-border: rgba(95, 117, 155, 0.22);
  --text: #edf4ff;
  --muted: #8ea0bd;
  --accent: #61a7ff;
  --accent-soft: rgba(97, 167, 255, 0.14);
  --success: #40c690;
  --warning: #f0ad4e;
  --danger: #f27787;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 93, 255, 0.08), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(0, 240, 255, 0.06), transparent 28%),
    linear-gradient(135deg, #f7f9fc 0%, #eff4ff 100%);
}

button,
input,
select {
  font: inherit;
}

.dashboard-app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: rgba(251, 253, 255, 0.96);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(140, 160, 185, 0.18);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .dashboard-sidebar {
  background: rgba(13, 23, 39, 0.94);
  color: #edf4ff;
  border-right-color: rgba(255, 255, 255, 0.06);
}

.dashboard-app.is-collapsed {
  grid-template-columns: 96px minmax(0, 1fr);
}

.dashboard-app.is-collapsed .sidebar-brand-copy,
.dashboard-app.is-collapsed .nav-label,
.dashboard-app.is-collapsed .ghost-label {
  font-size: 0;
}

.dashboard-app.is-collapsed .sidebar-nav-item,
.dashboard-app.is-collapsed .ghost-button {
  justify-content: center;
}

.dashboard-app.is-collapsed .sidebar-brand {
  justify-content: center;
}

.dashboard-app.is-collapsed .sidebar-home {
  margin: 0 auto;
}

.dashboard-app.is-collapsed .topbar-actions {
  justify-content: flex-end;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 8px 14px;
}

.sidebar-home {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #165dff, #0f3fa8);
  box-shadow: 0 18px 30px rgba(62, 146, 245, 0.2);
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-brand-copy strong {
  font-size: 1rem;
}

.sidebar-brand-copy span {
  color: var(--muted);
  font-size: 0.85rem;
}

[data-theme="dark"] .sidebar-brand-copy span {
  color: rgba(237, 244, 255, 0.68);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-item {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: transparent;
  color: #334155;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] .sidebar-nav-item {
  color: rgba(237, 244, 255, 0.72);
}

.nav-glyph,
.ghost-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-glyph svg,
.ghost-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.is-active {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.12), rgba(69, 163, 255, 0.12));
  color: #165dff;
  box-shadow: inset 0 0 0 1px rgba(52, 198, 235, 0.08);
}

[data-theme="dark"] .sidebar-nav-item:hover,
[data-theme="dark"] .sidebar-nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ghost-button,
.primary-button,
.secondary-button,
.icon-button,
.toolbar-select,
.text-input {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
}

.ghost-button {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
}

.ghost-button:hover {
  background: #ffffff;
}

[data-theme="dark"] .ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dashboard-main {
  padding: 20px 24px 28px;
}

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

.topbar-glass {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -20px -24px 22px;
  padding: 18px 24px 16px;
  border-bottom: 1px solid rgba(22, 93, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(247, 249, 252, 0.9), rgba(247, 249, 252, 0.82)),
    radial-gradient(circle at 20% 0%, rgba(22, 93, 255, 0.1), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(0, 240, 255, 0.08), transparent 24%);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 34px rgba(22, 93, 255, 0.08);
}

[data-theme="dark"] .topbar-glass {
  background:
    linear-gradient(180deg, rgba(15, 23, 38, 0.86), rgba(15, 23, 38, 0.82)),
    radial-gradient(circle at 20% 0%, rgba(22, 93, 255, 0.14), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(0, 240, 255, 0.08), transparent 24%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.topbar-headline {
  display: flex;
  align-items: center;
  min-height: 52px;
  flex: 1 1 auto;
}

.topbar-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-title {
  margin: 0;
  font-size: 2rem;
}

.topbar-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.topbar-copy {
  flex: 1 1 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-pill {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--panel-border);
  box-shadow: 0 16px 38px rgba(23, 44, 72, 0.1);
  color: #0f3fa8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

[data-theme="dark"] .topbar-pill {
  background: rgba(18, 27, 43, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.icon-button {
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.top-dropdown {
  position: relative;
}

.top-action-button {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: #5f6d84;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  box-shadow: 0 16px 38px rgba(23, 44, 72, 0.1);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] .top-action-button {
  background: rgba(18, 27, 43, 0.9);
  color: #d8e4f8;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.top-action-button.is-icon {
  width: 44px;
  padding: 0;
}

.top-action-button svg,
.topbar-user svg,
.menu-caret {
  width: 18px;
  height: 18px;
}

.top-action-button-text {
  font-size: 0.92rem;
  color: inherit;
}

.top-action-button:hover,
.top-subscription-pill:hover,
.topbar-user:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(23, 44, 72, 0.14);
}

[data-theme="dark"] .top-action-button:hover,
[data-theme="dark"] .top-subscription-pill:hover,
[data-theme="dark"] .topbar-user:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.top-notice-dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .top-notice-dot {
  box-shadow: 0 0 0 3px rgba(18, 27, 43, 0.92);
}

.top-subscription-pill {
  min-height: 44px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  box-shadow: 0 16px 38px rgba(23, 44, 72, 0.1);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] .top-subscription-pill {
  background: rgba(18, 27, 43, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.top-subscription-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(61, 130, 246, 0.16), rgba(45, 188, 165, 0.18));
  color: #165dff;
}

.top-subscription-pill-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.top-subscription-pill-copy strong {
  font-size: 1rem;
}

.top-subscription-pill-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(140, 160, 185, 0.14);
  box-shadow: 0 16px 38px rgba(23, 44, 72, 0.1);
  position: relative;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.topbar-user:hover,
.topbar-user[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(23, 44, 72, 0.14);
}

[data-theme="dark"] .topbar-user {
  background: rgba(18, 27, 43, 0.9);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .topbar-user:hover,
[data-theme="dark"] .topbar-user[aria-expanded="true"] {
  background: rgba(23, 34, 54, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.user-avatar,
.profile-avatar-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #165dff, #0f3fa8);
  color: #ffffff;
  font-weight: 700;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #165dff, #0f3fa8);
  box-shadow: 0 6px 16px rgba(10, 143, 131, 0.24);
}

.user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-copy strong {
  font-size: 0.98rem;
}

.user-copy span {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: capitalize;
}

.user-caret {
  color: var(--muted);
}

.floating-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  padding: 12px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  z-index: 40;
}

.small-menu {
  width: 180px;
}

.notice-menu {
  width: 352px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(25, 45, 75, 0.18);
}

.subscription-menu {
  width: 340px;
}

.floating-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.floating-menu-head strong {
  display: block;
  margin-bottom: 4px;
}

.floating-menu-head p,
.subscription-floating-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.floating-menu-badge {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(46, 124, 246, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.notice-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.menu-notice-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(246, 249, 253, 0.92);
  border: 1px solid rgba(140, 198, 235, 0.34);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

[data-theme="dark"] .menu-notice-item {
  background: rgba(15, 24, 40, 0.7);
}

.menu-notice-item.is-unread {
  border-color: rgba(52, 198, 235, 0.52);
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(241, 247, 255, 0.92));
}

.menu-notice-item:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 124, 246, 0.36);
  background: #ffffff;
}

.menu-notice-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.menu-notice-copy strong {
  font-size: 0.92rem;
}

.menu-notice-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.notice-read-badge {
  min-width: 52px;
  min-height: 52px;
  border-radius: 999px;
  background: rgba(46, 124, 246, 0.14);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.menu-list-button,
.menu-link-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.menu-list-button {
  padding: 11px 12px;
}

.menu-link-button {
  padding: 12px 14px;
  background: rgba(46, 124, 246, 0.08);
  color: #155eef;
  font-weight: 600;
}

.menu-list-button:hover,
.user-menu-item:hover {
  background: rgba(61, 130, 246, 0.08);
}

.menu-link-button:hover {
  background: rgba(46, 124, 246, 0.12);
}

.subscription-floating-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(245, 248, 252, 0.86);
  border: 1px solid rgba(140, 160, 185, 0.14);
  margin-bottom: 12px;
}

[data-theme="dark"] .subscription-floating-card {
  background: rgba(15, 24, 40, 0.7);
}

.subscription-floating-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.subscription-progress-block + .subscription-progress-block {
  margin-top: 12px;
}

.subscription-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.subscription-progress-row em {
  font-style: normal;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(140, 160, 185, 0.18);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #34c6eb, #22b983);
}

.user-menu {
  width: 224px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.user-menu-head {
  padding: 16px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.user-menu-head strong,
.user-menu-head span {
  display: block;
}

.user-menu-head strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.user-menu-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.user-menu-item {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
}

.user-menu-item.danger {
  color: var(--danger);
  border-bottom: 0;
}

[data-theme="dark"] .user-menu-head,
[data-theme="dark"] .user-menu-item {
  border-color: rgba(55, 65, 81, 0.8);
}

.hidden {
  display: none !important;
}

.surface {
  display: none;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.surface.is-active {
  display: block;
}

.toolbar,
.section-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar {
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.toolbar-input {
  min-width: 240px;
  max-width: 360px;
  margin-bottom: 0;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-label,
.field-label,
.panel-head p,
.section-head p {
  color: var(--muted);
}

.toolbar-select,
.text-input {
  padding: 11px 14px;
}

.primary-button {
  padding: 12px 18px;
  background: linear-gradient(90deg, #165dff 0%, #45a3ff 100%);
  border-color: transparent;
  color: #ffffff;
  cursor: pointer;
}

.primary-button:hover {
  filter: brightness(1.03);
}

.secondary-button {
  padding: 12px 18px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
}

.secondary-button:hover {
  border-color: rgba(61, 130, 246, 0.25);
}

.full-width {
  width: 100%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card,
.panel-card,
.redeem-card,
.profile-card,
.usage-row,
.quick-action-card,
.notice-item,
.subscription-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(142, 160, 185, 0.2);
  border-radius: var(--radius-lg);
}

[data-theme="dark"] .metric-card,
[data-theme="dark"] .panel-card,
[data-theme="dark"] .redeem-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .usage-row,
[data-theme="dark"] .quick-action-card,
[data-theme="dark"] .notice-item,
[data-theme="dark"] .subscription-item {
  background: rgba(15, 24, 40, 0.7);
}

.metric-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value {
  font-size: 1.7rem;
  line-height: 1.1;
}

.metric-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel-card,
.redeem-card,
.profile-card {
  padding: 20px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2,
.section-head h2 {
  margin: 0 0 6px;
}

.panel-head p,
.section-head p {
  margin: 0;
}

.distribution-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut-wrap {
  display: flex;
  justify-content: center;
}

.donut-chart {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(#d9e5f4 0deg 360deg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--panel-strong);
}

.donut-center {
  position: relative;
  z-index: 1;
  max-width: 90px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.distribution-table,
.card-table {
  overflow: auto;
}

.distribution-row,
.table-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.distribution-head,
.distribution-row {
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(72px, 1fr));
}

.distribution-head {
  color: var(--muted);
  font-size: 0.83rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.distribution-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(142, 160, 185, 0.14);
  font-size: 0.92rem;
}

.trend-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trend-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 220px;
}

.trend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.trend-stack {
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.trend-bar {
  flex: 1;
  border-radius: 12px 12px 6px 6px;
  min-height: 6px;
}

.trend-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.activity-list,
.quick-actions,
.notice-list,
.subscription-list,
.redeem-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subscription-summary {
  display: none;
}

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

.usage-row,
.quick-action-card,
.notice-item,
.subscription-item {
  padding: 16px;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.usage-main,
.notice-copy,
.subscription-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-meta,
.usage-submeta {
  color: var(--muted);
  font-size: 0.85rem;
}

.usage-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subscription-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(29, 54, 85, 0.08);
}

[data-theme="dark"] .subscription-card {
  background: rgba(15, 24, 40, 0.82);
  border-color: rgba(34, 197, 94, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.subscription-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(142, 160, 185, 0.14);
}

.subscription-card-headline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.subscription-status-dot {
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 999px;
  flex: 0 0 6px;
  background: #10b981;
}

.subscription-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.subscription-card-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
}

.subscription-provider-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  font-size: 0.72rem;
  font-weight: 600;
}

.subscription-card-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: normal;
}

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

.subscription-action-button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.subscription-action-button:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.subscription-card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
}

.subscription-expiry-row,
.subscription-meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.subscription-expiry-row {
  font-size: 0.9rem;
}

.subscription-expiry-row > span:first-child,
.subscription-meter-row > span:first-child,
.subscription-meter-note {
  color: var(--muted);
}

.subscription-expiry-value {
  color: var(--text);
}

.subscription-expired-text {
  color: #ef4444;
  font-weight: 600;
}

.subscription-meter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-meter-row {
  font-size: 0.9rem;
}

.subscription-meter-row em {
  font-style: normal;
  color: var(--muted);
}

.subscription-meter-bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.subscription-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: #22c55e;
  transition: width 0.3s ease;
}

.subscription-bar-fill.is-warning {
  background: #f97316;
}

.subscription-meter-note {
  margin: 0;
  font-size: 0.8rem;
}

.cost {
  color: var(--success);
  font-weight: 700;
}

.quick-action-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.quick-action-card:hover {
  border-color: rgba(61, 130, 246, 0.35);
}

.mini-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--panel-border);
}

.notice-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
}

.status-chip-active {
  background: rgba(34, 185, 131, 0.14);
  color: var(--success);
}

.status-chip-danger {
  background: rgba(217, 78, 95, 0.14);
  color: var(--danger);
}

.card-table table {
  width: 100%;
  border-collapse: collapse;
}

.card-table th,
.card-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(142, 160, 185, 0.14);
  text-align: left;
  white-space: nowrap;
}

.card-table th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.card-table td code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(46, 124, 246, 0.08);
}

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

.panel-action-button {
  min-height: 38px;
  padding: 9px 14px;
  color: var(--text);
}

.panel-action-button.danger {
  color: var(--danger);
}

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

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

.summary-card,
.profile-stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(142, 160, 185, 0.2);
}

[data-theme="dark"] .summary-card,
[data-theme="dark"] .profile-stat {
  background: rgba(15, 24, 40, 0.7);
}

.summary-card span,
.profile-stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.summary-card strong,
.profile-stat strong {
  font-size: 1.2rem;
}

.usage-summary-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.usage-filter-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(142, 160, 185, 0.2);
}

[data-theme="dark"] .usage-filter-card {
  background: rgba(15, 24, 40, 0.7);
}

.usage-filter-grid {
  flex: 1 1 720px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.usage-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usage-filter-field span,
.usage-pagination-summary,
.usage-page-size span {
  color: var(--muted);
  font-size: 0.84rem;
}

.usage-filter-actions,
.usage-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usage-breakdown-grid {
  margin-bottom: 18px;
}

.usage-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.usage-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(142, 160, 185, 0.2);
}

[data-theme="dark"] .usage-breakdown-item {
  background: rgba(15, 24, 40, 0.7);
}

.usage-breakdown-main,
.usage-breakdown-side {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.usage-breakdown-side {
  text-align: right;
}

.usage-breakdown-sub {
  color: var(--muted);
  font-size: 0.84rem;
}

.usage-model-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.usage-inline-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.usage-token-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.usage-token-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.usage-token-label {
  min-width: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.usage-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.usage-tag.route-default,
.usage-tag.status-success,
.usage-tag.billing-request {
  background: rgba(46, 124, 246, 0.12);
  color: #165dff;
}

.usage-tag.route-upgrade,
.usage-tag.type-stream,
.usage-tag.billing-usage {
  background: rgba(34, 185, 131, 0.14);
  color: #1fa971;
}

.usage-tag.route-client_auth,
.usage-tag.type-sync {
  background: rgba(255, 179, 71, 0.16);
  color: #c47a12;
}

.usage-tag.status-error {
  background: rgba(217, 78, 95, 0.14);
  color: #d94e5f;
}

.usage-records-table {
  min-width: 1320px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.usage-records-table th,
.usage-records-table td {
  white-space: nowrap;
  text-align: left;
  padding: 16px 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  font-size: 0.88rem;
  vertical-align: middle;
}

.usage-records-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 12px;
  padding-bottom: 12px;
}

.usage-records-table th:nth-child(2)::after {
  content: "⌃";
  margin-left: 6px;
  color: #9ca3af;
  font-size: 0.8rem;
}

.usage-records-table th:nth-child(11)::after {
  content: "⌄";
  margin-left: 6px;
  color: #9ca3af;
  font-size: 0.8rem;
}

.usage-records-table tbody tr:hover td {
  background: #f9fafb;
}

.usage-records-table .sticky-col-left {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 10px 0 18px rgba(15, 23, 42, 0.04);
}

.usage-records-table th.sticky-col-left,
.usage-records-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #f9fafb;
}

.usage-main-text,
.usage-model-text {
  color: #111827;
  font-size: 0.88rem;
}

.usage-model-text {
  font-weight: 700;
}

.usage-user-agent {
  display: block;
  max-width: 320px;
  white-space: normal;
  word-break: break-all;
  color: #4b5563;
  font-size: 0.84rem;
}

.usage-endpoint {
  display: block;
  max-width: 320px;
  white-space: normal;
  word-break: break-all;
  color: #4b5563;
}

.usage-token-cell,
.usage-cost-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.usage-token-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-token-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-token-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111827;
  font-weight: 650;
}

.usage-token-part.cache {
  color: #0284c7;
}

.usage-token-icon {
  width: 16px;
  height: 16px;
}

.usage-token-icon.input {
  color: #10b981;
}

.usage-token-icon.output {
  color: #8b5cf6;
}

.usage-token-icon.cache {
  color: #0ea5e9;
}

.usage-info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #9ca3af;
}

.usage-info-dot svg {
  width: 12px;
  height: 12px;
}

.usage-cost {
  color: #16a34a;
  font-weight: 700;
}

[data-theme="dark"] .usage-records-table {
  background: #101827;
}

[data-theme="dark"] .usage-records-table th {
  background: #172033;
  color: #9ca3af;
}

[data-theme="dark"] .usage-records-table td {
  border-bottom-color: #253044;
  color: #f3f4f6;
}

[data-theme="dark"] .usage-records-table tbody tr:hover td,
[data-theme="dark"] .usage-records-table .sticky-col-left {
  background: #172033;
}

[data-theme="dark"] .usage-main-text,
[data-theme="dark"] .usage-model-text,
[data-theme="dark"] .usage-token-part {
  color: #f9fafb;
}

.usage-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.usage-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-page-btn,
.usage-page-number {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
}

.usage-page-btn:disabled,
.usage-page-number:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.usage-page-number.is-active {
  border-color: transparent;
  background: linear-gradient(90deg, #165dff 0%, #45a3ff 100%);
  color: #ffffff;
}

.usage-page-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

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

.legacy-profile-layout {
  display: none;
}

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

.profile-overview-card {
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(170, 217, 207, 0.44);
  background:
    linear-gradient(135deg, rgba(230, 249, 245, 0.92), rgba(255, 255, 255, 0.94) 44%, rgba(255, 245, 224, 0.8));
  box-shadow: 0 20px 48px rgba(27, 61, 88, 0.1);
}

[data-theme="dark"] .profile-overview-card {
  border-color: rgba(88, 146, 135, 0.28);
  background:
    linear-gradient(135deg, rgba(18, 51, 49, 0.72), rgba(17, 24, 39, 0.94) 44%, rgba(53, 38, 19, 0.46));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

.profile-overview-shell {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 10px 12px;
}

.profile-overview-avatar {
  width: 80px;
  height: 80px;
  border-radius: 28px;
  font-size: 2rem;
  box-shadow: 0 18px 30px rgba(16, 185, 129, 0.2);
}

.profile-overview-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-overview-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.profile-overview-title-row h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.profile-overview-email {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-chip-muted {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.22);
}

.badge-chip-success {
  background: rgba(52, 211, 153, 0.14);
  color: #059669;
  border-color: rgba(52, 211, 153, 0.2);
}

.profile-overview-stats {
  margin-bottom: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-overview-stats .profile-stat {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.64);
  box-shadow: 0 10px 24px rgba(28, 55, 88, 0.05);
}

[data-theme="dark"] .profile-overview-stats .profile-stat {
  background: rgba(15, 23, 38, 0.62);
  border-color: rgba(255, 255, 255, 0.05);
}

.profile-overview-stats .profile-stat span {
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94a3b8;
}

.profile-overview-stats .profile-stat strong {
  font-size: 1.05rem;
}

.profile-section-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card-section {
  padding: 26px;
}

.profile-panel-head {
  margin-bottom: 20px;
}

.profile-panel-head h3 {
  margin: 0;
  font-size: 1.55rem;
}

.profile-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.profile-subcard,
.profile-binding-card {
  border-radius: 28px;
  border: 1px solid rgba(142, 160, 185, 0.16);
  background: rgba(248, 250, 252, 0.82);
  padding: 22px;
}

[data-theme="dark"] .profile-subcard,
[data-theme="dark"] .profile-binding-card {
  background: rgba(15, 24, 40, 0.42);
  border-color: rgba(255, 255, 255, 0.06);
}

.profile-subcard-content {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.profile-subcard-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 1.7rem;
}

.profile-subcard-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-subcard-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.profile-subcard-text,
.profile-binding-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-inline-button {
  margin-top: 8px;
}

.profile-binding-list {
  display: grid;
  gap: 16px;
}

.profile-binding-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.profile-binding-icon {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  font-weight: 700;
}

.profile-binding-icon svg {
  width: 18px;
  height: 18px;
}

.profile-binding-icon-email {
  background: rgba(45, 212, 191, 0.16);
  color: #165dff;
}

.profile-binding-icon-neutral {
  background: rgba(251, 191, 36, 0.18);
  color: #c2410c;
}

.profile-binding-icon-sky {
  background: rgba(56, 189, 248, 0.16);
  color: #0369a1;
}

.profile-binding-icon-wechat {
  background: rgba(74, 222, 128, 0.16);
  color: #15803d;
}

.profile-binding-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

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

.profile-binding-title-row h4 {
  margin: 0;
  font-size: 1rem;
}

.profile-binding-value {
  margin: 0;
  font-size: 1rem;
}

.profile-password-panel {
  max-width: 760px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 1.4rem;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.text-input {
  width: 100%;
  margin-bottom: 14px;
}

.text-input.modal-inline-input {
  margin-bottom: 0;
}

.distribution-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 38, 0.46);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 48px auto;
  padding: 0 20px;
}

.modal-wide {
  max-width: 980px;
}

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

.notice-detail-modal {
  z-index: 70;
}

.notice-detail-modal .modal-backdrop {
  background:
    radial-gradient(circle at 40% 32%, rgba(28, 163, 138, 0.16), transparent 24%),
    rgba(10, 12, 14, 0.88);
  backdrop-filter: blur(8px);
}

.notice-detail-dialog {
  max-width: 780px;
  margin-top: 10vh;
}

.notice-detail-card {
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.notice-detail-head {
  min-height: 162px;
  padding: 28px 32px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at 72% 18%, rgba(46, 124, 246, 0.16), transparent 34%),
    linear-gradient(135deg, #f8fbff, #f2f5ff);
}

.notice-detail-meta-row,
.notice-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4d7cff, #5c5ff5);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(46, 124, 246, 0.26);
}

.notice-detail-type {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(46, 124, 246, 0.11);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

.notice-detail-head h3 {
  margin: 16px 0 12px;
  color: #121827;
  font-size: 1.55rem;
  line-height: 1.3;
}

.notice-detail-meta {
  color: #536176;
  font-size: 0.9rem;
}

.notice-detail-close {
  background: rgba(232, 238, 248, 0.9);
}

.notice-detail-body {
  max-height: 56vh;
  overflow: auto;
  padding: 28px 32px;
  color: #263246;
  line-height: 1.9;
  border-left: 4px solid #4d7cff;
}

.notice-detail-body :first-child {
  margin-top: 0;
}

.notice-detail-foot {
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #edf1f7;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.88rem;
}

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

.modal-head h3 {
  margin: 0 0 6px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
}

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

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

.modal-inline-input {
  flex: 1;
}

.modal-note {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.guide-card {
  border: 1px solid rgba(142, 160, 185, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

[data-theme="dark"] .guide-card {
  background: rgba(15, 24, 40, 0.7);
}

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

.code-block {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: rgba(21, 31, 48, 0.95);
  color: #edf4ff;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.empty-state {
  padding: 22px 10px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(21, 31, 48, 0.94);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 1200px) {
  .metric-grid,
  .usage-summary-grid,
  .subscription-summary,
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .distribution-layout,
  .two-column,
  .redeem-layout,
  .profile-layout,
  .profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-overview-stats {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .dashboard-app,
  .dashboard-app.is-collapsed {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: relative;
    height: auto;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-glass {
    margin-left: -24px;
    margin-right: -24px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }

  .profile-overview-shell,
  .profile-binding-card {
    flex-direction: column;
  }

  .profile-overview-title-row h3 {
    font-size: 1.6rem;
  }

  .topbar-user .user-copy {
    display: none;
  }

  .metric-grid,
  .usage-summary-grid,
  .subscription-summary,
  .profile-stats {
    grid-template-columns: 1fr;
  }

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

  .usage-filter-actions,
  .usage-pagination-controls {
    width: 100%;
    flex-wrap: wrap;
  }
}
