:root {
  --bg: #EDF3FB;
  --bg-gradient: linear-gradient(165deg, #E4EDF9 0%, #EDF3FA 40%, #F4F8FC 100%);
  --surface: #FFFFFF;
  --surface-muted: #F5F8FC;
  --surface-hover: #F0F5FD;
  --line: #DBE4EF;
  --line-soft: #E9F0F8;
  --text: #131F33;
  --text-secondary: #46546B;
  --text-muted: #8090A5;

  --teal: #2563EB;
  --teal-dark: #1D4ED8;
  --teal-light: #4F8AF7;
  --teal-soft: #E8F0FE;
  --teal-gradient: linear-gradient(135deg, #2563EB 0%, #4F8AF7 100%);

  --blue: #0EA5E9;
  --blue-soft: #E5F6FD;
  --blue-gradient: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);

  --amber: #E8920C;
  --amber-soft: #FFF5E6;
  --amber-gradient: linear-gradient(135deg, #E8920C 0%, #F5B43C 100%);

  --purple: #7C5CBF;
  --purple-soft: #F2EDFB;
  --purple-gradient: linear-gradient(135deg, #7C5CBF 0%, #A98AE0 100%);

  --red: #D94848;
  --red-soft: #FFF0F0;

  --shadow-sm: 0 2px 8px rgba(22, 48, 60, 0.05);
  --shadow: 0 6px 20px rgba(22, 48, 60, 0.07);
  --shadow-lg: 0 16px 48px rgba(22, 48, 60, 0.12);
  --shadow-card: 0 4px 16px rgba(22, 48, 60, 0.06);
  --shadow-hover: 0 12px 36px rgba(22, 48, 60, 0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: PingFang SC, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(79, 138, 247,0.18);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hidden {
  display: none !important;
}

/* ==================== LOGIN ==================== */

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(37, 99, 235, 0.10) 0%, rgba(244, 248, 252, 0) 40%),
    linear-gradient(210deg, rgba(14, 165, 233, 0.08) 0%, rgba(244, 248, 252, 0) 45%),
    var(--bg-gradient);
}

.login-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 78%);
  pointer-events: none;
}

.login-shell {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid rgba(219, 228, 239, 0.9);
  box-shadow:
    0 24px 64px rgba(22, 48, 90, 0.14),
    0 6px 20px rgba(22, 48, 90, 0.06);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: login-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-brand {
  min-height: 480px;
  padding: 44px 38px;
  color: #FFFFFF;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(145deg, #1D4ED8 0%, #2563EB 52%, #0EA5E9 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.login-brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  font-size: 26px;
}

.login-brand-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.login-brand-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-brand-desc {
  margin: 30px 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.login-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.login-brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
}

.login-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.login-panel {
  padding: 46px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #FFFFFF;
}

.login-panel .login-head {
  margin-bottom: 26px;
  align-items: flex-start;
  text-align: left;
}

.login-panel .login-head-copy h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.login-panel .login-desc {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.login-panel .field {
  margin-bottom: 18px;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #7C8DA0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  box-sizing: border-box;
}

.password-toggle:hover {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.login-panel .primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--teal-gradient);
  border: none;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(37, 99, 235,0.3);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  font-size: 20px;
  box-shadow: 0 3px 10px rgba(37, 99, 235,0.25);
}

/* 输入框内嵌图标 */
.field {
  position: relative;
}

.field.icon-user::before,
.field.icon-lock::before {
  position: absolute;
  left: 13px;
  bottom: 12px;
  width: 22px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity var(--transition);
}

.field.icon-user::before { content: '👤'; }
.field.icon-lock::before { content: '🔒'; }

.field.icon-user input,
.field.icon-lock input {
  padding-left: 42px;
}

.field.icon-user:focus-within::before,
.field.icon-lock:focus-within::before {
  opacity: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  color: #344552;
  font-size: 13px;
  font-weight: 700;
}

.text-input,
.select-input,
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #D0DCE3;
  border-radius: var(--radius-xs);
  background: #FAFCFD;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.text-input::placeholder,
.field input::placeholder {
  color: #9AA7B0;
}

.text-input:hover,
.select-input:hover,
.field input:hover {
  border-color: #A8BCC6;
  background: #FFFFFF;
}

.text-input:focus,
.select-input:focus,
.field input:focus {
  border-color: var(--teal-light);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(79, 138, 247,0.1);
}

.primary-btn,
.ghost-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-xs);
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
}

