/**
 * 通用样式 - 浅色管理系统风格
 */

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-bg: #eff6ff;
  --primary-soft: #dbeafe;

  --success: #16a34a;
  --success-bg: #ecfdf3;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  --bg-page: #f4f7fb;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.48);

  --border-light: #e5e7eb;
  --border-medium: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 18px 50px rgba(15, 23, 42, 0.10), 0 1px 0 rgba(255, 255, 255, 0.8) inset;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: 0.18s ease;
  --transition-slow: 0.28s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(37, 99, 235, 0.10), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.10), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg-page) 58%, #eef4ff 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  line-height: 1.5;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.logo span {
  display: inline-block;
  transition: transform var(--transition), filter var(--transition);
}

.logo span:hover {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.18));
}

.logo-1 { color: #ec4899; }
.logo-2 { color: #f97316; }
.logo-3 { color: #eab308; }
.logo-4 { color: #22c55e; }
.logo-5 { color: #06b6d4; }
.logo-6 { color: #2563eb; }
.logo-7 { color: #a855f7; }

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: 0.4px;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  padding: 34px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
  outline: none;
  box-shadow: var(--shadow-sm);
}

input[type="text"]:hover,
input[type="password"]:hover {
  border-color: #bfdbfe;
}

input[type="text"]:focus,
input[type="password"]:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), var(--shadow-sm);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #94a3b8;
}

.btn {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-inverse);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
  user-select: none;
  white-space: nowrap;
}

.btn > span,
#btn-text,
#official-btn-text,
#guigu-start-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.26);
}

.btn .spinner {
  flex-shrink: 0;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

.btn:focus-visible,
.reset-btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.20);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-muted);
  border-color: #bfdbfe;
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.reset-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-family: inherit;
}

.reset-btn:hover {
  background: var(--bg-muted);
  border-color: var(--border-light);
  color: var(--primary-dark);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 24px 0;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert.error {
  background: var(--error-bg);
  border-color: #fecaca;
  color: #991b1b;
}

.alert.success {
  background: var(--success-bg);
  border-color: #bbf7d0;
  color: #166534;
}

.alert.warning {
  background: var(--warning-bg);
  border-color: #fde68a;
  color: #92400e;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

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

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-in {
  animation: fadeIn 0.28s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@media (max-width: 480px) {
  body {
    padding: 16px;
    justify-content: flex-start;
  }

  .card {
    padding: 24px;
    border-radius: var(--radius-lg);
  }

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