:root {
  --primary: #07c160;
  --primary-dark: #06ad56;
  --danger: #ff4d4f;
  --warning: #faad14;
  --bg: #f5f5f5;
  --card-bg: #fff;
  --text: #333;
  --text-secondary: #666;
  --border: #e8e8e8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* Header */
.header {
  background: var(--primary);
  color: #fff;
  padding: 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .sub {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.9;
  margin-top: 4px;
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

/* Form */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
}
.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Button */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-default {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-small {
  display: inline-block;
  width: auto;
  padding: 6px 16px;
  font-size: 14px;
}

/* Task List */
.task-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.1s;
}
.task-item:active { transform: scale(0.98); }
.task-item-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.task-item-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.task-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.task-status.active {
  background: #e6f7ed;
  color: var(--primary);
}
.task-status.closed {
  background: #f5f5f5;
  color: #999;
}

/* File Upload */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
}
.upload-zone input[type="file"] {
  display: none;
}
.file-list {
  margin-top: 16px;
}
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.file-item-name {
  font-size: 14px;
  word-break: break-all;
}
.file-item-size {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  margin-left: 12px;
}
.file-item-remove {
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
  margin-left: 12px;
}

/* Status */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.status-success { background: #e6f7ed; color: var(--primary); }
.status-partial { background: #fff7e6; color: var(--warning); }
.status-failed { background: #fff1f0; color: var(--danger); }
.status-processing { background: #e6f4ff; color: #1890ff; }

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  display: none;
}
.toast.show { display: block; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  justify-content: center;
  align-items: center;
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 85%;
  max-width: 360px;
  padding: 24px;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}
.modal-body {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: center;
}
.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-actions .btn { flex: 1; }

/* Login */
.login-logo {
  text-align: center;
  padding: 40px 0 20px;
}
.login-logo h1 {
  font-size: 28px;
  color: var(--primary);
}
.login-logo p {
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Empty */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state p { margin-top: 12px; }

/* Copy link */
.share-link {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  word-break: break-all;
  margin: 12px 0;
}

/* Folder picker */
.folder-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.folder-item:hover {
  background: #f5f5f5;
}
.folder-item:active {
  background: #e8e8e8;
}

/* Tabs */
.tab-bar {
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 15px;
  color: #999;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

/* Hidden */
.hidden { display: none !important; }