.login-panel > .primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.primary-btn {
  background: var(--teal-gradient);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235,0.28);
}

.primary-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235,0.38);
  filter: brightness(1.06);
}

.primary-btn:active,
.ghost-btn:active {
  transform: translateY(1px);
}

.ghost-btn {
  background: #FFFFFF;
  border-color: #D0DCE3;
  color: #4A5C68;
}

.ghost-btn:hover {
  border-color: var(--teal-light);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.error-text {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: var(--radius-xs);
  background: var(--red-soft);
  border: 1px solid rgba(217, 72, 72, 0.2);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

/* ==================== APP VIEW ==================== */

.app-view {
  min-height: 100vh;
}

.topbar {
  height: 68px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 16px rgba(22, 48, 60, 0.04);
}

.topbar-title,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-title {
  gap: 12px;
}

.topbar-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.topbar-copy strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.topbar-copy > span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.topbar-actions {
  gap: 12px;
}

.service-status {
  height: 32px;
  padding: 0 12px;
  border-radius: 20px;
  background: #E8F5EE;
  border: 1px solid #C5E5D1;
  color: #2B7A4B;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.05); }
}

.main {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 30px 40px 50px;
}

.page-heading {
  min-height: 58px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-eyebrow {
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.heading-date {
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.heading-date::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-light);
}

.status-message {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--teal-soft);
  border: 1px solid rgba(37, 99, 235,0.2);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 600;
}

.status-message.error {
  background: var(--red-soft);
  border-color: rgba(217, 72, 72, 0.22);
  color: var(--red);
}

/* ==================== STATS GRID ==================== */

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

.stat-card {
  min-width: 0;
  min-height: 120px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--teal-gradient);
  opacity: 0.9;
}

.stat-card:nth-child(2)::before { background: var(--blue-gradient); }
.stat-card:nth-child(3)::before { background: var(--amber-gradient); }
.stat-card:nth-child(4)::before { background: var(--purple-gradient); }

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

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--teal-soft);
  color: var(--teal);
  flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat-card:nth-child(3) .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat-card:nth-child(4) .stat-icon { background: var(--purple-soft); color: var(--purple); }

.stat-value {
  margin-top: 14px;
  color: var(--text);
  font-size: 33px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

/* ==================== PANEL ==================== */

.panel {
  margin-bottom: 18px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.toolbar {
  min-height: 72px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #FFFFFF;
}

.toolbar-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--teal-gradient);
  flex-shrink: 0;
}

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

.text-input {
  width: 280px;
}

.select-input {
  width: auto;
  min-width: 132px;
}

/* ==================== TABLE ==================== */

.table-wrap {
  overflow: auto;
  background: #FFFFFF;
}

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

.data-table th,
.data-table td {
  height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  height: 44px;
  background: var(--surface-muted);
  color: #5A6B76;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--line);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table td:nth-child(1),
.data-table td:nth-child(5),
.data-table td:nth-child(6),
.data-table td:nth-child(7) {
  font-variant-numeric: tabular-nums;
}

.mono-cell {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: #5A6974;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  font-size: 12px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #E0E8EC;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.avatar-fallback {
  background: var(--teal-gradient);
  color: #FFFFFF;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.link-btn {
  min-width: 56px;
  height: 32px;
  padding: 0 14px;
  border: 1.5px solid var(--teal-light);
  border-radius: 20px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.link-btn:hover {
  background: var(--teal-gradient);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(37, 99, 235,0.25);
}

.empty-text {
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
}

/* ==================== PAGINATION ==================== */

.pagination {
  min-height: 64px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  background: #FFFFFF;
}

.pagination .ghost-btn {
  height: 34px;
  padding: 0 14px;
}

/* ==================== DETAIL VIEW ==================== */

.detail-head {
  min-height: 84px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.user-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.summary-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.summary-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.summary-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.summary-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--blue-soft);
  border: 1px solid #BEE7FB;
  color: #0B72A4;
  font-size: 12px;
  font-weight: 800;
  transition: transform var(--transition);
}

.summary-chip:hover {
  transform: translateY(-1px);
}

.summary-chip:nth-child(2) {
  background: var(--amber-soft);
  border-color: #FFE0B8;
  color: #9A5A0B;
}

.summary-chip:nth-child(3) {
  background: var(--teal-soft);
  border-color: #C7DBFE;
  color: var(--teal-dark);
}

.fish-details {
  margin: 0;
}

.fish-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal);
  font-weight: 800;
  transition: color var(--transition);
}

