*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  min-height: 100vh;
  margin: 0;
  color: #1f2937;
}

.hidden {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

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

.auth-card {
  margin: 0 auto;
  padding: 32px;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.main-content {
  padding: 32px;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, #2563eb, #4f46e5);
  color: white;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.18);
  color: #1f2937;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(148, 163, 184, 0.25);
}

.btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.btn-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: scale(1.1);
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  background: white;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.input-compact {
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 0;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

fieldset legend {
  padding: 0 8px;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
}

fieldset .input-group {
  margin-bottom: 16px;
}

fieldset .input-group:last-child {
  margin-bottom: 0;
}

textarea.input {
  resize: none;
  font-family: inherit;
  min-height: 60px;
  overflow-y: hidden;
}

/* Rich Editor Styles */
.rich-editor-container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  max-width: 100%;
  width: 100%;
}

.editor-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar-group {
  display: flex;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid #e2e8f0;
}

.toolbar-group:last-child {
  border-right: none;
  margin-left: auto;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  padding: 0;
}

.toolbar-btn iconify-icon {
  font-size: 18px;
  display: flex;
  pointer-events: none;
}

.toolbar-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.toolbar-btn.active {
  background: #3b82f6;
  border-color: #2563eb;
  color: white;
}

.toolbar-btn.active:hover {
  background: #2563eb;
}

.editor-content {
  position: relative;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}

.editor-content .markdown-editor,
.editor-content .markdown-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.editor-content .markdown-editor {
  border: none;
  border-radius: 0;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  line-height: 1.6;
  font-size: 14px;
  min-height: 120px;
}

.editor-content .markdown-editor:focus {
  box-shadow: none;
}

/* 富文本编辑器样式 */
.wysiwyg-editor {
  min-height: 120px;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 16px;
  border: none;
  outline: none;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
  background: white;
  word-wrap: break-word;
}

.wysiwyg-editor:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  border-radius: 0 0 12px 12px;
}

/* Placeholder 样式 */
.wysiwyg-editor:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.wysiwyg-editor[data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

/* 编辑器内的内容样式 */
.wysiwyg-editor h1,
.wysiwyg-editor h2,
.wysiwyg-editor h3,
.wysiwyg-editor h4,
.wysiwyg-editor h5,
.wysiwyg-editor h6 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
}

.wysiwyg-editor h1 { font-size: 2em; }
.wysiwyg-editor h2 { font-size: 1.5em; }
.wysiwyg-editor h3 { font-size: 1.25em; }
.wysiwyg-editor h4 { font-size: 1.1em; }
.wysiwyg-editor h5 { font-size: 1em; }
.wysiwyg-editor h6 { font-size: 0.9em; }

.wysiwyg-editor p {
  margin: 8px 0;
}

.wysiwyg-editor strong,
.wysiwyg-editor b {
  font-weight: 600;
}

.wysiwyg-editor em,
.wysiwyg-editor i {
  font-style: italic;
}

.wysiwyg-editor u {
  text-decoration: underline;
}

.wysiwyg-editor del,
.wysiwyg-editor s,
.wysiwyg-editor strike {
  text-decoration: line-through;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
  margin: 8px 0;
  padding-left: 24px;
}

.wysiwyg-editor li {
  margin: 4px 0;
}

.wysiwyg-editor a {
  color: #2563eb;
  text-decoration: underline;
}

.wysiwyg-editor a:hover {
  color: #1d4ed8;
}

.wysiwyg-editor code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.9em;
}

.wysiwyg-editor pre {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}

.wysiwyg-editor pre code {
  background: none;
  padding: 0;
}

.wysiwyg-editor blockquote {
  border-left: 4px solid #e2e8f0;
  padding-left: 16px;
  margin: 8px 0;
  color: #64748b;
  font-style: italic;
}

.wysiwyg-editor hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 16px 0;
}

.wysiwyg-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  background: white;
}

.wysiwyg-editor thead {
  background: #f8fafc;
}

.wysiwyg-editor th,
.wysiwyg-editor td {
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  text-align: left;
}

.wysiwyg-editor th {
  font-weight: 600;
  color: #1f2937;
  background: #f1f5f9;
}

.wysiwyg-editor td {
  color: #374151;
}

.wysiwyg-editor tr:hover {
  background: #f9fafb;
}

.wysiwyg-editor caption {
  font-weight: 600;
  margin-bottom: 8px;
  text-align: left;
  color: #1f2937;
}

.editor-content .markdown-preview {
  padding: 10px 14px;
  line-height: 1.6;
  font-size: 14px;
  color: #374151;
  min-height: 120px;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Markdown Preview Styles */
.markdown-preview h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0 0.5rem 0;
  color: #1f2937;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0.875rem 0 0.375rem 0;
  color: #374151;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview h3 {
  font-size: 1.125rem;
  font-weight: bold;
  margin: 0.75rem 0 0.25rem 0;
  color: #4b5563;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview p {
  margin: 0.5rem 0;
  color: #374151;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview strong {
  font-weight: bold;
  color: #1f2937;
}

.markdown-preview em {
  font-style: italic;
  color: #4b5563;
}

