/* 简洁现代风,适配 PRD 学生使用 UI 风格 */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: #fafbfc;
  color: #1a1a1a;
  font-size: 14px;
}

header {
  background: #1a73e8;
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-size: 16px; font-weight: 600; }
.user-bar { display: flex; gap: 8px; align-items: center; }
.user-bar input { padding: 6px 10px; border: 0; border-radius: 4px; }
.user-bar input:focus { outline: 2px solid #fff; }
.user-bar button {
  padding: 6px 12px;
  background: white;
  color: #1a73e8;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}
#user-info { font-size: 13px; opacity: 0.9; }

nav {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  padding: 0 16px;
}
nav .tab {
  background: none;
  border: 0;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #5f6368;
}
nav .tab.active { border-bottom-color: #1a73e8; color: #1a73e8; font-weight: 500; }

main {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}
.tab-content { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
h2 { margin-top: 0; color: #1a73e8; }

.create-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.create-form input, .create-form textarea {
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
}
.create-form textarea { resize: vertical; }
.create-form button, .runs button {
  background: #1a73e8;
  color: white;
  border: 0;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  align-self: flex-start;
}
.create-form button:disabled, .runs button:disabled { background: #dadce0; cursor: not-allowed; }

hr { border: 0; border-top: 1px solid #e5e7eb; margin: 16px 0; }

#ass-list .assignment {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.assignment h3 { margin: 0 0 4px 0; font-size: 15px; }
.assignment .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: #fef3c0;
  color: #92400e;
  margin-left: 8px;
}
.assignment .status.completed { background: #d1fae5; color: #065f46; }
.assignment .status.abnormal { background: #fee2e2; color: #991b1b; }
.assignment .status.draft-ready, .assignment .status.self-check-running, .assignment .status.self-check-passed, .assignment .status.reduce-running { background: #e0e7ff; color: #3730a3; }
.assignment .status.init-running { background: #fef3c0; color: #92400e; }
.assignment .status.brief-uploaded { background: #e5e7eb; color: #4b5563; }

.draft-section { margin-top: 12px; }
.draft-section pre {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  font-size: 13px;
}
.diff-section {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}
.diff-section h4 { margin: 0 0 6px 0; }

.self-check {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f1f8e9;
  border-radius: 4px;
  font-size: 13px;
}

#emails-list .email {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.email .classify {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
}
.email .classify.important { background: #fee2e2; color: #991b1b; }
.email .classify.normal { background: #fef3c0; color: #92400e; }
.email .classify.ignore { background: #e5e7eb; color: #4b5563; }
.email .subject { font-weight: 500; }
.email .from { color: #6b7280; font-size: 12px; }
.email .preview { color: #4b5563; margin-top: 4px; font-size: 13px; }

pre#mail-device-code {
  white-space: pre-wrap;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  font-size: 13px;
  display: none;
}

/* 邮箱连接状态 */
#mail-status { font-size: 13px; min-height: 18px; }
#mail-status.ok { color: #059669; }
#mail-status.err { color: #dc2626; }

footer {
  text-align: center;
  padding: 24px;
  color: #6b7280;
  font-size: 12px;
}
#footer-msg { margin-top: 4px; }
#footer-msg.error { color: #dc2626; }
#footer-msg.success { color: #059669; }

/* 合规页面入口(Google OAuth 品牌验证要求) */
.legal-links {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.legal-links a {
  color: #6b7280;
  text-decoration: none;
  font-size: 12px;
  border-bottom: 1px solid rgba(107,114,128,0.3);
}
.legal-links a:hover { color: #1a73e8; }

/* ───────── 作业文件上传区 ───────── */
.drop-zone {
  border: 2px dashed #dadce0;
  border-radius: 8px;
  padding: 22px 16px;
  text-align: center;
  background: #fafbfc;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.drop-zone:hover { border-color: #a9c3f5; background: #f5f9ff; }
.drop-zone.drag-over {
  border-color: #1a73e8;
  background: #e8f0fe;
}
.dz-title { font-size: 14px; color: #374151; margin-bottom: 6px; }
.dz-hint { font-size: 12px; color: #9ca3af; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #1a73e8;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  font-weight: 500;
}
.link-btn:hover { color: #1765cc; }

/* 上传结果 */
.upload-list { display: flex; flex-direction: column; gap: 6px; }
.upload-list:empty { display: none; }
.up-item {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 9px 12px;
  background: #fff;
  font-size: 13px;
}
.up-item.up-loading { color: #6b7280; text-align: center; }
.up-name { font-weight: 500; color: #1f2937; display: flex; align-items: center; gap: 8px; }
.up-kind {
  font-size: 11px;
  font-weight: 400;
  color: #6b7280;
  background: #f1f3f4;
  padding: 1px 7px;
  border-radius: 10px;
}
.up-detail { margin-top: 3px; font-size: 12px; }
.up-text { color: #059669; }
.up-vision { color: #1a73e8; }
.up-err { color: #dc2626; }
