/* ============ 会议报告收集系统 - 全局样式 ============ */
:root {
  --primary: #4353e8;
  --primary-dark: #3643c4;
  --primary-2: #7c3aed;
  --grad: linear-gradient(135deg, #4353e8 0%, #7c3aed 100%);
  --bg: #f2f4fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e6e8f0;
  --success: #16a34a;
  --success-bg: #ecfdf3;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(31, 41, 80, .08);
  --shadow-lg: 0 20px 50px rgba(31, 41, 80, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.86); } 60% { transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 40px 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drawCircle { from { stroke-dashoffset: 166; } to { stroke-dashoffset: 0; } }
@keyframes drawCheck { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }

.fade-up { animation: fadeUp .55s cubic-bezier(.22, .9, .36, 1) both; }
.shake { animation: shake .5s; }

/* ---------- Hero ---------- */
.hero {
  background: var(--grad);
  color: #fff;
  padding: 52px 20px 84px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  animation: floaty 7s ease-in-out infinite;
}
.hero::before { width: 300px; height: 300px; top: -120px; right: -60px; }
.hero::after { width: 220px; height: 220px; bottom: -110px; left: -40px; animation-delay: 2s; }
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.hero-logo {
  width: min(960px, 96%); max-height: 220px; object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  margin-bottom: 20px;
  animation: fadeUp .6s both;
}
/* 上传了会议横幅时，hero 使用与横幅协调的深蓝渐变 */
.hero.branded { background: linear-gradient(150deg, #14337f 0%, #2456c8 55%, #2f6ae2 100%); }
.hero h1 {
  margin: 0; font-size: clamp(24px, 4vw, 38px); font-weight: 800;
  letter-spacing: 1px; animation: fadeUp .6s .05s both;
}
.hero-sub {
  margin: 10px 0 0; font-size: clamp(13px, 2vw, 16px);
  color: rgba(255, 255, 255, .88); letter-spacing: 4px;
  animation: fadeUp .6s .12s both;
}
.deadline-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px); font-size: 13px; animation: fadeUp .6s .2s both;
}
.deadline-chip.passed { background: rgba(220, 38, 38, .35); }

/* ---------- 布局 ---------- */
.container { max-width: 860px; margin: -48px auto 48px; padding: 0 18px; position: relative; z-index: 2; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
  border: 1px solid rgba(230, 232, 240, .8);
}
.card + .card { margin-top: 18px; }
.card h2 {
  margin: 0 0 4px; font-size: 20px; display: flex; align-items: center; gap: 10px;
}
.card h2::before {
  content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--grad);
}
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

footer { text-align: center; color: #9aa1b2; font-size: 12.5px; padding: 26px 16px 40px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: #374151; }
.field label .req { color: var(--danger); margin-left: 2px; }
.input, .select {
  width: 100%; padding: 11px 14px; font-size: 14.5px; font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 11px; background: #fbfbfe;
  color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
  appearance: none;
}
.input:hover, .select:hover { border-color: #cdd3ea; }
.input:focus, .select:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(67, 83, 232, .12);
}
.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field.invalid .input, .field.invalid .select { border-color: var(--danger); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 11px; border: none; cursor: pointer;
  font-size: 14.5px; font-weight: 600; font-family: var(--font); color: var(--text);
  background: #eef0f7; transition: transform .16s, box-shadow .2s, background .2s, opacity .2s;
  user-select: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(67, 83, 232, .35); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(67, 83, 232, .45); }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 8px 20px rgba(220, 38, 38, .28); }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: 14px 34px; font-size: 16px; border-radius: 13px; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* ---------- 拖拽上传区 ---------- */
.dropzone {
  border: 2px dashed #cdd3ea; border-radius: 14px; background: #fafbff;
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s, transform .2s;
}
.dropzone:hover { border-color: var(--primary); background: #f4f6ff; }
.dropzone.dragover { border-color: var(--primary); background: #eef1ff; transform: scale(1.012); }
.dz-icon { font-size: 34px; margin-bottom: 8px; animation: floaty 3.2s ease-in-out infinite; display: inline-block; }
.dz-text { font-size: 14.5px; color: #4b5563; }
.dz-text b { color: var(--primary); }
.dz-hint { font-size: 12.5px; color: #9aa1b2; margin-top: 6px; }
.file-chip {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  background: #f4f6ff; border: 1px solid #dde2fb; border-radius: 12px;
  padding: 12px 14px; animation: popIn .35s both; text-align: left;
}
.file-chip .f-ico { font-size: 24px; }
.file-chip .f-name { font-size: 14px; font-weight: 600; word-break: break-all; }
.file-chip .f-size { font-size: 12px; color: var(--muted); }
.file-chip .f-remove {
  margin-left: auto; border: none; background: transparent; cursor: pointer;
  color: #9aa1b2; font-size: 16px; padding: 4px 8px; border-radius: 8px; transition: all .15s;
}
.file-chip .f-remove:hover { color: var(--danger); background: var(--danger-bg); }

/* ---------- 上传进度弹层 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 24, 44, .55);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
  z-index: 100; animation: fadeIn .25s both; padding: 20px;
}
.progress-card {
  background: #fff; border-radius: 20px; padding: 34px 30px; width: min(460px, 94vw);
  box-shadow: var(--shadow-lg); animation: popIn .35s both; text-align: center;
}
.progress-card .fname { font-weight: 700; font-size: 15px; word-break: break-all; margin: 6px 0 20px; }
.pbar { height: 14px; border-radius: 999px; background: #eef0f7; overflow: hidden; }
.pbar-fill {
  height: 100%; width: 0%; border-radius: 999px; background: var(--grad);
  background-size: 40px 40px; position: relative;
  transition: width .18s linear;
  background-image: linear-gradient(135deg, #4353e8, #7c3aed),
    linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%);
  background-blend-mode: overlay;
  animation: stripes .8s linear infinite;
  box-shadow: 0 0 14px rgba(124, 58, 237, .5);
}
.percent { font-size: 26px; font-weight: 800; margin: 16px 0 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pstats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px;
  font-size: 12px; color: var(--muted);
}
.pstats b { display: block; color: var(--text); font-size: 13.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 成功页 ---------- */
.success-wrap { text-align: center; animation: fadeUp .5s both; }
.check-svg { width: 84px; height: 84px; margin: 6px auto 14px; display: block; }
.check-svg .circle { stroke-dasharray: 166; animation: drawCircle .7s .1s cubic-bezier(.65,0,.45,1) both; }
.check-svg .check { stroke-dasharray: 48; animation: drawCheck .4s .7s cubic-bezier(.65,0,.45,1) both; }
.success-wrap h3 { margin: 0 0 8px; font-size: 21px; }
.success-wrap .desc { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 auto 20px; max-width: 480px; }
.link-box {
  display: flex; gap: 10px; align-items: center; background: #f4f6ff;
  border: 1.5px dashed var(--primary); border-radius: 12px; padding: 12px 14px;
  margin: 0 auto 12px; max-width: 560px;
}
.link-box .url { flex: 1; text-align: left; font-size: 13.5px; word-break: break-all; color: var(--primary-dark); font-weight: 600; }
.link-warn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--warn); background: var(--warn-bg); padding: 8px 16px; border-radius: 999px; margin-bottom: 22px;
}

/* ---------- 信息展示 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; margin-top: 16px; }
.info-item .k { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.info-item .v { font-size: 14.5px; font-weight: 600; word-break: break-all; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.deleted { background: var(--danger-bg); color: var(--danger); }
.badge.act-upload { background: var(--success-bg); color: var(--success); }
.badge.act-resubmit { background: var(--info-bg); color: var(--info); }
.badge.act-update { background: var(--info-bg); color: var(--info); }
.badge.act-delete { background: var(--danger-bg); color: var(--danger); }
.badge.act-preview { background: #f3e8ff; color: #7c3aed; }
.badge.act-download { background: var(--warn-bg); color: var(--warn); }
.badge.act-reset { background: #f1f5f9; color: #475569; }

.notice {
  display: flex; gap: 10px; align-items: flex-start; border-radius: 12px;
  padding: 13px 16px; font-size: 13.5px; line-height: 1.6; margin-bottom: 16px;
  animation: fadeUp .4s both;
}
.notice.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }
.notice.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.notice.info { background: var(--info-bg); color: var(--info); border: 1px solid #bfdbfe; }

/* ---------- 预览区 ---------- */
.preview-box {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #f8f9fd; margin: 16px 0;
}
.preview-box iframe { width: 100%; height: 560px; border: 0; display: block; background: #525659; }
.preview-ph { padding: 60px 20px; text-align: center; color: var(--muted); }
.preview-ph .big { font-size: 46px; margin-bottom: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 日志 ---------- */
.log-list { list-style: none; margin: 14px 0 0; padding: 0; }
.log-list li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px;
  border-bottom: 1px solid var(--line); animation: fadeUp .35s both;
}
.log-list li:last-child { border-bottom: none; }
.log-time { font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 3px; font-variant-numeric: tabular-nums; }
.log-body { flex: 1; min-width: 0; }
.log-detail { font-size: 13px; color: #4b5563; margin-top: 4px; word-break: break-all; }
.log-empty { text-align: center; color: var(--muted); padding: 26px 0; font-size: 14px; }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.pager button {
  min-width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-family: var(--font); font-size: 13px;
  transition: all .18s; color: var(--text); padding: 0 8px;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pager button.active { background: var(--grad); color: #fff; border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .info { font-size: 12.5px; color: var(--muted); width: 100%; text-align: center; margin-top: 4px; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; width: min(420px, 92vw); }
.toast {
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .3s cubic-bezier(.22,.9,.36,1) both;
  display: flex; align-items: center; gap: 8px; backdrop-filter: blur(8px);
}
.toast.success { background: rgba(22, 163, 74, .95); }
.toast.error { background: rgba(220, 38, 38, .95); }
.toast.info { background: rgba(37, 99, 235, .95); }
.toast.warn { background: rgba(217, 119, 6, .95); }
.toast.out { opacity: 0; transform: translateY(-12px); transition: all .3s; }

/* ---------- 模态框 ---------- */
.modal-card {
  background: #fff; border-radius: 18px; width: min(480px, 94vw);
  padding: 26px; box-shadow: var(--shadow-lg); animation: popIn .3s both;
  max-height: 86vh; overflow-y: auto;
}
.modal-card h3 { margin: 0 0 8px; font-size: 17px; }
.modal-card .modal-desc { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ---------- SVG 图标 ---------- */
.icon {
  width: 1em; height: 1em; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.14em; flex: none;
}
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 26px; height: 26px; stroke-width: 1.8; }
.icon-xl { width: 44px; height: 44px; stroke-width: 1.6; }
.c-blue { color: #2563eb; } .c-orange { color: #ea580c; } .c-red { color: #dc2626; }
.c-green { color: #16a34a; } .c-amber { color: #b45309; } .c-purple { color: #7c3aed; }
.c-pink { color: #db2777; } .c-gray { color: #6b7280; }
.dz-icon { color: var(--primary); }
.f-ico { display: inline-flex; }

/* ---------- 预览模态窗口 ---------- */
.preview-modal {
  background: #fff; border-radius: 16px; width: min(1060px, 96vw);
  height: min(80vh, 880px); display: flex; flex-direction: column;
  overflow: hidden; box-shadow: var(--shadow-lg); animation: popIn .3s both;
}
.pm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff;
}
.pm-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.pm-title .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-actions { display: flex; gap: 8px; flex: none; }
.pm-body { flex: 1; position: relative; background: #525659; min-height: 0; }
.pm-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.pm-loading {
  position: absolute; inset: 0; z-index: 2; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px;
}
.pm-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3.5px solid #e5e7f5; border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
.pm-loading .pbar { width: 240px; }
.pm-pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.pm-msg { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14px; padding: 30px; text-align: center; }
.pm-msg .icon { width: 44px; height: 44px; color: #c3c8d9; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero { padding: 40px 16px 70px; }
  .hero-logo { max-height: 120px; }
  .card { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .pstats { grid-template-columns: repeat(2, 1fr); }
  .btn-row .btn { flex: 1 1 45%; }
  .preview-box iframe { height: 420px; }
  .link-box { flex-direction: column; }
  .link-box .url { text-align: center; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
