/* Fluent Design 全局样式 */
:root {
  --fluent-primary: #0078d4;
  --fluent-primary-dark: #106ebe;
  --fluent-accent: #0078d4;
  --fluent-text: #323130;
  --fluent-text-light: #605e5c;
  --fluent-text-lighter: #a19f9d;
  --fluent-background: #ffffff;
  --fluent-surface: #ffffff;
  --fluent-surface-light: #f8f8f8;
  --fluent-border: #edebe9;
  --fluent-border-light: #f3f2f1;
  --fluent-shadow-4: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);
  --fluent-shadow-8: 0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108);
  --fluent-shadow-16: 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
  --fluent-radius: 8px;
  --fluent-radius-medium: 4px;
  --fluent-radius-large: 12px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--fluent-surface) 0%, #f5f5f5 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--fluent-text);
}

main {
  flex: 1;
  padding: 20px 0;
}

/* Fluent Design 动画过渡 */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Fluent Design 圆角 */
.rounded {
  border-radius: var(--fluent-radius-medium) !important;
}

.rounded-lg {
  border-radius: var(--fluent-radius) !important;
}

.rounded-xl {
  border-radius: var(--fluent-radius-large) !important;
}

/* Fluent Design 卡片 */
.card {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  box-shadow: var(--fluent-shadow-4);
  overflow: hidden;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--fluent-shadow-8);
  border-color: var(--fluent-border-light);
}

.card-header {
  background: var(--fluent-surface-light);
  border: none !important;
  border-bottom: 1px solid var(--fluent-border) !important;
  padding: 1rem 1.25rem !important;
  font-weight: 600;
  color: var(--fluent-text);
}

.card-header.bg-primary {
  background: var(--fluent-primary) !important;
  color: #ffffff !important;
  border-bottom: none !important;
}

.card-body {
  padding: 1.25rem !important;
  color: var(--fluent-text);
}

/* Fluent Design 搜索结果卡片 */
.result-card {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  box-shadow: var(--fluent-shadow-4);
}

.result-card:hover {
  box-shadow: var(--fluent-shadow-8);
  border-color: var(--fluent-border-light);
  transform: translateY(-2px);
}

.result-card .app-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--fluent-radius-medium);
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 1px solid var(--fluent-border);
}

.result-card .app-icon-placeholder {
  width: 50px;
  height: 50px;
  border-radius: var(--fluent-radius-medium);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.result-card .app-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fluent-text);
}

.result-card .app-key {
  font-size: 0.9rem;
  color: var(--fluent-text-light);
}

.result-card .app-info {
  font-size: 0.85rem;
  color: var(--fluent-text-lighter);
}

.result-card .badge {
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 5px 12px;
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

/* Fluent Design 表单控件 */
.form-control,
.form-select {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  color: var(--fluent-text);
}

.form-control:focus,
.form-select:focus {
  background: var(--fluent-surface);
  border-color: var(--fluent-accent);
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
  outline: none;
  color: var(--fluent-text);
}

.form-control::placeholder {
  color: var(--fluent-text-lighter);
}

.input-group {
  border-radius: var(--fluent-radius);
  overflow: hidden;
}

/* Fluent Design 表格 */
.table {
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--fluent-radius);
  overflow: hidden;
}

.table th {
  background: var(--fluent-surface-light);
  font-weight: 600;
  border: none !important;
  padding: 0.75rem 1rem !important;
  text-align: left;
  color: var(--fluent-text);
  border-bottom: 1px solid var(--fluent-border);
}

.table td {
  vertical-align: middle;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: var(--fluent-surface-light) !important;
}

.table-responsive {
  border-radius: var(--fluent-radius);
  overflow: auto;
}

/* Fluent Design 模态框 */
.modal-content {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius-large);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  background: var(--fluent-surface-light);
  border-bottom: 1px solid var(--fluent-border) !important;
  padding: 1rem 1.5rem !important;
}

.modal-body {
  padding: 1.5rem !important;
}

.modal-footer {
  background: var(--fluent-surface-light);
  border-top: 1px solid var(--fluent-border) !important;
  padding: 1rem 1.5rem !important;
}

/* Fluent Design Toast */
.toast {
  min-width: 300px;
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  box-shadow: var(--fluent-shadow-16);
  overflow: hidden;
}

.toast-header {
  background: var(--fluent-surface-light);
  border-bottom: 1px solid var(--fluent-border) !important;
  padding: 0.75rem 1rem !important;
}

.toast-body {
  padding: 1rem !important;
}

/* Fluent Design 按钮 */
.btn {
  border-radius: var(--fluent-radius-medium);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--fluent-shadow-8);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--fluent-primary-dark);
  border-color: var(--fluent-primary-dark);
  color: white;
}