.markdown-preview code {
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.875rem;
  color: #dc2626;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview pre {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.markdown-preview pre code {
  background: none;
  padding: 0;
  color: #1f2937;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.markdown-preview ul, .markdown-preview ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  overflow-x: hidden;
}

.markdown-preview li {
  margin: 0.25rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview a {
  color: #3b82f6;
  text-decoration: underline;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
}

.markdown-preview a:hover {
  color: #2563eb;
}

.markdown-preview blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: #6b7280;
  font-style: italic;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-preview hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 1rem 0;
}

.markdown-preview del {
  text-decoration: line-through;
  color: #6b7280;
}

.markdown-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
}

/* Markdown表格样式 */
.markdown-preview table,
.markdown-preview .md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.markdown-preview table th,
.markdown-preview .md-table th {
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid #e2e8f0;
}

.markdown-preview table td,
.markdown-preview .md-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

.markdown-preview table tr:last-child td,
.markdown-preview .md-table tr:last-child td {
  border-bottom: none;
}

.markdown-preview table tr:hover,
.markdown-preview .md-table tr:hover {
  background: #fafbfc;
}

/* Markdown引用块样式 - 增强 */
.markdown-preview blockquote {
  border-left: 4px solid #3b82f6;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: #eff6ff;
  border-radius: 0 8px 8px 0;
  color: #1e40af;
  font-style: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 任务列表样式 */
.markdown-preview .task-list {
  list-style: none;
  padding-left: 0;
}

.markdown-preview .task-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0.5rem 0;
}

.markdown-preview .task-item input[type="checkbox"] {
  margin-top: 4px;
  cursor: default;
}

/* 定义列表样式 */
.markdown-preview dl {
  margin: 1rem 0;
}

.markdown-preview dt {
  font-weight: bold;
  margin-top: 0.5rem;
  color: #1f2937;
}

.markdown-preview dd {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

/* 高亮文本 */
.markdown-preview mark {
  background: #fef08a;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  color: #713f12;
}

/* 下划线文本 */
.markdown-preview u {
  text-decoration: underline;
  text-decoration-color: #3b82f6;
  text-decoration-thickness: 2px;
}

/* 上标和下标 */
.markdown-preview sup {
  vertical-align: super;
  font-size: 0.75em;
}

.markdown-preview sub {
  vertical-align: sub;
  font-size: 0.75em;
}

/* 键盘按键样式 */
.markdown-preview kbd {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  box-shadow: 0 2px 0 #cbd5e1, inset 0 0 0 2px white;
  color: #1f2937;
}

/* 缩写样式 */
.markdown-preview abbr {
  text-decoration: underline dotted;
  cursor: help;
  color: #3b82f6;
}

/* 脚注样式 */
.markdown-preview .footnote-ref {
  margin-left: 2px;
}

.markdown-preview .footnote-ref a {
  text-decoration: none;
  color: #3b82f6;
  font-weight: 600;
}

/* H4-H6 标题样式 */
.markdown-preview h4 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0.625rem 0 0.25rem 0;
  color: #4b5563;
}

.markdown-preview h5 {
  font-size: 0.875rem;
  font-weight: bold;
  margin: 0.5rem 0 0.25rem 0;
  color: #6b7280;
}

.markdown-preview h6 {
  font-size: 0.75rem;
  font-weight: bold;
  margin: 0.5rem 0 0.25rem 0;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 嵌套列表样式 */
.markdown-preview ul ul,
.markdown-preview ul ol,
.markdown-preview ol ul,
.markdown-preview ol ol {
  margin: 0.25rem 0;
  padding-left: 1.5rem;
}

/* 代码块语言标识样式 */
.markdown-preview pre code[class*="language-"] {
  display: block;
}

.markdown-preview pre code[class*="language-"]::before {
  content: attr(class);
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Detail Page Styles */
.detail-section {
  margin: 16px 0;
}

.detail-section > p:first-child {
  margin-bottom: 8px;
}

.detail-markdown {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 0;
}

.detail-markdown:empty::after {
  content: '-';
  color: #94a3b8;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.table thead th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 0 16px;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.table tbody td {
  padding: 14px 16px;
  font-size: 15px;
  color: #334155;
}

/* UID表格列宽优化（已调整复选框列） */
/* 复选框列 */
#uid-table th:nth-child(1), 
#uid-table td:nth-child(1) {
  width: 40px;
  min-width: 40px;
}

/* UID列 */
#uid-table th:nth-child(2), 
#uid-table td:nth-child(2) {
  width: 80px;
  min-width: 80px;
}

/* 备注列 - 加宽 */
#uid-table th:nth-child(3), 
#uid-table td:nth-child(3) {
  width: 280px;
  min-width: 250px;
}

/* 状态列 */
#uid-table th:nth-child(4), 
#uid-table td:nth-child(4) {
  width: 110px;
  min-width: 110px;
}

/* 语言列 */
#uid-table th:nth-child(5), 
#uid-table td:nth-child(5) {
  width: 70px;
  min-width: 70px;
}

/* 平台列 */
#uid-table th:nth-child(6), 
#uid-table td:nth-child(6) {
  width: 90px;
  min-width: 90px;
}

