/* STS 全站视觉主题：极光 (aurora) / 夜幕 (noir)，由 Cookie STS.Application.VisualTheme + html[data-sts-theme] 驱动 */

/* —— 顶栏用户头像（完美圆形 + 强制覆盖 core.css） —— */
body .avatar {
  border-radius: 50% !important;
  overflow: hidden !important;
}

body .avatar img {
  object-fit: cover !important;
  border-radius: 0 !important;
}

/* —— 顶栏用户头像：必须固定圆形容器尺寸。仅依赖 dist/web.css 时若缺少下列规则，img 的 width:100% 会以错误参照拉伸，顶栏头像会异常巨大 */
.profile-avatar-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #5d87ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-circle.profile-avatar-lg {
  width: 60px;
  height: 60px;
}

.profile-avatar-circle .profile-avatar-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-initial {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  user-select: none;
}

.profile-avatar-initial.profile-avatar-initial-lg {
  font-size: 1.4rem;
}

/* —— 登录 / 注册卡片 —— */
.register-shell,
.login-shell {
  max-width: 460px;
  margin: 0 auto;
}

.register-card {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.75rem 1.75rem 2rem;
  overflow: hidden;
  transition: background 0.35s ease, box-shadow 0.35s ease, color 0.25s ease;
}

.register-card__stripe {
  display: none;
}

.register-card__title {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.register-card__lead {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

@keyframes sts-aurora-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ========== 极光 ========== */
html[data-sts-theme="aurora"] .register-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5f3ff 48%, #eef2ff 100%);
  box-shadow:
    0 4px 28px rgba(99, 102, 241, 0.14),
    0 0 0 1px rgba(99, 102, 241, 0.06);
}

html[data-sts-theme="aurora"] .register-card__stripe {
  display: block;
  height: 5px;
  margin: -1.75rem -1.75rem 1.25rem -1.75rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #c084fc, #6366f1);
  background-size: 200% 100%;
  animation: sts-aurora-shift 8s ease infinite;
}

html[data-sts-theme="aurora"] .btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

html[data-sts-theme="aurora"] .btn-primary:hover {
  filter: brightness(1.05);
}

html[data-sts-theme="aurora"] .login-shell .btn-light {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.22);
}

html[data-sts-theme="aurora"] .login-shell .btn-light:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

/* ========== 夜幕 ========== */
html[data-sts-theme="noir"] .register-card {
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #020617 100%);
  color: #e2e8f0;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.12),
    0 24px 48px rgba(15, 23, 42, 0.45);
}

html[data-sts-theme="noir"] .register-card__title {
  color: #f8fafc;
}

html[data-sts-theme="noir"] .register-shell .text-muted,
html[data-sts-theme="noir"] .login-shell .text-muted {
  color: #c7d2e0 !important;
}

html[data-sts-theme="noir"] .register-shell .form-label,
html[data-sts-theme="noir"] .login-shell .form-label {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .register-shell .form-control,
html[data-sts-theme="noir"] .login-shell .form-control {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.25);
  color: #f1f5f9;
}

html[data-sts-theme="noir"] .register-shell .form-control:focus,
html[data-sts-theme="noir"] .login-shell .form-control:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: #22d3ee;
  box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2);
  color: #fff;
}

html[data-sts-theme="noir"] .register-shell .btn-primary,
html[data-sts-theme="noir"] .login-shell .btn-primary {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  border: none;
  color: #0f172a;
  font-weight: 700;
}

html[data-sts-theme="noir"] .register-shell .btn-primary:hover,
html[data-sts-theme="noir"] .login-shell .btn-primary:hover {
  filter: brightness(1.08);
  color: #0f172a;
}

html[data-sts-theme="noir"] .register-shell .text-danger,
html[data-sts-theme="noir"] .login-shell .text-danger {
  color: #fca5a5 !important;
}

html[data-sts-theme="noir"] .login-shell .btn-light {
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-sts-theme="noir"] .login-shell .btn-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

html[data-sts-theme="noir"] .login-shell .btn-light.text-dark {
  color: #e2e8f0 !important;
}

html[data-sts-theme="noir"] .login-shell .btn-outline-secondary {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.45);
  background: transparent;
}

html[data-sts-theme="noir"] .login-shell .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

html[data-sts-theme="noir"] .login-shell .btn-info {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.45);
  color: #67e8f9;
}

html[data-sts-theme="noir"] .login-shell .btn-info:hover {
  background: rgba(34, 211, 238, 0.2);
  color: #a5f3fc;
}

html[data-sts-theme="noir"] .login-shell .btn-dark {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}

html[data-sts-theme="noir"] .login-shell .btn-dark:hover {
  background: rgba(129, 140, 248, 0.28);
  color: #e0e7ff;
}

html[data-sts-theme="noir"] .login-shell .form-check-input {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.4);
}

html[data-sts-theme="noir"] .login-shell .form-check-input:checked {
  background-color: #22d3ee;
  border-color: #22d3ee;
}

html[data-sts-theme="noir"] .login-shell .form-check-label {
  color: #cbd5e1;
}