.btn-primary:active {
  background: #005a9e;
  border-color: #005a9e;
}

.btn-success {
  background: #107c10;
  border-color: #107c10;
  color: white;
}

.btn-success:hover {
  background: #0e6b0e;
  border-color: #0e6b0e;
  color: white;
}

.btn-success:active {
  background: #0d5c0d;
  border-color: #0d5c0d;
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--fluent-accent);
  color: var(--fluent-accent);
}

.btn-outline-primary:hover {
  background: rgba(0, 120, 212, 0.1);
  color: var(--fluent-accent);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--fluent-text-light);
  color: var(--fluent-text-light);
}

.btn-outline-secondary:hover {
  background: rgba(50, 49, 48, 0.1);
  color: var(--fluent-text);
}

.btn-light {
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

.btn-light:hover {
  background: #e5e5e5;
  border-color: #d0d0d0;
  color: var(--fluent-text);
}

.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  border-radius: var(--fluent-radius-medium);
}

/* Fluent Design 关闭按钮 */
.btn-close {
  filter: invert(0) opacity(0.7);
  border-radius: var(--fluent-radius-medium);
  transition: all 0.2s ease;
  background: transparent;
}

.btn-close:hover {
  filter: invert(0) opacity(1);
  background: rgba(0, 0, 0, 0.05);
}

/* 模态框液态玻璃效果 */
.modal-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 20px 20px 0 0 !important;
  padding: 1.2rem 1.5rem !important;
}

.modal-body {
  padding: 1.5rem !important;
}

.modal-footer {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 0 0 20px 20px !important;
  padding: 1rem 1.5rem !important;
}

.modal-title {
  font-weight: 600;
}

.btn-close {
  filter: invert(1) opacity(0.7);
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.btn-close:hover {
  filter: invert(1) opacity(1);
  background: rgba(0, 0, 0, 0.2);
}

/* Toast */
.toast {
  min-width: 300px;
}

/* 分页 */
.pagination .page-link {
  border-radius: 5px;
  margin: 0 2px;
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* 详情列表 */
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
}

.detail-list li:last-child {
  border-bottom: none;
}

.detail-list .label {
  font-weight: 600;
  color: #666;
  min-width: 100px;
}

.detail-list .value {
  flex: 1;
  word-break: break-all;
}

/* 状态徽章 */
.status-active {
  background-color: #28a745;
}

.status-inactive {
  background-color: #dc3545;
}

/* 角色徽章 */
.role-admin {
  background-color: #dc3545;
}

.role-user {
  background-color: #0d6efd;
}

.role-readonly {
  background-color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .result-card {
    padding: 10px;
  }
  
  .result-card .app-icon,
  .result-card .app-icon-placeholder {
    width: 40px;
    height: 40px;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .btn-group-sm .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
}

/* 复制按钮动画 */
.copy-success {
  animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 液态动画效果 */
@keyframes liquid-glass {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 加载动画液态效果 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 200%;
  animation: liquid-glass 2s ease infinite;
}

.loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
  z-index: 2;
}

/* 空状态液态玻璃效果 */
.empty-state {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.8;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

/* 详情列表液态玻璃效果 */
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 15px;
  overflow: hidden;
}

.detail-list li {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  transition: background 0.3s ease;
}

.detail-list li:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-list li:last-child {
  border-bottom: none;
}

.detail-list .label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  min-width: 120px;
}

.detail-list .value {
  flex: 1;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.85);
}

/* 分页液态玻璃效果 */
.pagination {
  justify-content: center;
}

.page-item {
  margin: 0 3px;
}

.page-link {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px !important;
  color: #333;
  transition: all 0.3s ease;
}

