<view class="page">
  <view class="page-content">
    <view class="user-row">
      <view class="user-avatar">👤</view>
      <view class="user-info">
        <view class="user-name">{{userInfo.nickname || '未登录'}}</view>
        <view class="user-phone">{{userInfo.phone || ''}}</view>
      </view>
    </view>

    <view class="sub-card" wx:if="{{subscription && subscription.status === 'active' && subRemaining > 0}}">
      <view class="sub-left">
        <view class="sub-name">✨ 智能模式</view>
        <view class="sub-remain">剩余 {{subRemaining}}天</view>
      </view>
      <text class="status-badge status-badge-gold">使用中</text>
    </view>
    <view class="sub-card sub-card-inactive" wx:else bindtap="onViewSubscription">
      <view class="sub-left">
        <view class="sub-name">智能模式</view>
        <view class="sub-remain">未订阅</view>
      </view>
      <text class="status-badge" style="background:#eee;color:#999;">去订阅 ›</text>
    </view>

    <view class="menu-list">
      <view class="menu-item" bindtap="onManageDevice">
        <view class="menu-icon">📱</view>
        <view class="menu-text">我的设备</view>
        <text class="menu-device-status" wx:if="{{deviceCount > 0}}">已绑定</text>
        <text class="menu-device-status menu-device-unbound" wx:else>未绑定</text>
        <text class="menu-arrow">›</text>
      </view>
      <view class="menu-item" bindtap="onViewHistory">
        <view class="menu-icon">📋</view>
        <view class="menu-text">护理记录</view>
        <text class="menu-arrow">›</text>
      </view>
      <view class="menu-item" bindtap="onViewSubscription">
        <view class="menu-icon">💳</view>
        <view class="menu-text">订阅管理</view>
        <text class="menu-arrow">›</text>
      </view>
      <view class="menu-item" bindtap="onHelp">
        <view class="menu-icon">❓</view>
        <view class="menu-text">使用帮助</view>
        <text class="menu-arrow">›</text>
      </view>
      <view class="menu-item" bindtap="onContact">
        <view class="menu-icon">📞</view>
        <view class="menu-text">联系我们</view>
        <text class="menu-arrow">›</text>
      </view>
    </view>

    <view class="logout-btn" bindtap="onLogout">退出登录</view>
  </view>
</view>