html[data-sts-theme="noir"] .login-shell .login-or-label {
  background-color: transparent !important;
  color: #cbd5e1 !important;
}

html[data-sts-theme="noir"] .login-shell .position-relative .border-top {
  border-color: rgba(148, 163, 184, 0.28) !important;
}

html[data-sts-theme="noir"] .login-shell .alert-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

/* ========== Account 全屏布局 · 极光 ========== */
html[data-sts-theme="aurora"] body {
  background-color: #f8fafc;
}

html[data-sts-theme="aurora"] .radial-gradient {
  background: radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(34, 211, 238, 0.1), transparent 50%);
}

html[data-sts-theme="aurora"] .authentication-login.bg-body {
  background-color: #fafbff !important;
}

/* ========== Account 全屏布局 · 夜幕 ========== */
html[data-sts-theme="noir"] .radial-gradient {
  background: radial-gradient(ellipse at 20% 20%, rgba(34, 211, 238, 0.08), transparent 45%),
    radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.12), transparent 50%),
    #0b1220;
}

html[data-sts-theme="noir"] .authentication-login.bg-body {
  background-color: #0f172a !important;
  color: #e2e8f0;
}

html[data-sts-theme="noir"] .authentication-login .text-body-secondary,
html[data-sts-theme="noir"] .authentication-login label.text-body-secondary {
  color: #c7d2e0 !important;
}

/* ========== 已登录 · 侧栏与内容区 · 极光 ========== */
html[data-sts-theme="aurora"] .left-sidebar {
  box-shadow: inset -1px 0 0 rgba(99, 102, 241, 0.08);
}

html[data-sts-theme="aurora"] .body-wrapper {
  background: linear-gradient(180deg, #fafbff 0%, #f8fafc 100%);
}

/* ========== 已登录 · 侧栏与内容区 · 夜幕 ========== */
html[data-sts-theme="noir"] #main-wrapper {
  background: #0f172a;
}

html[data-sts-theme="noir"] .left-sidebar {
  background: #1e293b !important;
  border-right: 1px solid rgba(148, 163, 184, 0.15);
}

html[data-sts-theme="noir"] .left-sidebar .sidebar-link,
html[data-sts-theme="noir"] .left-sidebar .hide-menu {
  color: #e8eef5 !important;
}

html[data-sts-theme="noir"] .left-sidebar .sidebar-link.active {
  background: rgba(34, 211, 238, 0.12) !important;
  color: #f8fafc !important;
}

html[data-sts-theme="noir"] .left-sidebar .nav-small-cap {
  color: #b0bfd4 !important;
}

