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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 420px;
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Logo */
.logo-section {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.logo-title {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.logo-subtitle {
  font-size: 13px;
  color: #999;
}

/* Tabs */
.tabs {
  display: flex;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #888;
  transition: all 0.25s ease;
}

.tab.active {
  background: #667eea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

/* Forms */
.form {
  display: none;
}

.form.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

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

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #667eea;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.45);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Message */
.message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
}

.message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.message.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #ccc;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.divider span {
  padding: 0 12px;
}

/* WeChat Button */
.btn-wechat {
  width: 100%;
  padding: 12px;
  background: #f5f5f5;
  color: #999;
  border: 2px dashed #ddd;
  border-radius: 10px;
  font-size: 14px;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* App Selector */
.app-selector {
  margin-top: 20px;
}

.app-selector-title {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8f9ff;
  border: 2px solid #e8ecff;
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}

.app-card:hover {
  border-color: #667eea;
  background: #f0f2ff;
  transform: translateX(4px);
}

/* 无权限的应用：灰色 */
.app-card.disabled {
  background: #f5f5f5;
  border-color: #e0e0e0;
  color: #bbb;
  filter: grayscale(1);
  cursor: pointer;
}

.app-card.disabled:hover {
  border-color: #d0d0d0;
  background: #eeeeee;
  transform: none;
}

/* 管理员入口卡片 */
.app-card-admin {
  background: #fff7e6;
  border-color: #ffd591;
  color: #d46b08;
}

.app-card-admin:hover {
  background: #fff1d6;
  border-color: #ffa940;
}

.app-card-icon {
  font-size: 28px;
}

.app-card-name {
  font-size: 16px;
  font-weight: 600;
}

/* Hint */
.hint {
  text-align: center;
  font-size: 13px;
  color: #bbb;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .logo-icon {
    font-size: 40px;
  }

  .logo-title {
    font-size: 22px;
  }
}

.btn-logout {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}
