* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

#app { max-width: 600px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }

/* 登录页 */
#login-screen { padding-top: 60px; text-align: center; }
#login-screen h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.subtitle { color: #666; margin-bottom: 32px; }

.login-options { max-width: 320px; margin: 0 auto; }
.login-option { background: #fff; padding: 20px; margin-bottom: 16px; border: 1px solid #e0e0e0; }
.login-option h3 { font-size: 14px; color: #333; margin-bottom: 8px; }
.login-option .desc { font-size: 12px; color: #888; margin-bottom: 12px; }
.login-option code { background: #f0f0f0; padding: 2px 6px; font-size: 12px; }

.login-divider { color: #aaa; font-size: 12px; margin: 16px 0; }

.token-form { display: flex; gap: 8px; }
.token-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}
.token-form input:focus { outline: none; border-color: #999; }

.hint { color: #888; font-size: 12px; margin-top: 16px; }

/* 按钮 */
.btn {
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: #f5f5f5; }
.btn.primary { background: #333; color: #fff; border-color: #333; }
.btn.primary:hover { background: #555; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn.success { background: #27ae60; color: #fff; border-color: #27ae60; }

/* 头部 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 16px;
}
header h1 { font-size: 18px; font-weight: 600; }

.user-info { display: flex; align-items: center; gap: 8px; font-size: 14px; }
#avatar { width: 28px; height: 28px; border-radius: 50%; }
.badge { font-size: 11px; padding: 2px 6px; background: #e0e0e0; }
.badge.super { background: #f39c12; color: #fff; }

/* 标签 */
.tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 1px solid #e0e0e0; }
.tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: #333; }
.tab.active { color: #333; border-bottom-color: #333; }
.tab .count {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0 4px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* 时段 */
.period-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.period-tab {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}
.period-tab:hover { border-color: #999; }
.period-tab.active { background: #333; color: #fff; border-color: #333; }

/* 菜单列表 */
.menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  font-size: 13px;
}
.menu-item .name { white-space: nowrap; }
.menu-item .delete-btn {
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
}
.menu-item:hover .delete-btn { color: #e74c3c; }

/* 添加表单 */
.add-form { display: flex; gap: 8px; }
.add-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}
.add-form input:focus { outline: none; border-color: #999; }

/* 待审核 */
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #f39c12;
  transition: all 0.3s ease;
}

.pending-item.processing {
  opacity: 0.6;
  transform: scale(0.98);
}

.pending-item.approved {
  opacity: 0;
  transform: translateX(30px);
  border-left-color: #27ae60;
}

.pending-item.rejected {
  opacity: 0;
  transform: translateX(-30px);
  border-left-color: #e74c3c;
}
.pending-item .type { font-size: 12px; color: #888; }
.pending-item .name { font-size: 14px; margin: 4px 0; }
.pending-item .actions { display: flex; gap: 6px; }

.empty { text-align: center; color: #888; padding: 32px; font-size: 14px; }

/* 管理员 */
.admin-info { font-size: 13px; color: #666; margin-bottom: 16px; }
.admin-info p { margin-bottom: 8px; }
h3 { font-size: 14px; margin-bottom: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.admin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  font-size: 13px;
}
.admin-item img { width: 24px; height: 24px; border-radius: 50%; }
.admin-item span { flex: 1; }

/* 加载 */
.loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.spinner {
  width: 24px; height: 24px;
  border: 2px solid #e0e0e0;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部 */
footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
  font-size: 12px;
  color: #888;
}
footer a { color: #333; }

/* 响应式 */
@media (max-width: 400px) {
  #app { padding: 12px; }
  header { flex-direction: column; gap: 12px; }
  .menu-item { font-size: 12px; padding: 6px 10px; }
}