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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f0f2f5;
  color: #1f2329;
  font-size: 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  background: #fff;
  border-bottom: 1px solid #e5e6eb;
  position: sticky;
  top: 0;
}

.brand { font-size: 16px; font-weight: 600; }

.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3370ff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.user-name { color: #1f2329; font-size: 14px; }
.logout-btn {
  padding: 4px 14px;
  border: 1px solid #d0d3d9;
  border-radius: 6px;
  background: #fff;
  color: #646a73;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.logout-btn:hover {
  border-color: #d83931;
  color: #d83931;
  background: #fff2f0;
}

.container { max-width: 900px; margin: 20px auto; padding: 0 16px; }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

.tabs { display: flex; gap: 8px; }
.tab {
  padding: 6px 16px;
  border: 1px solid #d0d3d9;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.tab.active { background: #3370ff; color: #fff; border-color: #3370ff; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: 500; }
.req { color: #f54a45; }
.hint { color: #8a8f99; font-weight: 400; margin-left: 8px; font-size: 12px; }

input[type="text"], input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d0d3d9;
  border-radius: 6px;
  font-size: 14px;
}

.banner {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  background: #fff7e6;
  color: #ad6800;
  border: 1px solid #ffe7ba;
}

/* 悬浮提交按钮 */
.fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 1000;
  padding: 14px 22px;
  border: none;
  border-radius: 30px;
  background: #3370ff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(51, 112, 255, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(51, 112, 255, .45); }

/* 上传申请模态框 */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}
.modal-mask .upload-card {
  width: 100%;
  max-width: 560px;
  margin: 0;
  max-height: none;
}
.modal-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #8a8f99;
  padding: 0 4px;
}
.modal-close:hover { color: #1f2329; }

.type-row { display: flex; gap: 8px; align-items: center; }
.type-select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d0d3d9;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}
.type-new { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.type-new input { flex: 1; }

.picker-wrap {
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  max-height: 260px;
  overflow: auto;
}

.dept-tree { padding: 10px; }
.dept-node { margin: 4px 0; }
.dept-node-head { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 0; }
.dept-node-head label { margin-bottom: 0; font-weight: 400; cursor: pointer; }
.dept-children, .dept-members, .dept-body { margin-left: 20px; border-left: 1px dashed #e5e6eb; padding-left: 10px; }
.dept-users { margin-left: 20px; padding-left: 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; margin: 4px; border: 1px solid #d0d3d9; border-radius: 16px; cursor: pointer; user-select: none; }
.user-chip.picked { background: #e6f0ff; border-color: #3370ff; color: #3370ff; }
.chevron { width: 14px; text-align: center; color: #8a8f99; transition: transform .15s; }
.chevron.open { transform: rotate(90deg); }

.picked-list { padding: 8px 10px; border-top: 1px dashed #e5e6eb; min-height: 34px; }
.picked-list .picked-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e6f0ff; color: #3370ff; border-radius: 16px; padding: 4px 12px; margin: 3px;
}
.picked-item .x { cursor: pointer; font-weight: 700; }

.loading { color: #8a8f99; text-align: center; padding: 20px; }
.loading-slim { color: #8a8f99; font-size: 12px; padding: 6px 0; }

.form-actions { display: flex; align-items: center; gap: 12px; }
.upload-tip { color: #8a8f99; font-size: 12px; }

.btn {
  padding: 8px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn.primary { background: #3370ff; color: #fff; }
.btn.primary:disabled { background: #a0bdf8; cursor: not-allowed; }
.btn.small { padding: 4px 12px; font-size: 12px; }

.file-table { width: 100%; border-collapse: collapse; }
.file-table th, .file-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #f0f2f5; }
.file-table th { color: #8a8f99; font-weight: 500; font-size: 12px; }
.file-table td { font-size: 13px; }

.status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.status.ok { background: #e8f7ee; color: #1e8e52; }
.status.warn { background: #fff7e6; color: #ad6800; }
.status.no { background: #ffeeee; color: #d83931; }

.file-name { color: #3370ff; text-decoration: none; word-break: break-all; }

/* ===== 居中提示弹窗 ===== */
.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.toast.show { opacity: 1; pointer-events: auto; }
.toast-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 16px 22px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  color: #1f2329;
  transform: translateY(-8px);
  transition: transform .18s ease;
}
.toast.show .toast-inner { transform: translateY(0); }
.toast-icon { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
.toast.success .toast-icon { background: #1e8e52; content: '✓'; }
.toast.success .toast-icon::before { content: '✓'; }
.toast.error .toast-icon { background: #d83931; }
.toast.error .toast-icon::before { content: '✕'; }
.toast.warn .toast-icon { background: #ad6800; }
.toast.warn .toast-icon::before { content: '!'; }
