/* ===== 增强样式：Toast、确认框、骨架屏、分页 ===== */

/* Toast 通知 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--teal);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

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

.toast-ok { border-left-color: var(--green); }
.toast-warn { border-left-color: var(--amber); }
.toast-error { border-left-color: var(--rose); }
.toast-info { border-left-color: var(--blue); }

.toast-icon::before {
  font-size: 18px;
}
.toast-ok .toast-icon::before { content: "✓"; color: var(--green); }
.toast-warn .toast-icon::before { content: "!"; color: var(--amber); }
.toast-error .toast-icon::before { content: "✕"; color: var(--rose); }
.toast-info .toast-icon::before { content: "i"; color: var(--blue); }

/* 确认对话框 */
.confirm-backdrop {
  position: fixed;
  inset: 0; z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 15, 0.42);
  animation: fadeIn 0.15s ease;
}

.confirm-dialog {
  display: grid;
  gap: 14px;
  justify-items: center;
  width: min(380px, 100%);
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp 0.2s ease;
}

.confirm-icon {
  display: grid;
  width: 48px; height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 24px;
  font-weight: 800;
}

.confirm-dialog strong { font-size: 18px; }

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-dialog footer {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* 骨架屏 */
.skeleton-card {
  min-height: auto;
  border-color: var(--line);
  background: var(--surface);
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef0eb 25%, #e4e8e2 50%, #eef0eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-title { height: 18px; width: 60%; }
.skeleton-label { height: 12px; width: 40%; }
.skeleton-value { height: 28px; width: 50%; margin-top: 4px; }
.skeleton-short { width: 30%; }

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

/* 分页 */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}

.page-btn {
  min-width: 36px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.page-btn.is-active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 表单验证提示 */
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.field-error-visible {
  display: block !important;
  color: var(--rose);
  font-size: 12px;
}

/* 操作日志时间列 */
.log-time {
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 13px;
  color: var(--muted);
}
