@import '@/styles/morandi.scss';

.mine-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 188rpx);
  overflow: hidden;
  background: $morandi-bg-page;
  box-sizing: border-box;
}

.mine-header {
  flex-shrink: 0;
  padding: 48rpx 32rpx 64rpx;
  background: linear-gradient(145deg, #3d9b6e 0%, #22c55e 55%, #86efac 100%);
}

.mine-header__row {
  display: flex;
  align-items: center;
}

.mine-header__avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 60rpx;
  background: rgba(255, 255, 255, 0.35);
  border: 4rpx solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.mine-header__info {
  flex: 1;
  margin-left: 24rpx;
}

.mine-header__name {
  display: block;
  font-size: 36rpx;
  font-weight: 600;
  color: #fff;
}

.mine-header__sub {
  display: block;
  margin-top: 8rpx;
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.88);
}

.mine-header__arrow {
  margin-left: 8rpx;
}

.mine-scroll {
  flex: 1;
  width: 100%;
  /* 订单卡片上浮叠在绿色头部下沿，负边距写在 scroll-view 上避免内容被裁切 */
  margin-top: -40rpx;
  position: relative;
  z-index: 2;
}

.mine-body {
  padding: 0 24rpx 48rpx;
}

.mine-order-card {
  margin-bottom: 24rpx;
  padding: 24rpx 28rpx 20rpx;
  background: #fff;
  border-radius: 20rpx;
  box-shadow: 0 4rpx 20rpx rgba(74, 69, 66, 0.06);
}

.mine-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24rpx;
}

.mine-order-head__title {
  font-size: 30rpx;
  font-weight: 600;
  color: $morandi-text;
}

.mine-order-head__all {
  display: flex;
  align-items: center;
  gap: 4rpx;
  font-size: 24rpx;
  color: $morandi-text-muted;
}

.mine-order-shortcuts {
  display: flex;
  justify-content: space-around;
}

.mine-order-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120rpx;
}

.mine-order-shortcut__icon-wrap {
  position: relative;
  width: 56rpx;
  height: 56rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mine-order-shortcut__badge {
  position: absolute;
  top: -8rpx;
  right: -16rpx;
  min-width: 32rpx;
  height: 32rpx;
  line-height: 32rpx;
  padding: 0 8rpx;
  font-size: 20rpx;
  color: #fff;
  text-align: center;
  background: #e53935;
  border-radius: 16rpx;
}

.mine-order-shortcut__label {
  margin-top: 12rpx;
  font-size: 24rpx;
  color: $morandi-text-secondary;
}

.mine-card {
  margin-bottom: 24rpx;
  padding: 8rpx 0;
  background: #fff;
  border-radius: 20rpx;
  box-shadow: 0 4rpx 20rpx rgba(74, 69, 66, 0.06);
}

.mine-card__title {
  padding: 20rpx 28rpx 8rpx;
  font-size: 24rpx;
  color: $morandi-text-muted;
}

.mine-menu-item {
  display: flex;
  align-items: center;
  padding: 28rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

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

.mine-menu-item__label {
  flex: 1;
  font-size: 30rpx;
  color: $morandi-text;
}

.mine-menu-badge {
  min-width: 32rpx;
  height: 32rpx;
  line-height: 32rpx;
  padding: 0 10rpx;
  margin-right: 8rpx;
  font-size: 20rpx;
  color: #fff;
  text-align: center;
  background: #e53935;
  border-radius: 16rpx;
}

.mine-guest {
  margin-bottom: 24rpx;
  overflow: hidden;
  background: #fff;
  border-radius: 20rpx;
  box-shadow: 0 4rpx 20rpx rgba(74, 69, 66, 0.06);
}

.mine-guest__hero {
  padding: 40rpx 32rpx 8rpx;
  text-align: center;
  background: linear-gradient(180deg, #ecfdf3 0%, #fff 100%);
}

.mine-guest__icon-ring {
  width: 120rpx;
  height: 120rpx;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%);
  box-shadow: 0 8rpx 24rpx rgba(46, 125, 50, 0.15);
}

.mine-guest__title {
  display: block;
  margin-top: 28rpx;
  font-size: 34rpx;
  font-weight: 600;
  color: $morandi-text;
}

.mine-guest__tip {
  display: block;
  margin-top: 12rpx;
  font-size: 26rpx;
  color: $morandi-text-muted;
  line-height: 1.5;
}

.mine-guest__btns {
  padding: 32rpx 32rpx 40rpx;
}

.mine-guest__btn-login {
  width: 100%;
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  box-shadow: 0 8rpx 20rpx rgba(46, 125, 50, 0.25);
}

.mine-guest__btn-login::after {
  border: none;
}

.mine-guest__register {
  margin-top: 24rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rpx;
}

.mine-guest__register-text {
  font-size: 26rpx;
  color: $morandi-text-muted;
}

.mine-guest__register-link {
  font-size: 26rpx;
  color: #2e7d32;
  font-weight: 600;
}

.mine-btn-primary {
  height: 88rpx;
  line-height: 88rpx;
  background: #2e7d32;
  color: #fff;
  font-size: 30rpx;
  border-radius: 44rpx;
  border: none;
}

.mine-btn-primary::after {
  border: none;
}

.mine-btn-outline {
  height: 80rpx;
  line-height: 80rpx;
  background: #fff;
  color: #2e7d32;
  font-size: 28rpx;
  border-radius: 40rpx;
  border: 1rpx solid #2e7d32;
}

.mine-logout {
  margin: 16rpx 24rpx 0;
}

/* 表单页通用 */
.form-page {
  height: calc(100vh - 100rpx);
  padding: 24rpx;
  padding-bottom: 160rpx;
  background: $morandi-bg-page;
  box-sizing: border-box;
}

.form-card {
  padding: 8rpx 24rpx;
  background: #fff;
  border-radius: 16rpx;
}

.form-row {
  display: flex;
  align-items: center;
  min-height: 96rpx;
  border-bottom: 1rpx solid #f5f5f5;
}

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

.form-row--col {
  flex-direction: column;
  align-items: stretch;
  padding: 20rpx 0;
}

.form-row__label {
  width: 200rpx;
  flex-shrink: 0;
  font-size: 28rpx;
  color: $morandi-text-secondary;
}

.form-row__label--req::before {
  content: '*';
  color: #d32f2f;
  margin-right: 4rpx;
}

.form-row__input {
  flex: 1;
  font-size: 28rpx;
  color: $morandi-text;
}

.form-row__readonly {
  flex: 1;
  font-size: 28rpx;
  color: $morandi-text-muted;
}

.form-row__picker {
  flex: 1;
  font-size: 28rpx;
  color: $morandi-text;
}

.form-row__placeholder {
  color: $morandi-text-soft;
}

.form-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24rpx 32rpx;
  padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.06);
}

.form-footer__btn {
  height: 88rpx;
  line-height: 88rpx;
  background: #2e7d32;
  color: #fff;
  font-size: 30rpx;
  border-radius: 44rpx;
  border: none;
}

.form-footer__btn[disabled] {
  opacity: 0.6;
}
