:root {
  --primary: #FE2C55;
  --primary-dark: #E6264D;
  --primary-light: #fff0f3;
  --accent: #25F4EE;
  --bg: #f5f7fa;
  --card: #ffffff;
  --surface: #ffffff;
  --text: #161823;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #eef0f4;
  --shadow-sm: 0 2px 8px rgba(22, 24, 35, 0.04);
  --shadow: 0 4px 24px rgba(22, 24, 35, 0.06);
  --shadow-lg: 0 12px 40px rgba(22, 24, 35, 0.12);
  --radius: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --success: #00c853;
  --success-light: #e6fff0;
  --danger: #ff4d4f;
  --danger-light: #fff1f0;
  --warning: #ff9f00;
  --warning-light: #fff8e6;
  --info: #00a1ff;
  --info-light: #e6f6ff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --header-height: 64px;
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(16px + var(--safe-bottom));
}

::selection {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* 图标系统 */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .2s, transform .2s;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* 页面加载器 */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}

.page-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-inner { text-align: center; }

.loader-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  animation: loaderPulse 1.2s ease-in-out infinite;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 30%, transparent);
}

.loader-bar {
  width: 120px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  animation: loaderSlide 1s ease-in-out infinite;
}

.loader-text {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 页面布局 */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  animation: fadeUp 0.5s var(--transition-smooth) both;
}

.page-wrapper.is-form { max-width: 720px; }

/* 顶部导航 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-header .brand h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.app-header .brand p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.app-header .user-info {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  line-height: 1.7;
}

.app-header .user-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin: 0 3px;
  transition: opacity 0.2s;
}

.app-header .user-info a:hover { opacity: 0.8; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--primary); }

/* 页面标题 */
.page-title { margin-bottom: 20px; }

.page-title h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.card + .card { margin-top: 16px; }

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  min-height: 46px;
  min-width: 46px;
  transition: transform 0.12s var(--transition-bounce), box-shadow 0.2s, opacity 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
  user-select: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn:active { transform: scale(0.96); }

.btn:disabled, .btn.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn-primary:hover { box-shadow: 0 6px 22px color-mix(in srgb, var(--primary) 38%, transparent); }

.btn-secondary { background: var(--text); color: #fff; }

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { background: var(--bg); }

.btn-danger { background: var(--danger); color: #fff; }

.btn-success { background: var(--success); color: #fff; }

.btn-info { background: var(--info); color: #fff; }

.btn-sm { padding: 10px 14px; font-size: 13px; border-radius: 10px; min-height: 38px; }

.btn-lg { padding: 14px 22px; font-size: 16px; min-height: 50px; }

.btn-block { width: 100%; }

.btn-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 35%, transparent);
  font-size: 26px;
  z-index: 40;
  padding: 0;
  min-width: auto;
  transition: transform .2s var(--transition-bounce), box-shadow .2s;
}

.btn-fab:hover { box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 45%, transparent); }

/* 点击波纹 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple .55s linear;
  pointer-events: none;
}

/* 顶部操作区 */
.top-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* 加载动画 */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.is-loading .spinner { display: inline-block; }

.btn-text {
  position: relative;
  z-index: 1;
  color: inherit !important;
}

.btn-primary .btn-text,
.btn-danger .btn-text,
.btn-success .btn-text,
.btn-secondary .btn-text {
  color: #fff !important;
}

.btn.is-loading .btn-text {
  opacity: 0.7;
}

/* 表单 */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group.required label::after {
  content: ' *';
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  outline: none;
  font-family: inherit;
  min-height: 48px;
}

.form-control::placeholder { color: #c0c4cc; }

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--danger);
}

select.form-control {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

textarea.form-control { resize: vertical; min-height: 80px; }
input[type="datetime-local"].form-control {
  appearance: none;
  padding-right: 14px;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(45%);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity .2s;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.form-tips {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-error-shake { animation: shake .35s ease; }

/* 底部固定操作栏 */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--card) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + var(--safe-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.bottom-bar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.bottom-bar .btn { flex: 1; min-height: 48px; }
.bottom-bar .btn-primary { flex: 2; }
.bottom-bar .btn-outline { flex: 1; }

.has-bottom-bar { padding-bottom: calc(90px + var(--safe-bottom)); }

/* 消息提示 */
.msg {
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: none;
  font-weight: 600;
}

.msg.show { display: block; animation: fadeUp 0.25s ease; }

.msg.error {
  color: var(--danger);
  background: var(--danger-light);
}

.msg.success {
  color: var(--success);
  background: var(--success-light);
}

.msg.info {
  color: var(--text-secondary);
  background: var(--bg);
}

/* Toast */
#toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: rgba(22, 24, 35, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  z-index: 1000;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--transition-bounce), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#toast::before {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

#toast.success::before {
  content: '✓';
  background: var(--success);
}

#toast.error::before {
  content: '!';
  background: var(--danger);
}

#toast.info::before {
  content: 'i';
  background: var(--info);
}

