/* ================================
   消费分期 - 完全复刻样式
   ================================ */

/* CSS Variables - 匹配原网站颜色 */
:root {
  --primary-blue: #60a5fa;
  --primary-blue-dark: #3b82f6;
  --danger-red: #ff3b30;
  --success-green: #00b578;
  --warning-orange: #ff8f1f;
  --bg-gray: #f3f4f6;
  --bg-slate: #e2e8f0;
  --bg-white: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-gray: #9ca3af;
  --text-light: #999999;
  --border-color: #e5e7eb;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 24px;
  --font-size-4xl: 36px;
}

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

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: var(--font-size-sm);
  background-color: var(--bg-gray);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Container */
.app-container {
  max-width: 768px;
  min-width: 375px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-gray);
  position: relative;
}

.page {
  display: none;
  padding-bottom: 60px;
}

.page.active {
  display: block;
}

/* ================================
   固定头部
   ================================ */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 768px;
  min-width: 375px;
  margin: 0 auto;
  min-height: 64px;
  background: white;
  z-index: 10;
  padding: 12px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: var(--font-size-2xl);
  font-weight: bold;
  color: var(--text-primary);
}

.header-subtitle {
  font-weight: bold;
  color: var(--text-gray);
  font-size: var(--font-size-sm);
}

/* ================================
   Hero Banner (着陆页)
   ================================ */
