/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 侧边栏样式 */
.sidebar-item {
  transition: all 0.15s;
}

.sidebar-item:hover {
  background: rgba(59,130,246,0.12);
}

.sidebar-item.active {
  background: #3b82f6;
  color: white;
}

/* 标签页样式 */
.tab-btn {
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  border-bottom-color: #3b82f6;
  color: #3b82f6;
  font-weight: 600;
}

.tab-btn:hover:not(.active) {
  color: #3b82f6;
  background: #eff6ff;
}

/* 表单样式 */
.form-section {
  border-left: 3px solid #3b82f6;
  padding-left: 12px;
  margin-bottom: 24px;
}

/* 评分徽章 */
.score-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* 动画 */
.fade-in {
  animation: fadeIn 0.2s ease;
}

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

/* 输入框样式 */
input[type=number]::-webkit-inner-spin-button {
  opacity: 0.4;
}

/* 单选按钮组 */
.radio-group label {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.1s;
}

.radio-group label:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.radio-group input[type=radio]:checked + span {
  color: #2563eb;
  font-weight: 600;
}

/* Likert量表 */
.likert-table th,
.likert-table td {
  padding: 8px 10px;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.likert-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #64748b;
}

.likert-table tr:hover td {
  background: #f8faff;
}

/* 页面切换 */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 状态点 */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Tab面板 */
.tab-panel {
  display: block;
}

.tab-panel.hidden {
  display: none;
}

/* Keep custom radio cards keyboard-accessible without preselecting answers. */
.edc-radio-anchor { position: relative; }
.edc-keyboard-radio { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
#entry-form-area label:has(input[type="radio"]:focus-visible) {
  outline: 3px solid #2563eb; outline-offset: 3px; border-radius: 6px;
}
#entry-form-area input:focus-visible, #entry-form-area select:focus-visible,
#entry-form-area textarea:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.edc-operation-status {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  max-width: calc(100vw - 40px); padding: 14px 20px;
  background: #1e40af; color: white; border-radius: 10px; font-weight: 600;
  box-shadow: 0 4px 16px #0003; pointer-events: none;
}

/* Shared notices: stack simultaneous saves instead of covering one another. */
#edc-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  pointer-events: none;
}
#edc-toast-stack > div { pointer-events: auto; flex-shrink: 0; }
.edc-toast-success {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 20px 22px;
  border: 2px solid #86efac;
  border-radius: 14px;
  background: #15803d;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.edc-toast-message { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.edc-toast-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 50%;
  text-align: center;
  line-height: 26px;
  font-family: Georgia, serif;
}
.edc-toast-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font-size: 28px;
  line-height: 28px;
  cursor: pointer;
}
.edc-toast-close:hover { background: rgba(255,255,255,.18); }
.edc-toast-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) {
  #edc-toast-stack { top: 12px; right: 12px; width: calc(100vw - 24px); }
  .edc-toast-success { padding: 16px; gap: 10px; font-size: 18px; }
}