.fish-details summary:hover {
  color: var(--teal-light);
}

.fish-table {
  margin-top: 10px;
  min-width: 580px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.fish-table th,
.fish-table td {
  height: auto;
  padding: 9px 12px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #FFFFFF;
  white-space: nowrap;
}

.fish-table th:last-child,
.fish-table td:last-child {
  border-right: 0;
}

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

.fish-table th {
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.muted {
  color: var(--text-muted);
}

/* ==================== POLISH ==================== */

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #C3D2E8;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #A9BEE0;
}

/* 按钮图标 */
.btn-ico {
  margin-right: 6px;
  font-size: 1em;
  line-height: 1;
}

/* 登录卡片入场动画 */
.login-panel {
  animation: panel-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* 面板与统计卡片入场动画 */
.panel {
  animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat-card {
  animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* 统计卡片右上角装饰光斑 */
.stat-card::after {
  content: '';
  position: absolute;
  top: -34px;
  right: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* 顶栏底部渐变光线 */
.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.35) 50%, transparent 100%);
  pointer-events: none;
}

/* 表格斑马纹（hover 覆盖在后） */
.data-table tbody tr:nth-child(even) {
  background: #F8FAFE;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

/* 空状态 */
.empty-text {
  font-size: 14px;
}

.empty-text::before {
  content: '🐟';
  display: block;
  margin-bottom: 12px;
  font-size: 36px;
  opacity: 0.55;
}

/* 分页按钮 */
.pagination .ghost-btn {
  border-radius: 20px;
  font-weight: 700;
}

.pagination .ghost-btn:not(:disabled):hover {
  border-color: var(--teal-light);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

/* 头像光环 */
.avatar {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), var(--shadow-sm);
}

/* 单选框/下拉箭头微调 */
.select-input {
  cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238090A5' d='M1 1l4 4 4-4' stroke='%238090A5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  appearance: none;
}

/* 搜索框聚焦宽度微动 */
.text-input {
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), width 0.25s ease;
}

.toolbar .text-input:focus {
  width: 320px;
}

/* ==================== RESPONSIVE ==================== */

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .panel,
  .stat-card,
  .login-shell,
  .login-panel,
  .status-dot {
    animation: none;
  }

  .stat-card,
  .primary-btn,
  .ghost-btn,
  .link-btn {
    transition: none;
  }
}



@media (max-width: 1040px) {
  .main {
    padding: 24px 20px 40px;
  }

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

  .toolbar-controls {
    width: 100%;
  }

  .text-input {
    flex: 1;
    min-width: 230px;
  }

  .detail-head {
    grid-template-columns: 1fr auto;
  }

  .user-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .login-view {
    padding: 20px 14px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .login-brand {
    min-height: auto;
    padding: 26px 24px;
    gap: 20px;
  }

  .login-brand-desc {
    margin: 16px 0 10px;
  }

  .login-brand-features {
    display: none;
  }

  .login-panel {
    padding: 30px 22px 26px;
  }

  .topbar {
    height: 62px;
    padding: 0 16px;
  }

  .service-status,
  .topbar-copy > span {
    display: none;
  }

  .main {
    padding: 20px 14px 34px;
  }

  .page-heading {
    min-height: 48px;
    margin-bottom: 14px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    min-height: 104px;
    padding: 16px;
  }

  .stat-value {
    font-size: 27px;
  }

  .toolbar {
    align-items: flex-start;
    padding: 14px;
  }

  .toolbar-controls,
  .toolbar-controls > * {
    width: 100%;
  }

  .text-input,
  .select-input {
    min-width: 0;
  }

  .toolbar .text-input:focus {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 40px;
  }

  .pagination {
    justify-content: space-between;
    padding: 10px 14px;
    gap: 8px;
  }

  .pagination span {
    text-align: center;
    font-size: 12px;
  }

  .detail-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

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

  .heading-date {
    display: none;
  }
}