html[data-sts-theme="noir"] .topbar {
  background: #1e293b !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

html[data-sts-theme="noir"] .topbar .nav-link,
html[data-sts-theme="noir"] .navbar {
  color: #e2e8f0;
}

html[data-sts-theme="noir"] .body-wrapper {
  background: #0f172a;
  color: #e2e8f0;
}

html[data-sts-theme="noir"] .body-wrapper .text-body-secondary {
  color: #c7d2e0 !important;
}

html[data-sts-theme="noir"] .body-wrapper .border-top {
  border-color: rgba(148, 163, 184, 0.2) !important;
}

html[data-sts-theme="noir"] .card {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

html[data-sts-theme="noir"] .table {
  color: #e2e8f0;
  --bs-table-border-color: rgba(148, 163, 184, 0.2);
}

html[data-sts-theme="noir"] .form-control,
html[data-sts-theme="noir"] .form-select {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.25);
  color: #f1f5f9;
}

html[data-sts-theme="noir"] .btn-primary {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  border: none;
  color: #0f172a;
  font-weight: 600;
}

html[data-sts-theme="noir"] .dropdown-menu {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-sts-theme="noir"] .dropdown-item {
  color: #f1f5f9;
}

html[data-sts-theme="noir"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-sts-theme="noir"] .profile-avatar-circle {
  border-color: rgba(148, 163, 184, 0.35);
}

/* ========== 夜幕 · 全局可读性（覆盖 Bootstrap / Demo 默认深色字） ========== */
html[data-sts-theme="noir"] {
  color-scheme: dark;
}

html[data-sts-theme="noir"] body {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .page-wrapper {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .text-body,
html[data-sts-theme="noir"] .text-dark {
  color: #e8eef5 !important;
}

html[data-sts-theme="noir"] .text-muted,
html[data-sts-theme="noir"] .text-body-secondary,
html[data-sts-theme="noir"] .text-black-50 {
  color: #b8c9dc !important;
}

html[data-sts-theme="noir"] h1,
html[data-sts-theme="noir"] h2,
html[data-sts-theme="noir"] h3,
html[data-sts-theme="noir"] h4,
html[data-sts-theme="noir"] h5,
html[data-sts-theme="noir"] h6,
html[data-sts-theme="noir"] .h1,
html[data-sts-theme="noir"] .h2,
html[data-sts-theme="noir"] .h3,
html[data-sts-theme="noir"] .h4,
html[data-sts-theme="noir"] .h5,
html[data-sts-theme="noir"] .h6 {
  color: #f8fafc;
}

html[data-sts-theme="noir"] .body-wrapper p,
html[data-sts-theme="noir"] .container-fluid p {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .body-wrapper a:not(.btn):not(.dropdown-item):not(.sidebar-link):not(.nav-link):not(.logo-img),
html[data-sts-theme="noir"] .container-fluid a:not(.btn):not(.dropdown-item):not(.sidebar-link) {
  color: #7dd3fc;
}

html[data-sts-theme="noir"] .body-wrapper a:not(.btn):hover,
html[data-sts-theme="noir"] .container-fluid a:not(.btn):hover {
  color: #bae6fd;
}

html[data-sts-theme="noir"] .card-title,
html[data-sts-theme="noir"] .card-header {
  color: #f8fafc;
}

html[data-sts-theme="noir"] .card .text-muted {
  color: #b8c9dc !important;
}

html[data-sts-theme="noir"] .table thead th {
  color: #f1f5f9;
}

html[data-sts-theme="noir"] .table td {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .form-label {
  color: #e8eef5;
}

html[data-sts-theme="noir"] .invalid-feedback,
html[data-sts-theme="noir"] .field-validation-error,
html[data-sts-theme="noir"] .validation-summary-errors {
  color: #fecaca !important;
}

html[data-sts-theme="noir"] .alert {
  color: #f8fafc;
}

html[data-sts-theme="noir"] .alert-secondary,
html[data-sts-theme="noir"] .alert-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e8eef5;
}

html[data-sts-theme="noir"] .dropdown-menu .text-muted,
html[data-sts-theme="noir"] .dropdown-menu small {
  color: #b8c9dc !important;
}

html[data-sts-theme="noir"] .dropdown-item .text-muted {
  color: #b8c9dc !important;
}

html[data-sts-theme="noir"] .modal-content {
  background: #1e293b;
  color: #e8eef5;
}

html[data-sts-theme="noir"] .list-group-item {
  background: #1e293b;
  color: #e8eef5;
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-sts-theme="noir"] .breadcrumb-item,
html[data-sts-theme="noir"] .breadcrumb-item a {
  color: #b8c9dc;
}

html[data-sts-theme="noir"] .breadcrumb-item.active {
  color: #f1f5f9;
}

/* ========== 夜幕 · 头像下拉菜单（.profile-content-dd） ========== */
html[data-sts-theme="noir"] .profile-content-dd.dropdown-menu {
  background: #1e293b !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

html[data-sts-theme="noir"] .profile-content-dd h6,
html[data-sts-theme="noir"] .profile-content-dd .fw-semibold {
  color: #f8fafc !important;
}

html[data-sts-theme="noir"] .profile-content-dd p,
html[data-sts-theme="noir"] .profile-content-dd .small,
html[data-sts-theme="noir"] .profile-content-dd span.small {
  color: #e8eef5 !important;
}

html[data-sts-theme="noir"] .profile-content-dd .text-muted {
  color: #c7d6e8 !important;
}

html[data-sts-theme="noir"] .profile-content-dd a.dropdown-item {
  color: #f1f5f9 !important;
}

html[data-sts-theme="noir"] .profile-content-dd a.dropdown-item:hover,
html[data-sts-theme="noir"] .profile-content-dd a.dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html[data-sts-theme="noir"] .profile-content-dd a.dropdown-item:hover .text-muted,
html[data-sts-theme="noir"] .profile-content-dd a.dropdown-item:focus .text-muted {
  color: #dce7f5 !important;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-menu-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

html[data-sts-theme="noir"] .profile-content-dd .border-bottom {
  border-color: rgba(148, 163, 184, 0.28) !important;
}

html[data-sts-theme="noir"] .profile-content-dd .dropdown-divider {
  border-color: rgba(148, 163, 184, 0.3) !important;
  opacity: 1;
}

html[data-sts-theme="noir"] .profile-content-dd .d-flex.align-items-center.gap-2.small,
html[data-sts-theme="noir"] .profile-content-dd .d-flex.justify-content-between .small {
  color: #e8eef5 !important;
}

html[data-sts-theme="noir"] .profile-content-dd .ti {
  color: #bae6fd;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-toggle-btn.btn-outline-info {
  color: #e0f2fe !important;
  border-color: #38bdf8 !important;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-toggle-btn.btn-outline-info:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff !important;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-toggle-btn.btn-outline-dark {
  color: #e8eef5 !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-toggle-btn.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

html[data-sts-theme="noir"] .profile-content-dd .profile-lang-select,
html[data-sts-theme="noir"] .profile-content-dd .form-select {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
  color: #f8fafc !important;
}

html[data-sts-theme="noir"] .profile-content-dd .btn-outline-danger {
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.65) !important;
}

html[data-sts-theme="noir"] .profile-content-dd .btn-outline-danger:hover {
  color: #fff !important;
  background: rgba(220, 38, 38, 0.25);
}