/* 状态标签 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success { color: var(--success); background: var(--success-light); }
.badge-danger { color: var(--danger); background: var(--danger-light); }
.badge-warning { color: var(--warning); background: var(--warning-light); }
.badge-primary { color: var(--primary); background: var(--primary-light); }
.badge-info { color: var(--info); background: var(--info-light); }
.badge-muted { color: var(--text-secondary); background: var(--bg); }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  color: var(--text-muted);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeUp .5s var(--transition-smooth) both;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.empty-state h3 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 700;
}

.empty-state p {
  font-size: 13px;
  margin-bottom: 18px;
}

.empty-state a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

/* 桌面端表格 */
.data-table {
  display: none;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
  animation: fadeUp .4s var(--transition-smooth) both;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr { transition: background 0.15s; }

.data-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }

.data-table .actions { white-space: nowrap; }

.data-table .actions .btn { margin-right: 6px; margin-bottom: 4px; }

/* 移动端卡片列表 */
.list-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.2s;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  animation: cardEnter .45s var(--transition-smooth) forwards;
}

.list-cards .list-card:nth-child(1) { animation-delay: .04s; }
.list-cards .list-card:nth-child(2) { animation-delay: .08s; }
.list-cards .list-card:nth-child(3) { animation-delay: .12s; }
.list-cards .list-card:nth-child(4) { animation-delay: .16s; }
.list-cards .list-card:nth-child(5) { animation-delay: .20s; }
.list-cards .list-card:nth-child(6) { animation-delay: .24s; }
.list-cards .list-card:nth-child(7) { animation-delay: .28s; }
.list-cards .list-card:nth-child(8) { animation-delay: .32s; }
.list-cards .list-card:nth-child(9) { animation-delay: .36s; }
.list-cards .list-card:nth-child(10) { animation-delay: .40s; }

.list-card:active { transform: scale(0.99); }

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

.list-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.list-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.list-card-subtitle {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  flex-shrink: 0;
}

.list-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.8;
}

.list-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
}

.list-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.list-card-actions .btn { width: 100%; }

/* 分页 */
.pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.pagination li {
  display: flex;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  min-width: 40px;
  min-height: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.1s, background 0.2s;
}

.pagination a:hover { background: var(--primary-light); color: var(--primary); }

.pagination .active span { background: var(--primary); color: #fff; border-color: var(--primary); }

.pagination .disabled span { color: var(--text-muted); background: var(--bg); cursor: not-allowed; }

/* 统计条 */
.stats-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--card);
  padding: 10px 16px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 600;
}

.stat-pill strong {
  color: var(--primary);
  margin-left: 4px;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
  position: relative;
}

.search-bar .search-input {
  flex: 1;
  min-width: 0;
  position: relative;
}

.search-bar .search-input input {
  width: 100%;
  height: 48px;
  padding-left: 44px;
  padding-right: 42px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}

.search-bar .search-input input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-bar .search-input input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-sm);
}

.search-bar .search-input .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
  transition: color .2s;
}

.search-bar .search-input input:focus ~ .search-icon {
  color: var(--primary);
}

.search-bar .search-input .search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background .15s, color .15s, transform .15s;
}

.search-bar .search-input .search-clear:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.search-bar .search-input input:not(:placeholder-shown) ~ .search-clear { display: inline-flex; }

.search-bar .btn-search {
  flex-shrink: 0;
  height: 48px;
  padding: 0 22px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
}

.search-bar .btn-search .search-btn-icon {
  font-size: 18px;
}

.search-bar .btn-search .search-btn-text {
  display: inline;
}