/* 投放账户列 */
#uid-table th:nth-child(7), 
#uid-table td:nth-child(7) {
  width: 110px;
  min-width: 110px;
}

/* 网址列 */
#uid-table th:nth-child(8), 
#uid-table td:nth-child(8) {
  width: 130px;
  min-width: 120px;
}

/* 创建时间列 */
#uid-table th:nth-child(9), 
#uid-table td:nth-child(9) {
  width: 150px;
  min-width: 145px;
}

/* 修改时间列 */
#uid-table th:nth-child(10), 
#uid-table td:nth-child(10) {
  width: 150px;
  min-width: 145px;
}

/* 操作列 */
#uid-table th:nth-child(11), 
#uid-table td:nth-child(11) {
  width: 150px;
  min-width: 150px;
}

/* 管理员表格列宽优化 */
#admin-uid-table th:nth-child(1), 
#admin-uid-table td:nth-child(1) {
  width: 40px;
  min-width: 40px;
}

#admin-uid-table th:nth-child(2), 
#admin-uid-table td:nth-child(2) {
  width: 100px;
  min-width: 90px;
}

#admin-uid-table th:nth-child(3), 
#admin-uid-table td:nth-child(3) {
  width: 90px;
  min-width: 80px;
}

#admin-uid-table th:nth-child(4), 
#admin-uid-table td:nth-child(4) {
  width: 200px;
  min-width: 180px;
  max-width: 280px;
}

#admin-uid-table th:nth-child(5), 
#admin-uid-table td:nth-child(5) {
  width: 90px;
  min-width: 80px;
}

#admin-uid-table th:nth-child(6), 
#admin-uid-table td:nth-child(6) {
  width: 90px;
  min-width: 80px;
}

#admin-uid-table th:nth-child(7), 
#admin-uid-table td:nth-child(7) {
  width: 110px;
  min-width: 100px;
}

#admin-uid-table th:nth-child(8), 
#admin-uid-table td:nth-child(8) {
  width: 80px;
  min-width: 70px;
}

#admin-uid-table th:nth-child(9), 
#admin-uid-table td:nth-child(9) {
  width: 150px;
  min-width: 145px;
}

#admin-uid-table th:nth-child(10), 
#admin-uid-table td:nth-child(10) {
  width: 150px;
  min-width: 145px;
}

#admin-uid-table th:nth-child(11), 
#admin-uid-table td:nth-child(11) {
  width: 160px;
  min-width: 150px;
}

/* 表格内容自动换行 */
.table td {
  word-break: break-word;
  overflow-wrap: break-word;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: white;
  border-radius: 24px;
  width: min(920px, 92vw);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  transform: translateY(16px);
  opacity: 0;
  animation: slideUp 0.35s ease forwards;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .modal-card {
    width: 90vw;
    border-radius: 18px;
  }
}


.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 20px;
  flex-shrink: 0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 32px 28px 32px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.8) rgba(226, 232, 240, 0.8);
  scrollbar-gutter: stable;
  flex: 1;
  min-height: 0;
}

.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.5);
  border-radius: 10px;
  margin: 8px 0;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.6);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-clip: padding-box;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.8);
  background-clip: padding-box;
}

@media (max-width: 768px) {
  .modal-header {
    padding: 24px 24px 16px;
  }
  
  .modal-body {
    padding: 0 24px 24px;
  }
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}

.status-active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.status-pending {
  background: rgba(250, 204, 21, 0.18);
  color: #b45309;
}

.status-paused {
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

.status-waiting {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.status-wording {
  background: rgba(168, 85, 247, 0.12);
  color: #7c3aed;
}

.status-follow_pending {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.status-follow_completed {
  background: rgba(139, 92, 246, 0.15);
  color: #6b21a8;
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: white;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-warning {
  border-left: 4px solid #f97316;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  padding: 16px;
}

.detail-body {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 16px;
  line-height: 1.6;
  color: #475569;
}

.modal-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
}

.toast.visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.link {
  color: #2563eb;
  font-weight: 500;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.navbar-nav {
  display: flex;
  gap: 16px;
}

.navbar-link {
  font-weight: 600;
  color: #475569;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar-link.active,
.navbar-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.stat-card {
  padding: 20px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: rgba(148, 163, 184, 0.18);
}

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

.table-filter {
  display: flex;
  gap: 12px;
}

.table-header-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}


.table-filter-grid {
  width: 100%;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.table-filter-grid .input {
  width: 100%;
  max-width: 100%;
}

/* 用户视图筛选栏 - 3列布局 */
#uid-table + * .table-filter-grid,
.card:has(#uid-table) .table-filter-grid {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

/* 管理员视图筛选栏 - 多列布局 */
#admin-uid-table + * .table-filter-grid,
.card:has(#admin-uid-table) .table-filter-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 800px) {
  .table-filter-grid {
    grid-template-columns: 1fr;
  }
}

.table-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: #94a3b8;
}

.table-actions .btn {
  font-size: 13px;
  padding: 8px 14px;
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
}

body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 6px;
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.3s ease;
}


@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.register-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.register-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