.page-link:hover,
.page-item.active .page-link {
  background: rgba(13, 110, 253, 0.85);
  color: white;
  border-color: rgba(13, 110, 253, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

/* 状态徽章液态玻璃效果 */
.badge {
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8em;
  font-weight: 500;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-active {
  background: rgba(40, 167, 69, 0.85);
  color: white;
}

.status-inactive {
  background: rgba(220, 53, 69, 0.85);
  color: white;
}

/* 角色徽章液态玻璃效果 */
.role-admin {
  background: rgba(220, 53, 69, 0.85);
  color: white;
}

.role-user {
  background: rgba(13, 110, 253, 0.85);
  color: white;
}

.role-readonly {
  background: rgba(108, 117, 125, 0.85);
  color: white;
}

/* Fluent Design 导航栏 */
.navbar {
  background: var(--fluent-surface) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--fluent-border);
  box-shadow: var(--fluent-shadow-4);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.navbar-brand {
  font-weight: 600;
  display: flex;
  align-items: center;
  color: var(--fluent-text) !important;
  gap: 10px;
}

.navbar-brand i {
  color: var(--fluent-accent);
}

.navbar .nav-link {
  color: var(--fluent-text-light) !important;
  border-radius: var(--fluent-radius-medium);
  margin: 0 2px;
  padding: 0.5rem 1rem !important;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.navbar .nav-link:hover {
  color: var(--fluent-text) !important;
  background-color: var(--fluent-surface-light);
}

.navbar .nav-link.active {
  color: var(--fluent-accent) !important;
  font-weight: 500;
  background: transparent !important;
  position: relative;
}

.navbar .nav-link.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: var(--fluent-accent);
  border-radius: 2px;
}

.navbar-toggler {
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius-medium);
  background: var(--fluent-surface-light);
  color: var(--fluent-text);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(50, 49, 48, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 主题切换按钮 */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius-medium);
  color: var(--fluent-text);
  padding: 0.375rem 0.75rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--fluent-surface-light);
  border-color: var(--fluent-text-lighter);
  color: var(--fluent-text);
}

.theme-toggle-btn:focus {
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
  outline: none;
}

.theme-toggle-btn i {
  font-size: 1rem;
}

.dropdown-menu {
  background: var(--fluent-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  box-shadow: var(--fluent-shadow-8);
  overflow: hidden;
  padding: 0.25rem 0;
}

.dropdown-item {
  border-radius: 0;
  margin: 0;
  padding: 0.7rem 1.2rem;
  color: var(--fluent-text);
  transition: all 0.2s ease;
}

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

/* Fluent Design 搜索框 */
#searchInput {
  border: 1px solid var(--fluent-border);
  border-radius: var(--fluent-radius);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

#searchInput:focus {
  border-color: var(--fluent-accent);
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
  outline: none;
}

/* 搜索框液态玻璃效果 */
.form-control {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-color: rgba(13, 110, 253, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-select {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.75rem 3rem 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-select:focus {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-color: rgba(13, 110, 253, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.input-group {
  border-radius: 12px;
  overflow: hidden;
}

/* 搜索框焦点效果 */
#searchInput:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* 代码样式 */
code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Fluent Design 页脚 */
footer {
  background: var(--fluent-surface-light);
  border-top: 1px solid var(--fluent-border);
  padding: 2rem 0;
  margin-top: 40px;
}

footer .container p {
  color: var(--fluent-text-light);
  margin: 0;
}

/* Fluent Design 深色模式样式 */
[data-theme="dark"] {
  --fluent-primary: #4CAFED;
  --fluent-primary-dark: #62AEF0;
  --fluent-accent: #4CAFED;
  --fluent-text: #ffffff;
  --fluent-text-light: #cccccc;
  --fluent-text-lighter: #a0a0a0;
  --fluent-background: #1a1a1a;
  --fluent-surface: #202020;
  --fluent-surface-light: #2d2d2d;
  --fluent-border: #3a3a3a;
  --fluent-border-light: #454545;
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
  background-attachment: fixed;
  color: var(--fluent-text);
}

[data-theme="dark"] .card {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card-header {
  background: var(--fluent-surface-light) !important;
  border-bottom: 1px solid var(--fluent-border) !important;
  color: var(--fluent-text);
}

[data-theme="dark"] .card-body {
  background: var(--fluent-surface);
  color: var(--fluent-text);
}

[data-theme="dark"] .result-card {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .result-card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--fluent-border-light);
}

[data-theme="dark"] .result-card .app-name {
  color: var(--fluent-text);
}

[data-theme="dark"] .result-card .app-key,
[data-theme="dark"] .result-card .app-info {
  color: var(--fluent-text-light);
}

[data-theme="dark"] .table {
  background: var(--fluent-surface) !important;
  color: var(--fluent-text) !important;
}

[data-theme="dark"] .table th {
  background: var(--fluent-surface-light) !important;
  color: var(--fluent-text) !important;
  border: none !important;
  border-bottom: 1px solid var(--fluent-border) !important;
}

[data-theme="dark"] .table td {
  background: var(--fluent-surface) !important;
  border-bottom: 1px solid var(--fluent-border) !important;
  color: var(--fluent-text) !important;
}

[data-theme="dark"] .table tr {
  background: var(--fluent-surface) !important;
}

[data-theme="dark"] .table tr:hover {
  background: var(--fluent-surface-light) !important;
}

[data-theme="dark"] .table tbody {
  background: var(--fluent-surface) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: var(--fluent-surface-light);
  border-color: var(--fluent-accent);
  box-shadow: 0 0 0 2px rgba(76, 175, 237, 0.3);
  color: var(--fluent-text);
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--fluent-text-lighter);
}

[data-theme="dark"] .modal-content {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .modal-header {
  background: var(--fluent-surface-light);
  border-bottom: 1px solid var(--fluent-border) !important;
  color: var(--fluent-text);
}

[data-theme="dark"] .modal-footer {
  background: var(--fluent-surface-light);
  border-top: 1px solid var(--fluent-border) !important;
}

[data-theme="dark"] .btn {
  color: var(--fluent-text);
}

[data-theme="dark"] .btn-primary {
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: white;
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--fluent-primary-dark);
  border-color: var(--fluent-primary-dark);
  color: white;
}

[data-theme="dark"] .btn-primary:active {
  background: #2190d4;
  border-color: #2190d4;
}

[data-theme="dark"] .btn-success {
  background: #428842;
  border-color: #428842;
  color: white;
}

[data-theme="dark"] .btn-success:hover {
  background: #4a964a;
  border-color: #4a964a;
  color: white;
}

[data-theme="dark"] .btn-success:active {
  background: #3a773a;
  border-color: #3a773a;
}

[data-theme="dark"] .btn-outline-primary {
  background: transparent;
  border: 1px solid var(--fluent-accent);
  color: var(--fluent-accent);
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: rgba(76, 175, 237, 0.2);
  color: white;
}

[data-theme="dark"] .btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--fluent-text-light);
  color: var(--fluent-text-light);
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background: rgba(204, 204, 204, 0.2);
  color: var(--fluent-text);
}

[data-theme="dark"] .btn-light {
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .btn-light:hover {
  background: var(--fluent-border);
  border-color: var(--fluent-border-light);
  color: var(--fluent-text);
}

[data-theme="dark"] .toast {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .toast-header {
  background: var(--fluent-surface-light);
  border-bottom: 1px solid var(--fluent-border) !important;
  color: var(--fluent-text);
}

[data-theme="dark"] .dropdown-menu {
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .dropdown-item {
  color: var(--fluent-text);
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--fluent-surface-light);
  color: var(--fluent-text);
}

[data-theme="dark"] .empty-state {
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text-light);
}

[data-theme="dark"] .detail-list {
  background: var(--fluent-surface-light);
}

[data-theme="dark"] .detail-list li {
  border-bottom: 1px solid var(--fluent-border);
}

[data-theme="dark"] .detail-list li:hover {
  background: var(--fluent-border);
}

[data-theme="dark"] .detail-list .label {
  color: var(--fluent-text);
}

[data-theme="dark"] .detail-list .value {
  color: var(--fluent-text-light);
}

[data-theme="dark"] .page-link {
  background: var(--fluent-surface-light);
  border: 1px solid var(--fluent-border);
  color: var(--fluent-text-light);
}

[data-theme="dark"] .page-link:hover,
[data-theme="dark"] .page-item.active .page-link {
  background: var(--fluent-accent);
  color: white;
  border-color: var(--fluent-accent);
}

[data-theme="dark"] footer {
  background: var(--fluent-surface-light);
  border-top: 1px solid var(--fluent-border);
}

[data-theme="dark"] footer .container p {
  color: var(--fluent-text-light);
}

[data-theme="dark"] code {
  background: var(--fluent-surface-light);
  color: #f8f8f2;
}

[data-theme="dark"] .navbar {
  background: var(--fluent-surface) !important;
  border-bottom: 1px solid var(--fluent-border);
}

[data-theme="dark"] .navbar .nav-link {
  color: var(--fluent-text-light) !important;
}

[data-theme="dark"] .navbar .nav-link:hover {
  color: var(--fluent-text) !important;
  background-color: var(--fluent-surface-light);
}

[data-theme="dark"] .navbar .nav-link.active {
  color: var(--fluent-accent) !important;
  background: transparent !important;
}

[data-theme="dark"] .navbar .nav-link.active:after {
  background: var(--fluent-accent);
}

[data-theme="dark"] .btn-close {
  filter: invert(1) opacity(0.7);
}

[data-theme="dark"] .btn-close:hover {
  filter: invert(1) opacity(1);
  background: rgba(255, 255, 255, 0.1);
}

/* 深色模式下图标调整 */
[data-theme="dark"] .btn i,
[data-theme="dark"] .nav-link i,
[data-theme="dark"] .dropdown-item i {
  color: inherit;
}

/* 深色模式下 Bootstrap 文字辅助类 */
[data-theme="dark"] .text-muted {
  color: var(--fluent-text-light) !important;
}

[data-theme="dark"] .small,
[data-theme="dark"] small {
  color: var(--fluent-text-light);
}

[data-theme="dark"] .card .text-muted,
[data-theme="dark"] .card small {
  color: var(--fluent-text-light) !important;
}

/* 深色模式下主题切换按钮 */
[data-theme="dark"] .theme-toggle-btn {
  background: transparent;
  border-color: var(--fluent-border);
  color: var(--fluent-text);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: var(--fluent-surface-light);
  border-color: var(--fluent-text-lighter);
  color: var(--fluent-text);
}