.hero-banner {
  background: var(--primary-blue);
  border-radius: 0 0 24px 24px;
  padding: 20px;
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-flex {
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.hero-info {
  flex: 1;
  color: white;
  padding-right: 10px;
}

.hero-greeting {
  font-size: var(--font-size-2xl);
  font-weight: bold;
  margin-bottom: 20px;
}

.hero-label {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  margin-bottom: 4px;
}

.hero-amount {
  font-size: var(--font-size-4xl);
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero-rate {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.hero-rate strong {
  color: #fbbf24;
  font-size: var(--font-size-lg);
}

.hero-mascot {
  width: 45%;
  max-width: 180px;
}

.btn-hero-login {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  color: var(--primary-blue-dark);
  padding: 16px 0;
  border-radius: 50px;
  font-weight: bold;
  font-size: var(--font-size-base);
  transition: all 0.3s;
}

.btn-hero-login:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ================================
   通知条
   ================================ */
.notice-bar {
  background: white;
  margin: 16px 20px;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-notice {
  margin-top: 16px;
}

.notice-icon {
  font-size: 18px;
  color: var(--warning-orange);
  margin-right: 10px;
  flex-shrink: 0;
}

.notice-content {
  flex: 1;
  overflow: hidden;
}

.notice-scroll {
  display: flex;
  animation: scroll-left 20s linear infinite;
  white-space: nowrap;
}

.notice-item {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-right: 40px;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ================================
   申请流程
   ================================ */
.process-card {
  background: var(--bg-slate);
  margin: 0 auto;
  margin-top: 20px;
  padding: 20px 40px;
  border-radius: 12px;
  width: 80%;
}

.process-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.step-icon {
  width: 48px;
  height: 48px;
}

.process-arrow {
  font-size: 20px;
  color: var(--text-gray);
}

.process-labels {
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.process-label {
  flex: 1;
}

.process-time {
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--primary-blue-dark);
}

.process-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

/* ================================
   通用卡片区域
   ================================ */
.section-card {
  background: white;
  margin: 32px 20px 16px;
  border-radius: 12px;
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-icon {
  font-size: 20px;
}

.section-title {
  font-size: var(--font-size-lg);
  font-weight: bold;
}

/* 产品表格 */
.product-table {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.product-row {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.product-row:last-child {
  border-bottom: none;
}

.product-label {
  width: 100px;
  padding: 12px;
  background: var(--bg-gray);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.product-value {
  flex: 1;
  padding: 12px;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

/* ================================
   统计数据
   ================================ */
.stats-card {
  background: white;
  margin: 16px 20px;
  border-radius: 12px;
  padding: 20px;
}

.stats-row {
  display: flex;
  justify-content: space-around;
}

.stats-item {
  text-align: center;
}

.stats-value {
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--primary-blue-dark);
}

.stats-plus {
  color: var(--danger-red);
}

.stats-label {
  font-size: var(--font-size-xs);
  color: var(--text-light);
  margin-top: 4px;
}

/* ================================
   图片区块
   ================================ */
.about-section,
.cooperation-section {
  margin: 16px 20px;
}

.about-image,
.cooperation-image {
  width: 100%;
  border-radius: 12px;
}

.home-cooperation {
  margin-bottom: 20px;
}

/* ================================
   底部导航
   ================================ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 768px;
  min-width: 375px;
  margin: 0 auto;
  background: white;
  display: flex;
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.3s;
}

.tab-item.active {
  color: var(--primary-blue-dark);
}

.tab-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.tab-text {
  font-size: var(--font-size-xs);
}

/* ================================
   导航栏
   ================================ */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-bar-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.nav-back {
  font-size: 24px;
  cursor: pointer;
  width: 40px;
}

.nav-title {
  font-size: var(--font-size-lg);
  font-weight: bold;
}

.nav-placeholder {
  width: 40px;
}

/* ================================
   登录页
   ================================ */
.login-header-bg {
  width: 100%;
  overflow: hidden;
}

.login-bg-image {
  width: 100%;
  height: auto;
}

.login-form-container {
  padding: 24px 20px;
  background: white;
  margin: -20px 16px 16px;
  border-radius: 12px;
  position: relative;
}

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

.form-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 16px;
  font-size: var(--font-size-base);
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue-dark);
}

.form-input-group {
  display: flex;
  gap: 12px;
}

.form-input-group .form-input {
  flex: 1;
}

.btn-get-code {
  width: 110px;
  height: 48px;
  background: none;
  border: 1px solid var(--primary-blue-dark);
  border-radius: 8px;
  color: var(--primary-blue-dark);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.btn-get-code:disabled {
  border-color: var(--text-light);
  color: var(--text-light);
  cursor: not-allowed;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  background: var(--primary-blue-dark);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: var(--font-size-lg);
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
}

.btn-login-submit:hover {
  opacity: 0.9;
}

.login-agreement {
  font-size: var(--font-size-xs);
  color: var(--text-light);
  text-align: center;
  margin-top: 16px;
}

.login-agreement a {
  color: var(--primary-blue-dark);
}

/* ================================
   逾期提醒 (已登录首页)
   ================================ */
.overdue-banner {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  margin: 80px 20px 0;
  border-radius: 12px;
  padding: 16px;
  color: white;
}

.overdue-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overdue-user {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.overdue-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.overdue-days {
  font-size: var(--font-size-sm);
}

.overdue-days strong {
  font-size: var(--font-size-2xl);
  font-weight: bold;
}

.overdue-amount {
  font-size: var(--font-size-lg);
  font-weight: bold;
}

.overdue-amount span {
  font-size: var(--font-size-2xl);
}

.btn-repay-now {
  width: 100%;
  background: var(--success-green);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 24px;
  font-size: var(--font-size-base);
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

/* ================================
   服务入口 (2列布局)
   ================================ */
.service-grid-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 20px;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.service-text {
  font-size: var(--font-size-xs);
  color: var(--text-primary);
}

/* 逾期影响入口 */
.impact-card {
  background: white;
  margin: 0 20px 16px;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.impact-img {
  width: 40px;
  height: 40px;
  margin-right: 12px;
}

.impact-text {
  flex: 1;
  font-size: var(--font-size-base);
  font-weight: 500;
}

.impact-arrow {
  font-size: 20px;
  color: var(--text-gray);
}

/* ================================
   还款页面
   ================================ */
.loan-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 20px;
  color: white;
}

.loan-order {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-bottom: 16px;
}

.loan-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.loan-info-item {
  padding: 8px;
}

.loan-info-value {
  font-size: var(--font-size-xl);
  font-weight: bold;
}

.loan-info-label {
  font-size: var(--font-size-xs);
  opacity: 0.8;
  margin-top: 4px;
}

/* 还款列表 */
.repayment-list {
  padding: 16px 20px;
}

.repayment-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.repayment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.repayment-period {
  font-size: var(--font-size-lg);
  font-weight: bold;
}

.repayment-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: var(--font-size-xs);
}

.repayment-status.overdue {
  background: #fee2e2;
  color: var(--danger-red);
}

.repayment-status.pending {
  background: #fef3c7;
  color: var(--warning-orange);
}

.repayment-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  font-size: var(--font-size-sm);
}

.repayment-detail-item {
  text-align: center;
}

.repayment-detail-label {
  color: var(--text-light);
  margin-bottom: 4px;
}

.repayment-detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

.repayment-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.repayment-total-amount {
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--danger-red);
}

.btn-repay {
  background: var(--danger-red);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  cursor: pointer;
}

/* ================================
   个人中心
   ================================ */
.member-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 40px 20px;
  color: white;
  text-align: center;
}

.member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary-blue-dark);
}

.member-name {
  font-size: var(--font-size-xl);
  font-weight: bold;
}

.member-phone {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-top: 4px;
}

/* 菜单列表 */
.menu-list {
  background: white;
  margin: 16px 20px;
  border-radius: 12px;
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 20px;
  color: var(--primary-blue-dark);
  margin-right: 12px;
  width: 24px;
}

.menu-icon.danger {
  color: var(--danger-red);
}

.menu-text {
  flex: 1;
  font-size: var(--font-size-base);
}

.menu-text.danger {
  color: var(--danger-red);
}

.menu-value {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.menu-arrow {
  font-size: 20px;
  color: var(--text-gray);
}

/* 我的资料页面 */
.profile-content {
  padding-top: 0;
}

/* ================================
   逾期影响页面
   ================================ */
.impact-content {
  padding: 16px 20px;
}

.impact-full-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

.impact-list {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.impact-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.impact-item:last-child {
  border-bottom: none;
}

.impact-item-icon {
  font-size: 28px;
  color: var(--primary-blue-dark);
  margin-right: 16px;
  width: 32px;
}

.impact-item-text {
  flex: 1;
}

.impact-item-title {
  font-size: var(--font-size-base);
  font-weight: 500;
  margin-bottom: 4px;
}

.impact-item-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}