/* ============================================================
   云财务智能会计教学平台 v4.6 — 全局样式（美化升级 2026-08-22）
   在原有基础样式上追加：设计令牌、渐变背景、卡片质感、
   徽章/标签体系、Skeleton 动画、滚动条与打印优化。
   全部为增量声明，不改变业务句柄与 JS 依赖。
   ============================================================ */

/* 设计令牌 */
:root {
  --cf-brand-1: #1e3a8a;
  --cf-brand-2: #2563eb;
  --cf-brand-3: #06b6d4;
  --cf-accent: #6366f1;
  --cf-ok: #10b981;
  --cf-warn: #f59e0b;
  --cf-err: #ef4444;
  --cf-ink: #0f172a;
  --cf-ink-2: #475569;
  --cf-ink-3: #94a3b8;
  --cf-line: #e2e8f0;
  --cf-bg: #f1f5f9;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background:
    radial-gradient(1100px 480px at 88% -6%, rgba(6, 182, 212, 0.08), transparent 60%),
    radial-gradient(900px 420px at -6% 12%, rgba(37, 99, 235, 0.09), transparent 55%),
    #f1f5f9 !important;
  color: var(--cf-ink);
}

/* 卡片质感：阴影层次 + 圆角 + 悬浮上浮 */
.glass {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -12px rgba(30, 58, 138, 0.18) !important;
  border-color: #bfdbfe;
}

/* 侧边栏：渐变激活态 */
.sidebar-item {
  transition: all 0.2s;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: #f1f5f9;
  color: #1e40af;
}

.sidebar-item.active {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdfa 100%);
  color: #1e40af;
  border-right: 3px solid #3b82f6;
  border-left: 3px solid #2563eb;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.35);
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

.doc-paper {
  background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.stamp { position: relative; }

.stamp::after {
  content: '已审核';
  position: absolute; top: 20px; right: 20px;
  width: 80px; height: 80px;
  border: 3px solid #ef4444; color: #ef4444;
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transform: rotate(-25deg); opacity: 0.6; pointer-events: none;
}

.progress-ring { transform: rotate(-90deg); }

/* 滚动条（细、圆角、与品牌色呼应） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #bfdbfe, #a5f3fc);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #93c5fd; }
::-webkit-scrollbar-track { background: transparent; }

.tab-btn { transition: all 0.2s; cursor: pointer; }

.tab-btn.active {
  color: #1e40af;
  border-bottom: 2px solid #3b82f6;
  background: #eff6ff;
  border-radius: 8px 8px 0 0;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-bounce { animation: bounce 0.6s infinite; }

input, textarea, select { transition: all 0.2s ease; }
input:focus, textarea:focus, select:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
button { transition: all 0.2s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0) scale(0.985); }

/* 期末考试倒计时最后5分钟闪烁警示 */
@keyframes examTimerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- 新增：徽章 / 标签 / 状态点 ---------- */
.cf-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
}
.cf-badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cf-badge-cyan { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.cf-badge-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cf-badge-red   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.cf-badge-purple{ background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.cf-badge-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* 数据状态点（成功/警告/失败） */
.cf-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.cf-dot-ok { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.cf-dot-warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.cf-dot-err { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }

/* 顶部条/页头渐变 */
.cf-gradient-bar {
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 55%, #06b6d4 100%) !important;
  color: #fff;
}
.cf-gradient-text {
  background: linear-gradient(90deg, #1e3a8a, #2563eb, #06b6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 主按钮渐变 + 阴影 */
.cf-btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.5);
}
.cf-btn-primary:hover { box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.55); }

/* 加载骨架屏 */
.cf-skeleton {
  position: relative; overflow: hidden;
  background: #e2e8f0; border-radius: 6px;
}
.cf-skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: cfShimmer 1.2s infinite;
}
@keyframes cfShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 输入框圆角统一 */
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  border-radius: 10px;
}
