/* ==========================================================
   智芽育儿 · 品牌主页 + 后台管理登录
   设计基调：温馨柔和（米色 / 浅橙 / 暖色调），圆角卡片
   ========================================================== */

:root {
  /* 主色 */
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-light: #FFF0E8;
  --primary-gradient: linear-gradient(180deg, #FF6B35 0%, #FF8F5E 100%);

  /* 暖色背景 */
  --bg: #FAFAF7;
  --bg-warm: #FBF4EC;
  --surface: #FFFFFF;

  /* 文字 */
  --text-primary: #4A4240;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;

  /* 边框 */
  --border: #E5E7EB;
  --border-light: #F3F0EC;

  /* 语义色 */
  --error: #EF4444;

  /* 圆角 */
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* 阴影 */
  --shadow-card: 0 2px 12px rgba(74, 66, 64, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(255, 107, 53, 0.12);
  --shadow-login: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 4px 12px rgba(255, 92, 0, 0.25);

  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-ghost:hover {
  background: var(--primary-light);
}

.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 16px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-gradient);
  border-radius: 10px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-admin {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 100%);
  padding: 64px 0 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-illustration img {
  width: 100%;
  border-radius: var(--radius-2xl);
  box-shadow: 0 16px 40px rgba(255, 107, 53, 0.14);
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-warm);
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 44px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ---------- 产品亮点 ---------- */
.feature-card {
  padding: 32px 24px;
  text-align: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--primary-light);
  border-radius: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- 功能展示 ---------- */
.function-card {
  display: flex;
  gap: 18px;
  padding: 28px;
  align-items: flex-start;
}

.function-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--primary-light);
  border-radius: 14px;
}

.function-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.function-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- 关于我们 ---------- */
.about-inner {
  max-width: 820px;
}

.about-card {
  padding: 36px 40px;
}

.about-card p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card strong {
  color: var(--text-primary);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.footer-brand .brand-logo {
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 8px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ==========================================================
   登录视图
   ========================================================== */

.login-wrap {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #FAF9F7;
  padding: 24px 16px;
}

.login-card {
  position: relative;
  width: 440px;
  max-width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-login);
}

.login-back {
  position: absolute;
  top: 18px;
  left: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.login-back:hover {
  color: var(--primary);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
  margin-top: 12px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-tertiary);
}

.login-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* 管理对象选择 */
.app-select {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.app-option {
  flex: 1;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 16px;
  border: 1.5px solid #F5F5F5;
  background: var(--surface);
  transition: all 0.2s;
}

.app-option .app-icon {
  font-size: 22px;
}

.app-option .app-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.app-option.selected {
  border: 2px solid var(--primary);
  background: var(--primary-light);
}

.app-option.selected .app-name {
  font-weight: 600;
  color: var(--primary);
}

/* 表单 */
.form-item {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.password-wrap {
  position: relative;
}

.password-wrap .form-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-tertiary);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.password-toggle:hover {
  opacity: 1;
}

.form-remember {
  margin-bottom: 24px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.remember-label input {
  accent-color: var(--primary);
}

.login-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
  border-radius: var(--radius-md);
}

.btn-login {
  width: 100%;
  height: 46px;
  font-size: 16px;
  letter-spacing: 4px;
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================================
   响应式
   ========================================================== */

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .hero-title {
    font-size: 26px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .login-title {
    font-size: 24px;
  }

  .function-card {
    padding: 22px;
  }
}