.search-bar.is-loading .search-input input {
  background-image: linear-gradient(90deg, transparent 0%, var(--primary-light) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.search-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  animation: fadeUp .3s both;
}

.search-keyword-chip .chip-clear {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  font-size: 12px;
  transition: background .15s;
}

.search-keyword-chip .chip-clear .icon { width: 1em; height: 1em; }

.search-keyword-chip .chip-clear:hover {
  background: var(--primary);
  color: #fff;
}

/* 权限卡片 */
.permission-group { margin-bottom: 20px; }

.permission-group-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-group-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.permission-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.permission-item:hover { background: var(--primary-light); border-color: var(--primary); }
.permission-item:active { transform: scale(0.99); }

.permission-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.permission-item span { font-size: 14px; font-weight: 600; }

/* ID 输入行 */
.dy-id-list { margin-bottom: 6px; }

.dy-id-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.dy-id-row input { flex: 1; }

.dy-id-row .idx {
  width: 44px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  border-radius: 10px;
  flex-shrink: 0;
}

.dy-id-row .btn-remove {
  width: 36px;
  height: 48px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.dy-id-row .btn-remove:hover {
  background: #ffe5e8;
  color: var(--primary);
}

.dy-id-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.dy-id-actions .btn-add {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px dashed var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, transform .15s;
}

.dy-id-actions .btn-add:hover {
  background: #ffdce1;
}

.dy-id-actions .btn-add:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 登录/认证页 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #fff0f3 0%, #f5f7fa 50%, #e6f7ff 100%);
  position: relative;
  overflow: hidden;
}

.auth-page .auth-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  animation: float 9s ease-in-out infinite;
}

.auth-page .auth-shape-1 {
  width: 360px;
  height: 360px;
  background: #ffccd5;
  top: -100px;
  right: -80px;
}

.auth-page .auth-shape-2 {
  width: 300px;
  height: 300px;
  background: #b3f0ff;
  bottom: -80px;
  left: -60px;
  animation-delay: -4s;
}

.auth-page .auth-shape-3 {
  width: 260px;
  height: 260px;
  background: #d6e4ff;
  top: 40%;
  left: 55%;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.05); }
}

.auth-page .login-box {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 44px 36px;
  box-shadow: 0 24px 70px rgba(22, 24, 35, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s var(--transition-smooth) both;
}

.auth-page .login-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 32%, transparent);
}

.auth-page .login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-page .login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-page .input-wrap { position: relative; }

.auth-page .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  transition: color .2s;
}

.auth-page .form-control { padding-left: 42px; }

.auth-page .form-control:focus ~ .input-icon { color: var(--primary); }

/* 验证码 */
.captcha-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-group input { flex: 1; }

.captcha-img {
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg);
  flex-shrink: 0;
}

/* 设置页 */
.theme-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.theme-color-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}

.theme-color-dot:hover { transform: scale(1.1); }

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker-wrap input[type="color"] {
  width: 52px;
  height: 40px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: none;
}

/* 主题实时预览卡片 */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.preview-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  text-align: center;
}

.preview-card .preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.preview-card .preview-accent {
  width: 32px;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  margin: 0 auto 8px;
}

.preview-card .preview-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 快捷导航 */
.quick-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 无障碍与辅助 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 响应式 */
@media (min-width: 768px) {
  .page-wrapper { padding: 28px; }
  .app-header .brand h1 { font-size: 22px; }
  .page-title h2 { font-size: 28px; }
  .card { padding: 28px; }
  .data-table { display: block; }
  .list-cards { display: none; }
  .list-card-actions { grid-template-columns: repeat(auto-fit, minmax(90px, auto)); }
  .permission-list { grid-template-columns: repeat(2, 1fr); }
  .search-bar .search-input { min-width: 280px; }
  .preview-cards { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .permission-list { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .btn { padding: 12px 16px; }
  .top-actions .btn { flex: 1; }
  .card { padding: 18px; }
  .form-group { margin-bottom: 18px; }
  .auth-page .login-box { padding: 32px 24px; }
  .auth-page .login-title { font-size: 22px; }
  .search-bar { gap: 8px; }
  .search-bar .search-input input { height: 44px; padding-left: 40px; padding-right: 38px; font-size: 14px; }
  .search-bar .search-input .search-icon { left: 14px; font-size: 16px; }
  .search-bar .btn-search { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .search-bar .btn-search .search-btn-text { display: none; }
  .search-bar .btn-search .search-btn-icon { margin: 0; }
  .captcha-group { flex-direction: column; align-items: stretch; }
  .captcha-img { width: 100%; height: 52px; object-fit: contain; }
  .preview-cards { grid-template-columns: repeat(2, 1fr); }
}


