/* styles.css - 考勤软件移动端样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
  padding-bottom: 40px;
}

/* 顶部标题 */
.app-header {
  text-align: center;
  padding: 24px 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 16px;
}

.app-header h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.app-header .subtitle {
  font-size: 13px;
  opacity: 0.9;
}

/* 卡片 */
.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

/* 表单 */
.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.form-row label {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.form-row select,
.form-row input[type="text"] {
  flex: 1;
  min-width: 60px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  cursor: pointer;
}

/* 提示文本 */
.hint {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 文本框 */
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 8px;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
}

/* 按钮 */
.btn-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #667eea;
  color: white;
  flex: 1;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-export {
  background: #28a745;
  color: white;
  flex: 1;
}

.btn-small {
  padding: 6px 10px;
  font-size: 12px;
  background: #f0f0f0;
  color: #333;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

/* 结果区域 */
.result-area {
  margin-top: 8px;
  font-size: 13px;
}

.result-item {
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  border-left: 3px solid #667eea;
}

.result-item.success {
  border-left-color: #28a745;
  background: #d4edda;
}

.result-item.error {
  border-left-color: #dc3545;
  background: #f8d7da;
}

/* 标签页 */
.tab-bar {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #666;
  font-size: 14px;
  margin-bottom: -2px;
}

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

.tab-content {
  display: none;
}

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

/* 数据列表 */
.data-list {
  margin-top: 8px;
}

.data-item {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}

.data-item .item-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.data-item .item-detail {
  color: #666;
  font-size: 12px;
}

.data-item .item-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

/* 底部 */
.app-footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 12px;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 20px;
  color: #999;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 400px) {
  .app-header h1 { font-size: 20px; }
  .card { padding: 12px; }
  button { padding: 8px 12px; font-size: 13px; }
}
