/* 固件上传页样式，与官网、policy 独立 */
* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 24px;
  background: #f5f5f5;
  color: #333;
}
.container {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
header {
  margin-bottom: 24px;
}
header h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
header .hint {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}
header .link-list,
header .link-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.875rem;
  color: #007aff;
  text-decoration: none;
}
header .link-list:hover,
header .link-back:hover {
  text-decoration: underline;
}
.upload-form .field {
  margin-bottom: 20px;
}
.upload-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9375rem;
}
/* 拖拽区域 */
.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover,
.drop-zone:focus {
  border-color: #007aff;
  background: #f0f7ff;
  outline: none;
}
.drop-zone.drag-over {
  border-color: #007aff;
  background: #e8f4ff;
}
.drop-zone .drop-zone-text {
  font-size: 0.9375rem;
  color: #666;
  text-align: center;
}
/* 已选文件列表 */
.file-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 0.875rem;
}
.file-list li.invalid {
  background: #ffebee;
  color: #c62828;
}
.file-list li .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-list li .meta {
  margin-left: 8px;
  font-size: 0.8125rem;
  color: #666;
}
.file-list li.invalid .meta {
  color: #c62828;
}
.file-list li .remove {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.8125rem;
  color: #666;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}
.file-list li .remove:hover {
  color: #c62828;
  background: rgba(0,0,0,0.05);
}
.file-list li .status {
  margin-left: 8px;
  font-size: 0.8125rem;
}
.file-list li .status.pending { color: #999; }
.file-list li .status.uploading { color: #007aff; }
.file-list li .status.success { color: #2e7d32; }
.file-list li .status.error { color: #c62828; }
.upload-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.875rem;
  resize: vertical;
}
.upload-form .char-count {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #999;
}
.upload-form .actions {
  margin-top: 24px;
}
.upload-form button {
  padding: 10px 24px;
  font-size: 0.9375rem;
  border: none;
  border-radius: 6px;
  background: #007aff;
  color: #fff;
  cursor: pointer;
}
.upload-form button:hover:not(:disabled) {
  background: #0066dd;
}
.upload-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
}
.message.show {
  display: block;
}
.message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.file-list:empty {
  display: none;
}

/* 登录页 */
.container-login {
  max-width: 360px;
}
.login-form .field {
  margin-bottom: 18px;
}
.login-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9375rem;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9375rem;
}
.login-form .actions {
  margin-top: 24px;
}
.login-form button {
  width: 100%;
  padding: 10px 24px;
  font-size: 0.9375rem;
  border: none;
  border-radius: 6px;
  background: #007aff;
  color: #fff;
  cursor: pointer;
}
.login-form button:hover:not(:disabled) {
  background: #0066dd;
}
.login-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 退出链接 */
.link-logout {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: #999;
  text-decoration: none;
}
.link-logout:hover {
  color: #c62828;
}

/* 已上传固件列表页 */
.container-list {
  max-width: 900px;
}
.list-loading,
.list-empty {
  padding: 24px;
  text-align: center;
  color: #666;
  font-size: 0.9375rem;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}
.firmware-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.firmware-table th,
.firmware-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.firmware-table th {
  background: #f5f5f5;
  font-weight: 500;
  color: #333;
}
.firmware-table td.col-name {
  font-family: monospace;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.firmware-table td.col-note {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #666;
}
.firmware-table td.col-time {
  white-space: nowrap;
  color: #666;
}
.firmware-table a {
  color: #007aff;
  text-decoration: none;
}
.firmware-table a:hover {
  text-decoration: underline;
}
.firmware-table .no-oss {
  color: #999;
  font-size: 0.8125rem;
}
