/* ── 全局重置 ──────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #07c160;
  text-decoration: none;
}

/* ── 页面容器 ──────────────────────────────────────── */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
  padding-bottom: 70px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin: 30px 0 30px;
  color: #1a1a1a;
}

/* ── 表单 ──────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: #07c160;
}

textarea.form-input {
  height: 200px;
  padding: 12px;
  resize: vertical;
}

/* ── 按钮 ──────────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  height: 44px;
  line-height: 44px;
  text-align: center;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:active {
  opacity: 0.8;
}

.btn-primary {
  background: #07c160;
  color: #fff;
}

.btn-primary:disabled {
  background: #9ed8b3;
  cursor: not-allowed;
}

.btn-outline {
  background: #fff;
  color: #07c160;
  border: 1px solid #07c160;
}

.btn-danger {
  background: #fff;
  color: #e53935;
  border: 1px solid #e53935;
}

.btn-sm {
  display: inline-block;
  width: auto;
  height: 30px;
  line-height: 30px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 6px;
}

/* ── Tab 切换 ──────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.tab-item {
  flex: 1;
  height: 42px;
  line-height: 42px;
  text-align: center;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.tab-item.active {
  color: #07c160;
  font-weight: 500;
  position: relative;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 2px;
  background: #07c160;
  border-radius: 1px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── 文件上传区域 ──────────────────────────────────── */
.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #fff;
}

.upload-area:active {
  border-color: #07c160;
}

.upload-area .icon {
  font-size: 36px;
  color: #ccc;
  margin-bottom: 8px;
}

.upload-area .text {
  color: #999;
  font-size: 14px;
}

.upload-area .filename {
  color: #333;
  font-size: 14px;
  margin-top: 8px;
  word-break: break-all;
}

.upload-area input[type="file"] {
  display: none;
}

/* ── 任务列表 ──────────────────────────────────────── */
.task-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.task-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  margin-left: 8px;
}

.status-pending {
  background: #fff3e0;
  color: #e65100;
}

.status-processing {
  background: #e3f2fd;
  color: #1565c0;
}

.status-done {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-fail {
  background: #fbe9e7;
  color: #c62828;
}

.task-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.task-actions {
  margin-top: 10px;
  text-align: right;
}

/* ── 底部导航 ──────────────────────────────────────── */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item.active {
  color: #07c160;
}

.nav-item .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

/* ── 提示消息 ──────────────────────────────────────── */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.toast.show {
  opacity: 1;
}

/* ── 空状态 ────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
}

.empty .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty .text {
  font-size: 14px;
}

/* ── 链接文字 ──────────────────────────────────────── */
.link-text {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #999;
}

.link-text a {
  color: #07c160;
}

/* ── 加载中 ────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 13px;
}
